2017 © Pedro Peláez
 

library console-defaults-bundle

A bundle to add defaluts argument to the symfony2 console

image

cypresslab/console-defaults-bundle

A bundle to add defaluts argument to the symfony2 console

  • Friday, December 20, 2013
  • by matteosister
  • Repository
  • 3 Watchers
  • 12 Stars
  • 15 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Console Defaults Bundle Latest Stable Version

Code Coverage Build Status Scrutinizer Quality Score SensioLabsInsight, (*1)

this bundle lets you define defaults parameters for your commands. It makes use of console events to work. So you need at least the 2.3 LTS version of symfony, (*2)

Installation

to install just require the cypresslab/console-defaults-bundle at ~0.3 version. Read the complete instructions here, (*3)

Usage

add the commands, with the defaults you want, under the cypress_console_defaults key. Here is an example, (*4)

cypress_console_defaults:
    commands:
        "doctrine:fixtures:load":
            params: [ "--append", "--fixtures src/NS/DataFixtures" ]

        "rabbitmq:consumer":
            params: [ "-w" ]

        "cache:clear":
            params: [ "--no-warmup", "--no-optional-warmers"]

the next time you will call one of the defined command the bundle will add the parameters for you, (*5)

$ ./app/console cache:clear
$ --- ConsoleDefaultsBundle You have defined some defaults for this command
$ --- proceeding with defaults: --no-warmup, --no-optional-warmers
$ Clearing the cache for the dev environment with debug true

From version 0.4 you can pass a regular expression as the command name. You need to use two slashes to wrap the command like this, (*6)

cypress_console_defaults:
    commands:
        "/doctrine:(.*)/":
            params: [ "--no-interaction"]

With this configuration every doctrine:... command will have the "--no-interaction" flag, (*7)

Use cases

  • default to --symlink for assets install
cypress_console_defaults:
    commands:
        "assets:install":
            params: [ "--symlink" ]
  • change the folder where the fixtures are loaded
cypress_console_defaults:
    commands:
        "doctrine:fixtures:load":
            params: [ "--fixtures my/personal/folder" ]
  • disable cache warmup
cypress_console_defaults:
    commands:
        "cache:clear":
            params: [ "--no-warmup", "--no-optional-warmers" ]

other ideas?, (*8)

Bitdeli Badge, (*9)

The Versions

20/12 2013

dev-master

9999999-dev

A bundle to add defaluts argument to the symfony2 console

  Sources   Download

LGPL-3.0+

The Requires

 

The Development Requires

17/11 2013

0.4.0

0.4.0.0

A bundle to add defaluts argument to the symfony2 console

  Sources   Download

LGPL-3.0+

The Requires

 

The Development Requires

18/10 2013

0.3.1

0.3.1.0

A bundle to add defaluts argument to the symfony2 console

  Sources   Download

LGPL-3.0+

The Requires

 

The Development Requires

17/10 2013

0.3.0

0.3.0.0

A bundle to add defaluts argument to the symfony2 console

  Sources   Download

MIT

The Requires

 

The Development Requires

17/10 2013

0.2.0

0.2.0.0

A bundle to add defaluts argument to the symfony2 console

  Sources   Download

MIT

The Requires

 

The Development Requires

17/10 2013

0.1.0

0.1.0.0

A bundle to add defaluts argument to the symfony2 console

  Sources   Download

MIT

The Requires

 

The Development Requires