Problem/Motivation

The database driver have been moved to their own modules and all database specific stuff should be in those modules. The PostgreSQL override of the entityQuery is now located in the namespace Drupal\Core\Entity\Query\Sql\pgsql and not in the pgsql module.

Proposed resolution

Move the PostgreSQL override of the entityQuery to the pgsql module

Remaining tasks

TBD

User interface changes

None

Introduced terminology

None

API changes

None

Data model changes

None

Release notes snippet

TBD

Issue fork drupal-3488572

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

daffie created an issue. See original summary.

daffie’s picture

Status: Active » Needs review

Ready for a review.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative

Only comment is if we can add a simple deprecation test for the class

daffie’s picture

Status: Needs work » Needs review

The requested deprecation test has been added.
Back to NR.

@smustgrave: Thank you for the review.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Thanks! rest of the changes LGTM.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

This patch does not implement the deprecation for 11.x correctly... before:

> \Drupal::service('pgsql.entity.query.sql')
= Drupal\Core\Entity\Query\Sql\pgsql\QueryFactory {#7704}

after

> \Drupal::service('pgsql.entity.query.sql')

   Error  Class "Drupal\pgsql\EntityQuery\QueryFactory" not found.

The core classes cannot extend the pgsql classes. We should just deprecate the code and not extend from the new code.

daffie’s picture

Status: Needs work » Needs review

As requested by @alexpott, the extending of the deprecated classes to the new ones in the pgsql module have been removed and the original code has been restored..

smustgrave’s picture

Status: Needs review » Needs work

Appears to be 1 open thread on MR.

daffie’s picture

Status: Needs work » Needs review

I have added the by @alexpott requested deprecation to the service in core.services.yml.

alexpott’s picture

Moving the deprecation to the constructor (like we do for plugins) resolves the issues caused by compiler passes reflecting on the class. This is very similar to what we do for plugins. They can't have deprecations in the main body of a class for a similar reason.

daffie’s picture

Status: Needs review » Reviewed & tested by the community

@alexpott: Moving the deprecation to the constructor was the solution. Thank you for your help. It is clear to me why you are a core framework manager and I am not. ;-)

All code changes look good to me.
All deprecations have testing.
We have a change record.
For me it is RTBC.

mradcliffe’s picture

Seems good to me. Do we need to trigger a "PHP 8.3 PostgreSQL 16" test run?

daffie’s picture

Do we need to trigger a "PHP 8.3 PostgreSQL 16" test run?

I have tried, but I am not allowed to do that.

  • catch committed 1e6a694c on 11.x
    Issue #3488572 by daffie, alexpott: Move the PostgreSQL override of the...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Kicked off a fresh pipeline and ran both postgres jobs.

Committed/pushed to 11.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.