-
-
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
PHP 8.0 syntax in bundles (without CoreBundle and ApiBundle) #13562
Conversation
Zales0123
commented
Jan 28, 2022
Q | A |
---|---|
Branch? | 1.11 |
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Related tickets | continuation of #13502 |
License | MIT |
@@ -47,7 +41,7 @@ public function validate($value, Constraint $constraint): void | |||
$propertyPath = $this->context->getPropertyPath(); | |||
|
|||
foreach (iterator_to_array($this->context->getViolations()) as $violation) { | |||
if (0 === strpos($violation->getPropertyPath(), $propertyPath)) { | |||
if (str_starts_with($violation->getPropertyPath(), $propertyPath)) { |
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.
OH MY GOD it feels so good ❤️
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.
Yes, I agree, this is a great one.
242fe71
to
f08ca1c
Compare
f08ca1c
to
2def894
Compare
src/Sylius/Bundle/AdminBundle/Controller/Dashboard/StatisticsController.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/AdminBundle/Controller/DashboardController.php
Outdated
Show resolved
Hide resolved
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 | extracted from #13562 for better readability | License | MIT Commits ------- b21b626 PHP 8 syntax in bundles vol.3 8b42dbd CS fixes
src/Sylius/Bundle/AdminBundle/Controller/Dashboard/StatisticsController.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/AdminBundle/Controller/CustomerStatisticsController.php
Outdated
Show resolved
Hide resolved
8437ecf
to
c4e7e4b
Compare
UserProviderInterface $userProvider, | ||
private UserImpersonatorInterface $impersonator, | ||
private AuthorizationCheckerInterface $authorizationChecker, | ||
private UserProviderInterface $userProvider, | ||
?RouterInterface $router, |
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.
?RouterInterface $router, | |
private ?RouterInterface $router, |
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.
But to be honest, we should rework this argument, to be able to replace logic with the new one
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.
Interesting idea, we can elaborate over it in the separate PR 🖖
private ?RouterInterface $router; | ||
|
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.
private ?RouterInterface $router; |
|
||
$this->impersonator = $impersonator; | ||
$this->authorizationChecker = $authorizationChecker; | ||
$this->userProvider = $userProvider; | ||
$this->router = $router; |
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.
$this->router = $router; |
src/Sylius/Bundle/LocaleBundle/Templating/Helper/LocaleHelper.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/LocaleBundle/Templating/Helper/LocaleHelper.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/LocaleBundle/Templating/Helper/LocaleHelper.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ShopBundle/Controller/SecurityWidgetController.php
Outdated
Show resolved
Hide resolved
src/Sylius/Bundle/ShopBundle/Controller/SecurityWidgetController.php
Outdated
Show resolved
Hide resolved
c4e7e4b
to
9e395ac
Compare
9e395ac
to
ced91b9
Compare
Thank you, Mateusz! 🥇 |
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 | extracted from #13562 for better readability | License | MIT Commits ------- 128117c PHP 8 syntax in bundles vol.2 e52f894 Line length fixes 160361f Small CS fixes