PHP v8 Deprecation Warnings
alanapplyby opened this issue · comments
I'm using PHP V8.2.1 on my Development server and the CRUD plugin is throwing deprecation warnings.
My composer.json:
"friendsofcake/crud": "^6.1",
"cakephp/cakephp": "4.x-dev",
The warning I have found to date concern dynamic property assignments, for example:
Deprecated: Creation of dynamic property Crud\Event\Subject::$args is deprecated in \vendor\friendsofcake\crud\src\Event\Subject.php on line 79
To fix I have added the following:
public $args;
public $action;
public $success;
public $query;
public $entities;
public $entity;
public $saveMethod;
public $saveOptions;
public $created;
public $element;
public $params;
public $key;
public $type;
public $name;
public $text;
public $url;
public $status;
public $repository;
public $id;
I appreciate that in a Production environment the server can be configured to supress such warnings but I was requested to create an issue in the Cake Slack channel.
Fixed in 6.1.2 release.