phpcs-psr4-sniff icon indicating copy to clipboard operation
phpcs-psr4-sniff copied to clipboard

Use {$var} instead of ${var}

Open GOD-oda opened this issue 2 years ago • 3 comments

背景

php8.2${var}による文字列への埋め込みが非推奨になった

php8.2環境で、phpcs-psr4-sniffをインストールしphpcsを実行した結果

----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 1 | ERROR | An error occurred during processing; checking has been
   |       | aborted. The error message was: Using ${var} in strings
   |       | is deprecated, use {$var} instead in
   |       | /deploy/vendor/suin/phpcs-psr4-sniff/src/Suin/Sniffs/Classes/PSR4/AutoloadabilityInspectorsFactory.php
   |       | on line 85 (Internal.Exception)
----------------------------------------------------------------------

Time: 3.27 secs; Memory: 26MB

Script ./vendor/bin/phpcs handling the phpcs event returned with error code 1

GOD-oda avatar Feb 01 '23 06:02 GOD-oda