rector icon indicating copy to clipboard operation
rector copied to clipboard

PHP 8.1 Symfony notice

Open kkmuffme opened this issue 3 years ago • 2 comments

Since symfony/console 6.1: Relying on the static property $defaultName for setting a command name is deprecated. Add the RectorPrefix202208/Symfony/Component/Console/Attribute/AsCommand attribute to the RectorPrefix202208/Symfony/Component/Console/Command/DumpCompletionCommand class instead.
File: .../vendor/rector/rector/vendor/symfony/contracts/Deprecation/function.php on line 26
Since symfony/console 6.1: Relying on the static property $defaultDescription for setting a command description is deprecated. Add the RectorPrefix202208/Symfony/Component/Console/Attribute/AsCommand attribute to the RectorPrefix202208/Symfony/Component/Console/Command/DumpCompletionCommand class instead.
File: .../vendor/rector/rector/vendor/symfony/contracts/Deprecation/function.php on line 26

See https://github.com/rectorphp/rector/issues/7430#issuecomment-1229921696

kkmuffme avatar Aug 29 '22 19:08 kkmuffme

The goal of new issue is not to jump back and forth :) Now it's unclear if/where the discussion goes.

Could you form an issolated issue with exact steps to solve?

TomasVotruba avatar Aug 29 '22 19:08 TomasVotruba

https://github.com/rectorphp/rector/blob/1d28ca109ca536e8034c3c756ee61c65e6e63c8a/vendor/symfony/contracts/Deprecation/function.php#L26

We do not really need to bubble up Symfony deprecations to Rector release, so removing this function seems the way to go.

Comment this line/empty this function will fix (= ignore) this issue.

kkmuffme avatar Aug 29 '22 19:08 kkmuffme

Fixed in https://github.com/rectorphp/rector/commit/19fe61ce3e920eeb2fec6d2c3704814866592649

TomasVotruba avatar Oct 13 '22 02:10 TomasVotruba