Skip to content

Instantly share code, notes, and snippets.

@riandoza
Last active June 11, 2025 17:24
Show Gist options
  • Save riandoza/de76dc607dee3b39a20ea49eac65bb07 to your computer and use it in GitHub Desktop.
Save riandoza/de76dc607dee3b39a20ea49eac65bb07 to your computer and use it in GitHub Desktop.
Fix Error CodeIgniter3 on PHP8.3+

Message: Creation of dynamic property ... is deprecated

Message: Creation of dynamic property CI_URI::$config is deprecated. Solution is to have the classes affected explicitly declare that they allow dynamic attributes

/system/core/URI.php

#[\AllowDynamicProperties]
class CI_URI {

/system/core/Router.php

#[\AllowDynamicProperties]
class CI_Router {

/system/core/Loader.php

#[\AllowDynamicProperties]
class CI_Loader {

/system/core/Controller.php

#[\AllowDynamicProperties]
class CI_Controller {

/system/core/DB_driver.php

#[\AllowDynamicProperties]
abstract class CI_DB_driver {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment