DDEV is a development platform for PHP based on Docker containers (DDEV-Local).
You must use version 1.17 or above of DDEV-local. Their documentation offers detailed procedures for most OSes.
The Blackfire probe is installed by default and the agent is added as an additional service. It can be configured globally with this command:
The credentials can be configured for a specific project by updating its
DDEV config file
located in .ddev/config.yaml
:
1
To activate Blackfire after every ddev restart
, run the following command:
1
To activate Blackfire every time your project starts, in the .ddev/config.yml
file of your DDEV project, define a custom hook
similar to:
1 2 3 4 5
Additional commands:
ddev blackfire
):1
1
You can now profile requests with all available methods.
When profiling with the CLI, prefix the blackfire
commands with ddev exec
:
ddev exec blackfire curl https://foobar.ddev.site
ddev exec blackfire drush st
When using ddev exec blackfire curl http://127.0.0.1
, there is no need
to specify a DDEV external port as you are already executing it in a DDEV
context. Additional documentation is provided by ddev-contrib.
Blackfire Player can be used in your DDEV project to trigger automated performance tests or crawl information.
DDEV support custom commands
enriching its standard behavior. Let's setup a ddev player
command for a
project by creating it configuration file .ddev/commands/host/player
with this
content: