This add-on seamlessly integrates various quality assurance tools from Drupal QA into DDEV, providing convenient ddev commands for various QA tools.
Since this add-on resides in a private Github repository ddev add-on get Pronovix/ddev-drupal-qa does not work, you need to configure a GitHub personal access token (PAT) for DDEV to download it.
- Log in to GitHub with an account that has access to the private
Pronovix/ddev-drupal-qarepository. - Navigate to GitHub's Fine-Grained Personal Access Tokens page.
- Fill out the following fields:
- Token name:
ddev-pronovix-private-addons(or any descriptive name). - Resource owner: Select
Pronovix. - Expiration: Select a reasonable timeframe (up to 3 months, but not more).
- Repository access: Select Only select repositories, then choose
Pronovix/ddev-drupal-qafrom the list. - Repository permissions: Expand the list, find Contents, and set its access level to Read-only. This provides enough permissions for DDEV to download the add-on files.
- Token name:
- Click Generate token, copy the generated token immediately, and store it in a secure location. You will not be able to see it again on GitHub.
- Request Approval: Because the token's resource owner is
Pronovix, the token must be approved by an organization administrator before it can be used. Ping the infrastructure team in the#tribe_infrastructurechannel to check and approve your new access token request at https://github.com/organizations/Pronovix/settings/personal-access-token-requests.
DDEV automatically recognizes the DDEV_GITHUB_TOKEN environment variable and uses it to authenticate API requests for downloading private add-ons.
Export the token in your current terminal session:
export DDEV_GITHUB_TOKEN="github_pat_your_fine_grained_token_here"Tip: To avoid having to export the token in every new shell session, you can add the export command to your shell configuration file (e.g.,
~/.bashrc,~/.zshrc, or~/.bash_profile).
Run the installation command in your DDEV project root:
ddev add-on get https://api.github.com/repos/Pronovix/ddev-drupal-qa/tarball/main Pinning to a specific release ensures that your environment is reproducible:
ddev add-on get https://api.github.com/repos/Pronovix/ddev-drupal-qa/tarball/v1.0.0(Replace v1.0.0 with the desired release tag).
Restart your DDEV project to apply the changes:
ddev restartAfter installation, make sure to commit the .ddev directory to version control.
Before using the commands, ensure you have the pronovix/drupal-qa package installed in your project:
composer require --dev pronovix/drupal-qaThis add-on also automatically installs ddev/ddev-selenium-standalone-chrome as a dependency of running tests with PHPUnit and other frameworks.
Once installed and configured, you can use the following ddev commands:
Description: Run phpcbf inside the web container
Usage: ddev phpcbf [flags] [args]
Example: "ddev phpcbf" or "ddev phpcbf -n"
Description: Run phpcs inside the web container
Usage: ddev phpcs [flags] [args]
Example: "ddev phpcs" or "ddev phpcs -n"
Description: Run phpstan inside the web container
Usage: ddev phpstan [flags] [args]
Example: "ddev phpstan" or "ddev phpstan -n"
Description: Run phpunit inside the web container
Usage: ddev phpunit [flags] [args]
Example: "ddev phpunit" or "ddev phpunit --stop-on-failure"
Description: Run behat inside the web container
Usage: ddev behat [flags] [args]
Example: "ddev behat" or "ddev behat --tags=@my_tag"
Contributed and maintained by @Pronovix