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
if (!method_exists($builder, 'setIsEmptyCallback')) {
39
+
@trigger_error(sprintf('Not implementing the setIsEmptyCallback() method in %s which implements %s is deprecated since Symfony 4.4.', \get_class($builder), FormConfigBuilderInterface::class), E_USER_DEPRECATED);
if (!method_exists($this->config, 'getIsEmptyCallback')) {
731
+
@trigger_error(sprintf('Not implementing the getIsEmptyCallback() method in %s which implements %s is deprecated since Symfony 4.4.', \get_class($this->config), FormConfigInterface::class), E_USER_DEPRECATED);
* @method $this setIsEmptyCallback(callable $isEmptyCallback) Sets the callback that will be called to determine if the model data of the form is empty or not - not implementing it is deprecated since Symfony 4.4
* @method callable getIsEmptyCallback() Returns a callable that takes the model data as argument and that returns if it is empty or not - not implementing it is deprecated since Symfony 4.4
// Some invalid cases are voluntarily not tested :
2085
+
// - multiple with placeholder
2086
+
// - required with placeholder
2087
+
return [
2088
+
'Nothing submitted / single / not required / without a placeholder -> should be empty' => [true, null, false, false, null],
2089
+
'Nothing submitted / single / not required / with a placeholder -> should not be empty' => [false, null, false, false, 'ccc'], // It falls back on the placeholder
2090
+
'Nothing submitted / single / required / without a placeholder -> should be empty' => [true, null, false, true, null],
2091
+
'Nothing submitted / single / required / with a placeholder -> should be empty' => [true, null, false, true, 'ccc'],
2092
+
'Nothing submitted / multiple / not required / without a placeholder -> should be empty' => [true, null, true, false, null],
2093
+
'Nothing submitted / multiple / required / without a placeholder -> should be empty' => [true, null, true, true, null],
2094
+
'Placeholder submitted / single / not required / with a placeholder -> should not be empty' => [false, '', false, false, 'ccc'], // The placeholder is a selected value
0 commit comments