yuncms / yii2-composer
This package is abandoned and no longer maintained.
The author suggests using the yuncms/yuncms-composer package instead.
The composer plugin for yuncms module installer
2.0.1.2
2017-11-03 11:01 UTC
Requires
- composer-plugin-api: ^1.0
- yiisoft/yii2-composer: ~2.0.0
Requires (Dev)
- composer/composer: ^1.0
README
YUNCMS Composer Installer
This is the composer installer for YUNCMS modules.
It implements a new composer package type named yii2-extension,
which should be used by all Yii 2 extensions if they are distributed as composer packages.
For license information check the LICENSE-file.
Usage
The Yii 2 Composer Installer is automatically installed with when installing the framework via Composer.
To use Yii 2 composer installer, simply set the package type to be yii2-extension in your composer.json,
like the following:
{
"type": "yii2-extension",
"require": {
"yiisoft/yii2": "~2.0.0"
},
...
}
You may specify a bootstrapping class in the extra section. The init() method of the class will be executed each time
the Yii 2 application is responding to a request. For example,
{
"type": "yii2-extension",
...,
"extra": {
"yuncms": {
"name": "admin",
"i18n": {
"class":"yii\\i18n\\PhpMessageSource",
"basePath":"@yuncms/admin/message"
},
"migrationNamespace": "yuncms\\admin\\migrations",
"backend": {
"class": "yuncms\\admin\\Module"
},
"frontend": {}
}
}
}