-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
src/Sylius/Component/Core/OrderProcessing/OrderTaxesProcessor.php
Outdated
Show resolved
Hide resolved
src/Sylius/Component/Core/OrderProcessing/OrderPaymentProcessor.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few more places
src/Sylius/Component/Core/Taxation/Applicator/OrderItemUnitsTaxesApplicator.php
Outdated
Show resolved
Hide resolved
src/Sylius/Component/Core/Locale/Context/StorageBasedLocaleContext.php
Outdated
Show resolved
Hide resolved
src/Sylius/Component/Core/Payment/Provider/OrderPaymentProvider.php
Outdated
Show resolved
Hide resolved
src/Sylius/Component/Core/Test/Services/DefaultUnitedStatesChannelFactory.php
Outdated
Show resolved
Hide resolved
src/Sylius/Component/Promotion/Generator/PromotionCouponGenerator.php
Outdated
Show resolved
Hide resolved
src/Sylius/Component/Promotion/Processor/PromotionProcessor.php
Outdated
Show resolved
Hide resolved
src/Sylius/Component/Shipping/Resolver/ShippingMethodsResolver.php
Outdated
Show resolved
Hide resolved
516401c
to
6c680aa
Compare
Thank you, Mateusz! 🎉 |
@@ -10,6 +10,8 @@ | |||
|
|||
return static function (ContainerConfigurator $containerConfigurator): void | |||
{ | |||
$containerConfigurator->import(SetList::PHP_80); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 #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 🚀 ❤️