8000 merged branch stof/form_cleanup (PR #3931) · kimhemsoe/symfony@d9fa1b9 · GitHub
[go: up one dir, main page]

Skip to content

Commit d9fa1b9

Browse files
committed
merged branch stof/form_cleanup (PR symfony#3931)
Commits ------- 538819a [Form] Fixed the tests 9e956a8 [Form] Cleaned the FormValidatorInterface deprecation Discussion ---------- [Form] Cleaned the FormValidatorInterface deprecation This fixes my feedback on symfony#3797 [![Build Status](https://secure.travis-ci.org/stof/symfony.png?branch=form_cleanup)](http://travis-ci.org/stof/symfony)
2 parents 8e59a4e + 538819a commit d9fa1b9

File tree

3 files changed

+6
-24
lines changed

3 files changed

+6
-24
lines changed

src/Symfony/Component/Form/Form.php

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class Form implements \IteratorAggregate, FormInterface
7777

7878
/**
7979
* The mapper for mapping data to children and back
80-
* @var DataMapper\DataMapperInterface
80+
* @var DataMapperInterface
8181
*/
8282
private $dataMapper;
8383

@@ -801,18 +801,6 @@ public function getClientTransformers()
801801
return $this->clientTransformers;
802802
}
803803

804-
/**
805-
* Returns the Validators
806-
*
807-
* @return array An array of FormValidatorInterface
808-
*
809-
* @deprecated Deprecated since version 2.1, to be removed in 2.3.
810-
*/
811-
public function getValidators()
812-
{
813-
return $this->validators;
814-
}
815-
816804
/**
817805
* Returns all children in this group.
818806
*

src/Symfony/Component/Form/Tests/Extension/Validator/EventListener/DelegatingValidationListenerTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,18 @@ class DelegatingValidationListenerTest extends \PHPUnit_Framework_TestCase
3232

3333
private $delegate;
3434

35-
private $validator;
35+
private $listener;
3636

3737
private $message;
3838

3939
private $params;
4040

4141
protected function setUp()
4242
{
43+
if (!class_exists('Symfony\Component\EventDispatcher\Event')) {
44+
$this->markTestSkipped('The "EventDispatcher" component is not available');
45+
}
46+
4347
$this->dispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
4448
$this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface');
4549
$this->delegate = $this->getMock('Symfony\Component\Validator\ValidatorInterface');

src/Symfony/Component/Form/Tests/FormTest.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,16 +1294,6 @@ public function testFormCannotHaveEmptyNameNotInRootLevel()
12941294
->getForm();
12951295
}
12961296

1297-
public function testGetValidatorsReturnsValidators()
1298-
{
1299-
$validator = $this->getFormValidator();
1300-
$form = $this->getBuilder()
1301-
->addValidator($validator)
1302-
->getForm();
1303-
1304-
$this->assertEquals(array($validator), $form->getValidators());
1305-
}
1306-
13071297
protected function getBuilder($name = 'name', EventDispatcherInterface $dispatcher = null)
13081298
{
13091299
return new FormBuilder($name, $this->factory, $dispatcher ?: $this->dispatcher);

0 commit comments

Comments
 (0)
0