-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
PHPCSUtils Breaks With Deprecation Notice ~~Because of Itself~~ #380
Comments
@timnolte How did you manage that ? I've just tried and confirmed, but if you require-dev PHPCompatibility at Could it be that you have a root requirement for PHPCSUtils in your project set to Test config I used: {
"name" : "foo/bar",
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"require-dev" : {
"phpcompatibility/php-compatibility": "dev-develop"
},
"minimum-stability": "dev",
"prefer-stable": true
} |
Do to additional library requirements such as The short of it is that this all goes back to the need to require PHP 8.0 and run as many PHP 8.0 compatibility tests that are available. Unfortunately, the PHPCS libraries are all behind in regards to the fact that PHp 7.4 will EOL for security updates next month which posts widespread security risks. |
@timnolte In that case, I can only suggest you run PHPCS with PHP This should only be needed for the next few days until PHPCSUtils You can do this either by changing the value in the phpcs -d error_reporting="E_ALL&~E_DEPRECATED" If you have a script in place in your "scripts": {
"check-cs": [
"@php ./vendor/squizlabs/php_codesniffer/bin/phpcs -d error_reporting=\"E_ALL&~E_DEPRECATED\""
]
} ❗ I understand you fixed PHPCSUtils to
Regarding the title of this issue. No, PHPCSUtils doesn't break because of itself. PHPCSUtils itself runs cleanly, but PHPCompatibility uses a few of the deprecated utilities and PHPCS doesn't show a backtrace, but only the top-level error message when it encounters any type of error, which is why it gives the impression that the deprecations come from PHPCSUtils itself, while in reality it is because PHPCompatibility does not allow for alpha4 yet (and rightfully so as it hasn't been tagged yet).
I'm well aware of that and various PHPCS libraries lagging behind is largely due to the HUGE amount of syntax changes PHP has been introducing since PHP 7.4 and there only being 24 hours in a day. All I can say is that the changes which have been made recently in PHPCSUtils will allow for (finally) getting PHPCompatibility (and some other libraries) to a release soonish, so bear with me. |
@timnolte Just checking - did my suggestion work for you ? |
I'm going to close this issue now.
Running |
@jrfnl sorry I didn't get back to you but since some of this came up again, as you rightly pointed out it would, I have updated the Composer dependencies to use |
@timnolte Glad to hear it all worked out now. If you've updated to Utils Having said that, if you have the deprecation ignoring in the PHPCS command itself (like via the One side-note on that: I'm aware of one PHP 8.2 deprecation still existing in PHPCS itself - a PR to solve that is open, but would/will in part remove a previously supported feature, which is why it has been earmarked for the next minor. |
Getting the following error when attempting to use the
develop
branch due to the requirements needed to use the 'develop' branch of PHPCompatibility in order to scan for PHP 8.0 compatibility.The PHPCSUtils\Tokens\Collections::functionDeclarationTokensBC() method is deprecated since PHPCSUtils 1.0.0-alpha4. Use the PHPCSUtils\Tokens\Collections::functionDeclarationTokens() method instead. in vendor/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/Collections.php on line 719 (Internal.Exception)
This is breaking all uses of PHPCS. I was able to lock in to the tagged
1.0.0-alpha3
version and it did resolve the issue for now.The text was updated successfully, but these errors were encountered: