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

[DX] Avoid reporting deprecated errors #1577

Merged
merged 4 commits into from
Dec 27, 2021
Merged

Conversation

TomasVotruba
Copy link
Member

No description provided.

TomasVotruba and others added 2 commits December 27, 2021 16:22
Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
Copy link
Member

@samsonasik samsonasik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I verified with check code:

@mkdir('test');
@mkdir('test');

and with the change :

if ((error_reporting() & $code) === 0) {

it run ok, only check error_reporting() will end up getting error:

 [ERROR] Could not process "/Users/samsonasik/www/rector-src/src/Application/FileProcessor.php" file, due to:           
         "mkdir(): File exists". On line: 26     

@samsonasik
Copy link
Member

I created PR to PHPStan for it sync phpstan/phpstan-src#889

@samsonasik
Copy link
Member

samsonasik commented Dec 27, 2021

@TomasVotruba
Copy link
Member Author

Thank you 👍

@TomasVotruba TomasVotruba merged commit 4e7fc94 into main Dec 27, 2021
@TomasVotruba TomasVotruba deleted the tv-skip-deprecate-report branch December 27, 2021 17:12
@samsonasik
Copy link
Member

@TomasVotruba it possibly cause error on downgrade, ref https://github.com/rectorphp/rector-src/runs/4643749917?check_suite_focus=true#step:9:9039

 [ERROR] Could not process                                                      
         "phar:///home/runner/work/rector-src/rector-src/vendor/phpstan/phpstan/
         phpstan.phar/src/Type/Constant/ConstantStringType.php" file, due to:   
         "Uninitialized string offset -1". On line: 222                

Previously, the Uninitialized string offset -1 is skipped, ref https://github.com/rectorphp/rector-src/runs/4643702959?check_suite_focus=true#step:9:5208

It seems E_WARNING needs to be added, I will check.

@samsonasik
Copy link
Member

I created PR #1579 to try fix on stopped by Uninitialized string offset -1 on downgrade

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants