-
Notifications
You must be signed in to change notification settings - Fork 445
Open
Description
Hey!
Thanks for your work on this awesome framework, which has served me more than well on my project.
I hat trouble using the AUTOLOAD global in CLI mode.
I have a folder structure like this
my-app/
├─ classes/
├─ public/
│ ├─ index.php
├─ config.ini
In config.ini I have
[globals]
AUTOLOAD=../classes/
The doumentation states, that The AUTOLOAD path is searched from the location of your index.php file.
This works fine for web requests.
However, for technical reasons I habe to run the CLI script from root, i.e. php my-app/public/index.php my-script. When calling the script like that the autoloading fails for some reason.
My workaround currently consists of setting the AUTOLOAD in my index.php, like this
$f3->set('AUTOLOAD', __DIR__ . '/../classes/');
This works fine, but a fix in the framework base would be highly appreciated.
Metadata
Metadata
Assignees
Labels
No labels