We have a metapackage which contains some other Yii 2.0 extensions. If someone installs the package several extensions/modules are registered automatically in the application bootstrap process.
Is there a way to disable calls to bootstrap()
in the configuration, eg. via $extensions
?
| Q | A |
| --- | --- |
| Yii version | 2.0.7 |
| PHP version | 5.6.18 |
| Operating system | Linux (Docker) |
| Related issues | https://github.com/dmstr/yii2-cms-metapackage/issues/2#issuecomment-203553611 |
manually update file @vendor/yiisoft/extensions.php
then remark specific bootstrap :grinning:
I am using some kind of hack:
$extensions = require Yii::getAlias('@vendor/yiisoft/extensions.php');
unset($extensions['packageName']);
$config = [
...
'extensions' = $extensions
...
];
another why. in bootstrap.php
and
Yii::$container->set('ext\ns\Bootstrap',function(){
return new yii\base\Object(); // or new stdClass();
});
Most helpful comment
another why. in
bootstrap.php
and