Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

#48167 add fallbackCallbackAccessor to PropertyPathAccessor to suppor… #53589

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

Closed
wants to merge 2 commits into from

Conversation

bartrail
Copy link

…t custom getter methods when submitting a form

Q A
Branch? 5.4
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #48167
License MIT

Added a private CallbackAccessor to the PropertyPathAccessor to have a 2nd look if there is a custom getter defined in the form config and use this as fallback..

@carsonbot
Copy link

Hey!

Thanks for your PR. You are targeting branch "7.1" but it seems your PR description refers to branch "5.4".
Could you update the PR description or change target branch? This helps core maintainers a lot.

Cheers!

Carsonbot

@bartrail bartrail changed the base branch from 7.1 to 5.4 January 19, 2024 18:14
Conrad Barthelmes added 2 commits March 24, 2024 14:51
@bartrail bartrail force-pushed the fix-48167-custom-getter branch from ba46382 to 213f015 Compare March 24, 2024 13:51

public function __construct(?PropertyAccessorInterface $propertyAccessor = null)
{
$this->propertyAccessor = $propertyAccessor ?? PropertyAccess::createPropertyAccessor();
$this->fallbackCallbackAccessorForCustomGetter = new CallbackAccessor();
Copy link
Member

Choose a reason for hiding this comment

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

This could be simpler, but it's limited to falling back on CallbackAccessor only, when it could be any DataAccessorInterface adapter.

See #54723 for a more generic solution.

@xabbuh
Copy link
Member

xabbuh commented Apr 25, 2024

Thank you for starting this Conrad. Closing in favour of #54723.

@xabbuh xabbuh closed this Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Form] Overriding only getter causes exceptions while submitting
4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.