Skip to content

Explicitly specify with phpdoc return types from interface#261

Merged
l0gicgate merged 1 commit intoslimphp:masterfrom
andrew-demb:symfony-error-handler-deprecations
Apr 14, 2022
Merged

Explicitly specify with phpdoc return types from interface#261
l0gicgate merged 1 commit intoslimphp:masterfrom
andrew-demb:symfony-error-handler-deprecations

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