-
alexpott โ
committed 8fd18feb on 11.x
Issue #3450706 by daffie, smustgrave, alexpott, quietone, mondrake: Let...
-
alexpott โ
committed 8fd18feb on 11.x
- ๐ฎ๐นItaly mondrake ๐ฎ๐น
Looks great to me, thanks for hearing my question. I triggered Sqlite and PgSql pipelines for safety, even though I do not think they are relevant here. RTBC
- ๐ณ๐ฑNetherlands daffie
The dummydb database driver is now dependent on the one for MySQL.
Back to NR. - ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
Okay let's keep on with dummydb but instead of extending the abstract connection class lets extend another db driver so we don't have to think about / maintain so much stuff we're not using here.
- ๐ณ๐ฑNetherlands daffie
How about adding a driver_test driver to core/modules/system/tests/modules/driver_test can be a copy of system/tests/modules/driver_test/src/Driver/Database/DriverTestMysql with the driver name changed to driver_test... less to maintain but the same amount of code coverage.
That sounds like a good idea, only it does not work. For that to work the $url need to change to:
'driver_test://test_user:test_pass@test_host/test_database'
. That url gets parsed into components and the result will be:array ( "path" => "driver_test://test_user:test_pass@test_host/test_database" );
No schema and host values are set and a \InvalidArgumentException wiil be thrown with the message: "The database connection URL 'driver_test://test_user:test_pass@test_host/test_database' is invalid. The minimum requirement is: 'driver://host/database'" The function
parse_url
does not accept schema's with an underscore character in it. To me, we have 2 options: the first is to change the module name "driver_test" to "drivertest". That will result in a lot of code changes. The other is to leave it like it is and go with the new test module called "dummydb". Putting the issue back to RTBC for the core committers decision. - ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
How about adding a driver_test driver to core/modules/system/tests/modules/driver_test can be a copy of system/tests/modules/driver_test/src/Driver/Database/DriverTestMysql with the driver name changed to driver_test... less to maintain but the same amount of code coverage.
- ๐ณ๐ฑNetherlands daffie
We cannot use
Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses
for testing with this MR, because of the fact that the module name and the driver name are not the same.
Back to RTBC. - ๐ฎ๐นItaly mondrake ๐ฎ๐น
Question: can't we use something from
Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses
instead of adding a completely new dummy db and all of its minimal implementations?Anyway, the above should not hold this. RTBC
- ๐ณ๐ฑNetherlands daffie
Removed the added style guide violations from the base line file.
Back to NR. - ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
I think we should be fixing the PHPStan errors in the new class we're adding - I can't see why we'd add these errors to the baseline.
- ๐ณ๐ฑNetherlands daffie
Addressed the remarks and suggestions of @alexpott.
Back to NR. -
alexpott โ
committed 7f543411 on 11.x
Issue #3475719 by daffie, mondrake, alexpott: Set entity schema...
-
alexpott โ
committed 7f543411 on 11.x
- ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
This seems like a good idea. Less special casing core FTW.
Added some comments to the MR to address.
- ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
@daffie the changes look great. Will commit once this is rtbc again
- ๐ณ๐ฑNetherlands daffie
The requested warning has been added for non-core tests. Back to NR.
- ๐ฌ๐งUnited Kingdom alexpott ๐ช๐บ๐
@daffie the event listener turned out great! Think we need to make a small adjustment for non core tests and trigger a deprecation until Drupal 12. See MR for suggestion for how to do this.
- ๐ฎ๐นItaly mondrake ๐ฎ๐น
Nice! LGTM now. Triggered tests for SQLite and PgSql.
- ๐ณ๐ฑNetherlands daffie
Applied the requested changes.
@mondrake: Thanks for the review.
- ๐ณ๐ฑNetherlands daffie
All remarks on the MR by @mondrake have been addressed.
A test has been added for the new field storage create check subscriber.
Back to NR.@mondrake: Thank you for the review.