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

Installs: 111

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:composer-plugin

2.0.1.2 2017-11-03 11:01 UTC

This package is auto-updated.

Last update: 2022-02-01 13:10:00 UTC


README

68747470733a2f2f676574636f6d706f7365722e6f72672f696d672f6c6f676f2d636f6d706f7365722d7472616e73706172656e74332e706e67

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.

Latest Stable Version Total Downloads

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": {}
        }
    }
}