Closed (fixed)
Project:
Drupal core
Version:
9.4.x-dev
Component:
documentation
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Aug 2021 at 13:16 UTC
Updated:
25 Mar 2022 at 22:19 UTC
Jump to comment: Most recent
Comments
Comment #6
beatrizrodriguesHope it fits.
Comment #7
lucienchalom commentedThe documentation follows the suggested solution.
Moving to RTBC.
Comment #8
xjmComment #9
xjmThanks for reporting and fixing this!
Removing credit for guilhermevp who did not actually make any changes in the MR.
It looks like there's a second instance of the exact same problem in a couple other places in the same interface. Can we fix those too?
Comment #10
beatrizrodriguesComment #11
beatrizrodriguesComment #12
joachim commentedLGTM.
Comment #13
quietone commentedThis does fix all the
@return $thisin \Drupal\Core\TypedData\TranslatableInterface to return the correct interface as well as adding the comment line. All feedback addressed.This looks ready to commit to me. I'll wait for another committer to confirm.
Comment #14
xjmThanks, good to fix them all at once.
On re-reviewing this I wondered if
ContentEntityInterfacewas too specific, and if it should instead beTranslatableRevisionableInterface. I don't know the API well enough to say for sure.Also found #2932049: Change TranslatableStorageInterface::createTranslation() to accept TranslatableInterface which is about a similar issue where the type might be overly specific.
Comment #18
quietone commentedCommitted/pushed to 10.0.x and cherry-picked to 9.4.x and 9.3.x.
Thank you!
Comment #19
quietone commentedI discussed #14 with xjm and although there is a question about the which interface to use this change is an improvement. I made a followup to answer the query, #3269177: Should some TranslatableInterface methods return ContentEntityInterface or TranslatableRevisionableInterface.