v0.5.0
🫣 Breaking change
Applicable if you've published Scramble's config or relied on the default route resolver behavior (which resolved routes by looking if a route uses api
middleware). In most cases you shouldn't really be affected by the change unless you modified API base URL.
In 0.4.0
I've introduced api_base_url
config that allowed configuring and modifying API base URL. By default it was url('/api')
. Sadly enough, using url
in config file caused php artisan serve
to fail with the following error:
Illuminate\Routing\UrlGenerator::__construct(): Argument #2 ($request) must be of type Illuminate\Http\Request, null given,
called in /***/vendor/laravel/framework/src/Illuminate/Routing/RoutingServiceProvider.php on line
67
To fix the issue I decided to go away from the idea of using url
helper in config and instead, and introduced api_path
config. So now this part of the config is much simpler and looks like 'api_path' => 'api'
.
Also, the default behavior of the default routes resolver changed as well. Previously it took all the routes that were using api
middleware. From now on, by default all the routes which URL starts with api/
(scramble.api_path
) will be used.
Full Changelog: v0.4.0...v0.5.0