-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Add support of PHP8 static return type for withers #36636
New issue
8000Have 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
Add support of PHP8 static return type for withers #36636
Conversation
edited
Q | A |
---|---|
Branch? | master |
Bug fix? | no |
New feature? | yes |
Deprecations? | no |
Tickets | https://github.com/orgs/symfony/projects/1#card-35852557 |
License | MIT |
Doc PR | symfony/symfony-docs#13619 |
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.
Actually, I just realized the check should also verify that @return $this
is NOT present.
We really miss the $this
return type, which would provide much better clarity and would save us many annotations.
With the current state, we'll still have to use docblocks to help differentiate those two situations.
/cc @nikic FYI, in case this can be considered for PHP v8
src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredMethodsPass.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Compiler/AutowireRequiredMethodsPass.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowireRequiredMethodsPassTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes_8.php
Outdated
Show resolved
Hide resolved
ab722c1
to
d586092
Compare
Updated 🙂 |
d586092
to
345a294
Compare
I still have a problem on travis 7.2/php_extra=7.4, my check on PHP_VERSION_ID seems not working on this environment 🤔 Do I miss something specific to this environment ? |
You need to list the new file in |
src/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php
Outdated
Show resolved
Hide resolved
28cd280
to
6cea5da
Compare
6cea5da
to
04fdf05
Compare
Updated 🙂 |
Thank you @l-vo. |