yiisoft/yii2 — pull request #6007 by andrew-makarenko (2014-11-11 08:17:13+00:00)
Title: fix View::registerAssetBundle() to handle root namespaces properly

It was possible to register the same asset bundle multiple times using fully qualified name (with root namespace) declaration.
Steps to reproduce:
- Create a view file with following contents:
AppAsset::register($this);
$this->registerJsFile('js/some.js', ['depends' => '\site\assets\AppAsset']);
- Check your View::assetBundles property in debugger. You will see asset be registered twice:
[
'\site\assets\AppAsset' => ...,
'site\assets\AppAsset' => ...,
]
If you don't compile yours assets it's a minor problem, but it cause a lot of problems if you overload assetmanager config with compressed asset configuration