Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Discovered via PHPStan in #3178534: Start running PHPStan on Drupal core (level 0):
Line core/lib/Drupal/Core/KeyValueStore/DatabaseStorage.php
------ -------------------------------------------------------------------------------
264 Caught class Drupal\Core\KeyValueStore\SchemaObjectExistsException not found.
Line 264 is:
catch (SchemaObjectExistsException $e) {
The correct class is Drupal\Core\Database\SchemaObjectExistsException but the use statement is missing.
Steps to reproduce
Proposed resolution
Add the missing use statement.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#3 | 3205026-applied_patch.png | 41.58 KB | Abhijith S |
#2 | 3205026.patch | 565 bytes | longwave |
Comments
Comment #2
longwaveComment #3
Abhijith S CreditAttribution: Abhijith S as a volunteer and at Zyxware Technologies commentedApplied patch #2 and it adds the missing class.
Comment #4
KingdutchMoving to RTBC as per #3 and manually confirmed the patch looks correct.
Comment #7
catchCommitted 7f6d534 and pushed to 9.2.x. Thanks! Also cherry-picked to 9.1.x