One of the phpstan test failures:

  Line   metatag_views/src/MetatagViewsCachePluginManager.php                   
 ------ ----------------------------------------------------------------------- 
  15     Trait Drupal\Core\Plugin\PreWarmablePluginManagerTrait requires using  
         class to implement Drupal\Core\PreWarm\PreWarmableInterface, but       
         Drupal\metatag_views\MetatagViewsCachePluginManager does not.          
         🪪  class.missingImplements                                            

Issue fork metatag-3633338

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

damienmckenna created an issue. See original summary.

shubhamgoel made their first commit to this issue’s fork.

shubhamgoel’s picture

Status: Active » Needs review

Hi team,

The fixes have been applied. Please review and merge the MR https://git.drupalcode.org/project/metatag/-/merge_requests/297/diffs

damienmckenna’s picture

Status: Needs review » Needs work

I think the correct approach would be to add PreWarmableInterface to the class, rather than removing the trait?

shubhamgoel’s picture

Status: Needs work » Needs review

Thanks @damienmckenna for the feedback.

Yes, You are correct. We must add PreWarmableInterface to the class instead of removing the trait. I have updated the MR.

csakiistvan’s picture

Assigned: Unassigned » csakiistvan
csakiistvan’s picture

Assigned: csakiistvan » Unassigned
Status: Needs review » Reviewed & tested by the community

✅ Tested and works — PHPStan on metatag_views/src/MetatagViewsCachePluginManager.php with the module's phpstan.neon reported the class.missingImplements error on line 15; after rebasing MR !297 onto 2.2.x and rerunning, it reports no errors. Adding PreWarmableInterface resolves the PHPStan failure.

  • damienmckenna committed 79fea10c on 2.2.x
    Issue #3633338 by shubhamgoel, csakiistvan, DamienMcKenna: Missing...

  • damienmckenna committed b01a1cab on 2.2.x
    Revert "Issue #3633338 by shubhamgoel, csakiistvan, DamienMcKenna:...
damienmckenna’s picture

damienmckenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thank you.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.