Skip to content
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

Explicitly specify with phpdoc return types from interface #261

Merged

Conversation

andrew-demb
Copy link
Contributor

It allows avoiding deprecation messages from symfony/error-handler like a

[info] User Deprecated: Method "Psr\Http\Message\ServerRequestInterface::withParsedBody()" might add "static" as a native return type declaration in the future. Do the same in implementation "Slim\Psr7\Request" now to avoid errors or add an explicit @return annotation to suppress this message.

Fixed via symfony/error-handler patch script: SYMFONY_PATCH_TYPE_DECLARATIONS="force=phpdoc&php=7.4" ./vendor/bin/patch-type-declarations

Some details about why this is necessary and how checks with trigger deprecations work: https://wouterj.nl/2021/09/symfony-6-native-typing

It allows avoiding deprecation messages from `symfony/error-handler` like a '[info] User Deprecated: Method "Psr\Http\Message\ServerRequestInterface::withParsedBody()" might add "static" as a native return type declaration in the future. Do the same in implementation "Slim\Psr7\Request" now to avoid errors or add an explicit @return annotation to suppress this message.'

Fixed via `symfony/error-handler` patch script: `SYMFONY_PATCH_TYPE_DECLARATIONS="force=phpdoc&php=7.4" ./vendor/bin/patch-type-declarations`

Some details about why this is necessary and how checks with trigger deprecations work: https://wouterj.nl/2021/09/symfony-6-native-typing
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 956b766 on andrew-demb:symfony-error-handler-deprecations into 9387321 on slimphp:master.

@l0gicgate l0gicgate added this to the 1.6 milestone Apr 14, 2022
@l0gicgate l0gicgate merged commit 1726c66 into slimphp:master Apr 14, 2022
@andrew-demb andrew-demb deleted the symfony-error-handler-deprecations branch April 14, 2022 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants