The property argument of language_default() is at best laughable in these days of object chaining. It was really supposed to be a quick convenience feature, but its more like cruft that is already not used consistently in code (some places already use the proper object chaining syntax). We can just get rid of this and use it as a simpler API.
Parent issue
Comment | File | Size | Author |
---|---|---|---|
#2 | modernize-language-default.patch | 5.31 KB | Gábor Hojtsy |
modernize-language-default.patch | 5.21 KB | Gábor Hojtsy | |
Comments
Comment #1
tstoecklerIn terms of "modernizing" can we split that out into separate lines, while we're at it?
Otherwise looks very good.
Comment #2
Gábor HojtsyLooks good?
Comment #3
tstoecklerAwesome, thanks!
Comment #4
sunHold on - we're storing a full object in a variable...?
Hope there's already a follow-up issue to clean that up.
20 days to next Drupal core point release.
Comment #5
Dries CreditAttribution: Dries commentedCommitted to 8.x. Thanks!
Comment #6
Gábor Hojtsy@sun: added #1272862: Clean up default language handling with some background info, your feedback is very welcome!
Comment #8
sunComment #9
Gábor HojtsyTagging for base language system.