Skip to content

Take advantage of PHP 5.4+ short echo#2585

Merged
Alkarex merged 3 commits intoFreshRSS:devfrom
Alkarex:php5.4_short_echo
Oct 23, 2019
Merged

Take advantage of PHP 5.4+ short echo#2585
Alkarex merged 3 commits intoFreshRSS:devfrom
Alkarex:php5.4_short_echo

Conversation

@Alkarex
Copy link
Copy Markdown
Member

@Alkarex Alkarex commented Oct 22, 2019

https://php.net/migration54.new-features thanks to #2495

Use <?= $x ?> instead of <?php echo $x; ?>
10kB of code saved :-)

Done with regular expression:

<\?php echo (.+?);? *\?>
<?= \1 ?>

https://php.net/migration54.new-features thanks to
FreshRSS#2495

Use `<?=  ?>` instead of `<?php echo; ?>`
10kB of code saved :-)

Done with regular expression:
```
<\?php echo (.+?);? *\?>
<?= \1 ?>
```
@Alkarex Alkarex added this to the 1.15.0 milestone Oct 22, 2019
@Alkarex
Copy link
Copy Markdown
Member Author

Alkarex commented Oct 22, 2019

Arg, that will need to be explained to Travis. Could you please have a look @Frenzie ?

@Alkarex Alkarex requested a review from Frenzie October 22, 2019 23:07
@Frenzie
Copy link
Copy Markdown
Member

Frenzie commented Oct 23, 2019

Can't test atm but I figure just removing this line should do the trick.

<rule ref="Generic.PHP.DisallowShortOpenTag" />

@marienfressinaud
Copy link
Copy Markdown
Member

Nice, that's something I wanted from a long time :) Did you use sed to automate the change in all files?

@Alkarex
Copy link
Copy Markdown
Member Author

Alkarex commented Oct 23, 2019

Yes

@Alkarex
Copy link
Copy Markdown
Member Author

Alkarex commented Oct 23, 2019

Travis fixed 299bc7d

@Alkarex Alkarex merged commit 7a5236d into FreshRSS:dev Oct 23, 2019
@Alkarex Alkarex deleted the php5.4_short_echo branch October 23, 2019 09:18
@Alkarex Alkarex mentioned this pull request Oct 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants