Is there any difference in naming the PHPunit configuration file phpunit.xml.dist or phpunit.xml Is there any difference in naming the PHPunit configuration file phpunit.xml.dist or phpunit.xml xml xml

Is there any difference in naming the PHPunit configuration file phpunit.xml.dist or phpunit.xml


If phpunit.xml or phpunit.xml.dist (in that order) exist in the current working directory and --configuration is not used, the configuration will be automatically read from that file.

The idea behind the fallback (to phpunit.xml.dist when phpunit.xml does not exist) is that phpunit.xml.dist can be checked into version control and phpunit.xml can be ignored from version control. This allows a developer to use a custom configuration without running the risk of accidentally checking it into version control.


File .dist are versioned with git for example and you usually don't version phpunit.xml because is a configuration file of your machine.

File .dist are often configuration files which do not contain the real-world deploy-specific parameters

If there is phpunit.xml and phpunit.xml.dist phpunit takes phpunit.xml

phpunit.xml.dist It's a standard file, phpunit.xml It's a customization and aren't versioned to avoid publishing personal data