Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Routing] Remove variadic constructor signature#46157
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
chalasr commentedApr 25, 2022
Can you check if the build failure is related? |
wouterj commentedApr 25, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Fixed fabbot, the CI test failures are caused by changes in PHP 8.2 upstream. You can see the same errors in e.g.https://github.com/symfony/symfony/runs/6146660539 Btw, let's mark PHP 8.2 tests as experimental again:#46160 |
Uh oh!
There was an error while loading.Please reload this page.
nicolas-grekas commentedApr 25, 2022
The benefit of using variadic was the type check enforced by PHP. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Component/Routing/Tests/Requirement/EnumRequirementTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
fancyweb commentedApr 27, 2022
👍 or 👎? |
wouterj commentedApr 27, 2022
👍 for |
fancyweb commentedApr 27, 2022
It's actually |
Uh oh!
There was an error while loading.Please reload this page.
da295d9 to0fdaaa8Compare
nicolas-grekas left a comment
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 updated the PR to my proposal)
0fdaaa8 to2183052Compare2183052 to49644c6Comparefabpot commentedApr 27, 2022
Thank you@wouterj. |
| * @var string[] | ||
| */ | ||
| privatereadonlyarray$values; | ||
| privatestring$requirement; |
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.
@nicolas-grekas Why did you remove the readonly?
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.
Not intentional! (But read-only on private is not useful either so 🤷♂️ 😆)
Uh oh!
There was an error while loading.Please reload this page.
Just a little suggestion, based on today's "New in Symfony" blogpost.
Subjective argument: the variadic signature felt a bit weird, as argument 1 has a different meaning than 2+ (but they look very similar due to PHP's
::class"magic constant")Objective argument: variadic signature is harder with BC layers when we want to add another argument. Personally, I feel like we have to be careful about using variadic signatures in Symfony.