-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PropertyAccess] Add a predictable convention for Adders and Removers #52809
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
Comments
Thank you for this suggestion. |
Just a quick reminder to make a comment on this. If I don't hear anything I'll close this. |
Okay, you asked for it. I don't think comments like this one help anyone. |
Thank you for this suggestion. |
Hello? This issue is about to be closed if nobody replies. |
Okay, you asked for it. I don't think comments like this help anyone. |
Uh oh!
There was an error while loading. Please reload this page.
Description
When using adders and removers to modify collections, PropertyAccess currently assumes that property names are English words and tries to apply English grammar transformations to singularise them (see #21569 and #5013). This is super flaky and makes this feature basically unusable in a lot of cases, as it 1. doesn't work for other languages than English (you really don't want to confuse people with English grammar if your applications domain language is something else), and 2. doesn't even work for all English words (see the ever-growing exception list).
Of course, we can't just remove the ever-growing exception list due to BC, but we could at least add another convention on top that works without natural language grammar transformations.
I propose the following one:
Calling
PropertyAccessor::setValue
for property'singularWordCollection'
should call the methodsgetSingularWordCollection
,addSingularWord
andremoveSingularWord
.Example
The text was updated successfully, but these errors were encountered: