yuncms/composer

This package is abandoned and no longer maintained. No replacement package was suggested.

The composer plugin for yuncms module installer

Maintainers

👁 larvacent

Package info

github.com/yuncms/composer

Type:composer-plugin

pkg:composer/yuncms/composer

Statistics

Installs: 2 446

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

2.0.1 2018-04-28 10:39 UTC

Requires

  • composer-plugin-api: ^1.0

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT ce6eb277c7fb60f02c5b41247d8efa48f8bb1888

  • Tongle Xu <xutongle.woop@gmail.com>

composeryii2module installeryuncms

This package is auto-updated.

Last update: 2022-07-09 17:21:30 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": {
 "id": "framework",
 "migrationPath": "@vendor/yuncms/framework/migrations"
 }
 }
}

or :

{
 "type": "yii2-extension",
 ...,
 "extra": {
 "yuncms": "mainfest.php"
 }
}

mainfest.php :

return [
 'id'=> 'user',
 'migrationPath'=> '@vendor/....',
 'events'=> [
 [etc],
 [etc1]
 ],
 'tasks'=> [
 [etc],
 [etc1]
 ],
 'translations'=> [
 'yuncms/user'=> [
 'class' => 'yii\i18n\PhpMessageSource',
 //'basePath' => '@app/messages',
 'sourceLanguage' => 'en-US',
 'fileMap' => [
 'app' => 'app.php',
 'app/error' => 'error.php',
 ],
 ]
 ],
 'frontend'=> [
 'class=>'',
 'etc'
 ],
 'backend'=> [
 'class=>'',
 ],
];