Skip to content

Fix/4372 skip null values in hal #7317

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 6 commits into from
Aug 6, 2025

Conversation

BacLuc
Copy link
Contributor

@BacLuc BacLuc commented Jul 26, 2025

Q A
Branch? main
Tickets Issue: #4372
License MIT
Doc PR -

RFC: This PR adds support for skip_null_to_one_relations: false with relations to the HAL normalizer. This however deviates from the hyperschema, because now the entries in _links and _embedded may be null, which isn't really allowed in HAL.

Relates to:

Additionally:

  • Always add tests and ensure they pass. ✔️
  • Never break backward compatibility (see https://symfony.com/bc). ✔️
  • Update CHANGELOG.md file: Will do that if this has a chance of beeing merged.

@soyuka
Copy link
Member

soyuka commented Jul 29, 2025

This looks okay, could you fix the tests? (lowest branches tests don't matter they'll get fixed later)

@BacLuc BacLuc force-pushed the fix/4372-skip-null-values-in-HAL branch from 5784c52 to 5b4e937 Compare August 3, 2025 12:44
@BacLuc
Copy link
Contributor Author

BacLuc commented Aug 3, 2025

This looks okay, could you fix the tests? (lowest branches tests don't matter they'll get fixed later)

I fixed most of them.
It didn't work with mongodb, is it ok if i leave it skipped or can you give me a hint were i should look?

I also did not change the changelog, because i don't have a hash of a commit in the api-platform repository yet.
Is that ok?

@soyuka soyuka merged commit de9e7f5 into api-platform:main Aug 6, 2025
110 of 112 checks passed
@soyuka
Copy link
Member

soyuka commented Aug 6, 2025

Thanks!

@BacLuc BacLuc deleted the fix/4372-skip-null-values-in-HAL branch August 6, 2025 08:21
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.

2 participants