Problem/Motivation

When trying to override InstantArticleContentEntityNormalizer to add some customizations, I found that I couldn't do it since the fbia_rss normalizer, InstantArticleRssContentEntityNormalizer, extends InstantArticleContentEntityNormalizer in such a way that overriding it is impossible. When you attempt to override it, your override gets ignored, b/c the InstantArticleRssContentEntityNormalizer normalizer calls parent::normalize() to do it's recursive normalization. This is wrong.

Proposed resolution

Make the InstantArticleRssContentEntityNormalizer independent of InstantArticleContentEntityNormalizer, by not extending it. Extact the common needs into a trait.

Remaining tasks

Implement. Think about BC implications.

User interface changes

None.

API changes

  • InstantArticleRssContentEntityNormalizer no longer extends from InstantArticleContentEntityNormalizer, which would mean any children of InstantArticleRssContentEntityNormalizer in the wild won't have access to the same API. Although the known common methods will be extracted into a trait, so ... not so bad?
  • InstantArticleContentEntityNormalizer will only strictly support fbia encoding format. Before it supported fbia and fbia_rss, which was a side effect of this weird class hierarchy.
  • Data model changes

    None.

Comments

m4olivei created an issue. See original summary.

m4olivei’s picture

  • m4olivei authored 7f6f162 on 8.x-2.x
    Issue #2994506 by m4olivei: Class hierarchy ties fbia_rss normalizer to...
m4olivei’s picture

Status: Needs review » Fixed

Reviewed by @vijaycs85. Shoot, I forgot to credit you too! Blech, sorry, next time. Merged.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.