mrafalko/command-runner-bundle

Executes symfony console command from a Controller.

1.0.0 2016-01-18 07:36 UTC

This package is not auto-updated.

Last update: 2024-10-26 16:43:51 UTC


README

Executes Symfony2 console command from Controller (HTTP request).

Installation

This bundle is available on Packagist:

To install it, run:

$ composer require mrafalko/command-runner-bundle:dev-master

Then add the bundle to app/AppKernel.php:

public function registerBundles()
{
    return array(
        ...
        new Mrafalko\CommandRunnerBundle\MrafalkoCommandRunnerBundle(),
        ...
    );
}

Then import routing file:

# app/config/routing.yml
mrafalko_command_runner:
    resource: "@MrafalkoCommandRunnerBundle/Controller/CommandRunnerController.php"
    type: annotation
    prefix:   /

Examples

Run the command from your URL:

http://yourdomain.dev/command-runner/your:command:name