You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, to load a command outside the app directory, one would have to directly reference the class because registering the directory the class is in will fail. This happens for several reason, but the main reason being, it's hard coded to use the App namespace in
We'll need more info and/or code to debug this further. Can you please create a repository with the command below, commit the code that reproduces the issue as one separate commit on the main/master branch and share the repository here?
It seems that, indeed, the path provided need to be within the main application namespace for a for having "withCommands" discovering commands within a directory. We are open to a pull request if you wish to enable this feature for a commands directory outside of the main application namespace.
Meanwhile, you can use the withCommands method with the command "class" string in your application's bootstrap/app.php:
Laravel Version
11.0.4
PHP Version
8.3
Database Driver & Version
N/A
Description
Currently, to load a command outside the
app
directory, one would have to directly reference the class because registering the directory the class is in will fail. This happens for several reason, but the main reason being, it's hard coded to use the App namespace inSteps To Reproduce
app
directorycomposer.json
bootstrap/app.php
fileThe text was updated successfully, but these errors were encountered: