Some common symfony console commands

v1.0 2013-12-04 10:12 UTC

This package is not auto-updated.

Last update: 2024-04-08 12:11:47 UTC


This package provides some useful beanstalk related commands for a symfony console.

Included commands are:

  • Delete beanstalk job (top of the queue is deleted)
  • Flush a tube
  • List tubes
  • Peek ready a tube
  • Get stats on a tube

Each command extends the AbstractPheanstalkCommand class, which provides a method for getting pheanstalk and setting a dependency injection container. Pheanstalk needs to be within an array or contained such as Pimple which implements \ArrayAccess with the key on pheanstalk.


Add the following to your composer.json file

"centralapps/common-console-commands": "dev-master"

Install / update composer.


Create a console file within your application; you need to provide a setup pheanstalk object connected to your beanstalkd service.

#!/usr/bin/env php

$container = array(
    'pheanstalk' => PHEANSTALK_GOES_HERE

$cli_application = new \Symfony\Component\Console\Application();

$commands = array(

foreach ($commands as $command) {
    $command = new $command();

    if ($command instanceof \CentralApps\Commands\AcceptsContainerInterface) {




php console pheanstlk:list