All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
1.0.0 - 2019-01-05
- Added cacheable page type, caching option to preferences, and caching logic for GET requests
- Added
CacheableJsonFrontEndPageclass - Added
convertEmptyElementsToStringtransformer - Added
pointybeard/symphony-classmapperandpointybeard/symphony-pdolibraries tocomposer.json - Added JSON encoding options to
JsonFrontendclass. This makes it easier to apply encoding changes across an entire API. Including two new methods:getEncodingOptions()andsetEncodingOptions() - Added shutdown method to
ErrorHandlerso JSON error is rendered when there are unrecoverable errors (rather than error based on Symphony's HTML error template) - Added
loadCurrentFromPageAndQueryString(),hasExpired(),expire(),fetchExpired(),deleteExpired(),removeAPIFrameworkHeadersFromJsonString(), andremoveAPIFrameworkHeadersFromArray()methods toPageCachemodel - Added better error handling when setting
isCachable
- Changed required versions of
symfony/http-foundationandjustinrainbow/json-schema - Removed code that stored
resolvedPagedata since causes issues with page params - No longer passing resolved page data to the contructor for
CacheableJsonFrontEndPageandJsonFrontEndPage - Using
JsonFrontendencoding options when generating responses
JsonFrontend::display()was failing if the page doesnt exist sinceresolvedPageis false
0.9.0 - 2018-09-27
- Added extended FrontendPage class,
JsonFrontendPageto handle json requests specifically. - Added
JsonRequestandRequestJsonInvalidException. They are used to grab the incoming json data. Also updated controller event to useJsonRequest. - Added logic that allows pages without JSON content to still reach the controller (Fixes #20)
- JSON Schema validation
- Fixed the recursive method
recursiveApplyTransformationToArray(). It had a logic bug that meant the result from lower levels was not propagated up the chain. Additionally, the@attributesarray was not being dealt with consistently. The last transformer to run will trigger a cleanup which removes the@attributesarray. (#15, #16, and #17) - Fixed Exception namespace in
__construct()function signature (Fixes #19). - Added
JSON_UNESCAPED_SLASHESflag when generating output from ExceptionHandler (Fixes #22)
- Updated controller event to pass Request object when calling execute method of a Controller object.
- Updated README for fixes #15 #16 and #17.
- Updated the json renderer to use
JsonFrontendinstead of the core Frontend class. - Changed abstract method
execute()to include a Request object, allowing controllers to manipulate the Request. - Changed the way a controller path is discovered by using
current-pageandparent-pathinstead ofcurrent-path. (#14) - Removed
boilerplate-xslfeature. This is no longer required as?debugnow works correctly. (#12) - Using
Lib\JsonFrontendinstead ofFrontend.JsonFrontendno longer extends theFrontendclass. - Minor improvements to how error handling works. Subverting some behaviour of the
FrontendPageclass by skipping it's constructor.JsonFrontendwill force enable theGenericExceptionHandler
0.2.1 - 2016-06-17
- Added
JSON_UNESCAPED_SLASHESto avoid unnecessary escaping of slashes in output. (#8) - Added new abstract extension
AbstractApiExceptionwhich is used byControllerNotFoundExceptionandMethodNotAllowedException. Allows setting of HTTP response code to avoid every exception thrown appearing as a '500 Internal Server Error'
- Updated core controller event based on changes to
ControllerNotFoundExceptionandMethodNotAllowedException - Updated
ControllerNotFoundExceptionandMethodNotAllowedExceptionto extend the newAbstractApiExceptionclass - Updated
ExceptionHandlerto check for overloaded http response code. Calls the methodgetHttpStatusCode()if it is available
- Removed the use clause for Symphony as it is redundant and causes a PHP warning
- Using API Framework exception and error handlers instead of Symphony built in. (#9)
0.2.0 - 2016-05-03
- Transformer and Transformation classes.
- Added APIFrameworkJSONRendererAppendTransformations delegate
- Added phpunit to composer require-dev
- Added unit tests for Transformation code
- Controller names are based on full page path (#5)
- Using PSR-4 folder structure for controllers. Controllers must have a namespace. (#7)
- Checking that controller actually exists before trying to include it (#6)
- Symphony PDO is not longer a Composer requirement as it is not used
0.1.1 - 2016-04-25
- Added CONTRIBUTING.md and CHANGELOG.md
- Improvements to the example controller code in README.md
- Code cleanup
- Improved README.md
- Extension driver had include class name which meant could not install
- Initial release
- Added Symphony PDO as requirement