I have a CakePHP 3 website running AdminLTE. Recently upgraded to 3.7 version of the framework, and this deprecation notices appeared in my controller test cases:
Deprecated Error: FormHelper::input() is deprecated. Use FormHelper::control() instead. - C:\xampp\htdocs\idscentral\vendor\maiconpinto\cakephp-adminlte-theme\src\View\Helper\FormHelper.php, line: 94
You can disable deprecation warnings by setting `Error.errorLevel` to `E_ALL & ~E_USER_DEPRECATED` in your config/app.php. in [C:\xampp\htdocs\idscentral\vendor\cakephp\cakephp\src\Core\functions.php, line 311]
Deprecated Error: Accessing `webroot` as a property will be removed in 4.0.0. Use request->getAttribute("webroot") instead. - C:\xampp\htdocs\idscentral\vendor\maiconpinto\cakephp-adminlte-theme\src\Template\Layout\collapsed.ctp, line: 97
You can disable deprecation warnings by setting `Error.errorLevel` to `E_ALL & ~E_USER_DEPRECATED` in your config/app.php. in [C:\xampp\htdocs\idscentral\vendor\cakephp\cakephp\src\Core\functions.php, line 311]
Deprecated Error: Accessing `url` as a property will be removed in 4.0.0. Use request->getPath() instead. - C:\xampp\htdocs\idscentral\vendor\maiconpinto\cakephp-adminlte-theme\src\Template\Layout\collapsed.ctp, line: 97
You can disable deprecation warnings by setting `Error.errorLevel` to `E_ALL & ~E_USER_DEPRECATED` in your config/app.php. in [C:\xampp\htdocs\idscentral\vendor\cakephp\cakephp\src\Core\functions.php, line 311]
Resolution strategy
For the first of the deprecation notices, I chose to:
1) Use the recommended method in the input() method
2) Mark input() for deprecation, in order to move the deprecation notices to the template files
For the second and third notices, I just replaced old calls with the recommended ones.
Motivation
I have a CakePHP 3 website running AdminLTE. Recently upgraded to 3.7 version of the framework, and this deprecation notices appeared in my controller test cases:
Resolution strategy
For the first of the deprecation notices, I chose to: 1) Use the recommended method in the input() method 2) Mark input() for deprecation, in order to move the deprecation notices to the template files
For the second and third notices, I just replaced old calls with the recommended ones.