zendtech / IbmiToolkit

PHP frontend to XMLSERVICE for IBM i development.
BSD 3-Clause "New" or "Revised" License
46 stars 34 forks source link

INI shouldn't be loaded from same directory as code #149

Open NattyNarwhal opened 3 years ago

NattyNarwhal commented 3 years ago

Reasoning:

alanseiden commented 3 years ago

Thanks. I was thinking about this today while we taught a client how to turn off debug mode via toolkit.ini.

NattyNarwhal commented 3 years ago

proposed search order and names:

Should it be overrriden in code too?

NattyNarwhal commented 3 years ago

realizing this could be from code too for i.e app specific

alanseiden commented 3 years ago

Toolkit install dir could contain a symlink to new location

NattyNarwhal commented 3 years ago

I will say that CONFIG_FILE is theoretically settable by defining it before Toolkit.php is loaded, but this seems greasy in a world where autoloaders exist. The fact the INI is basically handled by static resources sucks, and that could require a refactor to make instance-local.