Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b3081e8

Browse filesBrowse files
committed
[Form] removed deprecated methods and classes
1 parent e0385a2 commit b3081e8
Copy full SHA for b3081e8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree

51 files changed

+54
-1741
lines changed

‎src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php
-8Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,6 @@ public function guessMaxLength($class, $property)
138138
}
139139
}
140140

141-
/**
142-
* {@inheritDoc}
143-
*/
144-
public function guessMinLength($class, $property)
145-
{
146-
trigger_error('guessMinLength() is deprecated since version 2.1 and will be removed in 2.3.', E_USER_DEPRECATED);
147-
}
148-
149141
/**
150142
* {@inheritDoc}
151143
*/

‎src/Symfony/Bridge/Propel1/Form/PropelTypeGuesser.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Propel1/Form/PropelTypeGuesser.php
-8Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,6 @@ public function guessMaxLength($class, $property)
129129
}
130130
}
131131

132-
/**
133-
* {@inheritDoc}
134-
*/
135-
public function guessMinLength($class, $property)
136-
{
137-
trigger_error('guessMinLength() is deprecated since version 2.1 and will be removed in 2.3.', E_USER_DEPRECATED);
138-
}
139-
140132
/**
141133
* {@inheritDoc}
142134
*/

‎src/Symfony/Component/Form/AbstractType.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/AbstractType.php
-82Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@
1818
*/
1919
abstract class AbstractType implements FormTypeInterface
2020
{
21-
/**
22-
* @var array
23-
*
24-
* @deprecated Deprecated since version 2.1, to be removed in 2.3.
25-
*/
26-
private $extensions = array();
27-
2821
/**
2922
* {@inheritdoc}
3023
*/
@@ -51,50 +44,6 @@ public function finishView(FormView $view, FormInterface $form, array $options)
5144
*/
5245
public function setDefaultOptions(OptionsResolverInterface $resolver)
5346
{
54-
$defaults = $this->getDefaultOptions(array());
55-
$allowedTypes = $this->getAllowedOptionValues(array());
56-
57-
if (!empty($defaults)) {
58-
trigger_error('getDefaultOptions() is deprecated since version 2.1 and will be removed in 2.3. Use setDefaultOptions() instead.', E_USER_DEPRECATED);
59-
60-
$resolver->setDefaults($defaults);
61-
}
62-
63-
if (!empty($allowedTypes)) {
64-
trigger_error('getAllowedOptionValues() is deprecated since version 2.1 and will be removed in 2.3. Use setDefaultOptions() instead.', E_USER_DEPRECATED);
65-
66-
$resolver->addAllowedValues($allowedTypes);
67-
}
68-
}
69-
70-
/**
71-
* Returns the default options for this type.
72-
*
73-
* @param array $options Unsupported as of Symfony 2.1.
74-
*
75-
* @return array The default options
76-
*
77-
* @deprecated Deprecated since version 2.1, to be removed in 2.3.
78-
* Use {@link setDefaultOptions()} instead.
79-
*/
80-
public function getDefaultOptions(array $options)
81-
{
82-
return array();
83-
}
84-
85-
/**
86-
* Returns the allowed option values for each option (if any).
87-
*
88-
* @param array $options Unsupported as of Symfony 2.1.
89-
*
90-
* @return array The allowed option values
91-
*
92-
* @deprecated Deprecated since version 2.1, to be removed in 2.3.
93-
* Use {@link setDefaultOptions()} instead.
94-
*/
95-
public function getAllowedOptionValues(array $options)
96-
{
97-
return array();
9847
}
9948

10049
/**
@@ -104,35 +53,4 @@ public function getParent()
10453
{
10554
return 'form';
10655
}
107-
108-
/**
109-
* Sets the extensions for this type.
110-
*
111-
* @param FormTypeExtensionInterface[] $extensions An array of FormTypeExtensionInterface
112-
*
113-
* @throws Exception\UnexpectedTypeException if any extension does not implement FormTypeExtensionInterface
114-
*
115-
* @deprecated Deprecated since version 2.1, to be removed in 2.3.
116-
*/
117-
public function setExtensions(array $extensions)
118-
{
119-
trigger_error('setExtensions() is deprecated since version 2.1 and will be removed in 2.3.', E_USER_DEPRECATED);
120-
121-
$this->extensions = $extensions;
122-
}
123-
124-
/**
125-
* Returns the extensions associated with this type.
126-
*
127-
* @return FormTypeExtensionInterface[] An array of FormTypeExtensionInterface
128-
*
129-
* @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
130-
* {@link ResolvedFormTypeInterface::getTypeExtensions()} instead.
131-
*/
132-
public function getExtensions()
133-
{
134-
trigger_error('getExtensions() is deprecated since version 2.1 and will be removed in 2.3. Use ResolvedFormTypeInterface::getTypeExtensions instead.', E_USER_DEPRECATED);
135-
136-
return $this->extensions;
137-
}
13856
}

‎src/Symfony/Component/Form/AbstractTypeExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/AbstractTypeExtension.php
-40Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -44,45 +44,5 @@ public function finishView(FormView $view, FormInterface $form, array $options)
4444
*/
4545
public function setDefaultOptions(OptionsResolverInterface $resolver)
4646
{
47-
$defaults = $this->getDefaultOptions(array());
48-
$allowedTypes = $this->getAllowedOptionValues(array());
49-
50-
if (!empty($defaults)) {
51-
trigger_error('getDefaultOptions() is deprecated since version 2.1 and will be removed in 2.3. Use setDefaultOptions() instead.', E_USER_DEPRECATED);
52-
53-
$resolver->setDefaults($defaults);
54-
}
55-
56-
if (!empty($allowedTypes)) {
57-
trigger_error('getAllowedOptionValues() is deprecated since version 2.1 and will be removed in 2.3. Use setDefaultOptions() instead.', E_USER_DEPRECATED);
58-
59-
$resolver->addAllowedValues($allowedTypes);
60-
}
61-
}
62-
63-
/**
64-
* Overrides the default options form the extended type.
65-
*
66-
* @return array
67-
*
68-
* @deprecated Deprecated since version 2.1, to be removed in 2.3.
69-
* Use {@link setDefaultOptions()} instead.
70-
*/
71-
public function getDefaultOptions()
72-
{
73-
return array();
74-
}
75-
76-
/**
77-
* Returns the allowed option values for each option (if any).
78-
*
79-
* @return array The allowed option values
80-
*
81-
* @deprecated Deprecated since version 2.1, to be removed in 2.3.
82-
* Use {@link setDefaultOptions()} instead.
83-
*/
84-
public function getAllowedOptionValues()
85-
{
86-
return array();
8747
}
8848
}

‎src/Symfony/Component/Form/CallbackValidator.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/CallbackValidator.php
-44Lines changed: 0 additions & 44 deletions
This file was deleted.

‎src/Symfony/Component/Form/Event/DataEvent.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Event/DataEvent.php
-74Lines changed: 0 additions & 74 deletions
This file was deleted.

‎src/Symfony/Component/Form/Event/FilterDataEvent.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Event/FilterDataEvent.php
-22Lines changed: 0 additions & 22 deletions
This file was deleted.

‎src/Symfony/Component/Form/Extension/Core/CoreExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/CoreExtension.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class CoreExtension extends AbstractExtension
2424
protected function loadTypes()
2525
{
2626
return array(
27-
new Type\FieldType(),
2827
new Type\FormType(PropertyAccess::getPropertyAccessor()),
2928
new Type\BirthdayType(),
3029
new Type\CheckboxType(),

‎src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php
-8Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,6 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
5757
));
5858
}
5959

60-
/**
61-
* {@inheritdoc}
62-
*/
63-
public function getParent()
64-
{
65-
return 'field';
66-
}
67-
6860
/**
6961
* {@inheritdoc}
7062
*/

‎src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
-8Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -211,14 +211,6 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
211211
));
212212
}
213213

214-
/**
215-
* {@inheritdoc}
216-
*/
217-
public function getParent()
218-
{
219-
return 'field';
220-
}
221-
222214
/**
223215
* {@inheritdoc}
224216
*/

‎src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php
-8Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -284,14 +284,6 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
284284
));
285285
}
286286

287-
/**
288-
* {@inheritdoc}
289-
*/
290-
public function getParent()
291-
{
292-
return 'field';
293-
}
294-
295287
/**
296288
* {@inheritdoc}
297289
*/

‎src/Symfony/Component/Form/Extension/Core/Type/DateType.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/Type/DateType.php
-8Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -247,14 +247,6 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
247247
));
248248
}
249249

250-
/**
251-
* {@inheritdoc}
252-
*/
253-
public function getParent()
254-
{
255-
return 'field';
256-
}
257-
258250
/**
259251
* {@inheritdoc}
260252
*/

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.