Laravel-apidoc-generator: api:generate (and api:update) console commands do not appear after installing package

Created on 31 Mar 2018  路  3Comments  路  Source: mpociot/laravel-apidoc-generator

I was trying to install this package on Laravel 5.5.4 and on Laravel 5.6. But right after executing the $ composer require mpociot/laravel-apidoc-generator command the api commands haven't appeared in the console.

As it turned out the problem was that Mpociot\ApiDoc\ApiDocGeneratorServiceProvider::class wasn't added to config/app.php file automatically. After I have added it manually - everything started working!

In the documentation it is said that I should add this manually only if my version of Laravel < (less than) 5.5. So, please update the documentation or fix the current behavior. Thanks!

Most helpful comment

The reason is that _composer.json_ was not updated in the 2.0.0 release, so auto-discovery is not included. If you require the _dev-master_ version, it will work:
composer require mpociot/laravel-apidoc-generator:dev-master
Hope this will be merged soon in the next release.

All 3 comments

I have the strange issue that it's not working at all, even when adding it to app.php, or the AppServiceProvider, and cleaning the config cache afterwards.

The reason is that _composer.json_ was not updated in the 2.0.0 release, so auto-discovery is not included. If you require the _dev-master_ version, it will work:
composer require mpociot/laravel-apidoc-generator:dev-master
Hope this will be merged soon in the next release.

New release coming soon!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shankesgk2 picture shankesgk2  路  6Comments

herpaderpaldent picture herpaderpaldent  路  7Comments

Humni picture Humni  路  6Comments

usamaa picture usamaa  路  5Comments

nikosv picture nikosv  路  3Comments