Problem/Motivation
Typehinting with interfaces is in general the correct thing to do.
See #2271005-40: Rename Language module's LanguageInterface to ConfigurableLanguageInterface and Language to ConfigurableLanguage point 3.
Proposed resolution
type hint hooks with interface: ConfigurableLanguageInterface instead of LanguageEntity/ConfigurableLanguage
Remaining tasks
Task | Novice task? | Contributor instructions | Complete? |
---|---|---|---|
Create a patch | Instructions |
User interface changes
No.
API changes
Technically yes, but it should be low impact.
Comment | File | Size | Author |
---|---|---|---|
#8 | 2316561-5.patch | 5.35 KB | jmolivas |
#8 | interdiff-2-5.txt | 3.38 KB | jmolivas |
#2 | 2316561-2.patch | 1.99 KB | jmolivas |
#1 | 2316561-1.patch | 35.85 KB | jmolivas |
#1 | interdiff-0-1.txt | 1.99 KB | jmolivas |
Comments
Comment #1
jmolivas CreditAttribution: jmolivas commentedWorking on this Issue at TCDrupal
Replace type-hints from ConfigurableLanguage to ConfigurableLanguageInterface
Comment #2
jmolivas CreditAttribution: jmolivas commentedRegenerate patch since related issue was fixed.
Did not upload interdiff since file was not changed
Comment #5
YesCT CreditAttribution: YesCT commentedComment #6
YesCT CreditAttribution: YesCT commentedno unneeded changes, still applies, looks good.
Comment #7
alexpottLet's fix block_configurable_language_delete, language_configurable_language_delete, and node_configurable_language_delete too.
This is not an API change since it is a relaxation of the typehinting.
Comment #8
jmolivas CreditAttribution: jmolivas commentedFixing as request by @alexpott:
core/modules/block/block.module => block_configurable_language_delete
core/modules/language/language.module => language_configurable_language_delete
core/modules/node/node.module => node_configurable_language_delete too
Comment #9
jmolivas CreditAttribution: jmolivas commentedMy bad should be 8 and not 5 on the file names
* interdiff-2-8.txt
* 2316561-8.patch
Comment #10
YesCT CreditAttribution: YesCT commentedlanguage_configurable_language_insert() also, ok.
used
ag 'function .*\(.*ConfigurableLanguage ' core/*
to check if we got them all. looks good again.
Comment #11
alexpottCommitted 4d86f97 and pushed to 8.0.x. Thanks!