Creation of dynamic property Config\Cache::$file is deprecated |
Hi
I'm having some problems after upgrading PHP in a server I'm getting an exception Code: Creation of dynamic property Config\Cache::$file is deprecated I've also upgraded CodeIgniter and have followed all the corresponding upgrade guide's steps from 4.2.10 up to 4.3.3 Any advise? Thanks
Enrique
https://beza.com.ar
https://php.watch/versions/8.2/dynamic-p...deprecated
Also read this post for a temporary solution: https://forum.codeigniter.com/showthread...properties Just realized now that it’s an error in a system file so my above posts might not help you.
it looks like your on Linux
Code: rm -rf vendor So you removed dir vendor and contents. I don't do that when i update ; out of interest t what was the thinking behind doing that ? But the depreciated from my cursory look seems to be that classes have to have all properties defined. so i think that exception might be to do with: https://php.watch/versions/8.2/dynamic-p...deprecated
Fixing that error is very easy. Just add the property in the class.
https://github.com/codeigniter4/CodeIgni...#L111-L114 But I don't know why your Config\Cache does not have the $file. (04-24-2023, 12:00 PM)captain-sensible Wrote: it looks like your on Linux removing vendor and reinstalling; upgrading composer; etc. were listed as steps for upgrading from 4.2.10 to 4.3.3 (04-24-2023, 03:56 PM)kenjis Wrote: Fixing that error is very easy. Just add the property in the class. Yes, I knew that I could solve by adding the property in the class, but also wonder why that class doesn't have the property (even after upgraded)
Enrique
https://beza.com.ar
`composer update` does not change any your project files. It only updates files under vendor/.
If you created your app with older version of CI4, the config file may not have the property.. (04-25-2023, 05:38 PM)kenjis Wrote: `composer update` does not change any your project files. It only updates files under vendor/. Yes I had to do a similar stuff. I've downloaded a new appStarter project, then moved controllers, models, libraries, views, etc. from old application
Enrique
https://beza.com.ar
If you don't want to update your project files manually, Tatter\Patches does it automatically.
https://github.com/tattersoftware/codeigniter4-patches (04-26-2023, 04:43 AM)kenjis Wrote: If you don't want to update your project files manually, Tatter\Patches does it automatically. Wow, didn't know about it Thanks a lot for the suggestion
Enrique
https://beza.com.ar |
Welcome Guest, Not a member yet? Register Sign In |