Skip to content

Releases: Brain-WP/Cortex

v1.0.0-alpha.9

22 Jul 10:52
136c5fd
Compare
Choose a tag to compare

Fixed

v1.0.0-alpha.8

16 Nov 18:44
Compare
Choose a tag to compare

Added

  • "template" can now be a callback (see #22)

Changed

  • Improved docs

v1.0.0-alpha.7

14 Jul 19:57
Compare
Choose a tag to compare

Fixed

Nothing

Added

  • MatchingResult::matches() that returns the original vars matched from route

Changed

  • Route callbacks (before and after) and route handler receive now a 4th param, $matches that is what MatchingResult::matches() returns. See #12

v1.0.0-alpha.6

13 Jul 13:38
Compare
Choose a tag to compare

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 and after) 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

29 Feb 22:16
Compare
Choose a tag to compare
v1.0.0-alpha.5 Pre-release
Pre-release

Changed

  • Auto-generated paged vars always return paged (or page) query var

Added

  • 'cortex.match.done' action hook, after route parsing is done, before ResultHandler starts handling matching result object
  • 'cortex.result.done' action hook, after ResultHandler finished handle matching result object
  • ActionRoute object, to ease creation of routes with arbitrary callbacks as handler

v1.0.0-alpha.4

23 Feb 19:35
Compare
Choose a tag to compare
v1.0.0-alpha.4 Pre-release
Pre-release

Changed

  • Improve README

Fixed

  • PHP versio nrequirement in composer.json

0.1.0

23 Feb 17:58
Compare
Choose a tag to compare

Legacy version of Cortex

v1.0.0-alpha.3

19 Feb 16:08
Compare
Choose a tag to compare
v1.0.0-alpha.3 Pre-release
Pre-release

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

18 Feb 16:10
Compare
Choose a tag to compare
1.0.0-alpha.2 Pre-release
Pre-release

Added

  • cortex.routes now passes uri object and HTTP method for more context-aware routes adding
  • WordPressUri::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 passes MatchingResult 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

12 Feb 11:20
Compare
Choose a tag to compare
1.0.0-alpha.1 Pre-release
Pre-release
  • Huge refactoring with lot of breaking changes
  • FastRoute instead of Symfony Routing Component
  • Big strip down of dependencies
  • MIT license