Problem/Motivation
MigrationConfigurationTrait is not covered by unit tests.
While writing the unit test here, it was also discovered that it catches a PDOException
in a situation where it should be catching a DatabaseWrapperException
.
To elaborate, there are two try/catch blocks in MigrationConfigurationTrait::getLegacyDrupalVersion
. The second block, which was updated somewhat recently appears to catch the correct exception type. According to documentation (and poring over the code), Connection::query
can throw DatabaseWrapperException
, not a \PDOException
.
Therefore, the first try/catch block should be updated to match the second one.
Proposed resolution
It is proposed that we should correct the exception handling as part of writing the unit test.
Remaining tasks
Review
User interface changes
none
API changes
none
Data model changes
none
Release notes snippet
none