Skip to content

[make:entity] fix compatibility with api-platform 3.0 #1199

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

Merged
merged 2 commits into from
Sep 22, 2022

Conversation

yobrx
Copy link
Contributor

@yobrx yobrx commented Sep 20, 2022

I fixed #1198, but I don't know how launch tests suites easily, I don't have found documentation for that.

@weaverryan
Copy link
Member

We need to push a fix for the test suite - a recipe change upstream broke things.

But, to run tests locally, you can run composer install then ./vendor/bin/simple-phpunit. You will likely also need to tweak the TEST_DATABASE_DSN setting in phpunit.xml.dist to match your local settings. The test suite is HUGE and slow - so I usually target the specific tests that I want to run :)

@yobrx yobrx force-pushed the api-platform-3.0 branch 2 times, most recently from 972c899 to 77cb5c2 Compare September 20, 2022 14:11
@yobrx
Copy link
Contributor Author

yobrx commented Sep 20, 2022

Thanks ! I have failures but not (normally) related to my dev.

@jrushlow
Copy link
Collaborator

@yobrx - I've just merged in a few fixes to our CI. Doing a rebase against main should fix some of the CI failures we're seeing here

@yobrx
Copy link
Contributor Author

yobrx commented Sep 20, 2022

It's green, except one test on 6.2.x

@weaverryan weaverryan marked this pull request as ready for review September 21, 2022 13:18
Copy link
Member

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 6.2 failure looks weird and probably a real failure - but certainly unrelated to this PR 👍

ApiResource::class,
'api'
);
if (class_exists(LegacyApiResource::class)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would test for ApiResource first because in 2.7 both classes exist, and we prefer using the non-deprecated attribute.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Kévin, I fixed that.

… - Priority to the new version of Api Platform
@yobrx yobrx requested a review from dunglas September 22, 2022 09:29
Copy link
Member

@dunglas dunglas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Yoann!!

@jrushlow jrushlow changed the title Fix #1198 - MakeEntity is not compatible with api-platform 3.0 [make:entity] fix compatibility with api-platform 3.0 Sep 22, 2022
Copy link
Collaborator

@jrushlow jrushlow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thank you @yobrx

@jrushlow jrushlow added the Bug Bug Fix label Sep 22, 2022
@jrushlow jrushlow merged commit 4c20d32 into symfony:main Sep 22, 2022
@jrushlow jrushlow mentioned this pull request Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Bug Fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MakeEntity is not compatible with api-platform 3.0
4 participants