Closed Angatar closed 10 months ago
This PR (#415) only includes the relevant code directly related to the new feature added however the CI checks fail and according to the CI logs it seems the composer.lock was not updated for the required symfony/phpunit-bridge package used for running the tests: Here is a part of the CI Build&Test logs returned:
Created project in /home/runner/work/schema-generator/schema-generator/vendor/bin/.phpunit/phpunit-9-0 composer.json has been updated Installing dependencies from lock file Verifying lock file contents can be installed on current platform. Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run
composer update
orcomposer update <package name>
.
- Required package "symfony/phpunit-bridge" is not present in the lock file.
Has it to be fixed in the CI pipeline with a composer update
additional step or do I need to include the updated composer.json/composer.lock files in my PR?
composer.json
and composer.lock
files, which had for side effect to fix issue #416.Now it appears the tests fail with PHP 7.4 since PHP 8 syntax was used and I didn't realized it had to be PHP 7.4 compatible ... as PHP 8.3 just came out ;)
It seems there is currently an issue with the PHPUnit version used in the CI pipeline:
PHP Fatal error: Declaration of PHPUnit\Framework\TestSuite::run(): void must be compatible with PHPUnit\Framework\Test::run(?PHPUnit\Framework\TestResult $result = null): PHPUnit\Framework\TestResult in /home/runner/work/schema-generator/schema-generator/vendor/phpunit/phpunit/src/Framework/TestSuite.php on line 318
Can you fix it?
Details: https://github.com/api-platform/schema-generator/actions/runs/7142451910/job/19451775510?pr=415
BTW: I got no error on the local runs of the PHPunit tests with PHP 7.4, 8.0, 8.1, 8.2 and 8.3
@Angatar CI fixed in #414.
Thx I'm gonna rebase and make a new PR
PR #421 is replacing this PR #415 PR #421 now pass CI :)
API resources and PHP classes
New feature: Allow schema generator to use labels for naming API resources and PHP classes
Branch: