Skip to content

Commit

Permalink
[Form] removed deprecated methods and classes
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Mar 23, 2013
1 parent e0385a2 commit b3081e8
Show file tree
Hide file tree
Showing 51 changed files with 54 additions and 1,741 deletions.
8 changes: 0 additions & 8 deletions src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php
Expand Up @@ -138,14 +138,6 @@ public function guessMaxLength($class, $property)
}
}

/**
* {@inheritDoc}
*/
public function guessMinLength($class, $property)
{
trigger_error('guessMinLength() is deprecated since version 2.1 and will be removed in 2.3.', E_USER_DEPRECATED);
}

/**
* {@inheritDoc}
*/
Expand Down
8 changes: 0 additions & 8 deletions src/Symfony/Bridge/Propel1/Form/PropelTypeGuesser.php
Expand Up @@ -129,14 +129,6 @@ public function guessMaxLength($class, $property)
}
}

/**
* {@inheritDoc}
*/
public function guessMinLength($class, $property)
{
trigger_error('guessMinLength() is deprecated since version 2.1 and will be removed in 2.3.', E_USER_DEPRECATED);
}

/**
* {@inheritDoc}
*/
Expand Down
82 changes: 0 additions & 82 deletions src/Symfony/Component/Form/AbstractType.php
Expand Up @@ -18,13 +18,6 @@
*/
abstract class AbstractType implements FormTypeInterface
{
/**
* @var array
*
* @deprecated Deprecated since version 2.1, to be removed in 2.3.
*/
private $extensions = array();

/**
* {@inheritdoc}
*/
Expand All @@ -51,50 +44,6 @@ public function finishView(FormView $view, FormInterface $form, array $options)
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$defaults = $this->getDefaultOptions(array());
$allowedTypes = $this->getAllowedOptionValues(array());

if (!empty($defaults)) {
trigger_error('getDefaultOptions() is deprecated since version 2.1 and will be removed in 2.3. Use setDefaultOptions() instead.', E_USER_DEPRECATED);

$resolver->setDefaults($defaults);
}

if (!empty($allowedTypes)) {
trigger_error('getAllowedOptionValues() is deprecated since version 2.1 and will be removed in 2.3. Use setDefaultOptions() instead.', E_USER_DEPRECATED);

$resolver->addAllowedValues($allowedTypes);
}
}

/**
* Returns the default options for this type.
*
* @param array $options Unsupported as of Symfony 2.1.
*
* @return array The default options
*
* @deprecated Deprecated since version 2.1, to be removed in 2.3.
* Use {@link setDefaultOptions()} instead.
*/
public function getDefaultOptions(array $options)
{
return array();
}

/**
* Returns the allowed option values for each option (if any).
*
* @param array $options Unsupported as of Symfony 2.1.
*
* @return array The allowed option values
*
* @deprecated Deprecated since version 2.1, to be removed in 2.3.
* Use {@link setDefaultOptions()} instead.
*/
public function getAllowedOptionValues(array $options)
{
return array();
}

/**
Expand All @@ -104,35 +53,4 @@ public function getParent()
{
return 'form';
}

/**
* Sets the extensions for this type.
*
* @param FormTypeExtensionInterface[] $extensions An array of FormTypeExtensionInterface
*
* @throws Exception\UnexpectedTypeException if any extension does not implement FormTypeExtensionInterface
*
* @deprecated Deprecated since version 2.1, to be removed in 2.3.
*/
public function setExtensions(array $extensions)
{
trigger_error('setExtensions() is deprecated since version 2.1 and will be removed in 2.3.', E_USER_DEPRECATED);

$this->extensions = $extensions;
}

/**
* Returns the extensions associated with this type.
*
* @return FormTypeExtensionInterface[] An array of FormTypeExtensionInterface
*
* @deprecated Deprecated since version 2.1, to be removed in 2.3. Use
* {@link ResolvedFormTypeInterface::getTypeExtensions()} instead.
*/
public function getExtensions()
{
trigger_error('getExtensions() is deprecated since version 2.1 and will be removed in 2.3. Use ResolvedFormTypeInterface::getTypeExtensions instead.', E_USER_DEPRECATED);

return $this->extensions;
}
}
40 changes: 0 additions & 40 deletions src/Symfony/Component/Form/AbstractTypeExtension.php
Expand Up @@ -44,45 +44,5 @@ public function finishView(FormView $view, FormInterface $form, array $options)
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$defaults = $this->getDefaultOptions(array());
$allowedTypes = $this->getAllowedOptionValues(array());

if (!empty($defaults)) {
trigger_error('getDefaultOptions() is deprecated since version 2.1 and will be removed in 2.3. Use setDefaultOptions() instead.', E_USER_DEPRECATED);

$resolver->setDefaults($defaults);
}

if (!empty($allowedTypes)) {
trigger_error('getAllowedOptionValues() is deprecated since version 2.1 and will be removed in 2.3. Use setDefaultOptions() instead.', E_USER_DEPRECATED);

$resolver->addAllowedValues($allowedTypes);
}
}

/**
* Overrides the default options form the extended type.
*
* @return array
*
* @deprecated Deprecated since version 2.1, to be removed in 2.3.
* Use {@link setDefaultOptions()} instead.
*/
public function getDefaultOptions()
{
return array();
}

/**
* Returns the allowed option values for each option (if any).
*
* @return array The allowed option values
*
* @deprecated Deprecated since version 2.1, to be removed in 2.3.
* Use {@link setDefaultOptions()} instead.
*/
public function getAllowedOptionValues()
{
return array();
}
}
44 changes: 0 additions & 44 deletions src/Symfony/Component/Form/CallbackValidator.php

This file was deleted.

74 changes: 0 additions & 74 deletions src/Symfony/Component/Form/Event/DataEvent.php

This file was deleted.

22 changes: 0 additions & 22 deletions src/Symfony/Component/Form/Event/FilterDataEvent.php

This file was deleted.

Expand Up @@ -24,7 +24,6 @@ class CoreExtension extends AbstractExtension
protected function loadTypes()
{
return array(
new Type\FieldType(),
new Type\FormType(PropertyAccess::getPropertyAccessor()),
new Type\BirthdayType(),
new Type\CheckboxType(),
Expand Down
Expand Up @@ -57,14 +57,6 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
));
}

/**
* {@inheritdoc}
*/
public function getParent()
{
return 'field';
}

/**
* {@inheritdoc}
*/
Expand Down
8 changes: 0 additions & 8 deletions src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
Expand Up @@ -211,14 +211,6 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
));
}

/**
* {@inheritdoc}
*/
public function getParent()
{
return 'field';
}

/**
* {@inheritdoc}
*/
Expand Down
Expand Up @@ -284,14 +284,6 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
));
}

/**
* {@inheritdoc}
*/
public function getParent()
{
return 'field';
}

/**
* {@inheritdoc}
*/
Expand Down
8 changes: 0 additions & 8 deletions src/Symfony/Component/Form/Extension/Core/Type/DateType.php
Expand Up @@ -247,14 +247,6 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
));
}

/**
* {@inheritdoc}
*/
public function getParent()
{
return 'field';
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit b3081e8

Please sign in to comment.