php version : 8.3
PHP_CodeSniffer version 3.10.1 (stable) by Squiz and PHPCSStandards
The installed coding standards are MySource, PEAR, PSR1, PSR2, PSR12, Squiz, Zend and PHPCompatibility
phpcs -p --standard=PHPCompatibility --runtime-set testVersion 8.1- ./app --report-file=report_all.xml
"packages-dev": [
{
"name": "phpcompatibility/php-compatibility",
"version": "9.3.5",
when i run this command : phpcs -p --standard=PHPCompatibility --runtime-set testVersion 8.1- ./app --report-file=report_all.xml
it occurs a error below:
.PHP Fatal error: Uncaught TypeError: vsprintf(): Argument #2 ($values) must be of type array, string given in /var/www/html/magento2/vendor/squizlabs/php_codesniffer/src/Files/File.php:1089
Stack trace:
#0 /var/www/html/magento2/vendor/squizlabs/php_codesniffer/src/Files/File.php(1089): vsprintf()
#1 /var/www/html/magento2/vendor/squizlabs/php_codesniffer/src/Files/File.php(735): PHP_CodeSniffer\Files\File->addMessage()
#2 /var/www/html/magento2/vendor/phpcompatibility/php-compatibility/PHPCompatibility/Sniffs/ParameterValues/RemovedIconvEncodingSniff.php(83): PHP_CodeSniffer\Files\File->addWarning()
#3 /var/www/html/magento2/vendor/phpcompatibility/php-compatibility/PHPCompatibility/AbstractFunctionCallParameterSniff.php(138): PHPCompatibility\Sniffs\ParameterValues\RemovedIconvEncodingSniff->processParameters()
#4 /var/www/html/magento2/vendor/squizlabs/php_codesniffer/src/Files/File.php(519): PHPCompatibility\AbstractFunctionCallParameterSniff->process()
#5 /var/www/html/magento2/vendor/squizlabs/php_codesniffer/src/Files/LocalFile.php(92): PHP_CodeSniffer\Files\File->process()
#6 /var/www/html/magento2/vendor/squizlabs/php_codesniffer/src/Runner.php(648): PHP_CodeSniffer\Files\LocalFile->process()
#7 /var/www/html/magento2/vendor/squizlabs/php_codesniffer/src/Runner.php(454): PHP_CodeSniffer\Runner->processFile()
#8 /var/www/html/magento2/vendor/squizlabs/php_codesniffer/src/Runner.php(120): PHP_CodeSniffer\Runner->run()
#9 /var/www/html/magento2/vendor/squizlabs/php_codesniffer/bin/phpcs(14): PHP_CodeSniffer\Runner->runPHPCS()
#10 /var/www/html/magento2/vendor/bin/phpcs(119): include('...')
#11 {main}
thrown in /var/www/html/magento2/vendor/squizlabs/php_codesniffer/src/Files/File.php on line 1089
