Problem/Motivation

A decade ago, #2194897: Rename Database\Query\Merge::key() to keys(), retain a BC alias for key() introduced Merge::keys(), and ::key() was meant to accept single key values.

However, that was not enforced and ::key() is still in use accepting array values.

Proposed resolution

Use deprecation tools that now are available and deprecate passing array $fields to ::key()

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3388386

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

mondrake created an issue. See original summary.

mondrake’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Going to mark as the deprecation seems good.

Only question is if we can reuse that CR or need a new one. That I can't answer.

mondrake’s picture

#4 I think the existing one is enough. It says what is expected. If we were to write a new one I think we would just write the same things.

daffie’s picture

+1 for RTBC

xjm’s picture

Can we please attach the existing CR to this issue? Edit: Found it and did so, including adding a "Drupal 10.2 update" that it will now properly raise a deprecation.

The diff itself looks great.

xjm’s picture

Saving credits. @smustgrave for the question about the CR and me for fixing it. :P

  • xjm committed 8fd17f42 on 11.x
    Issue #3388386 by mondrake, xjm, smustgrave: Properly deprecate passing...
xjm’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 11.x. Not backporting since it includes a new deprecation warning. Thanks!

I also toggled the status to "Draft" and back so that the CR would show up as a recent one instead of being buried in 2014 when Drupal 8.0.0 was still only an alpha.

mondrake’s picture

Status: Fixed » Closed (fixed)

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