Move to PHP8.0 syntax in Components#13502
Conversation
|
Do you really think that promoted properties improve readability ? |
Less code is good, I'm in favor of that great PHP 8 feature. I was wondering if we should already use it on Sylius technical packages. |
lchrusciel
left a comment
There was a problem hiding this comment.
I'm in favour. I would say, that readability may be subjective and for sure, I'm not yet used to the new syntax. But for sure it is one place less when someone may do mistake
516401c to
6c680aa
Compare
|
Thank you, Mateusz! 🎉 |
|
|
||
| return static function (ContainerConfigurator $containerConfigurator): void | ||
| { | ||
| $containerConfigurator->import(SetList::PHP_80); |
There was a problem hiding this comment.
Tip for easier maintenance of PHP version. There is now "up to" one liner: https://getrector.org/blog/new-in-rector-012-the-latest-php-in-a-single-import
…Bundle) (Zales0123) This PR was merged into the 1.11 branch. Discussion ---------- | Q | A | --------------- | ----- | Branch? | 1.11 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | continuation of #13502 | License | MIT Commits ------- 50ac49c PHP 8 syntax in bundles #1 489c163 Fix line length issues ced91b9 Typehint templating engines properly
This PR was merged into the 1.11 branch. Discussion ---------- | Q | A | |-----------------|--------------------------------------------------------------| | Branch? | 1.11 | | Bug fix? | no | | New feature? | no | | BC breaks? | no | | Deprecations? | no | | Related tickets | based on #14038, continuation of https://github.com/Sylius/Sylius/pull/13502| | License | MIT | I've included here also [the PR](#13970) as it has been removed only from master, and now it was making the build failed on this PR <!-- - Bug fixes must be submitted against the 1.10 or 1.11 branch(the lowest possible) - Features and deprecations must be submitted against the master branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html --> Commits ------- 3acaac2 [Behat] Introduce PHP 8.0 syntax cb6d604 [Behat] Fix CS after introducing PHP 8.0 syntax 204e6d5 [Behat] Fix arguments order

We can finally do that 🚀 ❤️