Welcome Guest, Not a member yet? Register   Sign In
New Registrar Feature
#4

(10-22-2023, 06:36 PM)donpwinston Wrote: I'm annoyed at having to diff my config files with any new CI upgrade and merge all my changes back into the file after upgrading. There's got to be a better way to do this.

Probably many devs use Tatter\Patches. It patches config files automatically.
https://github.com/tattersoftware/codeigniter4-patches

(10-22-2023, 06:36 PM)donpwinston Wrote: The config part should not be affected by upgrades. The config information should be in a non php file like .env and loaded when the app starts or set the class properties in some sort of start up function somewhere.

Frankly, that will be difficult. It would be nice if we could have a new and wonderful Config system that completely replaces the existing Config system.

If you do try that, I would like to see a Config system that works much faster. The current Config has quite many features but insanely slow.

(10-22-2023, 06:36 PM)donpwinston Wrote: How can I modify the Config classes properties dynamically?

A Config object is a PHP object and the properties are public.

PHP Code:
$config->foo 'new value'

But I recommend you don't change the values after instantiation.
Because if the values may change dynamically, you may not be able to use the Config caching.
https://codeigniter4.github.io/CodeIgnit...ig-caching
Reply


Messages In This Thread
New Registrar Feature - by donpwinston - 10-22-2023, 06:36 PM
RE: New Registrar Feature - by InsiteFX - 10-22-2023, 09:57 PM
RE: New Registrar Feature - by kenjis - 10-22-2023, 10:06 PM
RE: New Registrar Feature - by donpwinston - 10-23-2023, 02:49 AM
RE: New Registrar Feature - by donpwinston - 10-28-2023, 12:21 AM
RE: New Registrar Feature - by kenjis - 10-22-2023, 10:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB