OS: Homestead running in Ubuntu 17.10
Laravel: 5.5.28
Passport: 4.0.3
Running php artisan vendor:publish --tag=passport-migrations publishes nothing, running this command I receive the message Publishing complete and on inspection of my /database/migrations directory it hasn't there are no migrations.
Running php artisan vendor:publish results in the following:
Which provider or tag's files would you like to publish?:
[0 ] Publish files from all providers and tags listed below
[1 ] Provider: Fideloper\Proxy\TrustedProxyServiceProvider
[2 ] Provider: Illuminate\Mail\MailServiceProvider
[3 ] Provider: Illuminate\Notifications\NotificationServiceProvider
[4 ] Provider: Illuminate\Pagination\PaginationServiceProvider
[5 ] Provider: Laravel\Passport\PassportServiceProvider
[6 ] Tag: laravel-mail
[7 ] Tag: laravel-notifications
[8 ] Tag: laravel-pagination
[9 ] Tag: passport-components
[10] Tag: passport-views
Note the lack of the passport-migrations tag.
If I attempt to manually copy the migrations from the package over to my database/migrations directory, these are ignored and it will still use the migrations from the package directory.
Ok I have narrowed this down a little:
When running with tag passport-migrations the following code the from the registerMigrations method in the PassportServiceProvider is never run:
if (Passport::$runsMigrations) {
return $this->loadMigrationsFrom(__DIR__.'/../database/migrations');
}
$this->publishes([
__DIR__.'/../database/migrations' => database_path('migrations'),
], 'passport-migrations');
This looks as though this is due to Passport::$runsMigrations being set to true in the Passport model. Manually setting this to false will allow the migrations to publish.
No longer an issue, turns out I forgot to add the Passport::ignoreMigrations() call to my AppServiceProvider.
You should to set it to True not False !
Most helpful comment
No longer an issue, turns out I forgot to add the
Passport::ignoreMigrations()call to myAppServiceProvider.