- Remove Middleware class and custom callback handling logic.
- Implement Synapsis as a dependency injection container for automatic
resolution.
- Refactor Router to use Synapsis for process route callbacks and not found
handler.
- Update Request to remove middleware-specific properties and use
Router::$currentParams for path parameters.
- Removed resumed way to set controllers and middlewares:
Now, the method of routers and middlewares need to be
callables.
- Add patch method in order to support PATCH http method.
- Add a way to get add more middlewares after. For Example:
<?php
use Libs\Router;
Router::get('/some-route', 'somefunction')
->middleware('firstmiddleware');
Router::get('/other-route', 'otherfunction');
// Recover first router and add a middleware
Router::get('/some-route')->middleware('secondmiddleware');
?>
- $notFoundCallback now has a function as default value (the normal 404 page as before).
- Change the way to manipulate the {pseudoVars} on uri, now it go into the same Neuron onject that "post", "get", and "json" and not more as separate params into the callback (the callback now only receive one param by default).
- $notFoundCallback now receive the $req, as param.