Skip to content
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

Commands not recognised in v11 #116

Closed
bafitu opened this issue May 14, 2024 · 2 comments
Closed

Commands not recognised in v11 #116

bafitu opened this issue May 14, 2024 · 2 comments

Comments

@bafitu
Copy link

bafitu commented May 14, 2024

Hi,

I have issues with using custom commands in v11 from artisan e.g. artisan mycommand:dosomething
They are not recognised from the framework.

I did some digging and found that there was an issue with one of the functions that this package does not extend:

src/Illuminate/Foundation/Console/Kernel.php in bootstrap function there is a check $this->shouldDiscoverCommands()
and when I use "use Gecche\Multidomain\Foundation\Application" in the boostrap/app.php this function is always returning false resulting in no custom commands to be discovered.
because the check is:
get_class($this) === __CLASS__
e.g. "Gecche\Multidomain\Foundation\Console\Kernel" === "Illuminate\Foundation\Console\Kernel"

if you had the same function in your Kernel class it will be ok because it will compare the same class.

Can you confirm thats the case and the package needs to be updated or I'm missing something?

@gecche
Copy link
Owner

gecche commented May 14, 2024

Hi,

thanks for your feedback... I think you are right... that method should be replicated in the package Kernel class.
I was not aware of that feature.

If you are in hurry, could you do some simple tests and issue a pull request?

I can't code properly until (maybe) tomorrow or Friday

Let me know

Thanks

Giacomo

@gecche
Copy link
Owner

gecche commented May 30, 2024

I just updated the package using your suggestions... thanks a lot!

@gecche gecche closed this as completed May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants