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
Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/ButtonBuilder.php
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -592,9 +592,14 @@ public function getByReference()
592
592
* Unsupported method.
593
593
*
594
594
* @return bool Always returns false.
595
+
*
596
+
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use
597
+
* {@link getInheritData()} instead.
595
598
*/
596
599
publicfunctiongetVirtual()
597
600
{
601
+
trigger_error('ButtonBuilder::getVirtual() is deprecated since version 2.3 and will be removed in 3.0. Use FormConfigBuilder::getInheritData() instead.', E_USER_DEPRECATED);
Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/Type/FormType.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -155,8 +155,8 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
155
155
// BC with old "virtual" option
156
156
$inheritData = function (Options$options) {
157
157
if (null !== $options['virtual']) {
158
-
// Uncomment this as soon as the deprecation note should be shown
159
-
// trigger_error('The form option "virtual" is deprecated since version 2.3 and will be removed in 3.0. Use "inherit_data" instead.', E_USER_DEPRECATED);
158
+
trigger_error('The form option "virtual" is deprecated since version 2.3 and will be removed in 3.0. Use "inherit_data" instead.', E_USER_DEPRECATED);
Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/FormConfigBuilder.php
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -356,8 +356,8 @@ public function getInheritData()
356
356
*/
357
357
publicfunctiongetVirtual()
358
358
{
359
-
// Uncomment this as soon as the deprecation note should be shown
360
-
// trigger_error('getVirtual() is deprecated since version 2.3 and will be removed in 3.0. Use getInheritData() instead.', E_USER_DEPRECATED);
359
+
trigger_error('FormConfigBuilder::getVirtual() is deprecated since version 2.3 and will be removed in 3.0. Use FormConfigBuilder::getInheritData() instead.', E_USER_DEPRECATED);
360
+
361
361
return$this->getInheritData();
362
362
}
363
363
@@ -722,8 +722,7 @@ public function setInheritData($inheritData)
722
722
*/
723
723
publicfunctionsetVirtual($inheritData)
724
724
{
725
-
// Uncomment this as soon as the deprecation note should be shown
726
-
// trigger_error('setVirtual() is deprecated since version 2.3 and will be removed in 3.0. Use setInheritData() instead.', E_USER_DEPRECATED);
725
+
trigger_error('FormConfigBuilder::setVirtual() is deprecated since version 2.3 and will be removed in 3.0. Use FormConfigBuilder::setInheritData() instead.', E_USER_DEPRECATED);
0 commit comments