-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[5.0] replace return-type annotations by real type declarations on final classes #31981
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
Comments
I would be glad to work on this, except if you think this task is more for a person with deep knowledge of the Sf code. |
Please give it a try, we're here to help! |
👍 |
Yes! |
5 tasks
Tobion
added a commit
that referenced
this issue
Jun 23, 2019
This PR was merged into the 5.0-dev branch. Discussion ---------- [5.0] Add return types in final classes | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes/no <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | no | Deprecations? | no | Tests pass? | no | Fixed tickets | #31981 | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> This is the first step for the issue #31981 I have some questions: - ~I have not added type for methods with `@inheritdoc` annotation, should I?~ - ~Don't we want to type also functions without `@return` annotation? (still in `final` classes)~ - ~If yes is the answer of the previous one, do we also want the `void` return type?~ - ~I have also added the return type in the `DependencyInjection` PhpDumper, but is it also wanted? (if yes, I will clean a bit the code changed)~ - ~Should we update the documentation's code samples when they display `final` classes?~ Todo: - [x] Adjust the PR, following the answers of the questions - [x] Add return type also when there is no `@return`, or with `@inheritdoc` - [x] [src/Symfony/Component/Debug/ErrorHandler.php#L383](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Debug/ErrorHandler.php#L383) `@return` annotation is not correct according to the return, investigate and adjust if needed - [x] [src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php#L50](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php#L50) `@return` annotation is not correct according to the return, investigate and adjust if needed - [x] Do a PR on documentation to add return type on code snippets with final classes => unneeded as they were already typed Commits ------- ca5ae19 Replace @return annotation by return type in final classes
hultberg
pushed a commit
to hultberg/symfony
that referenced
this issue
Sep 17, 2021
This PR was merged into the 5.0-dev branch. Discussion ---------- [5.0] Add return types in final classes | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes/no <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | no | Deprecations? | no | Tests pass? | no | Fixed tickets | symfony#31981 | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> This is the first step for the issue symfony#31981 I have some questions: - ~I have not added type for methods with `@inheritdoc` annotation, should I?~ - ~Don't we want to type also functions without `@return` annotation? (still in `final` classes)~ - ~If yes is the answer of the previous one, do we also want the `void` return type?~ - ~I have also added the return type in the `DependencyInjection` PhpDumper, but is it also wanted? (if yes, I will clean a bit the code changed)~ - ~Should we update the documentation's code samples when they display `final` classes?~ Todo: - [x] Adjust the PR, following the answers of the questions - [x] Add return type also when there is no `@return`, or with `@inheritdoc` - [x] [src/Symfony/Component/Debug/ErrorHandler.php#L383](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Debug/ErrorHandler.php#L383) `@return` annotation is not correct according to the return, investigate and adjust if needed - [x] [src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php#L50](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/ControllerMetadata/ArgumentMetadataFactory.php#L50) `@return` annotation is not correct according to the return, investigate and adjust if needed - [x] Do a PR on documentation to add return type on code snippets with final classes => unneeded as they were already typed Commits ------- ca5ae19 Replace @return annotation by return type in final classes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For master only, PR welcome.
The text was updated successfully, but these errors were encountered: