Releases: izniburak/php-router
Releases · izniburak/php-router
v3.1.0
v3.0.0
v2.5.0
- IMPORTANT - Added
notFoundmethod instead oferrormethod. From now on,errormethod will be used to handle exceptions and be able to return a pretty response you desire to client. - Added
XGETrequest method instead ofAJAX.AJAXrequest method will be deprecated in next releases. - Added
__invokemethod support for Controllers- From now on, you can use the Controller which only contain
__invokemethod. You can define a route with such a that controller:$router->get('/foo', 'FooController');
- From now on, you can use the Controller which only contain
For details, please check the Changelogs.
v2.4.0
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
v2.2.0
v2.1.0 - Improvements
Some improvements:
- Changed namespace and directory structure. You must use
Buki\Router\Routerclass instead ofBuki\Routerin order to create new Router instance. Please check documentation for more. - The same middleware has been prevented from running twice.
v2.0.0 Released!
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-foundationpackage. - Middleware usage was enhanced.
- Added base Controller and Middleware classes.
- Changed minimum PHP version as
^7.2.5. - Code optimizations...
Thanks.