Fixed
Project:
Metatag
Version:
2.2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
10 Nov 2026 at 11:25 UTC
Updated:
11 Nov 2026 at 17:42 UTC
Jump to comment: Most recent
There are some phpstan issues to resolve in the 2.2.x branch:
------ -----------------------------------------------------------------------
Line metatag_views/src/Controller/MetatagViewsTranslationController.php
------ -----------------------------------------------------------------------
24 Property
Drupal\metatag_views\Controller\MetatagViewsTranslationController::$e
ntityTypeManager (Drupal\Core\Entity\EntityTypeManagerInterface)
overriding property
Drupal\Core\Controller\ControllerBase::$entityTypeManager should not
have a native type.
🪪 property.extraNativeType (non-ignorable)
------ -----------------------------------------------------------------------
------ --------------------------------------------------------------
Line metatag_views/src/Form/MetatagViewsEditForm.php
------ --------------------------------------------------------------
100 Call to deprecated method get() of class
Symfony\Component\HttpFoundation\Request:
since Symfony 7.4, use properties `->attributes`, `query` or
`request` directly instead
🪪 method.deprecated
101 Call to deprecated method get() of class
Symfony\Component\HttpFoundation\Request:
since Symfony 7.4, use properties `->attributes`, `query` or
`request` directly instead
🪪 method.deprecated
------ --------------------------------------------------------------
------ --------------------------------------------------------------
Line metatag_views/src/Form/MetatagViewsTranslationForm.php
------ --------------------------------------------------------------
175 Call to deprecated method get() of class
Symfony\Component\HttpFoundation\Request:
since Symfony 7.4, use properties `->attributes`, `query` or
`request` directly instead
🪪 method.deprecated
176 Call to deprecated method get() of class
Symfony\Component\HttpFoundation\Request:
since Symfony 7.4, use properties `->attributes`, `query` or
`request` directly instead
🪪 method.deprecated
177 Call to deprecated method get() of class
Symfony\Component\HttpFoundation\Request:
since Symfony 7.4, use properties `->attributes`, `query` or
`request` directly instead
🪪 method.deprecated
------ --------------------------------------------------------------
------ -----------------------------------------------------------------------
Line metatag_views/src/MetatagViewsCacheWrapper.php
------ -----------------------------------------------------------------------
52 Access to an undefined property
Drupal\metatag_views\MetatagViewsCacheWrapper::$container.
🪪 property.notFound
💡 Learn more: https://phpstan.org/blog/solving-phpstan-access-to-und
efined-property
102 Call to deprecated method cacheExpire() of class
Drupal\views\Plugin\views\cache\CachePluginBase:
in drupal:11.4.0 and is removed from drupal:13.0.0. No
replacement is provided.
🪪 method.deprecated
116 PHPDoc tag @var with type
Drupal\metatag_views\Plugin\views\display_extender\MetatagDisplayExte
nder is not subtype of native type hasOffset(string).
🪪 varTag.nativeType
------ -----------------------------------------------------------------------
------ ----------------------------------------------------------------
Line src/Plugin/metatag/Group/GroupBase.php
------ ----------------------------------------------------------------
78 PHPDoc tag @return with type
Drupal\Core\StringTranslation\TranslatableMarkup|string is not
subtype of native type string.
🪪 return.phpDocType
88 PHPDoc tag @return with type
Drupal\Core\StringTranslation\TranslatableMarkup|string is not
subtype of native type string.
🪪 return.phpDocType
------ ----------------------------------------------------------------
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
Comment #4
ishfaqafridi85 commentedResolves the PHPStan errors listed in the issue, pipeline green now.
Comment #5
csakiistvanComment #6
csakiistvan✅ Tested and works — the phpstan job fails with 22 errors on the latest 2.2.x pipeline and reports "No errors" on MR !316; applied the MR locally, rebuilt caches, the front page returns 200 and
getGlobalMetatags()still returns the "global" defaults. The phpstan issues are resolved without a behaviour change.Notes
I used AI to draft my review texts, I have manually checked its findings.
Comment #7
damienmckennaGreat work everyone! Thank you.
Comment #9
damienmckenna