- Issue created by @beagaliana
- 🇪🇸Spain beagaliana
Added patch for PHP 7.0 deprecation fix for Hook Update Deploy Tools module.
PHPCompatibility has detected an error for PHP 8.1 version affecting src/Message.php file: functions inspecting arguments, like debug_backtrace(), no longer report the original value as passed to a parameter, but will instead provide the current value.
FILE: /var/www/html/docroot/sites/all/modules/contrib/hook_update_deploy_tools/src/Message.php
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LINE 45: ERROR Since PHP 7.0, functions inspecting arguments, like debug_backtrace(), no longer report the original value as passed to a parameter, but will instead provide the current value. The parameter
"$variables" was changed on line 43. (PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.Changed)
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
43: ····$variables·=·self::stringifyValues($variables);
44: ····//·Determine·what·instantiated·this·message's·parent.
>> 45: ····$trace·=·debug_backtrace();
46: ····$called_by·=·'';
47: ····if·(isset($trace[2]))·{
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Execute the following command:
phpcs docroot/sites/all/modules/contrib/hook_update_deploy_tools --extensions=php,module,inc --standard=PHPCompatibility --runtime-set testVersion 8.1 --report=code --report-file=reports/codereview/checkstyle-phpcompatibility_hook_update_deploy_tools.txt -sv
While being aware that there is no support for D7 modules anymore, we will contribute a patch that fixes the error as PHPCompatibility suggests.
Active
1.37
Code
The issue particularly affects sites running on PHP version 7.0.0 or later.
Added patch for PHP 7.0 deprecation fix for Hook Update Deploy Tools module.