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 3.4.6.3

Published by skipperbent almost 7 years ago

  • More Input-related optimisations.
simple-php-router - Version 3.4.6.2

Published by skipperbent almost 7 years ago

  • Fixed minor issues with file-input parsing.
  • Optimized Input class and removed old, unused functionality.
simple-php-router - Version 3.4.6.1

Published by skipperbent almost 7 years ago

  • Fixed typo in InputFile class.
  • Fixed minor url parsing issues.
simple-php-router - Version 3.4.6.0

Published by skipperbent almost 7 years ago

  • Fixed issue with InputFile not setting file-name properly.
  • Fixed issue with InputFile not setting the correct index when
    posting certain arrays.
  • Made Csrf-token handling more versatile by creating new
    CookieTokenProvider and ITokenProvider classes.
  • Better handling of urls in Uri class and small optimisations.
  • Request class now calls SimpleRouter::addDefaultNamespace in setRewriteRoute method as it was
    originally the intended behavior and to avoid duplicate functionality.
  • Strict-checks optimisations.
  • Updated documentation to reflect new changes.

Release notes

NOTE: This release contains changes that might affect your project.
Please read the release-note carefully before updating.

  • Due to new token-provider changes the CsrfToken class has been moved to Pecee\Http\Security\CookieTokenProvider.

  • Any references to SimpleRouter::router()->getCsrfVerifier()->getToken() should be replaced with SimpleRouter::router()->getCsrfVerifier()->getTokenProvider()->getToken().

simple-php-router - Version 3.4.5.6

Published by skipperbent almost 7 years ago

  • Fixed default-namespace causing router to break on closures.
  • Fixed spelling in documentation.
simple-php-router - Version 3.4.5.5

Published by skipperbent almost 7 years ago

  • Csrf-token are now refreshed on each page-load to avoid timeout.
simple-php-router - Version 3.4.5.4

Published by skipperbent almost 7 years ago

  • Added IIS Troubleshooting section to documentation (thanks to @jatubio - issue: #303).
  • Minor optimisations.
simple-php-router - Version 3.4.5.3

Published by skipperbent about 7 years ago

  • Added more info on route or method not allowed exception (issue: #297 - thanks @jatubio)
  • Added CSRF form-example in documentation (issue: #299 - thanks @PSF1)
simple-php-router - Version 3.4.5.2

Published by skipperbent about 7 years ago

  • simple-php-router will now use next exception-handler, if an exception is thrown in the previous handler.
simple-php-router - Version 3.4.5.1

Published by skipperbent about 7 years ago

  • Readded csrf_token() helper function in helpers.php.
simple-php-router - Version 3.4.5

Published by skipperbent about 7 years ago

  • Added partial-group support.
  • Fixed: not returning callback response when using rewrite-url.
  • Removed link from documentation that has been moved.
  • Updated documentation.
  • Added unit-tests (RouterPartialGroupTest) unit test.
  • Minor enhancements.

Release notes

simple-php-router - Version 3.4.4

Published by skipperbent about 7 years ago

  • Allowed response()->json() to accept array or objects implementing the JsonSerializable interface (issue: #284 - thanks @adamkelso-rg)
simple-php-router - Version 2.6.7

Published by skipperbent about 7 years ago

  • Allowed response()->json() to accept array or objects implementing the JsonSerializable interface (issue: #284 - thanks @adamkelso-rg)
simple-php-router - Version 1.8.1

Published by skipperbent about 7 years ago

  • Allowed response()->json() to accept array or objects implementing the JsonSerializable interface (issue: #284 - thanks @adamkelso-rg)
simple-php-router - Version 3.4.3

Published by skipperbent about 7 years ago

  • urldecode is now used on all urls in Uri class (issue: #268)
simple-php-router - Version 3.4.2

Published by skipperbent about 7 years ago

  • Request class now use the unencoded-url header if available to avoid any encoding issues on IIS (issue: #268 - thanks @jatubio)
simple-php-router - Version 3.4.1

Published by skipperbent about 7 years ago

  • Added unicode parameter regex support.
simple-php-router - Version 3.4.0

Published by skipperbent about 7 years ago

  • Added updated helpers.php file to library.
  • Updated helpers section in documentation.
  • Updated documentation (thanks @zaingithub and @jatubio).
  • Fixed: return / if all parameters are empty in $router->getUrl method.
  • Fixed unicode character encoding issues on some web-servers (issue: #268 - thanks @jatubio ).
  • Added IIS web.config file example to documentation (thanks @jatubio ).
  • Added Uri class which is now used to parse urls within the library.

Release notes

Note: this release contains breaking changes. We recommend reading this section carefully before updating in a production environment.

  • Request class now uses the Uri class to handle urls. This is done to ensure that unicode encoding etc. are always parsed correctly, but also adds additional features like getting querystring, fragments etc. from a particular url.

  • Calling $router->getUrl with empty parameters (example: url('', '')) now returns root path /.

Breaking changes

  • References to request()->getUri() should be changed to request()->getUri()->getPath().
simple-php-router - Version 3.3.6

Published by skipperbent about 7 years ago

  • Fixed using empty value in url still parsing current parameters.
  • Fixed double / when calling findUrl on routes with the first parameter optional.
simple-php-router - Version 3.3.5

Published by skipperbent about 7 years ago

  • $parameter argument in findUrl method now supports both string, array and null values to avoid any confusion. url() can now be called like this if only one parameter is present url('method', 'parameter'); and url('method', ['parameter1', 'parameter2']); for multiple parameters.

  • Using return value in callbacks now displays the value correctly (issue: #257)

  • Added unit-tests for issue: #257