This file contains the upgrade notes for the Yii Router. These notes highlight changes that could break your application when you upgrade it from one major version to another.
In this release classes Route, Group and MatchingResult are made dispatcher-independent. Now you don't can inject
own middleware dispatcher to group or to route.
The following backward incompatible changes have been made.
- Removed parameter
$dispatcherfromRoutecreating methods:get(),post(),put(),delete(),patch(),head(),options(),methods(). - Removed methods
Route::injectDispatcher()andRoute::withDispatcher(). Route::getData()changes:- removed elements
dispatcherWithMiddlewaresandhasDispatcher; - added element
enabledMiddlewares.
- removed elements
- Removed parameter
$dispatcherfromGroup::create()method. - Removed method
Group::withDispatcher(). Group::getData()changes:- removed element
hasDispatcher; - key
itemsrenamed toroutes; - key
middlewareDefinitionsrenamed toenabledMiddlewares.
- removed element
- Removed
MatchingResultimplementation fromMiddlewareInterface, so it is no longer middleware. - Removed method
MatchingResult::process().
Contract is changed:
- on URL generation all unused arguments must be moved to query parameters, if query parameter with such name doesn't exist;
- added
$hashparameter togenerate(),generateAbsolute()andgenerateFromCurrent()methods.
You should change your interface implementations accordingly.