Wednesday, 26 August 2020

Laravel 7 - php artisan vendor:publish not listing correctly

During the process of updating to Laravel 7 I added a couple of extra packages into the composer.json file (under "require" and "require-dev" that are listed in the composer.json file of the Laravel 7 depository on Github but were not added/installed when I ran composer update with the Laravel version on composer.json updated.

I then ran php artisan vendor:list to list which providers still required publishing. The aforementioned packages were indeed listed, however, so was every other package that I have installed (a total of 16 providers and tags.) Rather than giving me the option of pressing 0-16 which provider/tag I wished to publish (zero for all), the operation simply aborted after listing them.

I then went though the new packages by specifying them specifically - for example php artisan vendor:publish --provider="Facade\Ignition\IgnitionServiceProvider" - and they were then published successfully.

I then ran php artisan vendor:publish again and, sure enough, everything I have ever published (including the new packages that were now successfully published) appeared on the list and the operation was aborted once again.

In order to get the php artisan vendor:publish command to work (without having to specify the provider specifically) I have:

  1. Added --force
  2. Emptied the cache php artisan cache:clear
  3. Emptied the config php artisan config:clear
  4. Added a couple of the packages to the list of providers in app.config to see if it would stop they would disappear from the vendor:publish list.

The command still will still not work...



from Laravel 7 - php artisan vendor:publish not listing correctly

No comments:

Post a Comment