Problem/Motivation
In #3029500: Drupal\Core\Database\Query\Select::hasAllTags() and hasAnyTag() will require a new "$tags" argument in the next major version of its parent class we are removing documented variable arguments from Drupal\Core\Database\Query\AlterableInterface::hasAllTags() and hasAnyTag() because it generates deprecation errors due to the missing implementation in mock classes in tests.
Proposed resolution
In Drupal 8.8 we'll drop PHP 5 support and could possibly restore this documentation as a variadic (http://php.net/manual/en/functions.arguments.php#functions.variable-arg-...). From @alexpott:
Add back the @param but this time make it a proper variadic because then we've dropped PHP5 and then we can add the argument to the implementations so Symfony 4 doesn't trigger the deprecation and then finally in Drupal 9 we can add the variadic argument to the interface.
Follow Interface and base/abstract class method signature changes from How to Deprecate.
Remaining tasks
Review
Commit
User interface changes
None.
API changes
None in Drupal 8.8, only the docs will return.
Data model changes
None.
Release notes snippet
N/A
| Comment | File | Size | Author |
|---|
Issue fork drupal-3029729
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:
- 3029729-restore-documentation-on
changes, plain diff MR !11802 /
changes, plain diff MR !8994
Comments
Comment #8
quietone commentedComment #9
longwaveI think this is the right way to document this.
Comment #12
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #13
nikhil_110 commentedAttached patch against Drupal 10.1.x
Patch #9 is not applied for Drupal 10.1.x so Inter-diff file is not added.
Comment #15
quietone commentedI just converted this to an MR.
Comment #17
quietone commentedComment #18
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue.
While you are making the above changes, we recommend that you convert this patch to a merge request. Merge requests are preferred over patches. Be sure to hide the old patch files as well. (Converting an issue to a merge request without other contributions to the issue will not receive credit.)
Comment #19
quietone commentedComment #20
smustgrave commentedSeems pretty straight forward.
Comment #23
nod_This doesn't seem enough, we need a variable name. In PHP you need to do
for this to work, so doc needs to be
@param string …$params, we can't have only the….Comment #24
quietone commented@nod_, thanks. I converted that without much though, sorry.
Comment #25
quietone commentedComment #26
quietone commentedComment #27
smustgrave commentedBelieve feedback has been addressed on this one. Based on the D11 release know we search for drupal:12.0.0 so should be good there.
Comment #28
quietone commentedI checked in on this and noticed that the links in the @todo were incorrect. I updated them and rebased.
Comment #29
daffie commented@quietone: It is for me RTBC with or without the nitpicks.
Comment #30
smustgrave commentedbelieve feedback has been addressed on this one.
Comment #33
nod_Committed 80adfea and pushed to 11.x. Thanks!
Comment #34
mondrakeMaybe there is a small misconception in the deprecation ignore file? See comment inline
Comment #38
longwaveThank you @mondrake.