Skip to content

Conversation

@zanderwar
Copy link

@zanderwar zanderwar commented Jan 15, 2023

Closes #6192

Let me know if you would prefer a scope other than public (as Mock_Core_URI needs access to it, I'm assuming public is fine.)

@ubeljan
Copy link

ubeljan commented Jan 19, 2023

I think a better way is to implement #[\AllowDynamicProperties]
Shorter and easier.
I give you my changes.

/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 {

@zanderwar
Copy link
Author

I think a better way is to implement #[\AllowDynamicProperties] Shorter and easier. I give you my changes.

/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 {

Thanks, but thats a bit of a hack for lazy people. IDE auto-completion would be more grateful for the explicit declaration of the properties on the class; so will developers...

If that's the route the maintainers want to take then thats up to their discretion, personally never used codeigniter 👍

@gxgpet
Copy link
Contributor

gxgpet commented Jan 27, 2023

#6173

@gxgpet gxgpet closed this Jan 27, 2023
@zanderwar zanderwar deleted the patch-1 branch August 17, 2023 04:53
@behdadpourtavakoli
Copy link

I think a better way is to implement #[\AllowDynamicProperties] Shorter and easier. I give you my changes.

/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 {

Thanks a lot.
It's really working.
I needed to use Codeigniter v3.0.6, but the Codeigniter source normally made some errors, until I found this troubleshoot.
Thanks a lot again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Creation of dynamic property CI_URI::$config is deprecated

4 participants