CodeIgniter Forums
Deprecated dynamic properties in PHP 8.2 - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: General (https://forum.codeigniter.com/forumdisplay.php?fid=1)
+--- Forum: Lounge (https://forum.codeigniter.com/forumdisplay.php?fid=3)
+--- Thread: Deprecated dynamic properties in PHP 8.2 (/showthread.php?tid=82678)

Pages: 1 2


RE: Deprecated dynamic properties in PHP 8.2 - InsiteFX - 07-15-2023

This is not a CodeIgniter problem it is up to the users to fix it.

PHP.Watch - PHP 8.2: Dynamic Properties are deprecated


RE: Deprecated dynamic properties in PHP 8.2 - michaelvuillermoz - 07-16-2023

sorry but some core files seems affected and need to be updated:
some examples:

ERROR - 14-07-2023 09:07:03 --> Severity: 8192 --> Creation of dynamic property MY_URI::$config is deprecated C:\wamp64\www\vuillermoz\system\core\URI.php 102

ERROR - 14-07-2023 09:07:03 --> Severity: 8192 --> Creation of dynamic property CI_Router::$uri is deprecated C:\wamp64\www\project\system\core\Router.php 128

ERROR - 14-07-2023 09:07:03 --> Severity: 8192 --> Creation of dynamic property Produits::$benchmark is deprecated C:\wamp64\www\project\system\core\Controller.php 83

ERROR - 14-07-2023 09:07:03 --> Severity: 8192 --> Creation of dynamic property Produits::$form_validation is deprecated C:\wamp64\www\project\system\core\Loader.php 1284


RE: Deprecated dynamic properties in PHP 8.2 - kenjis - 07-16-2023

CI3 does not support PHP 8.2 yet.
Upgrade to CI4.3 is recommended if you want to use the latest PHP.


RE: Deprecated dynamic properties in PHP 8.2 - michaelvuillermoz - 07-16-2023

(07-16-2023, 12:37 AM)kenjis Wrote: CI3 does not support PHP 8.2 yet.
yes i see Smile
i don't want to rewrite all my project in CI4 it is a too big e-commerce website, too much work for this project
i just want to know want are the plans for the fix for 8.2 compatibility, 
for now i have edited the core files but it is not a good way to go


RE: Deprecated dynamic properties in PHP 8.2 - wdeda - 07-16-2023

(07-15-2023, 11:08 PM)InsiteFX Wrote: This is not a CodeIgniter problem it is up to the users to fix it.

PHP.Watch - PHP 8.2: Dynamic Properties are deprecated

I'm sorry, but I didn't understand your post.
A PHP language support framework that does not have the "obligation" to be updated by its developers when this language, PHP, is changed/updated, exactly what are we talking about? I'm talking about Codeigneter version 4.3.6.


RE: Deprecated dynamic properties in PHP 8.2 - InsiteFX - 07-16-2023

If you don't start decalaring your properties you will get those errors and warnings.


RE: Deprecated dynamic properties in PHP 8.2 - ozornick - 07-16-2023

Dont use php8 for CI3 project.


RE: Deprecated dynamic properties in PHP 8.2 - wdeda - 07-21-2023

I've been a Codeigniter user since version 2.x, when access to databases was only possible with third-party applications, among other limitations of a newly developed system.
I feel privileged to follow the evolution of CI over time and, without a doubt, version 4 was and continues to be a milestone.

Since version 2.x there is a rule that I can call it golden: system files must not be changed (hacked) by users because of the risk of causing unpredictable problems.

I use version 4.3.6, supposedly compatible with PHP 8.x, and when migrating to this version of PHP I get a message that the response.php file is causing an error due to Dynamic Properties are deprecated. This file is located in the HTTP folder which is a folder inside the System folder.
The suggested fix for the problem is that I must declare my class properties. Right, but my classes are inside the App folder and not in the System folder, so what?

I use VS Code and the Intelephense extension marks several lines of code, mostly in reference to "cookies", as deprecated.

Because it is an error, the entire site is inaccessible. What was the solution given by me? Downgrade to PHP version 8.1.x.

I will wait for a professional solution from the framework developers.


RE: Deprecated dynamic properties in PHP 8.2 - wdeda - 08-27-2023

With the release of version 4.4, at least for me, the problem is solved. Obviously, I cannot speak for others also affected.