我已经在一个测试的普通PHP项目中包含了PHPUnit,当我用vendor/bin/phpunit
开始测试时,我得到了下面的错误消息:Your XML configuration validates against a deprecated schema. Migrate your XML configuration using "--migrate-configuration"!
**问题:**此错误消息是什么意思?如何避免此错误?
我的phpunit.xml文件:
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
verbose="true"
stopOnFailure="true"
>
<testsuites>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
</testsuites>
</phpunit>
我使用phpunit 10
"require-dev": {
"phpunit/phpunit": "^10.0"
}
2条答案
按热度按时间ee7vknir1#
在下面尝试一次,read more here
but5z9lq2#
运行
vendor/bin/phpunit --migrate-configuration