表演者/流浪者

Vagrant PHPStorm 命令行工具控制台

安装: 19

依赖: 0

建议者: 0

安全: 0

星标: 2

关注者: 1

分支: 0

开放问题: 0

类型:symfony-bundle

1.0.0 2015-10-30 20:59 UTC

This package is auto-updated.

Last update: 2024-09-19 23:43:33 UTC


README

Symfony 扩展 -> 包含 vagrant 命令 + 在 "vagrant ssh --command 'bin/console some:command'" 中直接执行的 Symfony 和 Doctrine 命令

Composer

在 AppKernel.php 中启用此扩展

"require": {
        ...
        "performer/vagrant": "dev-master"
    }
// app/AppKernel.php
// use ...

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...

            new Performer\VagrantBundle\PerformerVagrantBundle(),
        );

        // ...
    }

    // ...
}

使用 PHPStorm

设置 -> 命令行工具控制台 -> + (新建命令) -> 选择工具(基于 Symfony 控制台的工具) -> 别名(v) -> 脚本路径(bin/vagrant)

配置示例

您可以配置默认查询参数名称和模板

performer_vagrant:
    defaults:
        remote_php_interpreter: /usr/bin/php
        remote_site_dir: /var/www
        remote_symfony_console: /bin/console
    users:
        remote_commands: ['Vendor\Path\Command', ... ]

命令示例

vagrant ssh --command '/usr/bin/php /var/www/bin/console cache:clear --env=dev'