承接 horat1us/yii2-advanced-package 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

horat1us/yii2-advanced-package

Composer 安装命令:

composer create-project horat1us/yii2-advanced-package

包简介

Yii2 Advanced Package Template

README 文档

README

Yii 2 Advanced Package Template is a skeleton Yii 2 package best for developing complex composer packages with migrations and unit tests.

Latest Stable Version Total Downloads Build Status codecov

Installation

As dependency

  • install using composer
composer require horat1us/yii2-advanced-package
  • add to your bootstrap.php:
<?php
// bootstrap.php

Yii::setAlias(
    '@Horat1us/Package/Migrations', // your namespace here
    "path-to-vendor/horat1us/yii2-advanced-package/migrations" // path to package migrations folder
);
  • add to your console config.php:
<?php
// console/config.php

use yii\console\controllers\MigrateController;

return [
    // some code
    
    'controllerMap' => [
        'migrate' => [
            'class' => MigrateController::class,
            'migrationNamespaces' => [
                'Horat1us\\Package\\Migrations',          
            ],
        ],
    ],    
];

As new project

composer create-project horat1us/yii2-advanced-package path-to-new-project

then you need to change project name in composer.json and modify namespaces

Tests

Run tests:

./vendor/bin/phpunit

Configuration

Default project configuration available in tests/config.php. If you want to use local config just create tests/config-local.php with configuration array.

Structure

migrations/     contains namespaced migrations (using Yii2 namespace autoloader)
src/            contains all source files (using composer autoloader)
tests/
    Mocks/          contains mocks for tests
    Fixtures/       contains Yii2 fixtures
    Unit/           contains PHPUnit tests 
vendor/                  contains dependent 3rd-party packages

License

MIT

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固