Releases: MarcinOrlowski/laravel-api-response-builder
Releases · MarcinOrlowski/laravel-api-response-builder
v9.3.0
- Added
data_always_object
config option that, when enabled enforces responsedata
node to always be JSON object (forNULL
it will return empty object{}
). - Updated project logo
- Improved code quality (fully pass on PHPStan's strict mode)
- Updated code style to match standard ruleset.
- Fixed floats being rejected as direct primitive payload.
- Fixed
Converter
unit tests for primitives-as-payload. - Fixed
ResponseBuilderProvider
throwing incorrect Exception in case of invalid config file. - Added
Validator::assertIsObjectOrExistingClass()
method. Validator::assertIsInt()
throws nowNotIntegerException
as expected.- Corrected
Validator
class tests to check agains specific exceptions thrown, not base class. - Improved error handling in
JsonSerializableConverter
- Switched Composer's autoload to follow
psr-4
instead of plainclassmap
(thanks to Viktor Szépe). - Added
TestingHelpers::getResponseContent()
,TestingHelpers::langGet()
to satisfy static analyzers. - Updated and corrected PHPDocs (incl. some type hints).
- Added missing type hint to
success()
. - Added strict type header to classes.
- Removed
dev
block from defaultcomposer.json
. See.config/README.md
for details. - Updated documentation.
v9.2.3
- [RB-194] Changed signature of ExceptionHandlers'
handle()
method to expectcThrowable
instead ofException
(reported by @genesiscz).
v9.2.2
- [RB-190] Fixed converting resource and resource collection (reported by @achinkumar121).
v9.2.1
ExceptionHandler
now expects\Throwable
instead of\Exception
.
v9.2.0
- Updated Travis config to run tests on PHP 8 too.
- Added Arabic translation (thanks to @mustafa-online)
- Added Turkish translation (thanks to @victorioustr)
v9.1.1
v9.1.0
- [RB-175]
Paginator
andLengthAwarePaginator
support is now included in default converter configuration (reported by @kcaj-burr) - Fixed
testConfigClassesMappingEntriesUnwantedConfigKeys()
testing trait not supportingnull
keys in converter config.
v9.0.3
Validator
type related exceptions must now implementInvalidTypeExceptionContract
.converter
configkey
element now acceptsnull
to indicate you want no key to be used.
v9.0.2
- Corrected tests to use regular ServiceProvider.
- Corrected primitive converter tests.
- Presence of configuration "converter/classes" array is now mandatory (reported by Raja)
- Extensive documentation overhaul
v9.0.1
- Fixed auto-discovery failing due to broken
ServiceProvider
(reported by Efriandika Pratama). - Corrected documentation and usage examples.