0s1r1s/dev-shortcuts-bundle

Bundle for symfony2 console command shortcuts.

dev-master 2013-11-27 11:48 UTC

This package is not auto-updated.

Last update: 2024-12-16 15:18:28 UTC


README

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.

##Basic docs

##Installation

Composer

composer require 0s1r1s/dev-shortcuts-bundle

##Configuration Register the bundle:

<?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:

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

##Usage E.g. the normal command to watch the assets

php app/console assetic:dump --watch

Same command with DevShortcutsBundle would be:

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:

alias sf="php app/console"

Or if you want the alias to point to a specific project:

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.

##Shortcut list The full list of Shortcuts you can use:

You can also use sf dev --help to get the full list of commands.