-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[ErrorHandler] DebugClassLoader reports bad static method should be implemented #35836
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
Labels
Comments
cool, that's the rule we missed implementing. Up for a PR @alekitto? (branch 4.4) |
alekitto
added a commit
to alekitto/symfony
that referenced
this issue
Feb 26, 2020
alekitto
added a commit
to alekitto/symfony
that referenced
this issue
Feb 26, 2020
nicolas-grekas
added a commit
that referenced
this issue
Feb 26, 2020
… method annotation (alekitto) This PR was merged into the 4.4 branch. Discussion ---------- [ErrorHandler] fix parsing static return type on interface method annotation | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #35836 | License | MIT As suggested in the issue, the regex has been adapted to capture the return type, then it will be checked while determining if the method to be implemented should be static or just returns an instance of `static`. Commits ------- 55734a2 [ErrorHandler] fix parsing static return type on interface method annotation (fix #35836)
fabpot
added a commit
that referenced
this issue
Feb 29, 2020
* 4.4: [Dotenv] Documentation improvement [DI] Clarified deprecation for TypedReference in 4.4 [Validator] Add missing vietnamese translations add German translation add missing Messenger options to XML schema definition [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc [DomCrawler][Form] Fix PHPDoc on get & offsetGet [ErrorHandler] fix parsing static return type on interface method annotation (fix #35836) prevent method calls on null values Return int if scale = 0
fabpot
added a commit
that referenced
this issue
Feb 29, 2020
* 5.0: [Dotenv] Documentation improvement [DI] Clarified deprecation for TypedReference in 4.4 [Validator] Add missing vietnamese translations add German translation add missing Messenger options to XML schema definition [5.0] Remove some unused variables [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc [DomCrawler][Form] Fix PHPDoc on get & offsetGet [ErrorHandler] fix parsing static return type on interface method annotation (fix #35836) prevent method calls on null values Return int if scale = 0
hultberg
pushed a commit
to hultberg/symfony
that referenced
this issue
Sep 17, 2021
* 4.4: [Dotenv] Documentation improvement [DI] Clarified deprecation for TypedReference in 4.4 [Validator] Add missing vietnamese translations add German translation add missing Messenger options to XML schema definition [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc [DomCrawler][Form] Fix PHPDoc on get & offsetGet [ErrorHandler] fix parsing static return type on interface method annotation (fix symfony#35836) prevent method calls on null values Return int if scale = 0
hultberg
pushed a commit
to hultberg/symfony
that referenced
this issue
Sep 17, 2021
* 5.0: [Dotenv] Documentation improvement [DI] Clarified deprecation for TypedReference in 4.4 [Validator] Add missing vietnamese translations add German translation add missing Messenger options to XML schema definition [5.0] Remove some unused variables [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc [DomCrawler][Form] Fix PHPDoc on get & offsetGet [ErrorHandler] fix parsing static return type on interface method annotation (fix symfony#35836) prevent method calls on null values Return int if scale = 0
PhilETaylor
pushed a commit
to PhilETaylor/symfony
that referenced
this issue
Sep 6, 2023
PhilETaylor
pushed a commit
to PhilETaylor/symfony
that referenced
this issue
Sep 6, 2023
* 4.4: [Dotenv] Documentation improvement [DI] Clarified deprecation for TypedReference in 4.4 [Validator] Add missing vietnamese translations add German translation add missing Messenger options to XML schema definition [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc [DomCrawler][Form] Fix PHPDoc on get & offsetGet [ErrorHandler] fix parsing static return type on interface method annotation (fix symfony#35836) prevent method calls on null values Return int if scale = 0
PhilETaylor
pushed a commit
to PhilETaylor/symfony
that referenced
this issue
Sep 6, 2023
* 5.0: [Dotenv] Documentation improvement [DI] Clarified deprecation for TypedReference in 4.4 [Validator] Add missing vietnamese translations add German translation add missing Messenger options to XML schema definition [5.0] Remove some unused variables [Validator][ConstraintValidator] Update wrong PRETTY_DATE doc [DomCrawler][Form] Fix PHPDoc on get & offsetGet [ErrorHandler] fix parsing static return type on interface method annotation (fix symfony#35836) prevent method calls on null values Return int if scale = 0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Symfony version(s) affected: 5.0.4
Description
If a
@method
annotation withstatic
return type is present on an interface, theDebugClassLoader
reportsClass Foo should implement method static FooInterface::method().
As per phpDocumentor method tag if a method is static the return type is mandatory. This implies that
should be parsed as non-static method with
static
return type, but now is parsed as static untyped method.Possible Solution
The
@method
parse regex on DebugClassLoader.php:L430 should capture return type and check it while determining if a method should be static or not.The text was updated successfully, but these errors were encountered: