Skip to content

Releases: MarcinOrlowski/laravel-api-response-builder

v6.3.1

06 Nov 06:19
7a440c7
Compare
Choose a tag to compare
  • Fixed config merging helper causing certain user settings to be lost.
  • No longer exposes exception class name for message-less exceptions. Fixes #107
  • Added test ensuring that user provided config overshadows built-in params.

v6.3.0

02 Nov 18:39
65b5b35
Compare
Choose a tag to compare
  • BACKWARD INCOMPATIBLE CHANGES (more info)
  • Signature of ResponseBuilder::buildResponse() changed to allow customization of final message 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

31 Oct 16:58
421d084
Compare
Choose a tag to compare
  • Added Laravel 6.4 to Travis-CI unit tests.
  • Corrected example in "Manipulating Response Object" docs.

v6.2.2

22 Oct 23:11
Compare
Choose a tag to compare
  • Squashed multiple typographic errors in the documentation files.

v6.2.1

21 Oct 17:45
0769753
Compare
Choose a tag to compare
  • 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

19 Oct 22:30
4ddde1d
Compare
Choose a tag to compare
  • 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

02 Oct 16:24
Compare
Choose a tag to compare
  • Corrected ServiceProvider used for tests.

v6.1.1

02 Oct 15:15
Compare
Choose a tag to compare
  • Fixed ResponseBuilderServiceProvider using unreferenced Arr class method (reported by yassir3wad).

v6.0.0

21 Sep 05:49
2c4e07d
Compare
Choose a tag to compare
  • BACKWARD INCOMPATIBLE CHANGES (more info)
  • Requires Laravel 6.0+ and PHP 7.2+ (see docs for legacy support hints).
  • All API codes are now withing defined code range, incl. built-in codes.
  • Reserved code range lowered from former 63 down to 19.
  • Added type hints to all method arguments and return values
  • ExceptionHandler returns Exception-type related HTTP codes now as per configuration.
  • Fixed ResponseBuilder::errorWithMessageAndData() not passing data properly.
  • Fixed exception message of ApiCodesHelpers::getMaxCode().
  • Corrected test cases list in testSuccess_DataAndHttpCode().
  • Fixed error code fallback in testRender_HttpException() test.
  • Fixed testError_DebugTrace() not containing any asserts.
  • Reformatted code to not exceed 132 columns, for better on-line readability.
  • ResponseBuilder::errorWithDataAndHttpCode() accepts now null as http code.
  • ResponseBuilder::errorWithHttpCode() accepts now null as http code.
  • Fixed ExceptionHandlerHelper replacing HTTP codes above 499 with 400.
  • Changed default built-in message for HTTP_NOT_FOUND error.
  • ExceptionHandler now falls back to EX_UNCAUGHT_EXCEPTION for all the cases.
  • Simplified ExceptionHandlerHelperTest::testRender_HttpException() test.
  • Removed exception_handler.use_exception_message_first feature.
  • Removed ResponseBuilder::DEFAULT_API_CODE_OK constant.
  • Removed getReservedMinCode(), getReservedMinCode(), getReservedMessageKey() methods.
  • Removed internal API code constants. Use corresponding methods to get proprt code value.
  • Reimplemented Laravel config merger to support multi-dimensional configuration arrays too.
  • Removed response_key_map configuration option.
  • You can now return HTTP codes from 5xx range with all error responses.

v4.1.9

08 Sep 19:44
Compare
Choose a tag to compare
  • Fixed ApiCodesHelpers::getMaxCode() exception message
  • Fixed ResponseBuilder::errorWithMessageAndData() not passing args properly