Problem/Motivation
The API documentation for Drupal\Core\Database\Query\SelectInterface::getTables() could be improved, by making some specimen code clearer.
Proposed resolution
Update the specimen code in the documentation block, a simple change:
$fields =& $query->getTables();
The variable should be called $tables, not $fields.
Remaining tasks
Edit core/lib/Drupal/Core/Database/Query/SelectInterface.php
Update the documentation block for the getTables() method.
Write a patch.
User interface changes
none.
API changes
none.
Data model changes
none.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | wrong-var-name-in-sample-code-2939724-7.patch | 574 bytes | ryanhayes |
Comments
Comment #2
andrewmacpherson commentedUpdating summary, providing novice tasks.
Joachim's link was for 8.2.x - it now points to an 8.5.x API page, for the interface.
We looked at this issue during a FLOSS code contribution workshop today, as part of a web developer apprenticeship program running in the UK. We found our way to the right interface file.
Comment #3
ryanhayes commentedComment #4
joachim commented> Joachim's link was for 8.2.x - it now points to an 8.5.x API page, for the interface.
Sorry about that! Google searches always throw up 8.2.x links for some reason.
Patch looks good to me!
Comment #6
joachim commentedAh. The file path's wrong.
(Can I recommend dorgflow for making patches painlessly?)
Comment #7
ryanhayes commentedCorrected, although it was pointed out before i uploaded it. I wanted to see what would happen :)
Yeah i'll check out Dorgflow.
Comment #8
Adam_MoulsdaleI can confirm that the issue explained in #6 has been fixed in the most recent patch.
Comment #9
samvel commentedReviewed and applied patch. Installed clean and correctly.
Good work! RTBC!
Comment #10
samvel commentedLet's hide unused patch
Comment #11
recluso commentedI think Samvel meant to update the status.
Comment #12
samvel commentedYes! i only waiting patch test results :) But they good too!
Comment #13
andrewmacpherson commentedAwesome - issue .filed to RTBC in under 5 hours!
@SachaPontes and @Adam_Moulsdale all deserve a first-time contribution credit here. After the first patch failed, the session involved a bit of pair-programming, patch-rerolling, git man-page reading, ...
Today's work was part of a first-time contribution workshop, run in Leeds by myself and @rachel_norfolk. The participants were from an apprenticeship scheme, leading to a recognized qualification.
Comment #16
gábor hojtsyYay, thanks all!
Comment #18
gábor hojtsy