In some of the phpstan test failures:

  Line   metatag_views/src/Controller/MetatagViewsController.php                
 ------ ----------------------------------------------------------------------- 
  43     Direct injection of entity storage via $viewStorage is not             
         recommended. Inject Drupal\Core\Entity\EntityTypeManagerInterface and  
         call getStorage() at the call-site instead.                            
         🪪  drupal.entityStorageDirectInjection                                
         💡  See                                                                
         https://mglaman.dev/blog/dependency-injection-anti-patterns-drupal     
  44     Storing entity storage as a class property is not recommended. Call    
         Drupal\Core\Entity\EntityTypeManagerInterface::getStorage() at the     
         call-site instead.                                                     
         🪪  drupal.entityStoragePropertyAssignment                             
         💡  See                                                                
         https://mglaman.dev/blog/dependency-injection-anti-patterns-drupal     

and..

  Line   metatag_views/src/Form/MetatagViewsTranslationForm.php               
 ------ --------------------------------------------------------------------- 
  119    Storing entity storage as a class property is not recommended. Call  
         Drupal\Core\Entity\EntityTypeManagerInterface::getStorage() at the   
         call-site instead.                                                   
         🪪  drupal.entityStoragePropertyAssignment                           
         💡  See                                                              
         https://mglaman.dev/blog/dependency-injection-anti-patterns-drupal   

.. and some others throughout the module.

Fix these per Matt's blog post.

Issue fork metatag-3633336

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.

damienmckenna’s picture

Issue summary: View changes

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/298/diffs.

liam morland made their first commit to this issue’s fork.

liam morland’s picture

I have added a commit to have it use the parent::entityTypeManager().

damienmckenna’s picture

Issue summary: View changes
Status: Needs review » Needs work

There are a few other instances of this error across the codebase.

damienmckenna’s picture

damienmckenna’s picture

Status: Needs work » 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.