2017 © Pedro Peláez
 

symfony-bundle dev-shortcuts-bundle

Bundle for symfony2 console command shortcuts.

image

0s1r1s/dev-shortcuts-bundle

Bundle for symfony2 console command shortcuts.

  • Wednesday, November 27, 2013
  • by 0s1r1s
  • Repository
  • 1 Watchers
  • 2 Stars
  • 197 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 1 % Grown

The README.md

DevShortcutsBundle

DevShortcutsBundle is a symfony2 bundle that allows you to run often used console commands with shortcuts. During development you always need to clear caches, reset the database, dump/watch the assets etc. With the DevShortcutsBundle you can easily run this commands faster., (*1)

Basic docs

Installation

Composer

composer require 0s1r1s/dev-shortcuts-bundle

Configuration

Register the bundle:, (*2)

<?php
// app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        // ...
        new Osiris\Bundle\DevShortcutsBundle\OsirisDevShortcutsBundle(),
    );
    // ...
}

If you want to use the "d" shortcut you need to set the path to your data fixtures in your config.yml:, (*3)

# app/config/config.yml
osiris_dev_shortcuts:
    path_to_fixtures: "./src/Path/ToYourBundle/DataFixtures"

Usage

E.g. the normal command to watch the assets, (*4)

php app/console assetic:dump --watch

Same command with DevShortcutsBundle would be:, (*5)

php app/console dev aw
or
sf dev aw

sf is an alias for php app/console. This alias needs to be configured by you. If you are using a linux distribution just edit .bash_aliases in you home folder or create it if it doesn't exist. You only need to add a line as the following:, (*6)

alias sf="php app/console"

Or if you want the alias to point to a specific project:, (*7)

alias sf="php /path/to/your/symfony-project/app/console"

For Windows it's different. Plain DOS doesn't have support for aliases. You can use 4dos / 4nt, Cygwin or something similar to setup aliases., (*8)

Shortcut list

The full list of Shortcuts you can use:, (*9)

Shortcut Original command Usage
cc cache:clear Clear cache
ai assets:install Install assets
ad assetic:dump Dump assets
aw assetic:dump --watch Watch assets
a Install & dump assets (ai + ad combination)
dd doctrine:database:drop --force Drop database
dc doctrine:database:create Create database
sd doctrine:schema:drop --force Drop database schema
sc doctrine:schema:create Create database schema
dform doctrine:fixtures:load --fixtures=./src/BundlePath/DataFixtures/ORM Load ORM DataFixtures
dfenv doctrine:fixtures:load --append --fixtures=./src/BundleName/DataFixtures/dev Load environment related DataFixtures
d Reloads the database: Drop database scheme, create scheme, load orm + env data fixtures (sd, sc, dform, dfenv shortcut combination)

You can also use sf dev --help to get the full list of commands., (*10)

The Versions

27/11 2013

dev-master

9999999-dev https://github.com/0s1r1s/DevShortcutsBundle

Bundle for symfony2 console command shortcuts.

  Sources   Download

MIT

The Requires

 

by Laurin Wandzioch

development shortcuts console command