PHP8.2 incompatibilities
In PHP8.2, dollar brace string interpolation is deprecated. For the RFC see https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation Thus php-ml is triggering E_DEPRECATED errors. Unfortunately due to #11 I cannot fix this myself, but quoting the git version of [PHPCompatibility scanner](https://github.com/PHPCompatibility/PHPCompatibility): ``` hans@DESKTOP-EE15SLU:~/projects/PHPCompatibility$ ./vendor/bin/phpcs -p ../php-ml --standard=PHPCompatibility ............................................................ 60 / 241 (25%) ..........................................W...W.......W..... 120 / 241 (50%) ............................................................ 180 / 241 (75%) ..........W.....................W..........................W 240 / 241 (100%) W 241 / 241 (100%) FILE: /php-ml/src/Classification/DecisionTree.php ----------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES ----------------------------------------------------------------------------------------------------------- 389 | WARNING | Using ${var} in strings is deprecated since PHP 8.2, use {$var} instead. Found: ${median} 391 | WARNING | Using ${var} in strings is deprecated since PHP 8.2, use {$var} instead. Found: ${median} ----------------------------------------------------------------------------------------------------------- FILE: /php-ml/src/Classification/Linear/DecisionStump.php -------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE -------------------------------------------------------------------------------------------------------- 90 | WARNING | Using ${var} in strings is deprecated since PHP 8.2, use {$var} instead. Found: ${this} 90 | WARNING | Using ${var} in strings is deprecated since PHP 8.2, use {$var} instead. Found: ${this} 90 | WARNING | Using ${var} in strings is deprecated since PHP 8.2, use {$var} instead. Found: ${this} -------------------------------------------------------------------------------------------------------- FILE: /php-ml/src/Classification/DecisionTree/DecisionTreeLeaf.php ---------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 4 LINES ---------------------------------------------------------------------------------------------------------- 125 | WARNING | Using ${var} in strings is deprecated since PHP 8.2, use {$var} instead. Found: ${this} 135 | WARNING | Using ${var} in strings is deprecated since PHP 8.2, use {$var} instead. Found: ${value} 138 | WARNING | Using ${var} in strings is deprecated since PHP 8.2, use {$var} instead. Found: ${col} 138 | WARNING | Using ${var} in strings is deprecated since PHP 8.2, use {$var} instead. Found: ${value} 141 | WARNING | Using ${var} in strings is deprecated since PHP 8.2, use {$var} instead. Found: ${value} ---------------------------------------------------------------------------------------------------------- FILE: /php-ml/src/FeatureExtraction/StopWords.php ------------------------------------------------------------------------------------------------------------ FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------ 28 | WARNING | Using ${var} in strings is deprecated since PHP 8.2, use {$var} instead. Found: ${language} ------------------------------------------------------------------------------------------------------------ FILE: /php-ml/src/Helper/OneVsRest.php ---------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------------------------------------------- 160 | WARNING | Using ${var} in strings is deprecated since PHP 8.2, use {$var} instead. Found: ${label} ---------------------------------------------------------------------------------------------------------- FILE: /php-ml/trap/trap.php -------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------------------------------------- 5 | WARNING | Using ${v} (variable variables) in strings is deprecated since PHP 8.2, use {${expr}} instead. -------------------------------------------------------------------------------------------------------------- FILE: /php-ml/trap.php -------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------------------------------------- 5 | WARNING | Using ${v} (variable variables) in strings is deprecated since PHP 8.2, use {${expr}} instead. -------------------------------------------------------------------------------------------------------------- ```
issue