Solve coding standards and deprecations

Created on 8 April 2025, about 2 months ago

Problem/Motivation

Currently, the main pipeline has multiple coding standards and deprecation messages.

Steps to reproduce

Review Gitlab Pipeline https://git.drupalcode.org/project/vlsuite/-/pipelines/407246

Proposed resolution

Review messages on failed pipelines and solve the errors.

πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

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

Merge Requests

Comments & Activities

  • πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί
  • πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

    CSpell

    | Original        | Corrected         |
    |----------------|-------------------|
    | acive          | active            |
    | activado       | activated         |
    | animatecss     | Animate.css       |
    | autocollapse   | auto-collapse     |
    | autoresize     | auto-resize       |
    | behaviour      | behavior          |
    | botom          | bottom            |
    | builderlink    | builder link      |
    | cardinallity   | cardinality       |
    | clasees        | classes           |
    | clases         | classes           |
    | clientside     | client-side       |
    | completly      | completely        |
    | contentvlsuite | content VLSuite   |
    | cpath          | cPath             |
    | crect          | correct           |
    | csvg           | CSVG              |
    | dependecies    | dependencies      |
    | depenencies    | dependencies      |
    | deprecatedfield| deprecated field  |
    | desactivado    | deactivated       |
    | descarted      | discarded         |
    | dialogclose    | dialog close      |
    | dinamically    | dynamically       |
    | dynamize       | dynamize (consider rephrasing) |
    | everytning     | everything        |
    | fourcols       | four columns      |
    | galleryvlsuite | gallery VLSuite   |
    | groupelement   | group element     |
    | indentifier    | identifier        |
    | initiazilation | initialization    |
    | laning         | planning          |
    | limititations  | limitations       |
    | linuxfoundation| Linux Foundation  |
    | nagination     | pagination        |
    | navlink        | nav link          |
    | olumn          | column            |
    | opctions       | options           |
    | otherwhise     | otherwise         |
    | overing        | hovering          |
    | palcehold      | placeholder       |
    | placehold      | placeholder       |
    | preffix        | prefix            |
    | proccesed      | processed         |
    | procesing      | processing        |
    | provinding     | providing         |
    | quoute         | quote             |
    | reduntant      | redundant         |
    | remoto         | remote            |
    | resovler       | resolver          |
    | scrollpy       | ScrollSpy         |
    | scrope         | scope             |
    | selecto        | selector          |
    | spicific       | specific          |
    | swiperjs       | Swiper.js         |
    | sysyem         | system            |
    | tada           | Tada (animation)  |
    | textdirection  | text direction    |
    | threecols      | three columns     |
    | twocols        | two columns       |
    | udate          | update            |
    | uidom          | UI DOM            |
    | usement        | usage             |
    | utilit         | utility           |
    | utilitites     | utilities         |
    | utilitties     | utilities         |
    | utilty         | utility           |
    | utitlities     | utilities         |
    | vluiste        | VLSuite           |
    | vΓ­deo          | video             |
    | warantee       | warranty          |
    | webforms       | Web Forms         |
    | wher           | where             |
    | whitout        | without           |
    
    
  • πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

    PHPStan Errors:

     ------ --------------------------------------------------------------------------- 
      Line   modules/vlsuite_block/modules/vlsuite_block_cta/vlsuite_block_cta.install  
     ------ --------------------------------------------------------------------------- 
      38     Access to constant BUNDLE_KEY on an unknown class VLSuiteBlockCta.         
             πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols        
      38     Class VLSuiteBlockCta not found.                                           
             πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols        
     ------ --------------------------------------------------------------------------- 
     ------ ----------------------------------------------------------------------------- 
      Line   modules/vlsuite_block/modules/vlsuite_block_icon/vlsuite_block_icon.install  
     ------ ----------------------------------------------------------------------------- 
      38     Access to constant BUNDLE_KEY on an unknown class VLSuiteBlockIcon.          
             πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols          
      38     Class VLSuiteBlockIcon not found.                                            
             πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols          
      45     Access to constant BUNDLE_KEY on an unknown class VLSuiteBlockIcon.          
             πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols          
      45     Class VLSuiteBlockIcon not found.                                            
             πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols          
     ------ ----------------------------------------------------------------------------- 
     ------ ------------------------------------------------------------------------------- 
      Line   modules/vlsuite_block/modules/vlsuite_block_image/vlsuite_block_image.install  
     ------ ------------------------------------------------------------------------------- 
      27     Access to constant BUNDLE_KEY on an unknown class VLSuiteBlockImage.           
             πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols            
      27     Class VLSuiteBlockImage not found.                                             
             πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols            
     ------ ------------------------------------------------------------------------------- 
     ------ ---------------------------------------------------------------------------- 
      Line   modules/vlsuite_block/src/Controller/VLSuiteBlockChooseBlockController.php  
     ------ ---------------------------------------------------------------------------- 
      20     Class                                                                       
             Drupal\vlsuite_block\Controller\VLSuiteBlockChooseBlockController           
             extends @internal class                                                     
             Drupal\layout_builder_restrictions\Controller\ChooseBlockController.        
     ------ ---------------------------------------------------------------------------- 
     ------ ------------------------------------------------------------------- 
      Line   modules/vlsuite_block/src/Plugin/Block/VLSuiteFieldBlock.php       
     ------ ------------------------------------------------------------------- 
      29     Class Drupal\vlsuite_block\Plugin\Block\VLSuiteFieldBlock extends  
             @internal class Drupal\layout_builder\Plugin\Block\FieldBlock.     
     ------ ------------------------------------------------------------------- 
     ------ -------------------------------------------------------------------- 
      Line   modules/vlsuite_block/src/Plugin/Block/VLSuiteInlineBlock.php       
     ------ -------------------------------------------------------------------- 
      28     Class Drupal\vlsuite_block\Plugin\Block\VLSuiteInlineBlock extends  
             @internal class Drupal\layout_builder\Plugin\Block\InlineBlock.     
     ------ -------------------------------------------------------------------- 
     ------ -------------------------------------------------------------------------- 
      Line   modules/vlsuite_block/src/Plugin/Derivative/VLSuiteFieldBlockDeriver.php  
     ------ -------------------------------------------------------------------------- 
      13     Class Drupal\vlsuite_block\Plugin\Derivative\VLSuiteFieldBlockDeriver     
             extends @internal class                                                   
             Drupal\layout_builder\Plugin\Derivative\FieldBlockDeriver.                
     ------ -------------------------------------------------------------------------- 
     ------ --------------------------------------------------------------------------------- 
      Line   modules/vlsuite_block/src/Plugin/Derivative/VLSuiteMediaBgFieldBlockDeriver.php  
     ------ --------------------------------------------------------------------------------- 
      14     Class                                                                            
             Drupal\vlsuite_block\Plugin\Derivative\VLSuiteMediaBgFieldBlockDeriver           
             extends @internal class                                                          
             Drupal\layout_builder\Plugin\Derivative\FieldBlockDeriver.                       
      27     \Drupal calls should be avoided in classes, use dependency injection             
             instead                                                                          
     ------ --------------------------------------------------------------------------------- 
     ------ ---------------------------------------------------------------- 
      Line   modules/vlsuite_block/vlsuite_block.module                      
     ------ ---------------------------------------------------------------- 
      185    Fetching deprecated class constant EXISTS_REPLACE of interface  
             Drupal\Core\File\FileSystemInterface:                           
             in drupal:10.3.0 and is removed from drupal:12.0.0. Use         
             \Drupal\Core\File\FileExists::Replace instead.                  
     ------ ---------------------------------------------------------------- 
     ------ --------------------------------------------------------------------- 
      Line   modules/vlsuite_collection/src/VLSuiteCollectionHelper.php           
     ------ --------------------------------------------------------------------- 
      96     Call to static method encode() on an unknown class                   
             Drupal\Core\Serialization\Yaml.                                      
             πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols  
      120    Call to static method decode() on an unknown class                   
             Drupal\Core\Serialization\Yaml.                                      
             πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols  
      193    Fetching deprecated class constant EXISTS_REPLACE of interface       
             Drupal\Core\File\FileSystemInterface:                                
             in drupal:10.3.0 and is removed from drupal:12.0.0. Use              
             \Drupal\Core\File\FileExists::Replace instead.                       
     ------ --------------------------------------------------------------------- 
     ------ --------------------------------------------------------------------- 
      Line   modules/vlsuite_demo/vlsuite_demo.install                            
     ------ --------------------------------------------------------------------- 
      127    Call to static method decode() on an unknown class                   
             Drupal\Core\Serialization\Yaml.                                      
             πŸ’‘ Learn more at https://phpstan.org/user-guide/discovering-symbols  
     ------ --------------------------------------------------------------------- 
     ------ ------------------------------------------------------------------------------------------ 
      Line   modules/vlsuite_generator/src/Drush/Generators/VLSuiteGeneratorModuleGenerator.php        
     ------ ------------------------------------------------------------------------------------------ 
      136    Parameter $default_content_exporter of method                                             
             Drupal\vlsuite_generator\Drush\Generators\VLSuiteGeneratorModuleGenerator::__construct()  
             has invalid type Drupal\default_content\ExporterInterface.                                
     ------ ------------------------------------------------------------------------------------------ 
     ------ ------------------------------------------------------------------------------------------------ 
      Line   modules/vlsuite_layout/modules/vlsuite_layout_tabs/src/Plugin/Layout/VLSuiteLayoutTabsBase.php  
     ------ ------------------------------------------------------------------------------------------------ 
      167    \Drupal calls should be avoided in classes, use dependency injection                            
             instead                                                                                         
     ------ ------------------------------------------------------------------------------------------------ 
     ------ ----------------------------------------------------------------- 
      Line   modules/vlsuite_modal/src/Form/VLSuiteModalSettingsForm.php      
     ------ ----------------------------------------------------------------- 
      129    Call to deprecated method clearCachedDefinitions() of interface  
             Drupal\Core\Asset\LibraryDiscoveryInterface:                     
             in drupal:11.1.0 and is removed from drupal:12.0.0. Use          
             LibraryDiscoveryCollector::clear() instead.                      
     ------ ----------------------------------------------------------------- 
     ------ ---------------------------------------------------------------------- 
      Line   modules/vlsuite_modal/src/VLSuiteModalConfigOverride.php              
     ------ ---------------------------------------------------------------------- 
      101    \Drupal calls should be avoided in classes, use dependency injection  
             instead                                                               
     ------ ---------------------------------------------------------------------- 
     [ERROR] Found 23 errors                                                    
    
  • πŸ‡ͺπŸ‡ΈSpain eduardo morales alberti Spain, πŸ‡ͺπŸ‡Ί

    Solved PHPStan and PHPCS warnings, pending CSPell and stylelint

Production build 0.71.5 2024