I am currently working on transitioning an old PHP application (more than 10 years olf) to PHP 7.4, we are currently implementing a continuous integration on the PHP 7.4 branch of the application. We decided to use a version of PHPUnit that is supported by the PHP current stable release. So we upgraded the ci testing job of the PHP 7.4 branch to PHPUnit 9.3.
We made all necessary changes according to documentation, but we are blocked on one warning that we don't know how to fix (granted the tests are executed and the report is published at the right place) Warning - The configuration file did not pass validation!
The following problems have been detected:
Line 38:
- Element 'log': This element is not expected..
I am sharing our PHPUnit configuration below and with the command, we use to launch it, can anyone spot what is wrong with it?
phpunit -c phpunit.xml.dist
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/9.3/phpunit.xsd"
colors = "true"
bootstrap = "tests/bootstrap.php"
>
<testsuites>
<testsuite name="Unit Tests">
<directory>tests/</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">api</directory>
</include>
</coverage>
<logging>
<log type="junit" target="build/unit_report.xml"/>
</logging>
</phpunit>