- Merged PR #53: Create dedicated "cannot route" error - @thekid
- Made compatible with
xp-framework/httpversion 11.0 - @thekid - Added PHP 8.6 to the test matrix - @thekid
- Added compatibility with
xp-forge/compressionversion 2.0+, enabling the ZStandard compression algorithm when thezstdextension is loaded. See https://github.com/kjdev/php-ext-zstd
- Supported specifying SSL/TLS protocol by using e.g.
https+tlsv12://in the URLs. Workaround for CloudFlare raising "403 Forbidden" errors when OpenSSL negotiates the TLS version; see issue #51. (@thekid)
- Refactored code base to use the
web.io.StaticContentclass instead of inheriting from the FilesFrom handler. (@thekid)
- Made it possible to use
web.frontend.Securityinstances for assets (@thekid) - Implemented default CSP in
web.frontend.AssetsFromto prevent XSS with SVG files. See #49 and https://stackoverflow.com/q/10557137 (@thekid) - Heads up: Dropped support for PHP < 7.4, see xp-framework/rfc#343 (@thekid)
- Added PHP 8.5 to test matrix - @thekid
- Added
web.frontend.View::type()to setContent-Typeheader easily (@thekid) - Merged PR #50: Add support for setting the
Last-Modifiedheader easily (@thekid)
- Merged PR #48: Implement
View::dispatch(), which redirects internally and dispatches the request to another route, bumping the dependency on theweblibrary to https://github.com/xp-forge/web/releases/tag/v4.2.0 (@thekid)
- Added dependency on
xp-forge/compression, see xp-framework/rfc#342 (@thekid) - Made compatible with XP 12 - @thekid
- Made this library compatible with xp-forge/web version 4.0 - @thekid
- Implemented xp-framework/rfc#341: Drop support for XP 9 - @thekid
- Merged PR #47: Support unmarshalling handler parameters - @thekid
- Merged PR #46: Allow specifying status code in
View::redirect()(@thekid) - Merged PR #45: Add
View::empty()to create a view which will not be rendered (@thekid) - Merged PR #44: Allow specifying template and fragment separated
by
#inView::named(). (@thekid)
- Merged PR #43: Support compression when downloading (in bundler) (@thekid)
- Merged PR #42: Add support for special
_methodfield to overwrite POST for routing (@thekid)
- Merged PR #40: Support
X-Csrf-Tokenheader (in addition to passingtokenvia payload). This makes integrating with frameworks such as HTMX easier. (@thekid)
- Merged PR #39: Support multiple sources in web.frontend.AssetsFrom (@thekid)
- Added PHP 8.4 to the test matrix - @thekid
- Merged PR #38: Make it possible to select a template fragment. The Handlebars template engine implements this, for example. See the PR xp-forge/handlebars-templates#14 (@thekid)
- Merged PR #37: Migrate to new reflection library. This introduces BC breaks in several cases, which may be regarded internal APIs, but might have also been used by the outside. (@thekid)
- Added possibility to explicitely pass target delegate and parameters to frontend handling, bypassing the request URI based routing logic. (@thekid)
- Added accessors for delegates and templates to
Frontend- @thekid - Merged PR #36: Migrate to new testing library - @thekid
- Fixed Creation of dynamic property errors in PHP 8.2 - @thekid
- Merged PR #35: Handle HEAD requests via GET unless explicitely handled (@thekid)
- Merged PR #33: Support glob patterns and directories for local dependencies, see https://www.php.net/glob (@thekid)
- Merged PR #32: Remove error handling constructor parameter - @thekid
- Merged PR #31: Implement default security policies, setting the headers
X-Content-Type-Options,X-Frame-OptionsandReferrer-Policyto sensible default values and providing a way to define a Content Security Policy. See https://github.com/xp-forge/frontend#security and issue #30 (@thekid)
- Merged PR #29: Compress assets downloaded as dependencies - @thekid
- Merged PR #28: Add support for bundling web fonts - @thekid
- Made library compatible with XP 11,
xp-forge/jsonversion 5.0.0 (@thekid)
- Made compatible with XP web 3.0, see xp-forge/web#83 - @thekid
- Merged PR #27: Add support for remote dependencies - @thekid
- Added possibility to use placeholders in
#[Handler]annotations (@thekid)
- Fixed issue #26: Unsupported operand types: array + null - @thekid
- Merged PR #25: Exception handling API. This allows to catch exceptions
and render a view instead of falling back to the minimalistic default
error pages provided by
xp-forge/web. (@thekid) - Heads up: Unmatched routes now result in a 404 "Not found" errors. Missing or mismatched CSRF tokens now yield 403 "Forbidden" - see #24 (@thekid)
- Added
charset=utf-8parameter toContent-Typeheader for all text, XML, JSON and JavaScript files. Implements suggestion in #23. (@thekid)
- Merged PR #22: If brotli extension is available, also compress to .br files - they're signifantly smaller! (@thekid)
- Used a compression level of 9 when compressing assets. Implements feature request #21. (@thekid)
- Merged PR #20: Add ability to bundle local files - @thekid
- Fixed issue #19: Raise 404 if folder is accessed - @thekid
- Removed deprecated ClassesIn replaced by
web.frontend.HandlersInback in version 1.0.0 of this library. (@thekid - Heads up: Dropped support for
xp-forge/webversion 1. This library now requires at least version 2.9.0! (@thekid) - Merged PR #18: Extend AssetsFrom handler from web.handlers.FilesFrom, enabling asynchronous asset downloads (@thekid)
- Added
Vary: Accept-Encodingto prevent CDNs from caching incorrectly, see https://blog.stackpath.com/accept-encoding-vary-important/ (@thekid)
- Merged PR #17: Implement asset fingerprinting. This makes the bundler
generate assets named
[name].[contenthash].[extension], which can then be delivered with immutable caching, see https://webhint.io/docs/user-guide/hints/hint-http-cache/ (@thekid) - Merged PR #16: Introduce globals, which are passed to the template context. This is a prerequisite for being able to pass the asset manifest to the frontend, see #15. (@thekid)
- Merged PR #14: Set Cache-Control to no-cache & allow overwriting via
View::cache()(@thekid) - Merged PR #13: Add
web.handler.AssetsFromto serve frontend assets. (@thekid) - Merged PR #12: Add
xp bundlesubcommand. This tool can compile NPM libraries into bundled frontend assets and serves as a lightweight alternative to a more complicated npm & webpack build system. (@thekid)
- Added
X-Content-Type-Options: nosniffto headers to prevent UAs from performing guesswork. See https://mimesniff.spec.whatwg.org/ and https://webhint.io/docs/user-guide/hints/hint-x-content-type-options/ (@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
. Converted
newinstanceto anonymous classes . Rewroteisset(X) ? X : defaulttoX ?? default(@thekid)
- Implemented xp-framework/rfc#334: Remove deprecated key/value pair annotation syntax (@thekid)
- Made compatible with XP 10 - @thekid
- Merged PR #10: Handlers. Heads up: This deprecates the
ClassesInloader! Refactoring code means replacing ClassesIn with HandlersIn inside the application and adding the@handlerannotation to all handler classes. (@thekid)
- Added PHP 7.4 support - @thekid
- Fixed wrapped exceptions' stacktraces from appearing. See PR #9 for discussions, examples and the (easy) fix. (@thekid, @johannes85)
- Merged PR #8: Request in templates - @johannes85, @thekid
- Added possibility to inject request by using
requestas parameter annotation (@johannes85, @thekid)
- Merged PR #6: Allows to throw web.Error in handler - @johannes85
- Fixed patterns to always be applied in order of their length, longest patterns first (@thekid)
- Merged PR #5: Delegates; adding shorthand alternative to manually entering all routes (@thekid)
- Added support for patterns in path segments, e.g.
/users/{id:[0-9]+}(@thekid)
- Fixed issue #3: Two named subpatterns have the same name - @thekid
- Changed dependency on
xp-forge/webto version 1.0.0 since it has been released (@thekid)
- Changed parameter annotations parsing to no longer be performed for every request, instead lazily initialize on first use; then cache. See https://nikic.github.io/2014/02/18/Fast-request-routing-using-regular-expressions.html (@thekid)
- Made HTTP response headers controllable via
View::header()- @thekid - Made HTTP response status controllable via
View::status()- @thekid
- Hello World! First release - @thekid