-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
Laravel 9.6.0: Command tenants:migrate is not detected correctly #832
Comments
@lbausch Thanks for the comprehensive report! Would this issue be solved by explicitly providing the command name, e.g. via a |
I wasn't able to get it working with a $class = static::class;
$signature = (new ReflectionClass($class))->getDefaultProperties()['signature'] ?? null;
if (isset($signature)) {
return Parser::parse($signature)[0];
} |
I'm facing the same issue. Any suggestion to make it work and go on? |
Ah I see your point. The |
Thank you @stancl! 💪🏻 |
Bug description
Laravel 9.6.0 introduced the method
getDefaultName()
inIlluminate\Console\Command
with commit laravel/framework@628d39fThis method first tries to determine the command name from the
signature
property and - if not present - falls back to thename
property.Because
Stancl\Tenancy\Commands\Migrate
extends fromIlluminate\Database\Console\Migrations\MigrateCommand
thesignature
of this class (migrate
) is inherited and used and not the defined name (tenants:migrate
).Steps to reproduce
Setup
stancl/tenancy
with Laravel 9.6.0Expected behavior
Migrations for tenants should be run, no tables should be dropped.
Laravel version
9.6.0
stancl/tenancy version
3.5.3
The text was updated successfully, but these errors were encountered: