Make this project compatible for drupal 9.
suggestions:

use drupal-check, rector , upgrade_status module to check the changes needed to be done
Add core_version_requirement: ^8 || ^9 to .info.yml

Comments

Deepak Goyal created an issue. See original summary.

deepak goyal’s picture

Assigned: deepak goyal » Unassigned
Status: Needs work » Needs review
StatusFileSize
new403 bytes

Updated core info please update.

meghasharma’s picture

Assigned: Unassigned » meghasharma
meghasharma’s picture

Assigned: meghasharma » Unassigned
Status: Needs review » Needs work
Issue tags: +DIACWSep2020

drupal_check is showing these errors..

my_site_name_dir % vendor/bin/drupal-check -ad web/modules/contrib/commerce_partpay
 12/12 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   src/Controller/OffSitePaymentController.php                                                                                                                                                    
 ------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  39     Property Drupal\commerce_partpay\Controller\OffSitePaymentController::$request (Symfony\Component\HttpFoundation\RequestStack) does not accept Symfony\Component\HttpFoundation\Request|null.  
  46     Unsafe usage of new static().                                                                                                                                                                  
         💡 Consider making the class or the constructor final.                                                                                                                                          
  66     Call to an undefined method Drupal\Core\Entity\EntityInterface::getPlugin().                                                                                                                   
  91     Access to an undefined property Drupal\state_machine\Plugin\Field\FieldType\StateItemInterface::$value.                                                                                        
  95     Call to an undefined method Symfony\Component\HttpFoundation\RequestStack::get().                                                                                                              
 ------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   src/PartPay/AbstractAbstractPartPayRequest.php                                                                                                                         
 ------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  131    Property Drupal\commerce_partpay\PartPay\AbstractAbstractPartPayRequest::$logger (Drupal\Core\Logger\LoggerChannelInterface) does not accept Psr\Log\LoggerInterface.  
  132    Property Drupal\commerce_partpay\PartPay\AbstractAbstractPartPayRequest::$httpClient (GuzzleHttp\Client) does not accept GuzzleHttp\ClientInterface.                   
  244    Property Drupal\commerce_partpay\PartPay\AbstractAbstractPartPayRequest::$token (string) does not accept null.                                                         
  245    Property Drupal\commerce_partpay\PartPay\AbstractAbstractPartPayRequest::$tokenExpiry (string) does not accept null.                                                   
  365    Call to an undefined method Drupal\commerce_partpay\PartPay\AbstractAbstractPartPayRequest::hasToken().                                                                
 ------ ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- 

 ------ ----------------------------------------------------------------------------------------------------------------------------- 
  Line   src/PartPay/CommercePartPay.php                                                                                              
 ------ ----------------------------------------------------------------------------------------------------------------------------- 
  23     Access to an undefined property Drupal\commerce_partpay\PartPay\CommercePartPay::$partPay.                                   
  47     Access to an undefined property Drupal\commerce_partpay\PartPay\CommercePartPay::$partPay.                                   
  69     Access to deprecated property $entityId of class Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\PaymentGatewayBase:  
         in commerce:8.x-2.16 and is removed from commerce:3.x.                                                                       
         Use $this->parentEntity->id() instead.                                                                                       
  100    Access to an undefined property Drupal\commerce_partpay\PartPay\CommercePartPay::$partPay.                                   
 ------ ----------------------------------------------------------------------------------------------------------------------------- 

 ------ ------------------------------------------------------- 
  Line   src/PluginForm/OffSiteRedirect/PartPayForm.php         
 ------ ------------------------------------------------------- 
  69     Unsafe usage of new static().                          
         💡 Consider making the class or the constructor final.  
 ------ ------------------------------------------------------- 

 ------ --------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  Line   tests/src/Unit/PartPayServiceTest.php                                                                                                                          
 ------ --------------------------------------------------------------------------------------------------------------------------------------------------------------- 
  24     Property Drupal\Tests\commerce_partpay\Unit\PartPayServiceTest::$partPayService has unknown class Drupal\commerce_partpay\PartPay\PartPayService as its type.  
  33     Access to an undefined property Drupal\Tests\commerce_partpay\Unit\PartPayServiceTest::$loggerMock.                                                            
  37     Access to an undefined property Drupal\Tests\commerce_partpay\Unit\PartPayServiceTest::$container.                                                             
  41     Instantiated class Drupal\commerce_partpay\PartPay\PartPayService not found.                                                                                   
 ------ --------------------------------------------------------------------------------------------------------------------------------------------------------------- 

                                                                                                                        
 [ERROR] Found 19 errors                                                                                                
                                                                                                         

need to fix these errors

adityasingh’s picture

Working on this.

adityasingh’s picture

StatusFileSize
new1.41 KB
new933 bytes

I attempted to fix the following deprecation issue from the list in #4:

69     Access to deprecated property $entityId of class Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\PaymentGatewayBase:  
         in commerce:8.x-2.16 and is removed from commerce:3.x.                                                                       
         Use $this->parentEntity->id() instead.

Feel free to take this forward.

gauravvvv’s picture

StatusFileSize
new24.13 KB

Patch #6 works fine for me. Adding a screenshot for reference. RTBC +1

gauravvvv’s picture

Status: Needs work » Reviewed & tested by the community