This document describes how you can enable the Xdebug extension in Pipelines for PHP 8.3. With this, you can generate code coverage reports with PHPUnit.
To enable this extension:
Confirm that Xdebug is available in the PHP image:
php -m | grep xdebugEnable Xdebug temporarily as follows:
php -d extension=xdebug.so -r "if (extension_loaded('xdebug')) { echo 'xdebug is loaded'; }"Add the following command to the acquia-pipeline.yaml file before the test steps:
version: 1.3.0 services: - php: version: 8.3 events: build: steps: - enable-xdebug: type: script script: - echo "Enabling Xdebug temporarily" - php -d extension=xdebug.so -v - ./vendor/bin/phpunit --coverage-textThis method enables Xdebug for that specific execution. You cannot enable this extension in a persistent manner as that is supported only after you update the php.ini file, requiring access which is not supported in Pipelines.