Releases: MarcinOrlowski/laravel-api-response-builder
Releases · MarcinOrlowski/laravel-api-response-builder
v9.3.0
- Added
data_always_objectconfig option that, when enabled enforces responsedatanode to always be JSON object (forNULLit 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
Converterunit tests for primitives-as-payload. - Fixed
ResponseBuilderProviderthrowing incorrect Exception in case of invalid config file. - Added
Validator::assertIsObjectOrExistingClass()method. Validator::assertIsInt()throws nowNotIntegerExceptionas expected.- Corrected
Validatorclass tests to check agains specific exceptions thrown, not base class. - Improved error handling in
JsonSerializableConverter - Switched Composer's autoload to follow
psr-4instead 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
devblock from defaultcomposer.json. See.config/README.mdfor details. - Updated documentation.
v9.2.3
- [RB-194] Changed signature of ExceptionHandlers'
handle()method to expectcThrowableinstead ofException(reported by @genesiscz).
v9.2.2
- [RB-190] Fixed converting resource and resource collection (reported by @achinkumar121).
v9.2.1
ExceptionHandlernow expects\Throwableinstead 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]
PaginatorandLengthAwarePaginatorsupport is now included in default converter configuration (reported by @kcaj-burr) - Fixed
testConfigClassesMappingEntriesUnwantedConfigKeys()testing trait not supportingnullkeys in converter config.
v9.0.3
Validatortype related exceptions must now implementInvalidTypeExceptionContract.converterconfigkeyelement now acceptsnullto 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.