- Made compatible with XP 12 - @thekid
- Added PHP 8.4 to the test matrix - @thekid
- Made this library compatible with xp-forge/web version 4.0 - @thekid
- Merged PR #26: Add possibility to convert input parameters via annotations, see #25. Includes support for matrix parameters. (@thekid)
- Added compatibility with
xp-forge/marshalling
v2.0.0 - @thekid
- Fixed annotation argument not being taken into account - @thekid
- Heads up: Removed deprecated
web.rest.ClassesIn
- @thekid - Merged PR #24: Migrate to new reflection library - @thekid
- Merged PR #23: Migrate to new testing library - @thekid
- Merged PR #22: Change
Response::stream()
to use async APIs - @thekid
- Ensured default headers are always set, not just when returning a
web.rest.Reponse
instance (@thekid)
- Added X-Content-Type-Options: nosniff and Cache-Control: no-cache to prevent errors in the browser console when using REST APIs via XHR / fetch. See issue #21 (@thekid)
- Merged PR #20: Return "application/json; charset=utf-8" as content type, requested to be changed in #19. (@thekid)
- Merged PR #17: Add support for asynchronously running handler code (@thekid)
- Merged PR #16: Send a "HTTP/1.1 100 Continue" if we get an Expect header with "100-continue" (@thekid)
- Made library compatible with new major release of
xp-forge/json
(@thekid) - Made library compatible with XP 11, newer
xp-framework/zip
library (@thekid)
- Fixed PHP 8.1 compatibility - @thekid
- Made compatible with XP web 3.0, see xp-forge/web#83 - @thekid
- Merged PR #13: Parameter defaults. With this pull request, it's no longer necessary to supply parameter annotations for the typical case. (@thekid)
- Merged PR #14: Expand curly braces inside location in
Response::see()
andResponse::created()
. (@thekid) - Merged PR #12: Inject request into parameters with
web.Request
type (@thekid)
- Implemented xp-framework/rfc#334: Drop PHP 5.6:
. Heads up: Minimum required PHP version now is PHP 7.0.0
. Rewrote code base, grouping use statements
. Rewrote
isset(X) ? X : default
toX ?? default
(@thekid)
- Implemented RFC #335: Remove deprecated key/value pair annotation syntax (@thekid)
- Made compatible with XP 10 - @thekid
- Made compatible with
xp-forge/marshalling
0.3.0 - @thekid
- Merged PR #11: Handle
web.Error
- @johannes85, @thekid
- Heads up: Deprecated
web.rest.ClassesIn
, which is superseded by the newResourcesIn
class. See PR #10 for migration guide. (@thekid)
- Merged PR #9: Extract built-in marshalling to xp-forge/marshalling library; see https://github.com/xp-forge/marshalling (@thekid)
- Implemented content type negotation via the HTTP
Accept
header (@thekid) - Merged PR #5: Accept instances or delegates in RestApi constructor (@thekid)
- Merged PR #6: Add support for "application/x-www-form-urlencoded" (@thekid)
- Fixed unmarshalling when invoking setter methods with an array or map (@thekid)
- Merged PR #3: Two Bugfixes in Marshalling - @johannes85
- Merged PR #4: Intercept invocations, which allow passing functions or
web.rest.Interceptor
instances toRestApi
s to intercept calls to the delegates. Usecases are logging, performance profiling, caching, input validation and exception handling, for example. (@thekid)
- Added support for patterns in path segments, e.g.
/users/{id:[0-9]+}
(@thekid) - Fixed
request
injection when parameter was type-hinted - @thekid - Fixed marshalling not recursing into value objects - @thekid
- Changed dependency on
xp-forge/web
to version 1.0.0 since it has been released (@thekid)
- Added optional
base
argument to RestApi constructor. This way, an API instance can be mounted at a given base, e.g./api/1.0
without having to rewrite all the handlers. (@thekid)
- Fixed
Link: ... rel="next"
header not being shown for items produced by a generator (e.g.,yield
). (@thekid)
- Added
web.rest.Response::export()
for easier unittest - @thekid - Merged PR #2: Pagination - @thekid
- Added
@$req: request
to pass complete request object - @thekid
- Restored HHVM support - @thekid
- Added support for all traversable data structures like
ArrayIterator
orIteratorAggregate
implementations, not just generator functions. (@thekid)
- Fixed object fields not being converted to their declared types during
unmarshalling (e.g., using
/** @var T */
). (@thekid)
- Hello World! First release - @thekid