Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The function is just a wrapper around SelectionPluginManager::getInstance().
Comment | File | Size | Author |
---|---|---|---|
#25 | 2017851-move_entity_reference_get_selection_handler-25.patch | 12.01 KB | amateescu |
#25 | interdiff.txt | 5.23 KB | amateescu |
#21 | 2017851-move_entity_reference_get_selection_handler-21.patch | 9.85 KB | amateescu |
#21 | interdiff.txt | 779 bytes | amateescu |
#18 | 2017851-move_entity_reference_get_selection_handler-19.patch | 9.91 KB | amateescu |
Comments
Comment #1
amateescu CreditAttribution: amateescu commentedI don't see anything wrong with that, let's do it :)
Comment #2
pcambraLet's see what I broke
Comment #4
pcambraComment #6
pcambraLet's see if this goes green, hopefully patch is aligned with the intention of the issue :)
Comment #7
amateescu CreditAttribution: amateescu commented$field and $instance are missing the 'array' data type, and $entity should be just \Drupal\Core\Entity\EntityInterface.
Otherwise we're good here :)
Comment #8
yched CreditAttribution: yched commentedThey can still be used as arrays for now, but strictly speaking they are FieldInterface and FieldInstanceInterface objects. There are still old docs that refer to them as arrays here and there, but I'd suggest doc that gets added or moved around refers to the interfaces ?
Comment #9
amateescu CreditAttribution: amateescu commentedYep, you're totally right.
Comment #10
pcambraOk had big re-roll conflict issues so no interdiff on the doc changes :( but here is the patch!
Comment #11
amateescu CreditAttribution: amateescu commentedLooks good to go :)
Comment #12
amateescu CreditAttribution: amateescu commentedNeeds another reroll for #2020405: Correct misspelling of 'referenceable' :(
Comment #13
PanchoHere's the reroll. Should still be RTBC, when green.
Comment #14
pcambraRTBC as for #12
Comment #15
YesCT CreditAttribution: YesCT commentedThis issue was RTBC and passing tests on July 1, the beginning of API freeze.
Comment #16
alexpottShould we actually be removing the function
entity_reference_get_selection_handler()
as well? It was a one point but in #10 it was no longer removed... can't determine why... as this patch does appear to remove all 10 usages from core.Also needs a reroll..
Comment #17
amateescu CreditAttribution: amateescu commentedYes, we should. I guess it was just a victim of the big conflict reroll from #10..
Comment #18
amateescu CreditAttribution: amateescu commentedRerolled and deleted the deprecated function.
Comment #19
amateescu CreditAttribution: amateescu commentedBack to RTBC since the patch is really trivial :)
Comment #20
alexpottI might be missing something... but shouldn't we using
$this->getInstance($options);
here?Comment #21
amateescu CreditAttribution: amateescu commentedOf course we should, me--. Got to respect that self-imposed break more :)
Comment #23
amateescu CreditAttribution: amateescu commented#21: 2017851-move_entity_reference_get_selection_handler-21.patch queued for re-testing.
Comment #24
tim.plunkettEntityReferenceAutocomplete is a service, so this can be easily injected
We really need to fix/kill WidgetFactory...
This could be $this->container->get(...
Comment #25
amateescu CreditAttribution: amateescu commentedThanks, Tim!
Comment #26
tim.plunkettCan we get an issue for WidgetFactory to extend or be replaced by ContainerFactory? Thanks!
Comment #27
alexpottCommitted 42ebadc and pushed to 8.x. Thanks!
Created followup #2052751: WidgetFactory is not used anywhere so it should be removed