coral-media / php-ml

Fresh approach to Machine Learning in PHP. Algorithms, Cross Validation, Neural Network, Preprocessing, Feature Extraction and much more in one library.
MIT License
1 stars 1 forks source link

Dollar brace string interpolation is deprecated #3

Closed rernesto closed 2 months ago

rernesto commented 2 months ago

For the RFC see https://wiki.php.net/rfc/deprecate_dollar_brace_string_interpolation

Thus php-ml is triggering E_DEPRECATED errors.

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.
--------------------------------------------------------------------------------------------------------------
divinity76 commented 2 months ago

made a fix: #7