Skip to content
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

Magic getters/setters support for fieldable Apigee entities #948

Open
mxr576 opened this issue Oct 5, 2023 · 0 comments · May be fixed by #956
Open

Magic getters/setters support for fieldable Apigee entities #948

mxr576 opened this issue Oct 5, 2023 · 0 comments · May be fixed by #956
Labels
enhancement New feature or request

Comments

@mxr576
Copy link
Contributor

mxr576 commented Oct 5, 2023

Is your feature request related to a problem? Please describe.

$entity->field_foo->getValue() is a commonly used Drupal trick for accessing field data on an entity instead of using (just a bit longer) $entity->get('field_foo')->getValue() . Not supporting these magic methods only becomes a problem on fieldable Apigee entities when Drupal core/contrib codes are called on them. like when an entity reference field on an Apigee entity gets validated by ValidReferenceConstraintValidator.

Steps to reproduce

  • Add an API Product reference field to a Team entity
  • Create a team and reference an API product in the field
  • Edit the team and reference a new API product in the field --> WSOD

Describe the solution you would like

Add support for magic __get()/__set() methods to fieldable Apigee entities.

Describe alternatives you have considered

Additional context

@mxr576 mxr576 added the enhancement New feature or request label Oct 5, 2023
boobaa added a commit to boobaa/apigee-edge-drupal that referenced this issue Oct 10, 2023
@boobaa boobaa linked a pull request Oct 10, 2023 that will close this issue
boobaa added a commit to boobaa/apigee-edge-drupal that referenced this issue Oct 11, 2023
boobaa added a commit to boobaa/apigee-edge-drupal that referenced this issue Oct 11, 2023
boobaa added a commit to boobaa/apigee-edge-drupal that referenced this issue Oct 12, 2023
boobaa added a commit to boobaa/apigee-edge-drupal that referenced this issue Oct 12, 2023
boobaa added a commit to boobaa/apigee-edge-drupal that referenced this issue Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant