Problem/Motivation

DynamicEntityReferenceItemNormalizer extends Drupal\hal\Normalizer\EntityReferenceItemNormalizer which does not exist in Drupal 10.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

acbramley created an issue. See original summary.

larowlan’s picture

ah we'll need a dep on the contrib module

acbramley’s picture

acbramley’s picture

Issue tags: +Needs tests

We obviously need tests for this too

jibran’s picture

Now that hal is in contrib. Let's move service to hal.

jibran’s picture

jibran’s picture

Assigned: Unassigned » larowlan
Status: Active » Postponed (maintainer needs more info)

Can we please have a suggestion on #6? Assigning it to Lee as he is HAL module maintainer.

larowlan’s picture

Status: Postponed (maintainer needs more info) » Needs review

HEAD tests are fixed now, let's see how it goes

eelkeblok’s picture

Status: Needs review » Needs work

I am havind trouble getting this change to work. AFAICT, the class is named EntityReferenceFieldItemNormalizer, not EntityReferenceItemNormalizer. Am I missing something?

acbramley’s picture

#11 is right, I can't see that class in 10.1.x or 11.x. How did tests pass??

eelkeblok’s picture

Wondered the same, but the obvious answer is: this is not tested. :) There is actually more information in the companion/duplicate issue, #3350347: Declaration of DynamicEntityReferenceItemNormalizer::normalize() must be compatible, although I agree that the "correct" answer is to remove the dependency entirely.

I created a new branch that "corrects" the name of the base class, but as noted in the other issue, it is actually quite different, so I guess the other issue may be the correct solution for the short term, while this one serves as a better, future solution.

jibran’s picture

Status: Needs work » Closed (won't fix)

I'm closing this in favor of #3414197: Add DynamicEntityReferenceItemNormalizer in the HAL issue.

berdir’s picture

Note to others: the normalizer was completely removed in #3377096: [DER] Fix GitLab CI , so latest dev shouldn't have this problem.

Also, double-check that you _really_ need hal module. Maybe you still have it installed because you use default_content 1.x or something else that used to depend on it? You should only get this error if you have that module installed.