Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
field system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
3 Jun 2013 at 19:55 UTC
Updated:
29 Jul 2014 at 22:28 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jlandfried commentedComment #2
jlandfried commentedComment #3
ddrozdik commentedlooks good, if result of testing will be green - RTBC
Comment #4
jlandfried commentedSorry, first timer here. Previous patch only updated the .module file, this one should handle all references to drupal_container in the field module.
Comment #5
ddrozdik commentedPlease remove empty line here.
Comment #6
jlandfried commentedSure, remove the empty line.
Comment #7
swentel commentedSweet
Comment #8
alexpottWell this is just plain weird... because drupal_container()->get(Language::TYPE_CONTENT) ain't going to return anything AFAICS as there is not service called 'language_content'
This is already injected into the plugin so
$this->formatterPluginManagercan be used...as above... no 'language_content' service!
As this is a views plugin I'm pretty sure we can and a static create method and a constructor to inject this...
Comment #9
phiit commentedWorking on the issue.
Comment #10
phiit commentedPatch didn't apply. Straight reroll attached to the issue. Fixes from field.info.inc were moved to /core/modules/field/field.deprecated.inc.
Will continue working on the changes from comment #8 if the reroll applies.
Comment #11
phiit commentedNot sure if I did this right, but here's my try on the issue.
I found another instance of
as seen here:
Comment #12
phiit commentedAnother try, hopefully this time it'll be more like it's supposed to be.
Comment #14
phiit commentedComment #15
phiit commented#12: 2011082-field-drupal-service-12.patch queued for re-testing.
Comment #17
swentel commentedThis should do it
Comment #18
amateescu commentedApplied the patch and there's no usage of drupal_container() anymore in the field module, rtbc :)
Comment #19
pfrenssenOverall it looks good, just found some coding standards issues.
This code block is badly indented, maybe fix this while we're at it?
Same here.
Put this with the other plugins.
Indented too far.
Comment #20
pfrenssenWoops, crossposted with amateescu. I have quickly addressed the coding standards remarks I pointed out in my last comment. This has no changes except for whitespace fixes and ordering of namespaces, so setting this back to RTBC.
Comment #21
amateescu commentedIs it me or the interdiff is backwards?
Comment #22
pfrenssenOuch, you're right, it is backwards. I probably diffed from the older version and forgot to add the -R parameter.
Comment #23
amateescu commentedNo worries, the patch looks better and that's what matters :)
Comment #24
alexpottComment #25
swentel commentedComment #27
swentel commentedForgot the use statements.
Comment #28
alexpottIs this ok since the annotation uses @PluginID
Comment #29
amateescu commentedYep, because annotation classes are now loaded automatically, no need for use statements anymore.
Comment #30
alexpottConfirmed with @dawehener that the annotation reader will automatically load the classes.
Committed 00249db and pushed to 8.x. Thanks!
Comment #31
yched commentedI don't understand this change.
The second argument of the str_replace() call used to be an array with two values, and is now an array with one value.
This means ***DEFAULT_LANGUAGE*** gets now replaces by an empty string ?
Related, the new code leaves the former $default_langcode variable unused.
(two occurrences - query() and field_langcode() methods)
Comment #33
swentel commentedMmm, you're right. So there's obviously no tests for this - tbh, not sure if I'm really ready for writing one here now too .. :/
Comment #34
yched commentedThanks!
Comment #35
xano33: 2011082-33.patch queued for re-testing.
Comment #37
swentel commented33: 2011082-33.patch queued for re-testing.
Comment #38
swentel commentedBack to RTBC
Comment #39
xano33: 2011082-33.patch queued for re-testing.
Comment #40
webchickHm. Not crazy about committing this without test coverage TBH, but in the interest of closing this out, I'll go ahead and do it, but let's get a follow-up (can't tell if it's major or normal) for adding that test.
Committed and pushed to 8.x.