Problem/Motivation

Drupal 10.0.0 stable was released on: 15 Dec 2022 by the Drupal core team
https://www.drupal.org/project/drupal/releases/10.0.0


Thank you so much!

Further drupal-check on

composer create-project drupal/recommended-project:~10.0 /var/www/html/sandboxes/drupal10admin_audit_trail

cd /var/www/html/sandboxes/drupal10admin_audit_trail/

composer config minimum-stability dev

composer require drupal/admin_audit_trail

composer require mglaman/drupal-check --dev
composer require phpspec/prophecy-phpunit:^2 --dev 

php vendor/bin/drupal-check -d web/modules/contrib/admin_audit_trail/

Output:

admin_audit_trail--drupal-check--report.txt

Proposed resolution

  • Support Drupal ~10 and change all deprecated packages, classes, functions, asset libraries to the Drupal 10 way
  • Real physical testing with Drupal ~10
  • Automated upgrade to Drupal ~10

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ✅ Performance
  • ➖ Security
  • ➖ Documentation
  • ✅ Code review by maintainers
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Release notes snippet
  • ✅ Release admin_audit_trail-1.0.1

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Issue #3277440: Support Drupal 10 and update all use of deprecation in the Admin Audit Trail module

Comments

Rajab Natshah created an issue. See original summary.

rajab natshah’s picture

rajab natshah’s picture

Title: Support Drupal 10 and update all use of depricatoins in the Admin Audit Trail module » Support Drupal 10 and update all use of deprecations in the Admin Audit Trail module

  • Rajab Natshah committed 3e47313 on 1.0.x
    Issue #3277440: Support Drupal 10 and update all use of deprecations in...
rajab natshah’s picture

Status: Active » Needs review
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes

  • Rajab Natshah committed 5df60ff on 1.0.x
    Issue #3277440: Support Drupal 10 and update all use of deprecations in...
rajab natshah’s picture

rajab natshah’s picture

Issue summary: View changes
Status: Needs review » Needs work
StatusFileSize
new3.97 KB

Further drupal-check on

composer create-project drupal/recommended-project:10.0.0-alpha4@alpha /var/www/html/sandboxes/drupal10admin_audit_trail

cd /var/www/html/sandboxes/drupal10admin_audit_trail/

composer require drupal/admin_audit_trail

composer require mglaman/drupal-check --dev
composer require phpspec/prophecy-phpunit:^2 --dev 

php vendor/bin/drupal-check -d web/modules/contrib/admin_audit_trail/

Output:

admin_audit_trail--drupal-check--report.txt

 ------ ------------------------------------------------------------------- 
  Line   admin_audit_trail.module                                           
 ------ ------------------------------------------------------------------- 
  133    Access to an undefined property                                    
         Drupal\Core\Form\FormStateInterface::$__admin_audit_trail_logged.  
 ------ ------------------------------------------------------------------- 

 ------ ------------------------------------------------------ 
  Line   admin_audit_trail_file/admin_audit_trail_file.module  
 ------ ------------------------------------------------------ 
  30     Call to an undefined method                           
         Drupal\Core\Entity\EntityInterface::getFileUri().     
  32     Call to an undefined method                           
         Drupal\Core\Entity\EntityInterface::getFilename().    
  46     Call to an undefined method                           
         Drupal\Core\Entity\EntityInterface::getFileUri().     
  48     Call to an undefined method                           
         Drupal\Core\Entity\EntityInterface::getFilename().    
  62     Call to an undefined method                           
         Drupal\Core\Entity\EntityInterface::getFileUri().     
  64     Call to an undefined method                           
         Drupal\Core\Entity\EntityInterface::getFilename().    
 ------ ------------------------------------------------------ 

 ------ -------------------------------------------------------------- 
  Line   admin_audit_trail_media/admin_audit_trail_media.module        
 ------ -------------------------------------------------------------- 
  33     Call to an undefined method                                   
         Drupal\Core\Entity\EntityInterface::getName().                
  34     Call to an undefined method                                   
         Drupal\Core\Entity\EntityInterface::getRevisionLogMessage().  
  34     Call to an undefined method                                   
         Drupal\Core\Entity\EntityInterface::getRevisionLogMessage().  
  53     Call to an undefined method                                   
         Drupal\Core\Entity\EntityInterface::getName().                
  54     Call to an undefined method                                   
         Drupal\Core\Entity\EntityInterface::getRevisionLogMessage().  
  54     Call to an undefined method                                   
         Drupal\Core\Entity\EntityInterface::getRevisionLogMessage().  
  73     Call to an undefined method                                   
         Drupal\Core\Entity\EntityInterface::getName().                
  74     Call to an undefined method                                   
         Drupal\Core\Entity\EntityInterface::getRevisionLogMessage().  
  74     Call to an undefined method                                   
         Drupal\Core\Entity\EntityInterface::getRevisionLogMessage().  
 ------ -------------------------------------------------------------- 

 ------ ------------------------------------------------------------------ 
  Line   src/AdminAuditTrailStorage.php                                    
 ------ ------------------------------------------------------------------ 
  29     Call to an undefined method                                       
         Drupal\Core\Database\Query\ExtendableInterface::orderByHeader().  
 ------ ------------------------------------------------------------------ 

 ------ ----------------------------------------------------------------- 
  Line   src/OverviewForm.php                                             
 ------ ----------------------------------------------------------------- 
  79     Method Drupal\admin_audit_trail\OverviewForm::getUserData() has  
         invalid return type Drupal\admin_audit_trail\Drupal\Core\Link.   
 ------ ----------------------------------------------------------------- 

 [ERROR] Found 18 errors                                                        


rajab natshah’s picture

Title: Support Drupal 10 and update all use of deprecations in the Admin Audit Trail module » Support Drupal 10 and update all use of deprecation in the Admin Audit Trail module
rajab natshah’s picture

Assigned: rajab natshah » Unassigned
rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue summary: View changes
rassoni’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new342.96 KB

Please find the attached patch and check the screenshot for reference.

rassoni’s picture

Status: Reviewed & tested by the community » Needs review
rajab natshah’s picture

Status: Needs review » Needs work

No change to code was proposed.
Back to Needs work

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Further drupal-check on

mkdir -p /var/www/html/sandboxes
cd /var/www/html/sandboxes

composer create-project drupal/recommended-project:~9.0 drupal9admin_audit_trail

cd /var/www/html/sandboxes/drupal9admin_audit_trail/

composer require drupal/admin_audit_trail:1.0.x-dev

composer require drupal/core-dev --dev
composer require mglaman/drupal-check --dev
composer require phpspec/prophecy-phpunit --dev 

php vendor/bin/drupal-check -d web/modules/contrib/admin_audit_trail/

The output

16/16 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 ------ ------------------------------------------------------------------- 
  Line   admin_audit_trail.module                                           
 ------ ------------------------------------------------------------------- 
  136    Access to an undefined property                                    
         Drupal\Core\Form\FormStateInterface::$__admin_audit_trail_logged.  
 ------ ------------------------------------------------------------------- 

 ------ ------------------------------------------------------ 
  Line   admin_audit_trail_file/admin_audit_trail_file.module  
 ------ ------------------------------------------------------ 
  30     Call to an undefined method                           
         Drupal\Core\Entity\EntityInterface::getFileUri().     
  32     Call to an undefined method                           
         Drupal\Core\Entity\EntityInterface::getFilename().    
  46     Call to an undefined method                           
         Drupal\Core\Entity\EntityInterface::getFileUri().     
  48     Call to an undefined method                           
         Drupal\Core\Entity\EntityInterface::getFilename().    
  62     Call to an undefined method                           
         Drupal\Core\Entity\EntityInterface::getFileUri().     
  64     Call to an undefined method                           
         Drupal\Core\Entity\EntityInterface::getFilename().    
 ------ ------------------------------------------------------ 

 ------ -------------------------------------------------------------- 
  Line   admin_audit_trail_media/admin_audit_trail_media.module        
 ------ -------------------------------------------------------------- 
  32     Call to an undefined method                                   
         Drupal\Core\Entity\EntityInterface::getName().                
  33     Call to an undefined method                                   
         Drupal\Core\Entity\EntityInterface::getRevisionLogMessage().  
  33     Call to an undefined method                                   
         Drupal\Core\Entity\EntityInterface::getRevisionLogMessage().  
  52     Call to an undefined method                                   
         Drupal\Core\Entity\EntityInterface::getName().                
  53     Call to an undefined method                                   
         Drupal\Core\Entity\EntityInterface::getRevisionLogMessage().  
  53     Call to an undefined method                                   
         Drupal\Core\Entity\EntityInterface::getRevisionLogMessage().  
  72     Call to an undefined method                                   
         Drupal\Core\Entity\EntityInterface::getName().                
  73     Call to an undefined method                                   
         Drupal\Core\Entity\EntityInterface::getRevisionLogMessage().  
  73     Call to an undefined method                                   
         Drupal\Core\Entity\EntityInterface::getRevisionLogMessage().  
 ------ -------------------------------------------------------------- 

 ------ ------------------------------------------------------------------ 
  Line   src/AdminAuditTrailStorage.php                                    
 ------ ------------------------------------------------------------------ 
  29     Call to an undefined method                                       
         Drupal\Core\Database\Query\ExtendableInterface::orderByHeader().  
 ------ ------------------------------------------------------------------ 

 ------ ----------------------------------------------------------------- 
  Line   src/OverviewForm.php                                             
 ------ ----------------------------------------------------------------- 
  79     Method Drupal\admin_audit_trail\OverviewForm::getUserData() has  
         invalid return type Drupal\admin_audit_trail\Drupal\Core\Link.   
 ------ ----------------------------------------------------------------- 

 [ERROR] Found 18 errors                                                        

Thanks for using drupal-check!

Consider sponsoring the development of the maintainers which make drupal-check possible:

- phpstan (ondrejmirtes): https://github.com/sponsors/ondrejmirtes
- phpstan-deprecation-rules (ondrejmirtes)): https://github.com/sponsors/ondrejmirtes
- phpstan-drupal (mglaman)): https://github.com/sponsors/mglaman
- drupal-check (mglaman)): https://github.com/sponsors/mglaman

rajab natshah’s picture

No issues with Drupal standards and Drupal Practice

phpcs --standard=Drupal

rajab@vardot-dev:/var/www/html/products/admin_audit_trail$ phpcbf --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,less,css,info,txt,md /var/www/html/products/admin_audit_trail --ignore="/var/www/html/products/admin_audit_trail/node_modules/"

phpcs--standard=DrupalPractice

rajab@vardot-dev:/var/www/html/products/admin_audit_trail$ phpcbf --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,less,css,info,txt,md /var/www/html/products/admin_audit_trail --ignore="/var/www/html/products/admin_audit_trail/node_modules/"

  • Rajab Natshah committed 899cd96 on 1.0.x
    Issue #3277440: Support Drupal 10 and update all use of deprecation in...
rajab natshah’s picture

Assigned: Unassigned » mohammed j. razem
Issue summary: View changes
Issue tags: +admin_audit_trail-1.0.1
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

Status: Needs work » Needs review
rajab natshah’s picture

Status: Needs review » Fixed
rajab natshah’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

rajab natshah’s picture

Issue summary: View changes