Permalink
Browse files

[Form] removed deprecated methods and classes

  • Loading branch information...
1 parent e0385a2 commit b3081e85a062abb8fc8a22f20a2b3289db2ff501 @fabpot fabpot committed Mar 1, 2013
Showing with 54 additions and 1,741 deletions.
  1. +0 −8 src/Symfony/Bridge/Doctrine/Form/DoctrineOrmTypeGuesser.php
  2. +0 −8 src/Symfony/Bridge/Propel1/Form/PropelTypeGuesser.php
  3. +0 −82 src/Symfony/Component/Form/AbstractType.php
  4. +0 −40 src/Symfony/Component/Form/AbstractTypeExtension.php
  5. +0 −44 src/Symfony/Component/Form/CallbackValidator.php
  6. +0 −74 src/Symfony/Component/Form/Event/DataEvent.php
  7. +0 −22 src/Symfony/Component/Form/Event/FilterDataEvent.php
  8. +0 −1 src/Symfony/Component/Form/Extension/Core/CoreExtension.php
  9. +0 −8 src/Symfony/Component/Form/Extension/Core/Type/CheckboxType.php
  10. +0 −8 src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
  11. +0 −8 src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php
  12. +0 −8 src/Symfony/Component/Form/Extension/Core/Type/DateType.php
  13. +0 −32 src/Symfony/Component/Form/Extension/Core/Type/FieldType.php
  14. +0 −8 src/Symfony/Component/Form/Extension/Core/Type/FileType.php
  15. +2 −12 src/Symfony/Component/Form/Extension/Core/Type/FormType.php
  16. +0 −8 src/Symfony/Component/Form/Extension/Core/Type/HiddenType.php
  17. +0 −8 src/Symfony/Component/Form/Extension/Core/Type/IntegerType.php
  18. +0 −8 src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php
  19. +0 −8 src/Symfony/Component/Form/Extension/Core/Type/NumberType.php
  20. +0 −8 src/Symfony/Component/Form/Extension/Core/Type/PercentType.php
  21. +0 −8 src/Symfony/Component/Form/Extension/Core/Type/TextType.php
  22. +0 −8 src/Symfony/Component/Form/Extension/Core/Type/TimeType.php
  23. +1 −8 src/Symfony/Component/Form/Extension/Validator/Type/FormTypeValidatorExtension.php
  24. +0 −8 src/Symfony/Component/Form/Extension/Validator/ValidatorTypeGuesser.php
  25. +3 −226 src/Symfony/Component/Form/Form.php
  26. +0 −28 src/Symfony/Component/Form/FormBuilder.php
  27. +0 −38 src/Symfony/Component/Form/FormBuilderInterface.php
  28. +0 −188 src/Symfony/Component/Form/FormConfigBuilder.php
  29. +0 −11 src/Symfony/Component/Form/FormConfigBuilderInterface.php
  30. +0 −9 src/Symfony/Component/Form/FormConfigInterface.php
  31. +46 −2 src/Symfony/Component/Form/FormEvent.php
  32. +0 −18 src/Symfony/Component/Form/FormEvents.php
  33. +0 −70 src/Symfony/Component/Form/FormFactory.php
  34. +2 −14 src/Symfony/Component/Form/FormRegistry.php
  35. +0 −11 src/Symfony/Component/Form/FormRegistryInterface.php
  36. +0 −12 src/Symfony/Component/Form/FormTypeGuesserChain.php
  37. +0 −12 src/Symfony/Component/Form/FormTypeGuesserInterface.php
  38. +0 −28 src/Symfony/Component/Form/FormValidatorInterface.php
  39. +0 −233 src/Symfony/Component/Form/FormView.php
  40. +0 −8 src/Symfony/Component/Form/ResolvedFormType.php
  41. +0 −16 src/Symfony/Component/Form/Tests/CompoundFormTest.php
  42. +0 −13 src/Symfony/Component/Form/Tests/Extension/Core/Type/FormTypeTest.php
  43. +0 −118 src/Symfony/Component/Form/Tests/FormFactoryTest.php
  44. +0 −32 src/Symfony/Component/Form/Tests/FormRegistryTest.php
  45. +0 −21 src/Symfony/Component/Form/Tests/SimpleFormTest.php
  46. +0 −15 src/Symfony/Component/Form/Util/FormUtil.php
  47. +0 −57 src/Symfony/Component/Form/Util/PropertyPath.php
  48. +0 −36 src/Symfony/Component/Form/Util/PropertyPathBuilder.php
  49. +0 −27 src/Symfony/Component/Form/Util/PropertyPathInterface.php
  50. +0 −36 src/Symfony/Component/Form/Util/PropertyPathIterator.php
  51. +0 −27 src/Symfony/Component/Form/Util/PropertyPathIteratorInterface.php
@@ -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}
*/
@@ -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}
*/
@@ -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}
*/
@@ -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();
}
/**
@@ -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;
- }
}
@@ -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();
}
}
@@ -1,44 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Form;
-
-/**
- * Deprecated. You should use FormEvents::POST_BIND event listeners instead.
- *
- * @author Bernhard Schussek <bschussek@gmail.com>
- *
- * @deprecated Deprecated since version 2.1, to be removed in 2.3.
- */
-class CallbackValidator implements FormValidatorInterface
-{
- private $callback;
-
- /**
- * @deprecated Deprecated since version 2.1, to be removed in 2.3.
- */
- public function __construct($callback)
- {
- trigger_error('CallbackValidator is deprecated since version 2.1 and will be removed in 2.3. Use the FormEvents::POST_BIND event instead.', E_USER_DEPRECATED);
-
- $this->callback = $callback;
- }
-
- /**
- * @deprecated Deprecated since version 2.1, to be removed in 2.3.
- */
- public function validate(FormInterface $form)
- {
- trigger_error('validate() is deprecated since version 2.1 and will be removed in 2.3.', E_USER_DEPRECATED);
-
- return call_user_func($this->callback, $form);
- }
-}
@@ -1,74 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Form\Event;
-
-use Symfony\Component\EventDispatcher\Event;
-use Symfony\Component\Form\FormInterface;
-use Symfony\Component\Form\FormEvent;
-
-/**
- * @author Bernhard Schussek <bschussek@gmail.com>
- *
- * @deprecated Deprecated since version 2.1, to be removed in 2.3. Code against
- * {@link \Symfony\Component\Form\FormEvent} instead.
- */
-class DataEvent extends Event
-{
- private $form;
- protected $data;
-
- /**
- * Constructs an event.
- *
- * @param FormInterface $form The associated form
- * @param mixed $data The data
- */
- public function __construct(FormInterface $form, $data)
- {
- if (!$this instanceof FormEvent) {
- trigger_error(sprintf('%s is deprecated since version 2.1 and will be removed in 2.3. Code against \Symfony\Component\Form\FormEvent instead.', get_class($this)), E_USER_DEPRECATED);
- }
-
- $this->form = $form;
- $this->data = $data;
- }
-
- /**
- * Returns the form at the source of the event.
- *
- * @return FormInterface
- */
- public function getForm()
- {
- return $this->form;
- }
-
- /**
- * Returns the data associated with this event.
- *
- * @return mixed
- */
- public function getData()
- {
- return $this->data;
- }
-
- /**
- * Allows updating with some filtered data.
- *
- * @param mixed $data
- */
- public function setData($data)
- {
- $this->data = $data;
- }
-}
@@ -1,22 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien@symfony.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Form\Event;
-
-/**
- * @author Bernhard Schussek <bschussek@gmail.com>
- *
- * @deprecated Deprecated since version 2.1, to be removed in 2.3. Code against
- * {@link \Symfony\Component\Form\FormEvent} instead.
- */
-class FilterDataEvent extends DataEvent
-{
-}
@@ -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(),
@@ -57,14 +57,6 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
));
}
- /**
- * {@inheritdoc}
- */
- public function getParent()
- {
- return 'field';
- }
-
/**
* {@inheritdoc}
*/
@@ -211,14 +211,6 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
));
}
- /**
- * {@inheritdoc}
- */
- public function getParent()
- {
- return 'field';
- }
-
/**
* {@inheritdoc}
*/
@@ -284,14 +284,6 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
));
}
- /**
- * {@inheritdoc}
- */
- public function getParent()
- {
- return 'field';
- }
-
/**
* {@inheritdoc}
*/
@@ -247,14 +247,6 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
));
}
- /**
- * {@inheritdoc}
- */
- public function getParent()
- {
- return 'field';
- }
-
/**
* {@inheritdoc}
*/
Oops, something went wrong.

0 comments on commit b3081e8

Please sign in to comment.