New Drupal 10.3 deprecations and test failures

Created on 25 June 2024, 3 months ago
Updated 24 July 2024, about 2 months ago

Problem/Motivation

$ php vendor/bin/phpstan analyze $_WEB_ROOT/modules/custom/$CI_PROJECT_NAME $PHPSTAN_CONFIGURATION --no-progress || EXIT_CODE=$?
 ------ ------------------------------------------------------------------- 
  Line   src/Form/ConfigSyncImportForm.php                                  
 ------ ------------------------------------------------------------------- 
  242    Call to deprecated method getName() of interface                   
         Drupal\Core\Extension\ModuleHandlerInterface:                      
         in drupal:10.3.0 and is removed from drupal:12.0.0.                
           Use \Drupal::service('extension.list.module')->getName($module)  
         instead.                                                           
 ------ ------------------------------------------------------------------- 
 ------ ------------------------------------------------------------------- 
  Line   src/Plugin/ConfigFilter/SyncFilterDeriver.php                      
 ------ ------------------------------------------------------------------- 
  95     Call to deprecated method getName() of interface                   
         Drupal\Core\Extension\ModuleHandlerInterface:                      
         in drupal:10.3.0 and is removed from drupal:12.0.0.                
           Use \Drupal::service('extension.list.module')->getName($module)  
         instead.                                                           
 ------ ------------------------------------------------------------------- 
 [ERROR] Found 2 errors  
PHPUnit 9.6.19 by Sebastian Bergmann and contributors.
.
E
E
E                                                                4 / 4 (100%)
Time: 00:40.851, Memory: 6.00 MB
There were 3 errors:
1) Drupal\Tests\config_sync\Kernel\UpdateModeTest::testUpdateModeMerge
Drupal\Core\Config\ConfigImporterException: There were errors validating the config synchronization.
The install profile <em class="placeholder">testing</em> is not in the list of installed modules.
/builds/project/config_sync/web/core/lib/Drupal/Core/Config/ConfigImporter.php:823
/builds/project/config_sync/web/core/lib/Drupal/Core/Config/ConfigImporter.php:595
/builds/project/config_sync/web/core/lib/Drupal/Core/Config/ConfigImporter.php:538
/builds/project/config_sync/tests/src/Kernel/UpdateModeTest.php:219
/builds/project/config_sync/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
2) Drupal\Tests\config_sync\Kernel\UpdateModeTest::testUpdateModePartialReset
Drupal\Core\Config\ConfigImporterException: There were errors validating the config synchronization.
The install profile <em class="placeholder">testing</em> is not in the list of installed modules.
/builds/project/config_sync/web/core/lib/Drupal/Core/Config/ConfigImporter.php:823
/builds/project/config_sync/web/core/lib/Drupal/Core/Config/ConfigImporter.php:595
/builds/project/config_sync/web/core/lib/Drupal/Core/Config/ConfigImporter.php:538
/builds/project/config_sync/tests/src/Kernel/UpdateModeTest.php:256
/builds/project/config_sync/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
3) Drupal\Tests\config_sync\Kernel\UpdateModeTest::testUpdateModeFullReset
Drupal\Core\Config\ConfigImporterException: There were errors validating the config synchronization.
The install profile <em class="placeholder">testing</em> is not in the list of installed modules.
/builds/project/config_sync/web/core/lib/Drupal/Core/Config/ConfigImporter.php:823
/builds/project/config_sync/web/core/lib/Drupal/Core/Config/ConfigImporter.php:595
/builds/project/config_sync/web/core/lib/Drupal/Core/Config/ConfigImporter.php:538
/builds/project/config_sync/tests/src/Kernel/UpdateModeTest.php:297
/builds/project/config_sync/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
ERRORS!
Tests: 4, Assertions: 44, Errors: 3.

Related 10.3 change records

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States joegraduate Arizona, USA

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024