Skip to content
Compare
Choose a tag to compare

Added

  • Extra logic for Route::gretPath to be able to properly resolve optional parameters.
Compare
Choose a tag to compare

Fix

  • Fix to allow multiple routes with the same path to be mapped across multiple extra conditions (scheme, host, port).
Compare
Choose a tag to compare

Added

  • Support for named routes within groups (@Fredrik82)
Compare
Choose a tag to compare

Added

  • Support for psr/container:2.0
Compare
Choose a tag to compare

[5.0.0] 2021-01

Added

  • A cached router, a way to have a fully built router cached and resolved from cache on subsequent requests.
  • Response decorators, a way to manipulate a response object returned from a matched route.
  • Automatic generation of OPTIONS routes if they have not been defined.

Changed

  • Minimum PHP requirement bumped to 7.2.
  • Router no longer extends FastRoute RouteCollecter.
    • Router constructor no longer accepts optional FastRoute RouteParser and DataGenerator.
    • Router constructor now accepts an optional FastRoute RouteCollector.
      • Routes already registered with FastRoute RouteCollector are respected and matched.
  • Separated route preparation from dispatch process so that the router can dispatch multiple times.
  • General code improvements.

Removed

  • Setting of default response headers on strategies. (Replaced by response decorators, see Added).
  • Exception handlers from strategies. (Already deprecated in favour of throwable handlers).
Compare
Choose a tag to compare

[4.5.0] 2020-05

Added

  • Ability to pass optional $replacements array to Route::getPath in order to build literal route path strings.
Compare
Choose a tag to compare

[4.4.0] 2020-05

Added

  • Ability to pass JSON flags to JsonStrategy. (@pine3ree)
  • Router is now a RequestHandlerInterface so can be used as a middleware itself. (@delboy1978uk)
  • Route params now added as Request attributes. (@delboy1978uk)

Fixed

  • Exception moved to more appropriate place when shifting no middleware. (@delboy1978uk)
  • Ensure group prefix is always added when adding a parent group. (@delboy1978uk)
Compare
Choose a tag to compare

[4.3.1] 2019-07

Fixed

  • Fixed bug when attempting to get a container for custom strategy that is not container aware.
Compare
Choose a tag to compare

[4.3.0] 2019-06

Added

  • Ability to add middleware to the stack as a class name so it is only instantiated when used.

Changed

  • Switch to use zendframework/zend-httphandlerrunner as removed from diactoros (@JohnstonCode)

Fixed

  • When adding a prefix to a group after adding routes, it is now applied to those routes. (@delboy1978uk)
  • Fix to how shifting middleware is handled to prevent error triggering. (@delboy1978uk)
  • Fix to ensure that when invoking FastRoute methods on League\Route all callables are converted to League\Route objects (@pgk)
  • Various documentation fixes.
Compare
Choose a tag to compare

[4.2.0] 2018-10

Added

  • Allow adding default response headers to strategies.
  • Expand error handling to include Throwable.

(Thanks @shadowhand)