Remove all code/tests to database drivers living in the directory DRUPAL_ROOT/drivers

Created on 24 November 2021, about 3 years ago
Updated 23 July 2024, 5 months ago

Problem/Motivation

In #3129043: Move core database drivers to modules of their own we are moving the core database drivers to their own module. That is great, only in D9 contrib database drivers can still live in the "drivers" directory. Those drivers are deprecated in D9 and will be removed before D10. Until D10 we shall have to support those drivers that are not provided by a module.

Proposed resolution

Remove all code/tests to database drivers living in the directory DRUPAL_ROOT/drivers.

Remaining tasks

TBD

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

None

📌 Task
Status

Needs work

Version

11.0 🔥

Component
Database 

Last updated 2 days ago

  • Maintained by
  • 🇳🇱Netherlands @daffie
Created by

🇳🇱Netherlands daffie

Live updates comments and jobs are added and updated live.
  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    Patch Failed to Apply
  • 🇳🇱Netherlands arantxio Dordrecht

    Here is a start for this change. I removed some function that was designed for D8 and then mapped and adjusted all the functions that referred to Drupal\Driver. Some might be removable, but we have to decided on that because its also kind off test coverage.

  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & pgsql-14.1
    last update over 1 year ago
    29,797 pass
  • 🇳🇱Netherlands arantxio Dordrecht

    Setting the version to D11 because 10.2 doesn't exist yet, we'll need to adjust this when the it's added.

  • last update over 1 year ago
    Patch Failed to Apply
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & sqlite-3.27
    last update over 1 year ago
    Patch Failed to Apply
  • last update over 1 year ago
    Patch Failed to Apply
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & sqlite-3.27
    last update over 1 year ago
    Patch Failed to Apply
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & pgsql-14.1
    last update over 1 year ago
    Patch Failed to Apply
  • 🇺🇸United States smustgrave

    10.2 will just be a tag off 11.x so as long as it works there it should be good.

    Requeuing tests to make sure mysql and sqllite passes.

  • last update over 1 year ago
    Patch Failed to Apply
  • last update over 1 year ago
    29,797 pass
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & sqlite-3.27
    last update over 1 year ago
    29,797 pass
  • Status changed to RTBC over 1 year ago
  • 🇺🇸United States smustgrave

    Refactor didn't seem to cause a regression. Think it would be good to get this in early for 10.2

  • 🇳🇱Netherlands daffie

    Updated the title and the IS.

  • 🇬🇧United Kingdom catch

    This could have gone in prior to 10.0.0 but I think it will need to wait until (actual) 11.x now.

  • Status changed to Needs review over 1 year ago
  • 🇬🇧United Kingdom catch
  • Status changed to Postponed over 1 year ago
  • 🇺🇸United States smustgrave

    Seems like postponed makes sense then.

    Is Major version only how you find D11 tickets or is there another tag?

  • Status changed to Needs work 9 months ago
  • 🇮🇹Italy mondrake 🇮🇹

    This is actionable now. Needs rebase and change to MR workflow.

  • 🇳🇱Netherlands arantxio Dordrecht

    I've added most of the patch to a merge request, however some of the code has changed already and some classes are gone.

    I don't see any more tests that reference Drupal\Driver or Drupal\\Driver. But a check on it would be great.

    I couldn't run the tests locally so I hope someone else could go through it.

  • 🇫🇷France andypost

    As I see only 4 usages left

    $ git grep database_drivers
    core/tests/Drupal/KernelTests/Core/Database/SelectExtenderTest.php:122:    $additional_class_loader->addPsr4("Drupal\\core_fake\\Driver\\Database\\coreFake\\", __DIR__ . "/../../../../../tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFake");
    core/tests/Drupal/KernelTests/Core/Database/SelectExtenderTest.php:123:    $additional_class_loader->addPsr4("Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses\\", __DIR__ . "/../../../../../tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses");
    core/tests/Drupal/Tests/Core/Database/ConnectionTest.php:324:    $additional_class_loader->addPsr4("Drupal\\core_fake\\Driver\\Database\\CoreFake\\", __DIR__ . "/../../../../../tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFake");
    core/tests/Drupal/Tests/Core/Database/ConnectionTest.php:325:    $additional_class_loader->addPsr4("Drupal\\core_fake\\Driver\\Database\\CoreFakeWithAllCustomClasses\\", __DIR__ . "/../../../../../tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses");
    
  • 🇳🇿New Zealand quietone

    I wasn't sure about this issue so I confirmed with @daffie that this is still relevant. In the same message they mentioned that there are other higher priority issues than removing these tests.

Production build 0.71.5 2024