diff --git a/src/Symfony/Bridge/Doctrine/ManagerRegistry.php b/src/Symfony/Bridge/Doctrine/ManagerRegistry.php index 6efcefb63736c..ff2c598b0577a 100644 --- a/src/Symfony/Bridge/Doctrine/ManagerRegistry.php +++ b/src/Symfony/Bridge/Doctrine/ManagerRegistry.php @@ -12,7 +12,7 @@ namespace Symfony\Bridge\Doctrine; use Symfony\Component\DependencyInjection\ContainerAwareInterface; -use Symfony\Component\DependencyInjection\ContainerInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Doctrine\Common\Persistence\AbstractManagerRegistry; /** @@ -22,10 +22,7 @@ */ abstract class ManagerRegistry extends AbstractManagerRegistry implements ContainerAwareInterface { - /** - * @var ContainerInterface - */ - protected $container; + use ContainerAwareTrait; /** * {@inheritdoc} @@ -42,12 +39,4 @@ protected function resetService($name) { $this->container->set($name, null); } - - /** - * {@inheritdoc} - */ - public function setContainer(ContainerInterface $container = null) - { - $this->container = $container; - } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php b/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php index d2a1685270f2c..01bf726ceec5a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php @@ -11,11 +11,12 @@ namespace Symfony\Bundle\FrameworkBundle\Controller; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\StreamedResponse; -use Symfony\Component\DependencyInjection\ContainerAware; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\Security\Core\Exception\AccessDeniedException; @@ -35,8 +36,10 @@ * * @author Fabien Potencier */ -abstract class Controller extends ContainerAware +abstract class Controller implements ContainerAwareInterface { + use ContainerAwareTrait; + /** * Generates a URL from the given parameters. * diff --git a/src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php b/src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php index b8f4e6415a540..a1f1b0486bba8 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php @@ -11,7 +11,8 @@ namespace Symfony\Bundle\FrameworkBundle\Controller; -use Symfony\Component\DependencyInjection\ContainerAware; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; @@ -23,8 +24,10 @@ * * @author Fabien Potencier */ -class RedirectController extends ContainerAware +class RedirectController implements ContainerAwareInterface { + use ContainerAwareTrait; + /** * Redirects to another route with the given name. * diff --git a/src/Symfony/Bundle/FrameworkBundle/Controller/TemplateController.php b/src/Symfony/Bundle/FrameworkBundle/Controller/TemplateController.php index 16d15f902340c..d222bc7ea37a2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/TemplateController.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/TemplateController.php @@ -11,7 +11,8 @@ namespace Symfony\Bundle\FrameworkBundle\Controller; -use Symfony\Component\DependencyInjection\ContainerAware; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Symfony\Component\HttpFoundation\Response; /** @@ -19,8 +20,10 @@ * * @author Fabien Potencier */ -class TemplateController extends ContainerAware +class TemplateController implements ContainerAwareInterface { + use ContainerAwareTrait; + /** * Renders a template. * diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/FragmentController.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/FragmentController.php index 783014ee9e1a0..88bd102a5f4ce 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/FragmentController.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/FragmentController.php @@ -11,12 +11,15 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\DependencyInjection\ContainerAware; -class FragmentController extends ContainerAware +class FragmentController implements ContainerAwareInterface { + use ContainerAwareTrait; + public function indexAction(Request $request) { return $this->container->get('templating')->renderResponse('fragment.html.php', array('bar' => new Bar())); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/ProfilerController.php index 0452e255eafe4..dd518a12a8d54 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/ProfilerController.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/ProfilerController.php @@ -11,11 +11,14 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\DependencyInjection\ContainerAware; -class ProfilerController extends ContainerAware +class ProfilerController implements ContainerAwareInterface { + use ContainerAwareTrait; + public function indexAction() { return new Response('Hello'); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SessionController.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SessionController.php index bf22e63370139..76146376d009f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SessionController.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SessionController.php @@ -11,13 +11,16 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\RedirectResponse; -use Symfony\Component\DependencyInjection\ContainerAware; -class SessionController extends ContainerAware +class SessionController implements ContainerAwareInterface { + use ContainerAwareTrait; + public function welcomeAction(Request $request, $name = null) { $session = $request->getSession(); diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SubRequestController.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SubRequestController.php index e1bd050ce0afe..5df6e29590a5b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SubRequestController.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Functional/Bundle/TestBundle/Controller/SubRequestController.php @@ -11,13 +11,16 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\TestBundle\Controller; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\DependencyInjection\ContainerAware; use Symfony\Component\HttpKernel\Controller\ControllerReference; -class SubRequestController extends ContainerAware +class SubRequestController implements ContainerAwareInterface { + use ContainerAwareTrait; + public function indexAction() { $handler = $this->container->get('fragment.handler'); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller/LoginController.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller/LoginController.php index dd7c19e9c7f15..c232b4cfd9029 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller/LoginController.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/CsrfFormLoginBundle/Controller/LoginController.php @@ -11,12 +11,15 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBundle\Controller; -use Symfony\Component\DependencyInjection\ContainerAware; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Core\Exception\AccessDeniedException; -class LoginController extends ContainerAware +class LoginController implements ContainerAwareInterface { + use ContainerAwareTrait; + public function loginAction() { $form = $this->container->get('form.factory')->create('Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBundle\Form\UserLoginType'); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php index b9004d26a3e69..7a6faf4cc99d2 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php @@ -11,13 +11,16 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FormLoginBundle\Controller; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Symfony\Component\Security\Core\Security; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\DependencyInjection\ContainerAware; -class LocalizedController extends ContainerAware +class LocalizedController implements ContainerAwareInterface { + use ContainerAwareTrait; + public function loginAction(Request $request) { // get the login error if there is one diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php index 3d0794a9e112d..ad003158f5179 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php @@ -11,14 +11,17 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\FormLoginBundle\Controller; +use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Symfony\Component\Security\Core\Exception\AccessDeniedException; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Security\Core\Security; -use Symfony\Component\DependencyInjection\ContainerAware; -class LoginController extends ContainerAware +class LoginController implements ContainerAwareInterface { + use ContainerAwareTrait; + public function loginAction(Request $request) { // get the login error if there is one diff --git a/src/Symfony/Bundle/TwigBundle/Command/DebugCommand.php b/src/Symfony/Bundle/TwigBundle/Command/DebugCommand.php index f1a3696da829a..e2f25cc22ed19 100644 --- a/src/Symfony/Bundle/TwigBundle/Command/DebugCommand.php +++ b/src/Symfony/Bundle/TwigBundle/Command/DebugCommand.php @@ -12,28 +12,17 @@ namespace Symfony\Bundle\TwigBundle\Command; use Symfony\Bridge\Twig\Command\DebugCommand as BaseDebugCommand; -use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; /** * Lists twig functions, filters, globals and tests present in the current project. * * @author Jordi Boggiano */ -class DebugCommand extends BaseDebugCommand implements ContainerAwareInterface +final class DebugCommand extends BaseDebugCommand implements ContainerAwareInterface { - /** - * @var ContainerInterface|null - */ - private $container; - - /** - * {@inheritdoc} - */ - public function setContainer(ContainerInterface $container = null) - { - $this->container = $container; - } + use ContainerAwareTrait; /** * {@inheritdoc} diff --git a/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php b/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php index 60afc27ea59d2..36e4f059ff812 100644 --- a/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php +++ b/src/Symfony/Bundle/TwigBundle/Command/LintCommand.php @@ -12,8 +12,8 @@ namespace Symfony\Bundle\TwigBundle\Command; use Symfony\Bridge\Twig\Command\LintCommand as BaseLintCommand; -use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerAwareInterface; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Symfony\Component\Finder\Finder; /** @@ -22,20 +22,9 @@ * @author Marc Weistroff * @author Jérôme Tamarelle */ -class LintCommand extends BaseLintCommand implements ContainerAwareInterface +final class LintCommand extends BaseLintCommand implements ContainerAwareInterface { - /** - * @var ContainerInterface|null - */ - private $container; - - /** - * {@inheritdoc} - */ - public function setContainer(ContainerInterface $container = null) - { - $this->container = $container; - } + use ContainerAwareTrait; /** * {@inheritdoc} diff --git a/src/Symfony/Component/DependencyInjection/ContainerAware.php b/src/Symfony/Component/DependencyInjection/ContainerAware.php deleted file mode 100644 index d85fab1843db1..0000000000000 --- a/src/Symfony/Component/DependencyInjection/ContainerAware.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\DependencyInjection; - -/** - * A simple implementation of ContainerAwareInterface. - * - * @author Fabien Potencier - * - * @deprecated since version 2.8, to be removed in 3.0. Use the ContainerAwareTrait instead. - */ -abstract class ContainerAware implements ContainerAwareInterface -{ - /** - * @var ContainerInterface - */ - protected $container; - - /** - * Sets the Container associated with this Controller. - * - * @param ContainerInterface $container A ContainerInterface instance - */ - public function setContainer(ContainerInterface $container = null) - { - $this->container = $container; - } -} diff --git a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php index b1abca5237303..ba791d20428fe 100644 --- a/src/Symfony/Component/HttpKernel/Bundle/Bundle.php +++ b/src/Symfony/Component/HttpKernel/Bundle/Bundle.php @@ -11,7 +11,7 @@ namespace Symfony\Component\HttpKernel\Bundle; -use Symfony\Component\DependencyInjection\ContainerAware; +use Symfony\Component\DependencyInjection\ContainerAwareTrait; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Container; use Symfony\Component\Console\Application; @@ -24,8 +24,10 @@ * * @author Fabien Potencier */ -abstract class Bundle extends ContainerAware implements BundleInterface +abstract class Bundle implements BundleInterface { + use ContainerAwareTrait; + protected $name; protected $extension; protected $path; diff --git a/src/Symfony/Component/VarDumper/Test/VarDumperTestCase.php b/src/Symfony/Component/VarDumper/Test/VarDumperTestCase.php deleted file mode 100644 index e04805d436418..0000000000000 --- a/src/Symfony/Component/VarDumper/Test/VarDumperTestCase.php +++ /dev/null @@ -1,46 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Test; - -use Symfony\Component\VarDumper\Cloner\VarCloner; -use Symfony\Component\VarDumper\Dumper\CliDumper; - -/** - * @author Nicolas Grekas - * - * @deprecated since version 2.8, to be removed in 3.0. Use the VarDumperTestTrait instead. - */ -abstract class VarDumperTestCase extends \PHPUnit_Framework_TestCase -{ - public function assertDumpEquals($dump, $data, $message = '') - { - $this->assertSame(rtrim($dump), $this->getDump($data), $message); - } - - public function assertDumpMatchesFormat($dump, $data, $message = '') - { - $this->assertStringMatchesFormat(rtrim($dump), $this->getDump($data), $message); - } - - protected function getDump($data) - { - $h = fopen('php://memory', 'r+b'); - $cloner = new VarCloner(); - $dumper = new CliDumper($h); - $dumper->setColors(false); - $dumper->dump($cloner->cloneVar($data)->withRefHandles(false)); - $data = stream_get_contents($h, -1, 0); - fclose($h); - - return rtrim($data); - } -} diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php index 2c42a906600dc..43d389ce1c009 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/CasterTest.php @@ -12,13 +12,15 @@ namespace Symfony\Component\VarDumper\Tests\Caster; use Symfony\Component\VarDumper\Caster\Caster; -use Symfony\Component\VarDumper\Test\VarDumperTestCase; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; /** * @author Nicolas Grekas */ -class CasterTest extends VarDumperTestCase +class CasterTest extends \PHPUnit_Framework_TestCase { + use VarDumperTestTrait; + private $referenceArray = array( 'null' => null, 'empty' => false, diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php index dcbbb17898837..6525eaef2e885 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php @@ -11,14 +11,16 @@ namespace Symfony\Component\VarDumper\Tests\Caster; -use Symfony\Component\VarDumper\Test\VarDumperTestCase; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; use Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo; /** * @author Nicolas Grekas */ -class ReflectionCasterTest extends VarDumperTestCase +class ReflectionCasterTest extends \PHPUnit_Framework_TestCase { + use VarDumperTestTrait; + public function testReflectionCaster() { $var = new \ReflectionClass('ReflectionClass'); @@ -73,7 +75,7 @@ public function testClosureCaster() \$b: & 123 } file: "%sReflectionCasterTest.php" - line: "63 to 63" + line: "65 to 65" } EOTXT , $var @@ -93,7 +95,7 @@ public function testReturnType() returnType: "int" class: "Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest" this: Symfony\Component\VarDumper\Tests\Caster\ReflectionCasterTest { …} - file: "%sReflectionCasterTest.php(88) : eval()'d code" + file: "%sReflectionCasterTest.php(90) : eval()'d code" line: "1 to 1" } EOTXT diff --git a/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php b/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php index e2a8c48fb6376..5d71e8d379dcf 100644 --- a/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php +++ b/src/Symfony/Component/VarDumper/Tests/Caster/SplCasterTest.php @@ -11,13 +11,15 @@ namespace Symfony\Component\VarDumper\Tests\Caster; -use Symfony\Component\VarDumper\Test\VarDumperTestCase; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; /** * @author Grégoire Pineau */ -class SplCasterTest extends VarDumperTestCase +class SplCasterTest extends \PHPUnit_Framework_TestCase { + use VarDumperTestTrait; + public function getCastFileInfoTests() { return array( diff --git a/src/Symfony/Component/VarDumper/Tests/CliDumperTest.php b/src/Symfony/Component/VarDumper/Tests/CliDumperTest.php index 5e70aea09fbe3..cd6d64d1c0368 100644 --- a/src/Symfony/Component/VarDumper/Tests/CliDumperTest.php +++ b/src/Symfony/Component/VarDumper/Tests/CliDumperTest.php @@ -13,13 +13,15 @@ use Symfony\Component\VarDumper\Cloner\VarCloner; use Symfony\Component\VarDumper\Dumper\CliDumper; -use Symfony\Component\VarDumper\Test\VarDumperTestCase; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; /** * @author Nicolas Grekas */ -class CliDumperTest extends VarDumperTestCase +class CliDumperTest extends \PHPUnit_Framework_TestCase { + use VarDumperTestTrait; + public function testGet() { require __DIR__.'/Fixtures/dumb-var.php'; diff --git a/src/Symfony/Component/VarDumper/Tests/Test/VarDumpTestTraitTest.php b/src/Symfony/Component/VarDumper/Tests/Test/VarDumpTestTraitTest.php deleted file mode 100644 index 21ef14d9ff4bc..0000000000000 --- a/src/Symfony/Component/VarDumper/Tests/Test/VarDumpTestTraitTest.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -// Skipping trait tests for PHP < 5.4 -if (version_compare(PHP_VERSION, '5.4.0-dev', '>=')) { - require 'VarDumpTestTraitRequire54.php'; -} - diff --git a/src/Symfony/Component/VarDumper/Tests/Test/VarDumpTestTraitRequire54.php b/src/Symfony/Component/VarDumper/Tests/Test/VarDumperTestTraitTest.php similarity index 88% rename from src/Symfony/Component/VarDumper/Tests/Test/VarDumpTestTraitRequire54.php rename to src/Symfony/Component/VarDumper/Tests/Test/VarDumperTestTraitTest.php index 240cc926aaccc..3295797179c48 100644 --- a/src/Symfony/Component/VarDumper/Tests/Test/VarDumpTestTraitRequire54.php +++ b/src/Symfony/Component/VarDumper/Tests/Test/VarDumperTestTraitTest.php @@ -11,10 +11,9 @@ namespace Symfony\Component\VarDumper\Tests\Test; -use Symfony\Component\VarDumper\Test\VarDumperTestCase; use Symfony\Component\VarDumper\Test\VarDumperTestTrait; -class VarDumperTestTraitTest extends VarDumperTestCase +class VarDumperTestTraitTest extends \PHPUnit_Framework_TestCase { use VarDumperTestTrait;