Permalink
Browse files

[Form] removed deprecated methods and classes

  • Loading branch information...
1 parent 7f85532 commit 6799dcd6f581167aa86405a9c4521c4c623f9adf @fabpot fabpot committed Mar 1, 2013
Showing with 54 additions and 1,725 deletions.
  1. +0 −82 AbstractType.php
  2. +0 −40 AbstractTypeExtension.php
  3. +0 −44 CallbackValidator.php
  4. +0 −74 Event/DataEvent.php
  5. +0 −22 Event/FilterDataEvent.php
  6. +0 −1 Extension/Core/CoreExtension.php
  7. +0 −8 Extension/Core/Type/CheckboxType.php
  8. +0 −8 Extension/Core/Type/ChoiceType.php
  9. +0 −8 Extension/Core/Type/DateTimeType.php
  10. +0 −8 Extension/Core/Type/DateType.php
  11. +0 −32 Extension/Core/Type/FieldType.php
  12. +0 −8 Extension/Core/Type/FileType.php
  13. +2 −12 Extension/Core/Type/FormType.php
  14. +0 −8 Extension/Core/Type/HiddenType.php
  15. +0 −8 Extension/Core/Type/IntegerType.php
  16. +0 −8 Extension/Core/Type/MoneyType.php
  17. +0 −8 Extension/Core/Type/NumberType.php
  18. +0 −8 Extension/Core/Type/PercentType.php
  19. +0 −8 Extension/Core/Type/TextType.php
  20. +0 −8 Extension/Core/Type/TimeType.php
  21. +1 −8 Extension/Validator/Type/FormTypeValidatorExtension.php
  22. +0 −8 Extension/Validator/ValidatorTypeGuesser.php
  23. +3 −226 Form.php
  24. +0 −28 FormBuilder.php
  25. +0 −38 FormBuilderInterface.php
  26. +0 −188 FormConfigBuilder.php
  27. +0 −11 FormConfigBuilderInterface.php
  28. +0 −9 FormConfigInterface.php
  29. +46 −2 FormEvent.php
  30. +0 −18 FormEvents.php
  31. +0 −70 FormFactory.php
  32. +2 −14 FormRegistry.php
  33. +0 −11 FormRegistryInterface.php
  34. +0 −12 FormTypeGuesserChain.php
  35. +0 −12 FormTypeGuesserInterface.php
  36. +0 −28 FormValidatorInterface.php
  37. +0 −233 FormView.php
  38. +0 −8 ResolvedFormType.php
  39. +0 −16 Tests/CompoundFormTest.php
  40. +0 −13 Tests/Extension/Core/Type/FormTypeTest.php
  41. +0 −118 Tests/FormFactoryTest.php
  42. +0 −32 Tests/FormRegistryTest.php
  43. +0 −21 Tests/SimpleFormTest.php
  44. +0 −15 Util/FormUtil.php
  45. +0 −57 Util/PropertyPath.php
  46. +0 −36 Util/PropertyPathBuilder.php
  47. +0 −27 Util/PropertyPathInterface.php
  48. +0 −36 Util/PropertyPathIterator.php
  49. +0 −27 Util/PropertyPathIteratorInterface.php
View
@@ -19,13 +19,6 @@
abstract class AbstractType implements FormTypeInterface
{
/**
- * @var array
- *
- * @deprecated Deprecated since version 2.1, to be removed in 2.3.
- */
- private $extensions = array();
-
- /**
* {@inheritdoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options)
@@ -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;
- }
}
View
@@ -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();
}
}
View
@@ -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);
- }
-}
View
@@ -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;
- }
-}
View
@@ -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(),
@@ -60,14 +60,6 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
/**
* {@inheritdoc}
*/
- public function getParent()
- {
- return 'field';
- }
-
- /**
- * {@inheritdoc}
- */
public function getName()
{
return 'checkbox';
@@ -214,14 +214,6 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
/**
* {@inheritdoc}
*/
- public function getParent()
- {
- return 'field';
- }
-
- /**
- * {@inheritdoc}
- */
public function getName()
{
return 'choice';
@@ -287,14 +287,6 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
/**
* {@inheritdoc}
*/
- public function getParent()
- {
- return 'field';
- }
-
- /**
- * {@inheritdoc}
- */
public function getName()
{
return 'datetime';
@@ -250,14 +250,6 @@ public function setDefaultOptions(OptionsResolverInterface $resolver)
/**
* {@inheritdoc}
*/
- public function getParent()
- {
- return 'field';
- }
-
- /**
- * {@inheritdoc}
- */
public function getName()
{
return 'date';
@@ -1,32 +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\Extension\Core\Type;
-
-use Symfony\Component\Form\AbstractType;
-
-/**
- * Deprecated. You should extend FormType instead.
- *
- * @author Bernhard Schussek <bschussek@gmail.com>
- *
- * @deprecated Deprecated since version 2.1, to be removed in 2.3.
- */
-class FieldType extends AbstractType
-{
- /**
- * {@inheritdoc}
- */
- public function getName()
- {
- return 'field';
- }
-}
Oops, something went wrong.

0 comments on commit 6799dcd

Please sign in to comment.