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('Passing callable strings is deprecated since version 3.1 and PropertyAccessDecorator will treat them as strings in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
89
91
}
90
92
91
93
if ($valueinstanceof PropertyPath) {
@@ -117,6 +119,8 @@ public function createListFromLoader(ChoiceLoaderInterface $loader, $value = nul
@trigger_error('Passing callable strings is deprecated since version 3.1 and PropertyAccessDecorator will treat them as strings in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
120
124
}
121
125
122
126
if ($valueinstanceof PropertyPath) {
@@ -153,6 +157,12 @@ public function createView(ChoiceListInterface $list, $preferredChoices = null,
@trigger_error('Passing callable strings is deprecated since version 3.1 and PropertyAccessDecorator will treat them as strings in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
162
+
163
+
$label = function ($choice) use ($label) {
164
+
return$label($choice);
165
+
};
156
166
}
157
167
158
168
if ($labelinstanceof PropertyPath) {
@@ -163,6 +173,12 @@ public function createView(ChoiceListInterface $list, $preferredChoices = null,
163
173
164
174
if (is_string($preferredChoices) && !is_callable($preferredChoices)) {
@trigger_error('Passing callable strings is deprecated since version 3.1 and PropertyAccessDecorator will treat them as strings in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
178
+
179
+
$preferredChoices = function ($choice) use ($preferredChoices) {
180
+
return$preferredChoices($choice);
181
+
};
166
182
}
167
183
168
184
if ($preferredChoicesinstanceof PropertyPath) {
@@ -178,6 +194,12 @@ public function createView(ChoiceListInterface $list, $preferredChoices = null,
@trigger_error('Passing callable strings is deprecated since version 3.1 and PropertyAccessDecorator will treat them as strings in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
199
+
200
+
$index = function ($choice) use ($index) {
201
+
return$index($choice);
202
+
};
181
203
}
182
204
183
205
if ($indexinstanceof PropertyPath) {
@@ -188,6 +210,12 @@ public function createView(ChoiceListInterface $list, $preferredChoices = null,
188
210
189
211
if (is_string($groupBy) && !is_callable($groupBy)) {
@trigger_error('Passing callable strings is deprecated since version 3.1 and PropertyAccessDecorator will treat them as strings in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
215
+
216
+
$groupBy = function ($choice) use ($groupBy) {
217
+
return$groupBy($choice);
218
+
};
191
219
}
192
220
193
221
if ($groupByinstanceof PropertyPath) {
@@ -202,6 +230,12 @@ public function createView(ChoiceListInterface $list, $preferredChoices = null,
@trigger_error('Passing callable strings is deprecated since version 3.1 and PropertyAccessDecorator will treat them as strings in 4.0. You should use a "\Closure" instead.', E_USER_DEPRECATED);
0 commit comments