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

fix(serializer) Restore the use of placeholders named differently than id #5739

Closed
wants to merge 1 commit into from

Conversation

Aerendir
Copy link
Contributor

@Aerendir Aerendir commented Aug 9, 2023

Q A
Branch? 3.x
Tickets Closes #5736
License MIT

Restore the use of placeholders named differently than id.

See #5736 for more details.

@Aerendir Aerendir changed the title fix(serializer) Restore the use of placeholders named differently than id fix(serializer) Restore the use of placeholders named differently than id Aug 9, 2023
@Aerendir Aerendir force-pushed the 5736 branch 2 times, most recently from 5ba3217 to fbc430f Compare August 9, 2023 14:56
@soyuka
Copy link
Member

soyuka commented Aug 10, 2023

We need to handle this differently, it should just find the correct ids no? I'll try to find out the issue...

@Aerendir
Copy link
Contributor Author

Yes, it should find the correct placeholder, given the resource. But as of what I saw, the array is flat, so, if you have two placeholders with the same name, then the one overwrites the other.

This would happen even if the placeholder were named, for example, resource_id.

But, with this change, if it is named resource_id, the code may break; if it is named id, the code will handle the situation.

I agree that a cleaner solution should be found, but I currently cannot find one: I hope you will as you know the code better than me 💪

Maybe in the mean time this PR may be published and a new patch release issued, just to don't break existing apps that rely on ApiPlatform?

@soyuka
Copy link
Member

soyuka commented Aug 11, 2023

@soyuka soyuka closed this Aug 11, 2023
@Aerendir Aerendir deleted the 5736 branch August 12, 2023 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants