Problem/Motivation
There is some dead code in PdoTrait.
Steps to reproduce
Search for the methods in the entire core codebase.
Proposed resolution
Deprecate for removal in Drupal 13.
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3611847
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:
- 3611847-11.x
changes, plain diff MR !16400
- 3611847-deprecate-unused-pdotrait
changes, plain diff MR !16357
Comments
Comment #2
mondrakeComment #4
mondrakeComment #5
danielvezaVerified the dead code is not used in Core, and fleshed out the CR to include more info and match some other deprecation CRs.
I think this is ready for RTBC, but since I did the CR changes, I guess it should stay NR.
Comment #6
dcam commentedsearch.tresbien.tech doesn't show any usage of these functions.
pdoToFetchAs()was made irrelevant by #3522561: Fully type StatementInterface methods' parameters. There were no usage results for the other functions at all. The code changes and change record look good. I did a little editing on the CR to improve the grammar and formatting, but I don't have any additional feedback.Comment #7
catchNot sure why given it's new, but needs a rebase.
Comment #8
catchBecause I was on the wrong branch...
Comment #9
catchCommitted/pushed to main, thanks!
Needs a backport MR for 11.x
Comment #11
mondrakeLooks like the push did not get through.
Comment #14
mondrakeVery strange the
protected array $fetchModeLiteralsis present in main head but not in 11.x head. The backport MR reinstates in 11.x what is missing.Comment #15
mondrakeComment #16
dcam commented5 months ago we moved
$fetchModeLiteralsfromcore/lib/Drupal/Core/Database/FetchModeTrait.phptoPdoTraitas part of #3525077: Remove deprecated paths from the Database API & friends. They still exist in the 11.xFetchModeTrait.Comment #17
mondrake#16 thanks for the digging; moved the deprecation location.
Comment #18
dcam commentedLooks good. The changes mirror what was committed to main, with the addition of telling PHPStan to ignore uses of the deprecated
pdoToFetchAs()function.Comment #20
catchCommitted/pushed to 11.x, thanks!