1- ![ REST API Response Builder for Laravel] ( docs/logo.png )
1+ ![ REST API Response Builder for Laravel] ( docs/img/ logo.png )
22
33# REST API Response Builder for Laravel #
44
55See [ compatibility docs] ( docs/compatibility.md ) for details about backward compatibility!
66
77## CHANGE LOG ##
88
9+ * 6.2.0 (2019-10-19)
10+ * Changed how auto-converter checks for supported classes (see [ Data Conversion] ( docs/docs.md#data-conversion ) )
11+ * Data conversion now supports [ JsonResource] ( https://laravel.com/docs/6.0/eloquent-resources ) data class.
12+ * Added unit test for ` ResponseBuilderServiceProvider::mergeConfg() ` .
13+ * Moved data conversion code to separate ` Converter ` class.
14+ * Added ` LICENSE.md ` file.
15+ * Added Laravel 6.2 to Travis tests.
16+ * Added unit tests for translation files.
17+
918* 6.1.2 (2019-10-02)
1019 * Corrected ServiceProvider used for tests.
1120
1221* 6.1.1 (2019-10-02)
1322 * Fixed ` ResponseBuilderServiceProvider ` using unreferenced ` Arr ` class method (reported by yassir3wad).
14-
23+
1524* 6.1.0 (2019-09-28)
1625 * ** BACKWARD INCOMPATIBLE CHANGES** ([ more info] ( docs/compatibility.md ) )
17- * Created new library logo (see ` artwork/ ` folder)
26+ * Created new library logo (see [ artwork/] ( artwork/ ) folder).
1827 * Added more unit tests to improve coverage.
1928 * Updated documentation.
2029 * Worked arround Laravel's config merger wnot working properly with multi-dimensional config arrays.
@@ -24,13 +33,13 @@ See [compatibility docs](docs/compatibility.md) for details about backward compa
2433
2534* v6.0.0 (2019-09-20)
2635 * ** BACKWARD INCOMPATIBLE CHANGES** ([ more info] ( docs/compatibility.md ) )
27- * Requires Laravel 6.0+ and PHP 7.2+ (see docs for legacy support hints).
36+ * Requires Laravel 6.0+ and PHP 7.2+ (see [ docs] ( docs/legacy.md ) for legacy support hints).
2837 * All API codes are now withing defined code range, incl. built-in codes.
29- * Reserved code range lowered from former 63 down to 19 .
38+ * Reserved codes reduced to 19 ( from former 63) .
3039 * Added type hints to all method arguments and return values
31- * ` ExceptionHandler ` returns Exception-type related HTTP codes now as per configuration .
40+ * ` ExceptionHandler ` responses use exception specific HTTP code .
3241 * Fixed ` ResponseBuilder::errorWithMessageAndData() ` not passing data properly.
33- * Fixed exception message of ` ApiCodesHelpers::getMaxCode() ` .
42+ * Fixed exception message thrown by ` ApiCodesHelpers::getMaxCode() ` .
3443 * Corrected test cases list in ` testSuccess_DataAndHttpCode() ` .
3544 * Fixed error code fallback in ` testRender_HttpException() ` test.
3645 * Fixed ` testError_DebugTrace() ` not containing any asserts.
@@ -85,7 +94,7 @@ See [compatibility docs](docs/compatibility.md) for details about backward compa
8594 * Fixed ` version ` in ` composer.json ` file
8695
8796* v4.1.0 (2017-09-09)
88- * [ RB-70] Added support for Laravel 5.5's auto-discovery feature
97+ * ` [RB-70] ` Added support for Laravel 5.5's auto-discovery feature
8998
9099* v4.0.2 (2017-04-13)
91100 * Enforced HTTP code for error messages fits 400-499 range
@@ -94,68 +103,68 @@ See [compatibility docs](docs/compatibility.md) for details about backward compa
94103
95104* v4.0.1 (2017-04-10)
96105 * TestingHelpers trait's ` validateResponseStructure() ` method is now public
97- * [ RB-64] Fixed Exception Handler generated HTTP code being out of allowed range in some cases
98- * [ RB-65] Exception Handler Helper now deals with messages using non-UTF8 or broken encoding
106+ * ` [RB-64] ` Fixed Exception Handler generated HTTP code being out of allowed range in some cases
107+ * ` [RB-65] ` Exception Handler Helper now deals with messages using non-UTF8 or broken encoding
99108 * Exception Handler's trace data is now properly placed into ` trace ` leaf
100109
101110* v4.0.0 (2017-04-10)
102111 * ** BACKWARD INCOMPATIBLE CHANGES** ([ more info] ( docs/compatibility.md ) )
103- * [ RB-59] Added option to remap response JSON keys to user provided values
104- * [ RB-54] Debug data no longer pollutes ` data ` leaf. Instead, it adds ` debug ` dictionary to root data structure.
105- * [ RB-37] Added support for Laravel 5.3+ ` unauthenticated() ` in Exception Handler. See new config keys defails
106- * [ RB-47] Exception Handler now supports ` FormRequests ` and returns all messages in ` ResponseBuilder::KEY_MESSAGES `
112+ * ` [RB-59] ` Added option to remap response JSON keys to user provided values
113+ * ` [RB-54] ` Debug data no longer pollutes ` data ` leaf. Instead, it adds ` debug ` dictionary to root data structure.
114+ * ` [RB-37] ` Added support for Laravel 5.3+ ` unauthenticated() ` in Exception Handler. See new config keys defails
115+ * ` [RB-47] ` Exception Handler now supports ` FormRequests ` and returns all messages in ` ResponseBuilder::KEY_MESSAGES `
107116 * Uncaught ` HttpResponse::HTTP_UNAUTHORIZED ` exception is now handled same way ` authentication_exception ` is
108- * [ RB-56] Added configurable key for debug trace added to returned JSON response (if enabled)
117+ * ` [RB-56] ` Added configurable key for debug trace added to returned JSON response (if enabled)
109118 * Added traits to help testing your config and ApiCodes with ease. See ` Unit Testing your ApiCodes ` docs for details
110119 * ` ApiCodeBase ` class is now named ` BaseApiCodes `
111- * [ RB-35] ExceptionHandlerHelper is now covered by tests
120+ * ` [RB-35] ` ExceptionHandlerHelper is now covered by tests
112121
113122* v3.2.1 (2017-04-06)
114- * [ RB-49] Fixed ` artisan vendor:publish ` not publishing config file correctly
123+ * ` [RB-49] Fixed ` artisan vendor: publish ` not publishing config file correctly
115124
116125* v3.2.0 (2017-03-02)
117- * [ RB-42] Default value of ` encoding_options ` include ` JSON_UNESCAPED_UNICODE ` to prevent unicode escaping
118- * [ RB-41] Updated documentation
126+ * ` [RB-42] Default value of ` encoding_options` include ` JSON_UNESCAPED_UNICODE` to prevent unicode escaping
127+ * ` [RB-41] ` Updated documentation
119128
120129* v3.1.0 (2017-02-28)
121- * [ RB-38] Added ` encoding_options ` to control data-to-json conversion.
122- * [ RB-38] Added optional encoding options args to all methods accepting ` data ` argument
123- * [ RB-34] Added option to control ExceptionHandler behavior on debug builds
130+ * ` [RB-38] Added ` encoding_options` to control data-to-json conversion.
131+ * ` [RB-38] Added optional encoding options args to all methods accepting ` data` argument
132+ * ` [RB-34] ` Added option to control ExceptionHandler behavior on debug builds
124133 * ExceptionHandler's debug is now added as ` debug ` node to make it more clear where it comes from
125134
126135* v3.0.3 (2017-02-24)
127136 * No changes. v3.0.2 was incorrectly released
128137
129138* v3.0.2 (2017-02-24)
130- * [ RB-31] Fixed incorrect exception message thrown in case of incomplete ` classes ` config mapping (@dragonfire1119 )
139+ * ` [RB-31] Fixed incorrect exception message thrown in case of incomplete ` classes` config mapping (@dragonfire1119 )
131140
132141* v3.0.1 (2017-02-23)
133142 * Updated ` composer.json ` to list ` laravel/framework ` among requirements
134143
135144* v3.0.0 (2017-02-23)
136145 * ** BACKWARD INCOMPATIBLE CHANGES** ([ more info] ( docs/compatibility.md ) )
137- * [ RB-17] ` success() ` now allows to return API code as well
146+ * ` [RB-17] ` success()` now allows to return API code as well
138147 * Corrected default config file containing faulty and unneeded ` use ` entries
139- * [ RB-20] Renamed ErrorCode class to ApiCodeBase
148+ * ` [RB-20] ` Renamed ErrorCode class to ApiCodeBase
140149 * ApiCodeBase's ` getMinCode() ` and ` getMaxCode() ` are now ` public `
141150 * Improved error messages to be even more informative
142151 * All exceptions thrown due to misconfiguration have ` CONFIG: ` message prefix now
143152 * Renamed ` error_code ` param to ` api_code ` in all the method signatures
144153 * ` :api_code ` is now code placeholder in strings (` :error_code ` is no longer supported)
145154 * Default HTTP codes are now declared as constants ` DEFAULT_HTTP_CODE_xxx ` if you need to know them
146155 * ` ApiCodeBase::getMap() ` now ensures ` map ` config entry of expected ` array ` type
147- * [ RB-26] Added ` successWithCode() ` method
156+ * ` [RB-26] ` Added ` successWithCode() ` method
148157
149158* v2.2.1 (2017-02-20)
150159 * Documentation split into separate files
151160
152161* v2.2.0 (2017-02-20)
153- * [ RB-5] Fixed error code range not being checked when used with custom message strings
162+ * ` [RB-5] ` Fixed error code range not being checked when used with custom message strings
154163 * ` successWithHttpCode() ` , ` errorWithDataAndHttpCode() ` , ` errorWithHttpCode() ` throws exception if ` http_code ` is ` null `
155164 * ` http_code ` can be handed as null to all other methods and it will be replaced by default codes
156165 * ` classes ` mapping now features ` method ` field to specify method name to call for automatic object conversion
157- * [ RB-10] When ` $data ` is an ` array ` , all elements mapped via "classes" config will be converted recursively
158- * [ RB-3] Unit tests are now part of the package
166+ * ` [RB-10] When ` $data` is an ` array`, all elements mapped via "classes" config will be converted recursively
167+ * ` [RB-3] ` Unit tests are now part of the package
159168
160169* v2.1.2 (2016-08-24)
161170 * Fixed exception code handling in ExceptionHandlerHelper (reported by Adrian Chen @absszero )
0 commit comments