Skip to content

Latest commit

 

History

History
 
 

symfony

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Run Symfony console commands (ddev console) and phpunit tests (ddev phpunit)

This adds custom command which executes the bin/console or bin/phpunit in the container without the need to SSH.

Installation

  • Copy the web directory into your project .ddev/commands/web, so that the console and the phpunit commands would be in .ddev/commands/web folder.

  • If the Symfony project is in a subfolder, add to .ddev/ddev.config.yaml:

    working_dir:
      web: /var/www/html/<symfony-project-subfolder>

Usage

Running ddev console or ddev phpunit is now equivalent to running bin/console or bin/phpunit from inside the container. It is now possible to get debug information such as ddev console debug:router, running a maker with ddev console make:entity or running phpunit tests without the need to SSH into the container.

Example

This is how ddev console about would look like:

console

Contributed by @alechko