Since i need to upgrade a website to Drupal 10 and we are using this module, i would need to make it D10 compatible.

Wil ladd a basic patch, that makes it recognised as D10 compatible by upgrade_status.

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

megadesk3000 created an issue. See original summary.

megadesk3000’s picture

Assigned: megadesk3000 » Unassigned
Status: Active » Needs review
drugan’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Status: Needs review » Needs work

Hi,

Further development will continue in the 2.0.x branch.

Please, try to fix the following errors and test your changes manually on each of the latest 9.x and 10.x versions:

drugan@test-xattributes-web:/var/www/html$ vendor/bin/phpstan analyze -l 0 web/modules/contrib/commerce_xattributes-3383392/
 13/13 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ---------------------------------------------------------------------------------------------------- 
  Line   modules/commerce_cattributes/commerce_cattributes.module                                            
 ------ ---------------------------------------------------------------------------------------------------- 
  45     Inner named functions are not supported by PHPStan. Consider refactoring to an anonymous function,  
         class method, or a top-level-defined function. See issue #165                                       
         (https://github.com/phpstan/phpstan/issues/165) for more details.                                   
 ------ ---------------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------------------------------------------------------- 
  Line   modules/commerce_cattributes/src/Plugin/Field/FieldWidget/CorrectProductVariationAttributesWidget.php  
 ------ ------------------------------------------------------------------------------------------------------- 
  120    Unsafe usage of new static().                                                                          
         💡 See: https://phpstan.org/blog/solving-phpstan-error-unsafe-usage-of-new-static                      
 ------ ------------------------------------------------------------------------------------------------------- 

 ------ --------------------------------------------------------------------------------------------------- 
  Line   src/Form/XattributesProductVariationTypeForm.php                                                   
 ------ --------------------------------------------------------------------------------------------------- 
  92     Method Drupal\commerce_xattributes\Form\XattributesProductVariationTypeForm::save() should return  
         int but return statement is missing.                                                               
 ------ --------------------------------------------------------------------------------------------------- 

                                                                                                               
 [ERROR] Found 3 errors                                                                                        
                                     

PS: in the 2.0.x we will not support the 8.x versions.

  • drugan committed f8046696 on 2.0.x
    Issue #3383392 by drugan: Drupal 10 Compatibility
    

drugan’s picture

Status: Needs work » Fixed
drugan’s picture

Status: Fixed » Closed (fixed)