simple-php-router

Simple, fast and yet powerful PHP router that is easy to get integrated and in any project. Heavily inspired by the way Laravel handles routing, with both simplicity and expand-ability in mind.

Downloads
140.9K
Stars
646
Committers
13
simple-php-router - Version 2.5.6

Published by skipperbent almost 8 years ago

  • Input optimisations
simple-php-router - Version 2.5.5

Published by skipperbent almost 8 years ago

  • Optimised Input-classes.
  • get and getObject methods on Input now supports filtering on multiple method-types when using the $method parameter.
  • Input classes now know how to parse that stupid nested $_FILES array.
  • It's now possible to change method-names on ResourceControllers.
  • Removed getValue and setValue from InputFile classes.
  • Ensured that request-method are only parsed from $_POST or $_SERVER.
  • Fixed minor parameter-issues with subdomain routing.
  • Added PHP-docs.
  • Added even more unit-tests.
  • Many small optimisations tweaks.
simple-php-router - Version 2.5.4

Published by skipperbent almost 8 years ago

  • It's now possible to adjust the load-order for parameters on routes.
  • Replaced PHP 7.1 deprecated mcrypt_create_iv function with random_bytes if available (requires >=PHP7)
  • Added setIndex, setName and setValue methods to IInputItem to allow for extendability.
  • Cleanup and bug fixes.
simple-php-router - Version 2.5.3

Published by skipperbent almost 8 years ago

  • Ensure that requestMethod is always lowercase in Request class.
  • Fixed spaces instead of tabs to comply with PSR-2.
simple-php-router - Version 2.5.2

Published by skipperbent almost 8 years ago

  • Fixed BootManager's not loading if less than 2 is added.
  • Optimised for-loops.
simple-php-router - Version 2.5.1

Published by skipperbent almost 8 years ago

  • Fixed Exception due to Input class not being loaded in Request class.
simple-php-router - Version 2.5.0

Published by skipperbent almost 8 years ago

  • Reworked Input and Input-related classes/features.
  • Removed InputCollection class.
  • Changed more foreach to for to avoid using unnecessary traversables.
  • BaseCsrfVerifier now only matches on POST, PUT and DELETE http-verbs.
  • Parameters are now parsed on custom regex-matches.
  • Added $type option to get method in Input class.
  • Removed demo-project - added to separate GitHub url.
  • Began work on new documentation.
simple-php-router - Version 2.4.6

Published by skipperbent almost 8 years ago

  • Fixed one HttpException not thrown as NotFoundHttpException.
simple-php-router - Version 2.4.5

Published by skipperbent almost 8 years ago

  • Fixed: input parameters are only parsed on valid content-type requests.
  • Fixed: references to request().
  • Fixed: Old behavior - only merge $_GET when all parameters are null when using getUrl.
  • Only parse parameters if modifier is found.
  • Changed many foreach to for to avoid using traversables (performance).
  • Made Response class use Request when parsing stuff.
  • Other small optimisations + bug fixes.
simple-php-router - Version 2.4.4

Published by skipperbent almost 8 years ago

  • Changed so getUrl only adds $_GET parameters is every other parameter is null when calling getUrl.
simple-php-router - Version 2.4.3

Published by skipperbent almost 8 years ago

  • Added example on how to get current url in documentation.
  • Fixed so urls always ends with /.
simple-php-router - Version 2.4.2

Published by skipperbent almost 8 years ago

  • Fixed // when calling url() on current route.
simple-php-router - Version 2.4.1

Published by skipperbent almost 8 years ago

  • Moved middleware stuff back to Route class.
  • Fixed Tests not working due to invalid method.
  • Updated deprecated method-calls in demo-project.
simple-php-router - Version 2.4.0

Published by skipperbent almost 8 years ago

  • Added more doctype and descriptions on functionality.
  • Renamed methods and properties to make better sense.
  • Added IRoute interface for easier extensibility.
  • Changed namespace for Route classes.
  • Made router rely heavily only on interface classes when making comparisons on type.
  • Moved find-url related stuff to routes-classes itself, so route's are more self obtained.
  • Added support for custom names on RouteController and RouteResource route.
  • Removed deprecated methods (getAlias, hasAlias, setAlias).
  • Removed getRoutes deprecated class from Route class.
  • Changed RouterBase to Router.
  • Changed RouterBootManager to interface IRouterBootManager.
  • Renamed merge method to setSettings in IRoute related classes.
  • Added merge param to setSettings method in IRoute related classes.
  • Added more unit-tests for finding urls.
  • Updated documentation.
  • Updated demo-project to reflect changes.
  • If $getParams is null when calling getUrl it will use $_GET as default.
  • Fixed double / that could appear on urls on rare occasions.
  • Minor bug fixes and improvements.

Release notes

Many class-names and namespaces has changed in this version. Please read the release notes carefully before updating to this version.

simple-php-router - Version 2.3.1

Published by skipperbent almost 8 years ago

  • Fixed: wrong argument-type in getUrl method in SimpleRouter class.
simple-php-router - Version 2.3.0

Published by skipperbent almost 8 years ago

  • Major refactoring of basic components.
  • Added phpunit tests for url-generation.
  • Updated documentation.
  • Updated demo-project.

Release notes

NOTE: This version has breaking changes. Please update with caution and review the pull-request before updating in production.

simple-php-router - Version 2.2.3

Published by skipperbent almost 8 years ago

  • Optimisations + cleanup.
simple-php-router - Version 2.2.2

Published by skipperbent almost 8 years ago

  • Bugfixes.
simple-php-router - Version 2.2.1

Published by skipperbent almost 8 years ago

  • Small optimisations.
simple-php-router - Version 2.2.0

Published by skipperbent almost 8 years ago

  • Fixed update causing middlewares to sometimes load on wrong routes.
  • Converted project to PSR/2.
  • Updated InputCollection class and added get method for easy access to values.
  • Complete refactor of RouterBase.
  • Added findRoute method to RouterBase.
  • It's now possible to change parameter modifiers and symbol by overwriting properties on RouterBase.
  • Added RouterUrlTest unit-test for testing route-urls.
  • Added IRestController that can be easily implemented in custom ResourceController-classes.
  • It's now possible to use "-" instead of "_" when using getHeader method in Request class.
  • Added PHPDocs.
  • Fixed "/" route sometimes returning "//" as url.
  • Optimisations and bug fixes.