yiisoft/yii2 — pull request #6220 by SDKiller (2014-11-24 19:54:43+00:00)
Title: Changed signature of yii\web\UrlRuleInterface::createUrl() - pass `$params` by reference

This especially refers to building pretty urls.

With your custom `urlRule` you may pass special `$params` for creating url, some of which you may need to unset after creating - because you don't want them to be passed later to `http_build_query()` in `UrlManager` ( https://github.com/yiisoft/yii2/blob/master/framework/web/UrlManager.php#L329 ).

Use case: to build seo-links you want pass `Products` and `Category` objects to you custom `urlRule::createUrl()` (to avoid in `urlRule` duplicate database trips to retrieve data you already have).
After creating url you need to unset this objects.

Now it is not possible to change signature of custom `urlRule::createUrl()` to pass `$params` by reference because:

```
Declaration of common\components\CatalogUrlRule::createUrl() must be compatible with yii\web\UrlRuleInterface::createUrl($manager, $route, $params)
```

Note: BC-breaking changes