1

CakePHP 4.1.7 on PHP 8.0.14

Running a site locally using bin/cake server and I get this PHP Warning showing on all pages of the application:

Warning (2): DebugKit\Panel\VariablesPanel::DebugKit\Panel{closure}(): Argument #1 ($item) must be passed by reference, value given [ROOT/vendor/cakephp/debug_kit/src/Panel/VariablesPanel.php,

Give this is in the vendor/cakephp/ folder I haven't been able to try much to fix it since it's an issue in the CakePHP codebase as opposed to my application.

In my config/app_local.php I have debugging enabled:

'debug' => filter_var(env('DEBUG', true), FILTER_VALIDATE_BOOLEAN),

I've tried doing the equivalent of the answer here Cake PHP 3 debug_kit panel in both config/app.php and config/app_local.php:

'DebugKit' => [
    'forceEnable' => true,
]

This makes no difference.

If I turn debugging off, 'debug' => filter_var(env('DEBUG', false), the message goes away, but that's besides the point as this simply stops it appearing but doesn't "fix" the underlying problem.

What is the problem and how can it be fixed please?

Andy
  • 5,142
  • 11
  • 58
  • 131
  • 1
    The CakePHP/DebugKit versions that you're using are not PHP8 compatible, you'll have to upgrade your dependencies to at least 4.2 and 4.4 respectively. **https://github.com/cakephp/debug_kit/issues/795** | **https://github.com/cakephp/debug_kit/releases/tag/4.4.0** | **https://github.com/cakephp/cakephp/releases/tag/4.2.0** – ndm Feb 04 '22 at 12:43

0 Answers0