- Laravel 5 and Lumen support. Laravel 4.x is no longer supported.
- Will only work with Lumen
5.0.*@dev
until some changes make it into a tagged release of Lumen.
- Routes are no longer registered with the underlying router.
- Routes must be registered on the
app('api.router')
instance. - Internal requests are currently not implemented.
- Generating URLs to named API routes is currently not implemented.
- Authentication and Rate Limiting is now done via middlewares instead of filters.
- Updated Tymon's JWTAuth to the latest version,
0.4.1
.
- Can now use
RateLimiter::setRateLimiter
to change the key used to rate limit requests from the clients IP.
- Made the trace readable by exploding on the EOL character.
- API filters are now applied before any other filters to ensure they are run first.
- Request and response instances are correctly set on the formatter for exception responses.
- Scopes set on groups are now parsed correctly.
- Routes are now added to the correct groups and matched correctly.
- OPTION requests are now handled correctly for API routes so preflights will no longer fail.
- Eager loading for Fractal transformers now checks the available includes before attempting to load.
- Raw internal requests now have the content run through any transformers as was initially described when implemented.
ResponseFactory::collection
is now type-hinted toIlluminate\Support\Collection
.- Refined the handling of route matching.
Dingo\Api\Transformer\TransformableInterface
is now deprecated. It's recommended you use the Response Builder.
- Fixed bug where some server variables were not being set properly.
- Fixed inconsistent response when returning an empty collection that is meant to be transformed.
- Fixed potential HHVM bug caused by
json_encode
being run on certain elements. Debug mode now returns trace as a string.
Symfony\Component\HttpKernel\Exception\BadRequestHttpException
is now thrown when invalid API version is requested.- Responses with HTTP error status codes will now throw a
Dingo\Api\Exception\InternalHttpException
when requested internally.
- Fixed bug where using the
Input
orRequest
facade prior to internal requests resulted in unexpected input behaviour. - Fixed recursive call to the
ControllerTrait::__call
method.
- Can now add cookies when using the response builder.
- Dispatcher can now internally send cookies.
- Removed
ResponseBuilder::addHeaders
andResponseBuilder::headers
.
- Changed
ResponseBuilder::addHeader
toResponseBuilder::withHeader
.
- Fixed bug where headers were not completely copied when creating a new response from an existing response.
- Fixed bug where request was not correctly rebound to the container.
- Default throttles for rate limiting have been removed.
- Fixed bug where any response object that could not be type cast as a string would throw an
UnexpectedValueException
. - Fixed bug where request was not bound as an instance resulting in rebounds not being fired.
- Fixed inconsistent response when returning an empty paginator and using transformers.
- Fixed bug with protected endpoints becoming unprotected when setting protection on both group and route.
- Fixed bug where routes defined before the replacement of the bound router would be lost.
AuthFilter
now require authentication for internal requests.- Don't catch exceptions and handle them within the
AuthFilter
, this causes issues with internal requests.
- Added a
debug
configuration key which enables/disables a more detailed error response for some exceptions.
- Fixed bug with Basic authentication.
Dingo\Api\ApiServiceProvider
is now atDingo\Api\Provider\ApiServiceProvider
. It has been split up into several smaller service providers.- Made namespaces more consistent by making them all singular.
- Custom transformation layers must now implement
Dingo\Api\Transformer\TransformerInterface
. - Authentication providers must now implement the
Dingo\Api\Auth\ProviderInterface
. - Upgraded the League OAuth 2.0 package to version 4.
- Renamed
ControllerTrait::scope
toControllerTrait::scopes
for consistency with other methods of definding scopes.
- Some dependencies are now injected into controller via setters instead of in the constructor. (#111)
- Authentication and Rate Limiting are now filters. Both can be changed on a per-route basis.
- Rate limiting now makes use of different throttles so the configuration has changed slightly.
- Added
API::response()
to make a new response builder from closure based routes. - Added
LeagueOAuth2Provider::setUserResolver
andLeagueOAuth2Provider::setClientResolver
. Dingo\Api\Routing\Controller
is nowDingo\Api\Routing\ControllerTrait
, you can now create your own base controller and simply use the trait.- Allow raw data to be sent with an internal request.
- Allow custom headers to be set on internal requests.
- Added a
Dispatcher::json
method to easily send raw JSON data with an internal request. Dispatcher::attach
now accepts either an array of file details or an array ofUploadedFile
instances.- Added a
Dispatcher::on
method to indicate which domain the dispatcher should work on. - Relations are automatically loaded when using Fractal includes.
- Added a
Dispatcher::raw
method to return a raw response object instead of the original content.
- Removed
Response::api()
macro. - Removed
LeagueOAuth2Provider::setUserCallback
andLeagueOAuth2Provider::setClientCallback
. - Removed
ResponseFormat::formatOther
as non-formattable responses are returned as they are.
- Global router "after" filter is now fired even when an exception is thrown and caught by the API.
- The response builder will now return the original response instance to internal requests and is decoupled from Fractal.
- Errors generated by the response factory and the exception handler are now the same.
LeagueOAuth2Provider
will now authenticate for any matching scopes instead of requiring all scopes.
- Fixed bug where conditional requests affected routes outside of the API. (#141)
- Fixed incompatibility bug with the latest Laravel. (#156)
- Basic implementation of attaching files for internal requests.
- Added
addMeta
(andmeta
alias) to theResponseBuilder
to add Fractal meta data.
- Fixed bug where the request was not being set on the transformer prior to dispatching the request. (#101)
- Refactored transformers. You can still use the
API::transform
method, however if you're using the underlying transformer instance to register your bindings you should now useregister
, e.g.,$app['dingo.api.transformer']->register('Class', 'ClassTransformer');
. - Can now grab the underlying Fractal instance, useful for custom serializers.
- Converted codebase to PSR-2.
- Authentication has been completely overhauled.
- Added the
ResponseBuilder
. - Conditional requests can now be enabled/disabled globally or on groups and individual endpoints.
- Non-morphable responses such as those created from
Response::download
can now be returned. - Fixed bug where headers set on a thrown exception were not properly set on the generated response.
- Updated to the latest version of Fractal.
- Added a
artisan api:routes
command. - Allow non-HTTP exceptions to be handled with
API::error
for better exception handling.
- Properly check collections are transformable when bound by contract. (#34)
- Transformation layer is now configurable meaning you can swap out Fractal for some other transformation library.
- Transformable classes can now implement
Dingo\Api\Transformer\TransformableInterface
to return their respective transformer.
- Fixed bug where collections were not detected as being a transformable type. (#30)
- Change the
embeds
configuration key tofractal_includes
.
- Only resolve controllers when they are being used. This prevents controllers from being resolved for no particular reason and should be more efficient when using large number of controllers.
- Configuration option for the default response format.
- Properly queue and replace requests and route instances.
- Default response format can now be configured in the configuration file.
- Custom authentication providers that extend at runtime can be registered as instances.
- Custom authentication providers that extend at runtime now get the application container as a parameter when using an anonymous function to resolve the provider.
- Minor internal changes to authorization based authentication providers.
- Properly maintain request and route stacks.
- Fixed bug where transformers would try to transform a non-transformable response.
- Added Fractal pagination support.
- Allow authentication providers to be extended at runtime.
- Refactoring and simplifying of authentication layer.
- Added Fractal transformers.
- Router gracefully falls back to default API version if no exact matching collection is found.
- APIs can now be versioned with point releases, e.g.,
v1.1
. - Fixed bug where collections were prematurely matched resulting in 404s when the prematurely matched collection did not contain the correct routes. (#16)
- Initial release