Problem/Motivation
The test Drupal\KernelTests\Core\Database\SchemaUniquePrefixedKeysIndexTest has a database driver specific testing in it and those test should extend Drupal\KernelTests\Core\Database\DriverSpecificDatabaseTestBase.
Proposed resolution
Make SchemaUniquePrefixedKeysIndexTest to extend DriverSpecificDatabaseTestBase.
Remaining tasks
Make the patch and review it.
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
None
| Comment | File | Size | Author |
|---|---|---|---|
| #17 | interdiff_14-17.txt | 1.07 KB | arantxio |
| #17 | 3351886-17.patch | 5.55 KB | arantxio |
Comments
Comment #2
arantxioI've created the patch so instead of relying on a extra function we now set the value depending on the driver class.
Comment #4
arantxioSo the naming had to be TestBase instead of Test, so the testbot does not run it. This way it should work.
Comment #6
daffie commentedGiving @mondrake issue credits for his remark in #1148856-85: Postgres schema doesn't support keylength on a unique index.
Comment #7
daffie commentedAll code changes look good to me.
For me it is RTBC.
Comment #8
mondrakeI don't think an alias is needed, here just extend
SchemaUniquePrefixedKeysIndexTestBase?Comment #9
arantxio@mondrake that's true, changed the naming so we don't have the alias anymore.
Comment #10
arantxioComment #11
mondrakeyou can typehint the property directly in PHP 8.1, and skip the annotation
protected string $columnValue;Comment #12
arantxioAdded the change suggested by @mondrake.
Comment #13
mondrakeI am afraid you need to do the same on the extending classes...
Comment #14
arantxio@mondrake That's true my bad. added the string typehint to the other classes.
Comment #15
daffie commentedAll points of @mondrake have been addressed.
Back to RTBC.
Comment #16
longwaveSchema -> schema
We are losing this comment, and without it it is not at all obvious why Postgres/SQLite are different to MySQL. I think it would be good to move some of this explanation to the property declaration in the base class?
Comment #17
arantxioI've adjusted the comments based on the feedback from @longwave.
I adjusted the "lost" comment to what I think is a better description of the current situation.
Comment #18
daffie commentedAll remarks of @longwave have been addressed.
Back to RTBC.
Comment #20
longwaveCommitted and pushed 224543f183 to 11.x (10.2.x). Thanks!