Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
views.module
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
1 Feb 2015 at 17:27 UTC
Updated:
1 Apr 2015 at 16:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
berdirComment #2
dawehneryeah so now we support dynamic values ... and we just have to hope that they are written in a entity agnostic way,
I guess we don't have any kind of metadata about it.
Comment #3
berdir@dawehner: That is the API yes, it must not be relied upon. This is documented in great detail at callback_allowed_values_function()
Comment #4
jhedstromI'll take a stab at a test.
Comment #5
jhedstromHere's a test. I extended the OptionsTestBase since that is a unit test rather than a full-blown web test.
Comment #7
berdirHm, should we maybe use the views data service instead of calling the function directly? maybe the function is renamed or moved to some other place and that would break this test for no good reason? It's a kernel test and not a unit test :)
Comment #8
jhedstromThat makes sense--how's this?
Comment #9
berdirLooks good to me, note that #2443485: Remove extension:views cache tag and other views related cache improvements should remove the need for the manual ->clear().
I guess we should wait for that to land, update it and then maybe @dawehner can confirm that it is fine like this?
Comment #11
jhedstromNow that #2443485: Remove extension:views cache tag and other views related cache improvements is in, here's the test w/o the manual cache clear.
Comment #13
berdirLooks good to me, but would be good to have an OK from @dawehner.
Comment #14
jibranYeah it's good to go.
Comment #15
alexpottI wouldn't mind @dawehner input either :)
Comment #16
dawehnerNow that you can call options_allowed_values() this is pretty save.
Comment #17
alexpottThis issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed 5538c44 and pushed to 8.0.x. Thanks!