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
CacheableJsonFrontEndPage
class - Added
convertEmptyElementsToString
transformer - Added
pointybeard/symphony-classmapper
andpointybeard/symphony-pdo
libraries tocomposer.json
- Added JSON encoding options to
JsonFrontend
class. This makes it easier to apply encoding changes across an entire API. Including two new methods:getEncodingOptions()
andsetEncodingOptions()
- Added shutdown method to
ErrorHandler
so 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 toPageCache
model - Added better error handling when setting
isCachable
- Changed required versions of
symfony/http-foundation
andjustinrainbow/json-schema
- Removed code that stored
resolvedPage
data since causes issues with page params - No longer passing resolved page data to the contructor for
CacheableJsonFrontEndPage
andJsonFrontEndPage
- Using
JsonFrontend
encoding options when generating responses
JsonFrontend::display()
was failing if the page doesnt exist sinceresolvedPage
is false
0.9.0 - 2018-09-27
- Added extended FrontendPage class,
JsonFrontendPage
to handle json requests specifically. - Added
JsonRequest
andRequestJsonInvalidException
. 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@attributes
array was not being dealt with consistently. The last transformer to run will trigger a cleanup which removes the@attributes
array. (#15, #16, and #17) - Fixed Exception namespace in
__construct()
function signature (Fixes #19). - Added
JSON_UNESCAPED_SLASHES
flag 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
JsonFrontend
instead 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-page
andparent-path
instead ofcurrent-path
. (#14) - Removed
boilerplate-xsl
feature. This is no longer required as?debug
now works correctly. (#12) - Using
Lib\JsonFrontend
instead ofFrontend
.JsonFrontend
no longer extends theFrontend
class. - Minor improvements to how error handling works. Subverting some behaviour of the
FrontendPage
class by skipping it's constructor.JsonFrontend
will force enable theGenericExceptionHandler
0.2.1 - 2016-06-17
- Added
JSON_UNESCAPED_SLASHES
to avoid unnecessary escaping of slashes in output. (#8) - Added new abstract extension
AbstractApiException
which is used byControllerNotFoundException
andMethodNotAllowedException
. 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
ControllerNotFoundException
andMethodNotAllowedException
- Updated
ControllerNotFoundException
andMethodNotAllowedException
to extend the newAbstractApiException
class - Updated
ExceptionHandler
to 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