You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@trigger_error('createListFromChoices() treats callable strings as callable and is deprecated since version 3.1.', E_USER_DEPRECATED);
91
-
$value = function ($choice) use ($value) {
92
-
return$value($choice);
90
+
@trigger_error('createListFromChoices() - Treating strings as callable is deprecated since version 3.1 and will throw an error in 4.0. You should use a "\Closure" instead', E_USER_DEPRECATED);
91
+
$value = function (array$choices) use ($value) {
92
+
return$value($choices);
93
93
};
94
+
95
+
return$value($choices);
94
96
}
95
97
96
98
if ($valueinstanceof PropertyPath) {
@@ -123,9 +125,9 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, $value = nul
@trigger_error('createListFromLoader() treats callable strings as callable and is deprecated since version 3.1.', E_USER_DEPRECATED);
127
-
$value = function ($choice) use ($value) {
128
-
return$value($choice);
128
+
@trigger_error('createListFromLoader() - Treating strings as callable is deprecated since version 3.1 and will throw an error in 4.0. You should use a "\Closure" instead', E_USER_DEPRECATED);
129
+
$value = function ($choices) use ($value) {
130
+
return$value($choices);
129
131
};
130
132
}
131
133
@@ -169,6 +171,7 @@ public function createView(ChoiceListInterface $list, $preferredChoices = null,
0 commit comments