Closed (fixed)
Project:
Metatag
Version:
2.2.x-dev
Component:
Code
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
2 Nov 2023 at 16:31 UTC
Updated:
29 Aug 2026 at 01:10 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
damienmckennaThis involves an API change, so it's going to require a new API and deprecating the old one.
Comment #3
damienmckennaWIP.
We'll need to deprecate the old APIs and finish updating all modules to the new APIs.
Comment #4
damienmckennaComment #5
damienmckennaComment #6
damienmckennaFurther WIP.
Comment #7
damienmckennaMisc syntax fixes.
Comment #9
damienmckennaNeed to get a move on so this can be added to 2.1.0.
Comment #10
damienmckennaWorking on this.
Comment #11
damienmckennaWIP. It still isn't loading all of the plugins.
Comment #12
damienmckennaThis is a priority.
Comment #13
damienmckennaTypoos.
Comment #15
damienmckennaPulling this off the schedule until it's closer to being done.
Comment #16
daniel_j commentedComment #18
daniel_j commentedThere are a number of phpstan warnings which are unrelated to this issue, mostly having to do with migrating Hooks away from procedural calls. There is also one phpunit failure, which is likewise unrelated (the fb_pages plugin is failing a Javascript test because the configured hostname is invalid).
I think this one's ready to at least have a look at. Documentation has not been updated yet, but it is probably best to do that once the code is likely to remain stable.
Comment #19
daniel_j commentedIt should be noted that I skipped any Tags that (in my opinion) should be deprecated. This includes any IE-specific tags as well as Pocket, which, alas, has gone to the big bitbucket in the sky.
Comment #20
damienmckennaA quick thought: how about we split this into two tasks - first convert the group plugins as there are only a few of them, then in a separate issue convert the tag plugins. We also need to retain backwards compatibility for now and drop the old ones in Metatag 3.
Comment #21
daniel_j commentedAs this MR stands, it is 100% backwards-compatible — it supports both Annotations and Attributes. Backwards-compatibility will be broken when the Annotation classes (and their reference in the plugin managers) are removed.
Comment #22
damienmckennaThank you, that's much appreciated.
Now to fix the test failures.
Comment #23
damienmckennaThe "previous major" test fails, i.e. the tests fail on Drupal 10.
Comment #24
damienmckennaNo, "previous major" is D9. Which is ok to fail.
Comment #25
damienmckennaThis will need to be refactored due to #3574819: Metatag: Convert hooks to OOP going in first.
Comment #26
damienmckennaThe tests fail on Drupal 10, which is a problem.
Comment #27
damienmckennaGoing to reroll this into a new MR.
Comment #31
damienmckennaThis fails dramatically on Drupal 10.
Comment #32
damienmckennaThe module fails on 10.5.x with this error:
Comment #33
damienmckennaConfigEntityType was changed to a PHP attribute in 11.1: https://www.drupal.org/node/3505422
As a result this change needs to go into 2.3.0, which would then require core 11.1 and would have to drop Drupal 10 entirely.
Comment #34
damienmckennaWe could revert the MetatagDefaults entity change and get the rest of these changes into 2.2.x..
Comment #35
damienmckennaWe'll convert MetatagDefaults to a PHP attribute in a separate issue for Metatag 2.3.0: #3582879: Convert MetatagDefaults config entity to a PHP annotation
Comment #37
damienmckennaCommitted. Woot!
Comment #39
damienmckenna