2017 © Pedro Peláez
 

symfony-bundle console-bundle

Symfony Bundle for interacting with the Symfony container through the command line

image

mlo/console-bundle

Symfony Bundle for interacting with the Symfony container through the command line

  • Monday, December 11, 2017
  • by mloberg
  • Repository
  • 1 Watchers
  • 1 Stars
  • 9,815 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 5 % Grown

The README.md

ConsoleBundle

Interact with Symfony's container through the command line. Uses Psysh for the console., (*1)

Installation

composer require --dev mlo/console-bundle

If you aren't using Symfony Flex, you will need to register the bundle in AppKernel.php in the dev and/or test environment., (*2)

if (in_array($this->getEnvironment(), array('dev', 'test'))) {
    $bundles[] = new Mlo\ConsoleBundle\MloConsoleBundle();
}

If you are using Symfony 4 or lower, require the v1 version of this package., (*3)

composer require --dev mlo/console-bundle:^1.0

Usage

bin/console tinker

This will drop you in a Psysh shell with the variables $container, $kernel and $this, which references the container., (*4)

Adding Variables

You can add custom variables to the shell scope with the following config:, (*5)

mlo_console:
    variables:
        debug: "%kernel.debug%"
        em: "@doctrine.orm.entity_manager"

Now you will have a $debug variable with the value of the kernel.debug parameter and $em with your entity manager., (*6)

The Versions

11/12 2017

dev-master

9999999-dev

Symfony Bundle for interacting with the Symfony container through the command line

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matthew Loberg

11/12 2017

v1.1.1

1.1.1.0

Symfony Bundle for interacting with the Symfony container through the command line

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matthew Loberg

11/12 2017

v1.1.0

1.1.0.0

Symfony Bundle for interacting with the Symfony container through the command line

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matthew Loberg

11/12 2017

dev-develop

dev-develop

Symfony Bundle for interacting with the Symfony container through the command line

  Sources   Download

MIT

The Requires

 

The Development Requires

by Matthew Loberg

08/07 2015

v1.0.0

1.0.0.0

Symfony2 Bundle for interacting with the Symfony container through the command line

  Sources   Download

MIT

The Requires

 

by Matthew Loberg