yuncms / yuncms-composer
The composer plugin for yuncms module installer
Installs: 2 257
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Type:composer-plugin
pkg:composer/yuncms/yuncms-composer
Requires
- composer-plugin-api: ^1.0
- yiisoft/yii2-composer: ~2.0.0
Requires (Dev)
- composer/composer: ^1.0
This package is auto-updated.
Last update: 2022-07-09 17:20:15 UTC
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": {}
}
}
}