我正在发现 API 平台,现在正处于“测试 API”步骤。
我得到两个我无法解决的不同错误,事件 avec a composer install / update :
1) App\Tests\BooksTest::testGetCollection
Error: Call to undefined method ApiPlatform\Core\Bridge\Symfony\Bundle\Test\Constraint\ArraySubsetLegacy::exporter()
/srv/api/vendor/api-platform/core/src/Bridge/Symfony/Bundle/Test/Constraint/ArraySubsetTrait.php:76
/srv/api/vendor/api-platform/core/src/Bridge/Symfony/Bundle/Test/Constraint/ArraySubsetTrait.php:84
/srv/api/vendor/api-platform/core/src/Bridge/Symfony/Bundle/Test/Constraint/ArraySubsetTrait.php:68
/srv/api/vendor/api-platform/core/src/Bridge/Symfony/Bundle/Test/Constraint/ArraySubsetLegacy.php:32
/srv/api/vendor/api-platform/core/src/Bridge/Symfony/Bundle/Test/ApiTestAssertionsTrait.php:100
/srv/api/vendor/api-platform/core/src/Bridge/Symfony/Bundle/Test/ApiTestAssertionsTrait.php:57
/srv/api/tests/BooksTest.php:26
和
4) App\Tests\BooksTest::testUpdateBook
TypeError: Argument 2 passed to ApiPlatform\Core\Bridge\Symfony\Bundle\Test\Client::request() must be of the type string, null given, called in /srv/api/tests/BooksTest.php on line 103
/srv/api/vendor/api-platform/core/src/Bridge/Symfony/Bundle/Test/Client.php:88
/srv/api/tests/BooksTest.php:103
任何想法 ?
谢谢 :-)