It should be possible to have <testsuite> specific bootstrap scripts:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/12.2/phpunit.xsd"
bootstrap="vendor/autoload.php">
<testsuites>
<testsuite name="unit">
<directory suffix="Test.php">tests/unit</directory>
</testsuite>
<testsuite name="integration" bootstrap="tests/integration/bootstrap.php">
<directory suffix="Test.php">tests/integration</directory>
</testsuite>
</testsuites>
</phpunit>
phpunit should load vendor/autoload.php and tests/integration/bootstrap.php.
phpunit --testsuite unit should only load vendor/autoload.php.
phpunit --testsuite integration should load vendor/autoload.php and tests/integration/bootstrap.php.
Each bootstrap script, even if configured multiple times, must only be loaded once.
It should be possible to have
<testsuite>specific bootstrap scripts:phpunitshould loadvendor/autoload.phpandtests/integration/bootstrap.php.phpunit --testsuite unitshould only loadvendor/autoload.php.phpunit --testsuite integrationshould loadvendor/autoload.phpandtests/integration/bootstrap.php.Each bootstrap script, even if configured multiple times, must only be loaded once.