We are no longer using our own APIExceptionsHandler
to send API fail responses and using Laravel's own HttpResponseException
to overcome App\Exceptions\Handler
overwrite problem.
So we removed all extra Exception files. so you need to remove those things from your API Controllers.
-
In all your API Controllers and find
throw new RecordNotFoundException
. -
Replace it with
$this->throwRecordNotFoundException
. -
Remove use statements
use Mitul\Generator\Exceptions\AppValidationException; use Mitul\Generator\Exceptions\RecordNotFoundException;
-
Remove throw statement from PHPDoc Blocks of functions
@throws AppValidationException @throws RecordNotFoundException
-
Enjoy Upgrade :)
-
Take a backup of your
config/generator.php
-
Delete your
config/generator.php
-
Change version in composer.json
"require": { "mitulgolakiya/laravel-api-generator": "1.2.*" }
-
Run composer update.
-
Run publish command again.
php artisan vendor:publish --provider="Mitul\Generator\GeneratorServiceProvider"
-
Replace your custom paths again in
config/generator.php
. -
Enjoy Upgrade :)