Skip to content

Commit 1d68ad3

Browse files
[2.3] Cleanup deprecations
1 parent e09b4f9 commit 1d68ad3

File tree

48 files changed

+160
-113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+160
-113
lines changed

src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/**
1717
* Class DoctrineOrmTestCase.
1818
*
19-
* @deprecated Deprecated as of Symfony 2.4, to be removed in Symfony 3.0.
19+
* @deprecated Deprecated as of Symfony 2.3, to be removed in Symfony 3.0.
2020
* Use {@link DoctrineTestHelper} instead.
2121
*/
2222
abstract class DoctrineOrmTestCase extends \PHPUnit_Framework_TestCase

src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/ORMQueryBuilderLoaderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
namespace Symfony\Bridge\Doctrine\Tests\Form\ChoiceList;
1313

1414
use Symfony\Bridge\Doctrine\Form\ChoiceList\ORMQueryBuilderLoader;
15-
use Symfony\Bridge\Doctrine\Tests\DoctrineOrmTestCase;
15+
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
1616
use Doctrine\DBAL\Connection;
1717

18-
class ORMQueryBuilderLoaderTest extends DoctrineOrmTestCase
18+
class ORMQueryBuilderLoaderTest extends DoctrineTestHelper
1919
{
2020
/**
2121
* @expectedException \Symfony\Component\Form\Exception\UnexpectedTypeException

src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Symfony\Component\Form\Test\FormPerformanceTestCase;
1515
use Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity;
1616
use Doctrine\ORM\Tools\SchemaTool;
17-
use Symfony\Bridge\Doctrine\Tests\DoctrineOrmTestCase;
17+
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
1818
use Symfony\Component\Form\Extension\Core\CoreExtension;
1919
use Symfony\Bridge\Doctrine\Form\DoctrineOrmExtension;
2020

@@ -66,7 +66,7 @@ protected function setUp()
6666
$this->markTestSkipped('Doctrine ORM is not available.');
6767
}
6868

69-
$this->em = DoctrineOrmTestCase::createTestEntityManager();
69+
$this->em = DoctrineTestHelper::createTestEntityManager();
7070

7171
parent::setUp();
7272

src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionDivLayoutTest.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,6 @@ class FormExtensionDivLayoutTest extends AbstractDivLayoutTest
3030

3131
protected function setUp()
3232
{
33-
if (!class_exists('Symfony\Component\Locale\Locale')) {
34-
$this->markTestSkipped('The "Locale" component is not available');
35-
}
36-
37-
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
38-
$this->markTestSkipped('The "EventDispatcher" component is not available');
39-
}
40-
41-
if (!class_exists('Symfony\Component\Form\Form')) {
42-
$this->markTestSkipped('The "Form" component is not available');
43-
}
44-
45-
if (!class_exists('Twig_Environment')) {
46-
$this->markTestSkipped('Twig is not available.');
47-
}
48-
4933
parent::setUp();
5034

5135
$rendererEngine = new TwigRendererEngine(array(

src/Symfony/Bridge/Twig/Tests/Extension/FormExtensionTableLayoutTest.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,6 @@ class FormExtensionTableLayoutTest extends AbstractTableLayoutTest
2929

3030
protected function setUp()
3131
{
32-
if (!class_exists('Symfony\Component\Locale\Locale')) {
33-
$this->markTestSkipped('The "Locale" component is not available');
34-
}
35-
36-
if (!class_exists('Symfony\Component\EventDispatcher\EventDispatcher')) {
37-
$this->markTestSkipped('The "EventDispatcher" component is not available');
38-
}
39-
40-
if (!class_exists('Symfony\Component\Form\Form')) {
41-
$this->markTestSkipped('The "Form" component is not available');
42-
}
43-
44-
if (!class_exists('Twig_Environment')) {
45-
$this->markTestSkipped('Twig is not available.');
46-
}
47-
4832
parent::setUp();
4933

5034
$rendererEngine = new TwigRendererEngine(array(

src/Symfony/Bridge/Twig/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"symfony/finder": "~2.3",
2424
"symfony/form": "~2.3.5",
2525
"symfony/http-kernel": "~2.3",
26-
"symfony/locale": "~2.0,>=2.0.5",
26+
"symfony/intl": "~2.3",
2727
"symfony/routing": "~2.2",
2828
"symfony/templating": "~2.1",
2929
"symfony/translation": "~2.2",

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/app/AppKernel.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@ public function registerBundles()
7474
return include $filename;
7575
}
7676

77-
public function init()
78-
{
79-
}
80-
8177
public function getRootDir()
8278
{
8379
return __DIR__;

src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperDivLayoutTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ protected function renderForm(FormView $view, array $vars = array())
7777

7878
protected function renderEnctype(FormView $view)
7979
{
80-
return (string) $this->engine->get('form')->enctype($view);
80+
if (!method_exists($form = $this->engine->get('form'), 'enctype')) {
81+
$this->markTestSkipped(sprintf("Deprecated method %s->enctype() is not implemented.", get_class($form)));
82+
}
83+
84+
return (string) $form->enctype($view);
8185
}
8286

8387
protected function renderLabel(FormView $view, $label = null, array $vars = array())

src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/FormHelperTableLayoutTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ protected function renderForm(FormView $view, array $vars = array())
7878

7979
protected function renderEnctype(FormView $view)
8080
{
81-
return (string) $this->engine->get('form')->enctype($view);
81+
if (!method_exists($form = $this->engine->get('form'), 'enctype')) {
82+
$this->markTestSkipped(sprintf("Deprecated method %s->enctype() is not implemented.", get_class($form)));
83+
}
84+
85+
return (string) $form->enctype($view);
8286
}
8387

8488
protected function renderLabel(FormView $view, $label = null, array $vars = array())

src/Symfony/Bundle/FrameworkBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"symfony/css-selector": "~2.0,>=2.0.5",
3636
"symfony/dom-crawler": "~2.0,>=2.0.5",
3737
"symfony/finder": "~2.0,>=2.0.5",
38-
"symfony/locale": "~2.0,>=2.0.5",
38+
"symfony/intl": "~2.3",
3939
"symfony/security": "~2.3",
4040
"symfony/form": "~2.3.0,>=2.3.5",
4141
"symfony/class-loader": "~2.1",

0 commit comments

Comments
 (0)