-
-
Notifications
You must be signed in to change notification settings - Fork 687
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
PHP 8.1 notices #7430
Comments
Could you narrow it down to specific rules and the code that cause it? For multiple rules applied, you can create failing test case PR to You can copy and modify on of the tests |
This has to be solved in the project themselves. We only use those here :) |
The |
Thanks, I reported both. 3 line rector.php for confirming this issue: return static function (\Rector\Config\RectorConfig $rectorConfig): void {
$rectorConfig->rule(\Rector\CodeQuality\Rector\Include_\AbsolutizeRequireAndIncludePathRector::class);
}; |
So is in Rector: https://github.com/rectorphp/rector/blob/main/vendor/symfony/console/Command/DumpCompletionCommand.php#L25 But Symfony checks the static property that is being downgraded to PHP 7.2. That's side effect of downgrade. What can we do about it here? |
It is :). The deprecation on framework side is false positive here. |
@kkmuffme How does it change if you comment this line in your local Rector vendor?
We do not really need to bubble up Symfony deprecations to Rector release, so removing this function seems the way to go. |
@TomasVotruba yes, then that notice is gone for symfony. === phpstan notice: === There are 2 phpstan.phar in rector, is this on purpose? |
Could you create a new issue with the Symfony notice only? To keep it clean |
@TomasVotruba if you want to support PHP 7.2, why not using the Symfony 5.4 LTS which supports PHP 7.2 and so does not deprecate features that are necessary when using PHP 8- due to not being able to use attributes ? |
@TomasVotruba phpstan issue is also fixed: Does rector use a custom error handler that picks this up despite snoozed/@ ? (or is this something in my PHP setup?) |
@stof Because we run on Symfony 6 with most of the deps already. It's easier for us to the use latest deps in general. The downgrade should work propperly in general, not just for Rector. If someone uses Rector to downgrade their Symfony 6 project, it should be allright. |
@kkmuffme > There are 2 phpstan.phar in rector, is this on purpose? The |
@TomasVotruba #7430 (comment) What's your suggestion?
😁 |
@kkmuffme I'd try to debug the error handler, why it passed your notices :) They seem skipped: https://github.com/rectorphp/rector-src/blob/58a577c5b3d34cc70ba6ea713e7a6c7bbe66354e/src/Application/ApplicationFileProcessor.php#L183 |
Bug Report
Minimal PHP Code Causing Issue
There may be more, I just grabbed the first I saw. Since they are in dependencies inside of rector I thought I report it here then upstream
The text was updated successfully, but these errors were encountered: