Releases: MarcinOrlowski/laravel-api-response-builder
Releases · MarcinOrlowski/laravel-api-response-builder
v7.0.1
- v7.0.1 (2019-11-25)
- Disabled Scrutinizer's "false positive" in Builder class.
- Added more tests to improve overall coverage.
- Updated PHPDocs
- Code cleanup
v7.0.0
- BACKWARD INCOMPATIBLE CHANGES (more info)
- New, flexible API based on
Builder
pattern (see docs for details). - Reworked
ExceptionHandlerHelper
configuration. Now, you will be able to easily configure every
HttpException for each HTTP status code you want. SeparateExceptionHandler::TYPE_HTTP_NOT_FOUND_KEY
and all related stuff, incl. localization keyhttp_not_found
, configuration is now replace with more
flexible generic code that provides error messages for all supported HTTP codes from in range400-599
. - Added support for external data converters (related part of config changed too).
- Config key
classes
is now (partially)converter
. Itsmethod
key is gone andhandler
.
needs to be added now, pointing to the class implementingConverterContract
acting as delegate worker. - Data converter now handles objects implementing
JsonSerializable
andArrayable
contracts as well.
v6.3.2
- Added
ResponseBuilder::successWithMessage()
method. - Entries in
classes
config array can now havepri
(default 0) to enforce order while
merging config with built-in configuration. - Persian translation (Thanks to @FaridAghili).
- Added Laravel 6.5 to Travis-CI unit tests.
v6.3.1
v6.3.0
- BACKWARD INCOMPATIBLE CHANGES (more info)
- Signature of
ResponseBuilder::buildResponse()
changed to allow customization of finalmessage
entry (@hawezo). - Moved all code that produces messages for API codes to
ResponseBuilder::getMessageForApiCode()
. - Added
Validator::assertType()
helper method that validates var against set of allowed types. - Added
Validator::assertString()
helper.
v6.2.3
- Added Laravel 6.4 to Travis-CI unit tests.
- Corrected example in "Manipulating Response Object" docs.
v6.2.2
- Squashed multiple typographic errors in the documentation files.
v6.2.1
- Added Laravel 6.3 to Travis-CI unit tests.
- Splitted tests into separate folders per class tested.
- ExceptionHandler no longer tries to enforce UTF-8 on exception message.
- Added PHP 7.4-snapshot to unit tests
v6.2.0
- Changed how auto-converter checks for supported classes (see Data Conversion)
- Data conversion now supports JsonResource data class.
- Added unit test for
ResponseBuilderServiceProvider::mergeConfg()
. - Moved data conversion code to separate
Converter
class. - Added
LICENSE.md
file. - Added Laravel 6.2 to Travis tests.
- Added unit tests for translation files.
v6.1.2
- Corrected ServiceProvider used for tests.