Skip to content

Releases: izniburak/php-router

v3.0.0

14 Apr 00:41
Compare
Choose a tag to compare

Minimum PHP version: 8.1

Refactor and improvement process will be continue...

v2.5.0

23 Jan 03:15
Compare
Choose a tag to compare
  • IMPORTANT - Added notFound method instead of error method. From now on, error method will be used to handle exceptions and be able to return a pretty response you desire to client.
  • Added XGET request method instead of AJAX. AJAX request method will be deprecated in next releases.
  • Added __invoke method support for Controllers
    • From now on, you can use the Controller which only contain __invoke method. You can define a route with such a that controller:
      $router->get('/foo', 'FooController');

For details, please check the Changelogs.

v2.4.0

20 Jan 23:37
Compare
Choose a tag to compare

Updated error function to handle Not Found errors better. Now, you can use Request and Response instances in Closure parameters:

$router->error(function(Request $request, Response $response) {
    $response->setStatusCode(Response::HTTP_NOT_FOUND);
    $response->setContent('Oops! Page not found!');
    return $response;
});

v2.3.0

08 May 14:44
Compare
Choose a tag to compare
  • Added some new patterns.
  • Fixed PHP8 'getClass' method issue.
  • and made some optimization.

v2.2.0

07 Dec 07:46
Compare
Choose a tag to compare

Added only and except options for controller method of the Router. You will be able to manage routes which will be generated from a controller file like you want.

v2.1.0 - Improvements

24 Nov 07:06
Compare
Choose a tag to compare

Some improvements:

  • Changed namespace and directory structure. You must use Buki\Router\Router class instead of Buki\Router in order to create new Router instance. Please check documentation for more.
  • The same middleware has been prevented from running twice.

v2.0.0 Released!

21 Nov 16:16
Compare
Choose a tag to compare

A lot of updates and code optimization has been made for PHP-Router and released v2.0.0. For this version:

  • Added and enhanced Request and Response support by using symfony/http-foundation package.
  • Middleware usage was enhanced.
  • Added base Controller and Middleware classes.
  • Changed minimum PHP version as ^7.2.5.
  • Code optimizations...

Thanks.

v1.5.0

16 Dec 19:52
Compare
Choose a tag to compare
  • Added parameter support for Middlewares.

v1.4.0

02 Jul 23:44
Compare
Choose a tag to compare
  • Added new patterns for pretty route url (Example: :id, :slug, :any etc.)
  • Added camelCase to snake-case transform for auto generated method though controller() method.

v1.3.0

10 Jan 23:40
Compare
Choose a tag to compare
  • Added caching routes feature. So, Routes can now be cached! For example:
// created instance $route

$route->get(...)
$route->post(...)
$route->put(...)

$route->cache();
$route->run();