Problem/Motivation

PHPStan and CSpell are complaining:

% ddev phpstan .
 10/10 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ --------------------------------------------------------------------- 
  Line   layout_builder_component_attributes.install                          
 ------ --------------------------------------------------------------------- 
  57     Access to constant FIELD_NAME of internal class                      
         Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage  
         from outside its root namespace Drupal.                              
         🪪  classConstant.internalClass                                      
  97     Access to constant FIELD_NAME of internal class                      
         Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage  
         from outside its root namespace Drupal.                              
         🪪  classConstant.internalClass                                      
  99     Access to constant FIELD_NAME of internal class                      
         Drupal\layout_builder\Plugin\SectionStorage\OverridesSectionStorage  
         from outside its root namespace Drupal.                              
         🪪  classConstant.internalClass                                      
 ------ --------------------------------------------------------------------- 


                                                                                
 [ERROR] Found 3 errors                                                         
                                                                                

Failed to run phpstan .: exit status 1
% ddev cspell
Writing json array to .cspell.json
README.md:137:9     - Unknown word (Burge)      -- - Chris Burge - https://www.drupal
	 Suggestions: [Burg, Barge, budge, Budge, Bulge]
CSpell: Files checked: 21, Issues found: 1 in 1 file.
Failed to run cspell : exit status 1

Steps to reproduce

  • Run PHPStan and CSpell.

Proposed resolution

  • Ignore internal class issue. It might be an internal class, but OverridesSectionStorage::FIELD_NAME can never change.
  • Add 'burge' to CSpell _CSPELL_WORDS in .gitlab-ci.yml.

Remaining tasks

  • Open MR
  • Passing PHPStan and CSpell scans

User interface changes

None

API changes

None

Data model changes

None

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

chris burge created an issue. See original summary.

chris burge’s picture

Next major version deprecation notice:

  Line   tests/modules/layout_builder_component_attributes_test/layout_builder  
         _component_attributes_test.install                                     
 ------ ----------------------------------------------------------------------- 
  12     Call to deprecated function module_set_weight():                       
         in drupal:11.5.0 and is removed from drupal:13.0.0. Use                
           \Drupal::service(ModuleWeight::class)->set() instead.                
         🪪  function.deprecated                                                

Replacement service isn't available across supported core versions - defer for now.

Previous major version:

------ ----------------------------------------------------------------------- 
  Line   layout_builder_component_attributes.module                             
 ------ ----------------------------------------------------------------------- 
  20     Attribute class Drupal\Core\Hook\Attribute\LegacyHook does not exist.  
  29     Attribute class Drupal\Core\Hook\Attribute\LegacyHook does not exist.  
 ------ ----------------------------------------------------------------------- 
 ------ ----------------------------------------------------------------- 
  Line   src/Hook/LayoutBuilderComponentAttributesHooks.php               
 ------ ----------------------------------------------------------------- 
  39     Attribute class Drupal\Core\Hook\Attribute\Hook does not exist.  
  79     Attribute class Drupal\Core\Hook\Attribute\Hook does not exist.  
 ------ ----------------------------------------------------------------- 
 ------ -------------------------------------------------------------------- 
  Line   tests/src/Functional/GlobalConfigTest.php                           
 ------ -------------------------------------------------------------------- 
  14     Attribute class PHPUnit\Framework\Attributes\Group does not exist.  
  15     Attribute class                                                     
         PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses does not   
         exist.                                                              
 ------ -------------------------------------------------------------------- 
 ------ -------------------------------------------------------------------- 
  Line   tests/src/FunctionalJavascript/ComponentAttributeTest.php           
 ------ -------------------------------------------------------------------- 
  16     Attribute class PHPUnit\Framework\Attributes\Group does not exist.  
  17     Attribute class                                                     
         PHPUnit\Framework\Attributes\RunTestsInSeparateProcesses does not   
         exist.                                                              
 ------ -------------------------------------------------------------------- 

These are simply ignored in D10 and will go away when D10 support is dropped.

chris burge’s picture

Status: Active » Fixed

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.