Skip to content

Conversation

@soyuka
Copy link
Member

@soyuka soyuka commented Sep 14, 2025

Q A
Branch? 4.1
Tickets Closes #7382
License MIT

Doctrine should not assume an id is not writable during updates. PropertyInfo should not assume a property is not writable (for now only during updates) but as this has a direct impact on serialization groups maybe we should just skip readable/writable in the PropertyInfoPropertyMetadataFactory.
SerializerPropertyMetadataFactory should run after AttributePropertyMetadataFactory or we can not override this behavior.

Mayabe that we could just simplify these and never set writable (or readable) from Doctrine or PropertyInfo actually (and we won't need to add the api_allow_update to the getFactoryOptions...).

fixes #7382

Doctrine should not assume an `id` is not writable during updates.
PropertyInfo should not assume a property is not writable (for now only
during updates) but as this has a direct impact on serialization groups
maybe we should just skip readable/writable in the
PropertyInfoPropertyMetadataFactory.
SerializerPropertyMetadataFactory should run after AttributePropertyMetadataFactory or we can not override this behavior.

Mayabe that we could just simplify these and never set `writable` (or
`readable`) from Doctrine or PropertyInfo actually (and we won't need to
add the api_allow_update to the getFactoryOptions...).

fixes api-platform#7382
@soyuka soyuka force-pushed the fix/7382 branch 3 times, most recently from 174919a to 916d9d5 Compare September 15, 2025 09:41
@soyuka soyuka merged commit 4abec44 into api-platform:4.1 Sep 15, 2025
1 of 2 checks passed
soyuka added a commit that referenced this pull request Sep 15, 2025
Co-authored-by: soyuka <[email protected]>
Co-authored-by: Matteo Beccati <[email protected]>
Co-authored-by: valentindrdt <[email protected]>
Co-authored-by: Emmanuel Averty <[email protected]>
Co-authored-by: Flug <[email protected]>
fix(symfony): only set name_converter for the default serializer (#6101) (#7365)
fix: pagination via cursor on ApiResource operations (#7368)
fix: phpdoc for HttpOperation paginationViaCursor parameter (#7379)
fix(metadata): compute isWritable during updates (#7383)
fixes #7382
BacLuc added a commit to BacLuc/ecamp3 that referenced this pull request Nov 9, 2025
BacLuc added a commit to BacLuc/ecamp3 that referenced this pull request Nov 9, 2025
This update failed because of this change:
api-platform/symfony@v4.1.23...v4.1.24
Of this PR:
- api-platform/core#7383

So this is reverted with the change in services.yaml.
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.

1 participant