11.2: Fix phpstan access to an undefined property

Created on 14 May 2025, about 24 hours ago

Problem/Motivation

11.2 phpstan shows the following:

 ------ -------------------------------------------------------------------------- 
  Line   tests/src/Functional/KeyChangeTest.php                                    
 ------ -------------------------------------------------------------------------- 
  158    Access to an undefined property                                           
         Drupal\Core\Field\FieldItemListInterface::$encryption_profile.            
         🪪 property.notFound                                                      
         💡 Learn more:                                                            
            https://phpstan.org/blog/solving-phpstan-access-to-undefined-property  
  159    Access to an undefined property                                           
         Drupal\Core\Field\FieldItemListInterface::$encryption_profile.            
         🪪 property.notFound                                                      
         💡 Learn more:                                                            
            https://phpstan.org/blog/solving-phpstan-access-to-undefined-property  
  160    Access to an undefined property                                           
         Drupal\Core\Field\FieldItemListInterface::$encryption_profile.            
         🪪 property.notFound                                                      
         💡 Learn more:                                                            
            https://phpstan.org/blog/solving-phpstan-access-to-undefined-property  
  185    Access to an undefined property                                           
         Drupal\Core\Field\FieldItemListInterface::$encryption_profile.            
         🪪 property.notFound                                                      
         💡 Learn more:                                                            
            https://phpstan.org/blog/solving-phpstan-access-to-undefined-property  
  186    Access to an undefined property                                           
         Drupal\Core\Field\FieldItemListInterface::$encryption_profile.            
         🪪 property.notFound                                                      
         💡 Learn more:                                                            
            https://phpstan.org/blog/solving-phpstan-access-to-undefined-property  
  187    Access to an undefined property                                           
         Drupal\Core\Field\FieldItemListInterface::$encryption_profile.            
         🪪 property.notFound                                                      
         💡 Learn more:                                                            
            https://phpstan.org/blog/solving-phpstan-access-to-undefined-property  
  225    Access to an undefined property                                           
         Drupal\Core\Field\FieldItemListInterface::$encryption_profile.            
         🪪 property.notFound                                                      
         💡 Learn more:                                                            
            https://phpstan.org/blog/solving-phpstan-access-to-undefined-property  
  226    Access to an undefined property                                           
         Drupal\Core\Field\FieldItemListInterface::$encryption_profile.            
         🪪 property.notFound                                                      
         💡 Learn more:                                                            
            https://phpstan.org/blog/solving-phpstan-access-to-undefined-property  
  227    Access to an undefined property                                           
         Drupal\Core\Field\FieldItemListInterface::$encryption_profile.            
         🪪 property.notFound                                                      
         💡 Learn more:                                                            
            https://phpstan.org/blog/solving-phpstan-access-to-undefined-property  
📌 Task
Status

Active

Version

4.0

Component

Code

Created by

🇯🇵Japan ptmkenny

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024