Problem/Motivation

 ------ --------------------------------------------------------------------- 
  Line   src/ListBuilder/NameFormatListBuilder.php                            
 ------ --------------------------------------------------------------------- 
  81     Direct injection of entity storage via $storage 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   
 ------ --------------------------------------------------------------------- 
 ------ --------------------------------------------------------------------- 
  Line   src/ListBuilder/NameListFormatListBuilder.php                        
 ------ --------------------------------------------------------------------- 
  71     Direct injection of entity storage via $storage 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   
 ------ --------------------------------------------------------------------- 
 ------ --------------------------------------------------------------------- 
  Line   src/Service/NameFormatterService.php                                 
 ------ --------------------------------------------------------------------- 
  96     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   
  97     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   
 ------ --------------------------------------------------------------------- 
 ------ --------------------------------------------------------------------- 
  Line   src/Service/NameOptionService.php                                    
 ------ --------------------------------------------------------------------- 
  51     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   
  52     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   
 ------ --------------------------------------------------------------------- 
 ------ ---------------------------------------------------------------------- 
  Line   tests/src/Functional/NameFormatterTest.php                            
 ------ ---------------------------------------------------------------------- 
  22     Class Drupal\name\NameFormatter not found.                            
         πŸͺͺ  class.notFound                                                    
         πŸ’‘  Learn more at https://phpstan.org/user-guide/discovering-symbols  
 ------ ---------------------------------------------------------------------- 
 ------ --------------------------------------------------------------------- 
  Line   tests/src/Unit/Plugin/Field/FieldFormatter/NameFormatterTest.php     
 ------ --------------------------------------------------------------------- 
  170    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   
  171    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   
 ------ --------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   tests/src/Unit/Plugin/diff/Field/NameFieldBuilderTest.php              
 ------ ----------------------------------------------------------------------- 
  94     Drupal\Core\DependencyInjection\DependencySerializationTrait does not  
         support private properties.                                            
         πŸͺͺ  dependencySerializationTraitProperty.unsupportedPrivateProperty    
         πŸ’‘  See https://www.drupal.org/node/3110266                            
  94     Read-only properties are incompatible with                             
         Drupal\Core\DependencyInjection\DependencySerializationTrait.          
         πŸͺͺ  dependencySerializationTraitProperty.unsupportedReadOnlyProperty   
         πŸ’‘  See https://www.drupal.org/node/3110266                            
 ------ ----------------------------------------------------------------------- 
 ------ --------------------------------------------------------------------- 
  Line   tests/src/Unit/Traits/NameFormSettingsHelperTraitTest.php            
 ------ --------------------------------------------------------------------- 
  71     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   
 ------ --------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------------- 
  Line   tests/src/Unit/Utility/FormattedNameTokenReplacementTest.php           
 ------ ----------------------------------------------------------------------- 
  468    Drupal\Core\DependencyInjection\DependencySerializationTrait does not  
         support private properties.                                            
         πŸͺͺ  dependencySerializationTraitProperty.unsupportedPrivateProperty    
         πŸ’‘  See https://www.drupal.org/node/3110266                            
  468    Read-only properties are incompatible with                             
         Drupal\Core\DependencyInjection\DependencySerializationTrait.          
         πŸͺͺ  dependencySerializationTraitProperty.unsupportedReadOnlyProperty   
         πŸ’‘  See https://www.drupal.org/node/3110266                            
  469    Drupal\Core\DependencyInjection\DependencySerializationTrait does not  
         support private properties.                                            
         πŸͺͺ  dependencySerializationTraitProperty.unsupportedPrivateProperty    
         πŸ’‘  See https://www.drupal.org/node/3110266                            
  469    Read-only properties are incompatible with                             
         Drupal\Core\DependencyInjection\DependencySerializationTrait.          
         πŸͺͺ  dependencySerializationTraitProperty.unsupportedReadOnlyProperty   
         πŸ’‘  See https://www.drupal.org/node/3110266                            
  470    Drupal\Core\DependencyInjection\DependencySerializationTrait does not  
         support private properties.                                            
         πŸͺͺ  dependencySerializationTraitProperty.unsupportedPrivateProperty    
         πŸ’‘  See https://www.drupal.org/node/3110266                            
  470    Read-only properties are incompatible with                             
         Drupal\Core\DependencyInjection\DependencySerializationTrait.          
         πŸͺͺ  dependencySerializationTraitProperty.unsupportedReadOnlyProperty   
         πŸ’‘  See https://www.drupal.org/node/3110266                            
  471    Drupal\Core\DependencyInjection\DependencySerializationTrait does not  
         support private properties.                                            
         πŸͺͺ  dependencySerializationTraitProperty.unsupportedPrivateProperty    
         πŸ’‘  See https://www.drupal.org/node/3110266                            
  471    Read-only properties are incompatible with                             
         Drupal\Core\DependencyInjection\DependencySerializationTrait.          
         πŸͺͺ  dependencySerializationTraitProperty.unsupportedReadOnlyProperty   
         πŸ’‘  See https://www.drupal.org/node/3110266                            
 ------ ----------------------------------------------------------------------- 
 ------ --------------------------------------------------------------------- 
  Line   tests/src/Unit/Utility/NameOptionValidatorTest.php                   
 ------ --------------------------------------------------------------------- 
  47     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   

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork name-3611475

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

bluegeek9 created an issue. See original summary.

bluegeek9’s picture

Issue summary: View changes

  • bluegeek9 committed cdd11c19 on 2.0.x
    task: #3611475 Storing entity storage as a class property is not...
bluegeek9’s picture

Assigned: bluegeek9 Β» Unassigned
Status: Active Β» Fixed
//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support makes this project sustainable.
There are multiple ways to show appreciation for the work contributed to this project including:

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.

Status: Fixed Β» Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.