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
Comment #2
m4oliveiPR: https://github.com/BurdaMagazinOrg/module-fb_instant_articles/pull/135
Comment #4
m4oliveiReviewed by @vijaycs85. Shoot, I forgot to credit you too! Blech, sorry, next time. Merged.