micayael/commands-bundle

适用于 Symfony2+ 的实用命令

安装数: 2,169

依赖项: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放问题: 9

类型:symfony-bundle

1.0.7 2018-04-20 20:50 UTC

This package is auto-updated.

Last update: 2024-09-29 04:14:29 UTC


README

此包为您的项目添加了有用的命令。

该包包括

  • app:search: 在您的代码中查找精确的文本或模式,允许您定义查找位置
  • app:verify: 在项目代码中查找常见错误
  • app:phpcs: 使用 php-cs-fixer 格式化代码
  • app:test: 使用 phpunit 执行单元测试
  • app:precommit: 在提交更改前执行命令

安装

步骤 1:下载包

打开命令控制台,进入您的项目目录,然后执行以下命令以下载此包的最新稳定版本

$ composer require --dev micayael/commands-bundle

此命令需要您全局安装 Composer,具体请参阅 Composer 文档中的安装章节

步骤 2:启用包

然后,将包添加到项目 app/AppKernel.php 文件中已注册的包列表中,以启用该包

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
            // ...

            $bundles[] = new Micayael\CommandsBundle\MicayaelCommandsBundle();
        }

        // ...
    }

    // ...
}

完整文档和示例