Cleanup access to undefined properties in FieldType classes

Created on 10 January 2024, 11 months ago
Updated 11 January 2024, 11 months ago

Problem/Motivation

πŸ“Œ Fix all code validate jobs running in GitLab CI Fixed is trying to get us to a fully clean set of passing code quality tests. There were a few PHPStan errors that were easier to silence and punt than fix:

 ------ -------------------------------------------------------------------------- 
  Line   src/Plugin/Field/FieldType/AddressItem.php                                
 ------ -------------------------------------------------------------------------- 
  357    Access to an undefined property                                           
         Drupal\address\Plugin\Field\FieldType\AddressItem::$langcode.             
         πŸ’‘ Learn more:                                                            
            https://phpstan.org/blog/solving-phpstan-access-to-undefined-property  
  421    Access to an undefined property                                           
         Drupal\address\Plugin\Field\FieldType\AddressItem::$country_code.         
         πŸ’‘ Learn more:                                                            
            https://phpstan.org/blog/solving-phpstan-access-to-undefined-property  
  429    Access to an undefined property                                           
         Drupal\address\Plugin\Field\FieldType\AddressItem::$langcode.             
         πŸ’‘ Learn more:                                                            
            https://phpstan.org/blog/solving-phpstan-access-to-undefined-property  
 ------ -------------------------------------------------------------------------- 
 ------ -------------------------------------------------------------------------- 
  Line   src/Plugin/Field/FieldType/ZoneItem.php                                   
 ------ -------------------------------------------------------------------------- 
  75     Access to an undefined property                                           
         Drupal\address\Plugin\Field\FieldType\ZoneItem::$value.                   
         πŸ’‘ Learn more:                                                            
            https://phpstan.org/blog/solving-phpstan-access-to-undefined-property  
 ------ -------------------------------------------------------------------------- 

These are currently being ignored in phpstan-baseline.neon

Steps to reproduce

Proposed resolution

  1. Fix these for real.
  2. Remove them from phpstan-baseline.neon

Remaining tasks

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dww

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

Comments & Activities

Production build 0.71.5 2024