All Projects → yiisoft → yii2-composer

yiisoft / yii2-composer

Licence: BSD-3-Clause license
Yii 2 composer extension

Programming Languages

PHP
23972 projects - #3 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to yii2-composer

project-template
Yii2 Project Template
Stars: ✭ 53 (-30.26%)
Mutual labels:  yii2, yii
ar-search
Provides unified search model for Yii ActiveRecord
Stars: ✭ 31 (-59.21%)
Mutual labels:  yii2, yii
yii2-grid-view-library
Highly enhanced GridView widget and grid components for Yii2
Stars: ✭ 57 (-25%)
Mutual labels:  yii2, yii
Easy Short Url
ESU 短网址,可在 Laravel、Yii、ThinkPHP 等框架 Composer 包引入,也可以独立搭建短网址站点
Stars: ✭ 71 (-6.58%)
Mutual labels:  composer, yii2
slides
Alexander Makarov conference slides
Stars: ✭ 26 (-65.79%)
Mutual labels:  yii2, yii
install
basic script for project installation
Stars: ✭ 17 (-77.63%)
Mutual labels:  yii2, yii
yii2-notifications
This Yii2 extension provides support for sending notifications across a variety of delivery channels, including mail, SMS, Slack, Telegram etc.
Stars: ✭ 62 (-18.42%)
Mutual labels:  yii2, yii
LazyWaimai-Web
懒人外卖的 Web 端,使用Yii2框架+Bootstrap进行开发
Stars: ✭ 32 (-57.89%)
Mutual labels:  composer, yii
yii2-formbuilder
A drag and drop form builder with jQuery for Yii2
Stars: ✭ 33 (-56.58%)
Mutual labels:  yii2, yii
yii2-dingtalk
yii2钉钉接口
Stars: ✭ 23 (-69.74%)
Mutual labels:  yii2, yii
ar-role
ActiveRecord behavior, which provides relation roles (table inheritance)
Stars: ✭ 34 (-55.26%)
Mutual labels:  yii2, yii
ar-variation
Variation behavior for ActiveRecord
Stars: ✭ 46 (-39.47%)
Mutual labels:  yii2, yii
Php frameworks analysis
php框架源码分析
Stars: ✭ 57 (-25%)
Mutual labels:  composer, yii2
yii2-admin-theme
基于Yii2+layui的后台框架模板,实现了完善的RBAC权限控制
Stars: ✭ 87 (+14.47%)
Mutual labels:  yii2, yii
Hookphp
HookPHP基于C扩展搭建内置AI编程的架构系统-支持微服务部署|热插拔业务组件-集成业务模型|权限模型|UI组件库|多模板|多平台|多域名|多终端|多语言-含常驻内存|前后分离|API平台|LUA QQ群:679116380
Stars: ✭ 575 (+656.58%)
Mutual labels:  composer, yii
content
Content management system for Yii2
Stars: ✭ 54 (-28.95%)
Mutual labels:  yii2, yii
Iisns
sns 开放社区
Stars: ✭ 217 (+185.53%)
Mutual labels:  yii2, yii
Yii2 Apidoc
Yii 2 apidoc extension.
Stars: ✭ 236 (+210.53%)
Mutual labels:  yii2, yii
behavior-trait
Allows handling events via inline declared methods, which can be added by traits
Stars: ✭ 18 (-76.32%)
Mutual labels:  yii2, yii
yii2-faker
Yii 2 Faker extension
Stars: ✭ 99 (+30.26%)
Mutual labels:  yii2, yii

Yii 2 Composer Installer


This is the composer installer for Yii framework 2.0 extensions. 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 Build status

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": {
        "bootstrap": "yii\\jui\\Extension"
    }
}

The Installer class also implements a static method postCreateProject() that can be called after a Yii 2 project is created, through the post-create-project-cmd composer script. A similar method exists for running tasks after each composer install call, which is postInstall(). These methods allow to run other Installer class methods like setPermission() or generateCookieValidationKey(), depending on the corresponding parameters set in the extra section of the composer.json file. For example,

{
    "name": "yiisoft/yii2-app-basic",
    "type": "project",
    ...
    "scripts": {
        "post-create-project-cmd": [
            "yii\\composer\\Installer::postCreateProject"
        ],
        "post-install-cmd": [
            "yii\\composer\\Installer::postInstall"
        ]
    },
    "extra": {
        "yii\\composer\\Installer::postCreateProject": {
            "setPermission": [
                {
                    "runtime": "0777",
                    "web/assets": "0777",
                    "yii": "0755"
                }
            ]
        },
        "yii\\composer\\Installer::postInstall": {
            "copyFiles": [
                {
                    "config/templates/console-local.php": "config/console-local.php",
                    "config/templates/web-local.php": "config/web-local.php",
                    "config/templates/db-local.php": "config/db-local.php",
                    "config/templates/cache.json": ["runtime/cache.json", true]
                }
            ],
            "generateCookieValidationKey": [
                "config/web-local.php"
            ]
        }
    }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].