On line 121 of LoggerFactory: return call_user_func_array(array($reflection, 'newInstance'), array_values($options));
Results in an error Uncaught Error: Unknown named parameter $path in /var/www/html/vendor/neeckeloo/monolog-module/src/Factory/LoggerFactory.php on line 121.
This is because in PHP8 call_user_func_array passes the $options array as named parameters if it has named keys.
Using array_values() to return a numerically keyed array would fix the issue as the options would then be passed positionaly just as they are in PHP7 and this would maintain both PHP7 and PHP8 compatibility.
On line 121 of LoggerFactory:
return call_user_func_array(array($reflection, 'newInstance'), array_values($options));
Results in an error
Uncaught Error: Unknown named parameter $path in /var/www/html/vendor/neeckeloo/monolog-module/src/Factory/LoggerFactory.php on line 121
.This is because in PHP8
call_user_func_array
passes the$options
array as named parameters if it has named keys. Usingarray_values()
to return a numerically keyed array would fix the issue as the options would then be passed positionaly just as they are in PHP7 and this would maintain both PHP7 and PHP8 compatibility.return call_user_func_array(array($reflection, 'newInstance'), array_values($options));