Releases: Brain-WP/Cortex
Releases · Brain-WP/Cortex
v1.0.0-alpha.9
Fixed
- WP 6.0 compatibility (props @polevaultweb)
v1.0.0-alpha.8
v1.0.0-alpha.7
Fixed
Nothing
Added
MatchingResult::matches()
that returns the original vars matched from route
Changed
- Route callbacks (
before
andafter
) and route handler receive now a 4th param,$matches
that is whatMatchingResult::matches()
returns. See #12
v1.0.0-alpha.6
Fixed
- Removed URL "chucks" check to parse a route, which conflicted with some regex
Changed
- Controllers
run()
method accepts "template" as 3rd argument - Routes callbacks (
before
andafter
) accept "template" as 3rd argument - Allow route template to be
false
as a way to preven WP to load any template - Route option can contain arbitrary keys.
Added
nothing
v1.0.0-alpha.5
Changed
- Auto-generated paged vars always return
paged
(orpage
) query var
Added
'cortex.match.done'
action hook, after route parsing is done, beforeResultHandler
starts handling matching result object'cortex.result.done'
action hook, afterResultHandler
finished handle matching result objectActionRoute
object, to ease creation of routes with arbitrary callbacks as handler
v1.0.0-alpha.4
Changed
- Improve README
Fixed
- PHP versio nrequirement in
composer.json
0.1.0
v1.0.0-alpha.3
Added
- 'cortex.matched-vars' filter hook, to edit the final array of matched vars
Changed
- when there's an exact match between url path and route path, the route matches immediately, without even involving FastRoute Collector/ dispatcher
- if user is logged in and 'preview' query string var is present, it is always merged in matched vars to ensure post preview works
1.0.0-alpha.2
Added
cortex.routes
now passes uri object and HTTP method for more context-aware routes addingWordPressUri::chunks()
method to get an array of/
separated parts of url path
Changed
- Default method for routes is the current method: add no method to routes means they match any method
cortex.matched
now passesMatchingResult
instance- Required version of "psr/http-message" is now
*
no need to limit Cortex compatibility because of that dependency version, any version will work good for us
Fixed
- Paged routes casued FastRoute exception because tryed to add 2 routes with same path
1.0.0-alpha.1
- Huge refactoring with lot of breaking changes
- FastRoute instead of Symfony Routing Component
- Big strip down of dependencies
- MIT license