Skip to content

Conversation

VincentLanglet
Copy link
Contributor

Hi @beberlei

In #11659 you introduce PropertyAccessor as a way to replace reflFields,
but the interface is internal.

Static analysis like PHPStan/Psalm does report internal class/methods because basically it means

  • The interface could be removed anytime
  • Some method could be removed anytime

And so we cannot rely on setValue/getValue.

Since we were able to use "freely" reflfields, I assume it should be the same for propertyAccessors.

As an exemple https://github.com/sonata-project/EntityAuditBundle use it a lot.

@beberlei
Copy link
Member

@VincentLanglet the internal is there because we are not sure yet if the API might need to be improved or changed. Can you ignore these errors for now globally? That would be preferable from our POV as you opt into the experimental API.

@VincentLanglet
Copy link
Contributor Author

Sure, I discovered classMetadata->getFieldValue and classMetadata->setFieldValue which is a non-internal proxy

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