Blackfire has built-in support for SymfonyCloud projects. The integration is made simpler as Blackfire agent and probe are installed and enabled by default on all SymfonyCloud accounts.
blackfire PHP extension to the
.symfony.cloud.yaml project file:
1 2 3
runtime: extensions: - blackfire
Set the Blackfire server credentials as environment variables (run this
command from the project root directory or pass the
To auto-fill server credentials in the command below, or Sign Up first
symfony var:set BLACKFIRE_SERVER_ID=XXXX BLACKFIRE_SERVER_TOKEN=XXXX
Learn more about builds in the dedicated documentation.
Follow these steps to enable Blackfire builds on all your SymfonyCloud environments each time a branch is deployed (after a push, merge, or redeploy event):
To auto-fill token credentials and environment UUID in the command below, or Sign Up first
symfony integration:add --type=webhook --url='https://TOKEN_USER:TOKEN_PASSWORD@blackfire.io/api/v2/builds/env/ENV_UUID/symfonycloud'
The command asks several questions. Hit enter to accept the default for all of them. If you get a permission error, ask a project admin to upgrade your account or ask someone who is an admin to run this command.
Now, whenever you push to a SymfonyCloud environment, Blackfire will automatically trigger a build for this specific environment. Blackfire scenarios will be run for all your pull requests.