-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong ROOTPATH on console #460
Comments
There, I think that should fix it, but let me know if it's still not working for you. |
No its no working actually the whole console is broken, this could be the problem at https://github.com/bcit-ci/CodeIgniter4/blob/develop/ci.php#L17 the variabale $paths is being used before declaration which happens at line https://github.com/bcit-ci/CodeIgniter4/blob/develop/ci.php#L42 |
Reorganizing my code to look as below seems to have worked for me fixing both issues
|
What do you mean when you say "the Console is broken"? Using the latest version of the code I'm able to list the commands, etc. Seems to be working correctly for me. What are you seeing? |
Yes the listing is working but if you try to run any of those commands you get the following warnings
as a result of this warning, the original issue was not fixed. and the reorganization of ci,php above worked for me. i'm working with the latest version. |
Strange. I don't think I was seeing that error. However, the latest version (1765d0d) has the reordering you placed here. It was just committed a day or so ago, so please pull down the latest version and see if that fixes it for you. If not, submitting a working PR would probably be the simplest fix. |
The ROOTPATH on console is wrong which has the effect composer autoloader is never required.
If i create a command at
application/Commands/Powerorm.php
The output i get is
/opt/lampp/htdocs/ci4/public
where instead of/opt/lampp/htdocs/ci4
which is what i get when i runOn the view.
This also has the side effect of, i am not able to use packages on the vendor folder in my command. since composer autloader is never required on the system/bootstrap.php
e.g. if i try the dump() method found on symfony/var-dumper which is already on my vendor.
The text was updated successfully, but these errors were encountered: