Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow schema generator to use labels for naming #415

Closed
wants to merge 0 commits into from

Conversation

Angatar
Copy link

@Angatar Angatar commented Dec 4, 2023

API resources and PHP classes

Q A
Branch? main
Tickets Closes #412
License MIT
Doc PR api-platform/docs#1848

New feature: Allow schema generator to use labels for naming API resources and PHP classes

Branch:

  • main

@Angatar
Copy link
Author

Angatar commented Dec 5, 2023

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 or composer 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?

@Angatar
Copy link
Author

Angatar commented Dec 6, 2023

#417 has updated the 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 ;)

@Angatar
Copy link
Author

Angatar commented Dec 8, 2023

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

@dunglas
Copy link
Member

dunglas commented Dec 9, 2023

@Angatar CI fixed in #414.

@Angatar
Copy link
Author

Angatar commented Dec 11, 2023

Thx I'm gonna rebase and make a new PR

@Angatar
Copy link
Author

Angatar commented Dec 12, 2023

#420 fixed #419, thanks!

PR #421 is replacing this PR #415
PR #421 now pass CI :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using labels instead of the local IDs for naming API resources and PHP classes
2 participants