Move to PHP8.0 syntax in Components#13502
Merged
lchrusciel merged 3 commits intoSylius:1.11from Jan 19, 2022
Merged
Conversation
Contributor
|
Do you really think that promoted properties improve readability ? |
Member
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
approved these changes
Jan 18, 2022
Contributor
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
src/Sylius/Component/Core/OrderProcessing/OrderTaxesProcessor.php
Outdated
Show resolved
Hide resolved
src/Sylius/Component/Core/OrderProcessing/OrderPaymentProcessor.php
Outdated
Show resolved
Hide resolved
lchrusciel
reviewed
Jan 19, 2022
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
lchrusciel
approved these changes
Jan 19, 2022
Contributor
|
Thank you, Mateusz! 🎉 |
|
|
||
| return static function (ContainerConfigurator $containerConfigurator): void | ||
| { | ||
| $containerConfigurator->import(SetList::PHP_80); |
Contributor
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
Contributor
lchrusciel
added a commit
that referenced
this pull request
Feb 4, 2022
…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
Zales0123
referenced
this pull request
Jun 24, 2022
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

We can finally do that 🚀 ❤️