You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warnings about deprecated features or removed obsolete functionnalities of PHP code seem to be not reported with php_codesniffer 3.9 using standard PHPCompatibilty on target PHP 8.3.
None warning is reported in the log file by the following command :
phpcs "C:\path_to_PHP_code" -d memory_limit=1G --extensions=php --standard=PHPCompatibility --runtime-set testVersion 8.3 --report-file=phpcs.log
N.B.:
I don't know that it is a bug or not, I am simply submitting here what I have encountered while checking my PHP code for compatibility with PHP 8.3.
PHPCS output here
None error displayed (the command executed normally), but none warning of deprecated code in the report file phpcs.log
Expected behavior
The following lines of message ought to be written in the report file phpcs.log :
FILE: test.php
FOUND 0 ERRORS AND 1 WARNINGS AFFECTING 1 LINE
4 | WARNING | Usage of ldap_connect with two arguments is deprecated
Versions (please complete the following information)
| Operating System | PHP version | PHP_CodeSniffer version | Standard | Install type |
| Windows 10 | 8.3 | 3.9.0 | MySource, PEAR, PSR1, PSR2, PSR12, Squiz, Zend and PHPCompatibility (given by phpcs -i) | Composer (global) |
Additional context
When testing PHP code written in PHP 7.4 using PHP_CodeSniffer 2.7 with PHPCompatibility on target PHP 8.1, the problem was not encountered: warnings on deprecated code PHP 7.4 were well reported
Please confirm:
I have searched the issue list and am not opening a duplicate issue.
The text was updated successfully, but these errors were encountered:
Describe the bug
Warnings about deprecated features or removed obsolete functionnalities of PHP code seem to be not reported with php_codesniffer 3.9 using standard PHPCompatibilty on target PHP 8.3.
None warning is reported in the log file by the following command :
phpcs "C:\path_to_PHP_code" -d memory_limit=1G --extensions=php --standard=PHPCompatibility --runtime-set testVersion 8.3 --report-file=phpcs.log
N.B.:
I don't know that it is a bug or not, I am simply submitting here what I have encountered while checking my PHP code for compatibility with PHP 8.3.
Code sample
...
$ldapHost = "ldap://annuaire.sesam-vitale.fr";
$ldapPort = 389;
$ds = ldap_connect($ldapHost,$ldapPort);
...
Custom ruleset
None custom ruleset used
To reproduce
Steps to reproduce the behavior:
test.php
with the code sample above...phpcs test.php -d memory_limit=1G --extensions=php --standard=PHPCompatibility --runtime-set testVersion 8.3 --report-file=phpcs.log
PHPCS output here
None error displayed (the command executed normally), but none warning of deprecated code in the report file phpcs.log
Expected behavior
The following lines of message ought to be written in the report file phpcs.log :
FILE: test.php
FOUND 0 ERRORS AND 1 WARNINGS AFFECTING 1 LINE
Versions (please complete the following information)
| Operating System | PHP version | PHP_CodeSniffer version | Standard | Install type |
| Windows 10 | 8.3 | 3.9.0 | MySource, PEAR, PSR1, PSR2, PSR12, Squiz, Zend and PHPCompatibility (given by phpcs -i) | Composer (global) |
Additional context
When testing PHP code written in PHP 7.4 using PHP_CodeSniffer 2.7 with PHPCompatibility on target PHP 8.1, the problem was not encountered: warnings on deprecated code PHP 7.4 were well reported
Please confirm:
The text was updated successfully, but these errors were encountered: