diff --git a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php
index fd2a1356a5..42d88b030d 100644
--- a/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php
+++ b/src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php
@@ -12,7 +12,7 @@
namespace Symfony\Bridge\PhpUnit;
/**
- * Catch deprecation notices and print a summary report at the end of the test suite
+ * Catch deprecation notices and print a summary report at the end of the test suite.
*
* @author Nicolas Grekas
*/
@@ -26,9 +26,11 @@ class DeprecationErrorHandler
return;
}
$deprecations = array(
+ 'unsilencedCount' => 0,
'remainingCount' => 0,
'legacyCount' => 0,
'otherCount' => 0,
+ 'unsilenced' => array(),
'remaining' => array(),
'legacy' => array(),
'other' => array(),
@@ -45,21 +47,25 @@ class DeprecationErrorHandler
// No-op
}
- if (isset($trace[$i]['object']) || isset($trace[$i]['class'])) {
+ if (0 !== error_reporting()) {
+ $group = 'unsilenced';
+ $ref = &$deprecations[$group][$msg]['count'];
+ ++$ref;
+ } elseif (isset($trace[$i]['object']) || isset($trace[$i]['class'])) {
$class = isset($trace[$i]['object']) ? get_class($trace[$i]['object']) : $trace[$i]['class'];
$method = $trace[$i]['function'];
$group = 0 === strpos($method, 'testLegacy') || 0 === strpos($method, 'provideLegacy') || 0 === strpos($method, 'getLegacy') || strpos($class, '\Legacy') || in_array('legacy', \PHPUnit_Util_Test::getGroups($class, $method), true) ? 'legacy' : 'remaining';
if ('legacy' !== $group && 'weak' !== $mode) {
- $ref =& $deprecations[$group][$msg]['count'];
+ $ref = &$deprecations[$group][$msg]['count'];
++$ref;
- $ref =& $deprecations[$group][$msg][$class.'::'.$method];
+ $ref = &$deprecations[$group][$msg][$class.'::'.$method];
++$ref;
}
} else {
$group = 'other';
- $ref =& $deprecations[$group][$msg]['count'];
+ $ref = &$deprecations[$group][$msg]['count'];
++$ref;
}
++$deprecations[$group.'Count'];
@@ -95,7 +101,7 @@ class DeprecationErrorHandler
return $b['count'] - $a['count'];
};
- foreach (array('remaining', 'legacy', 'other') as $group) {
+ foreach (array('unsilenced', 'remaining', 'legacy', 'other') as $group) {
if ($deprecations[$group.'Count']) {
echo "\n", $colorize(sprintf('%s deprecation notices (%d)', ucfirst($group), $deprecations[$group.'Count']), 'legacy' !== $group), "\n";
@@ -117,7 +123,7 @@ class DeprecationErrorHandler
if (!empty($notices)) {
echo "\n";
}
- if ('weak' !== $mode && ($deprecations['remaining'] || $deprecations['other'])) {
+ if ('weak' !== $mode && ($deprecations['unsilenced'] || $deprecations['remaining'] || $deprecations['other'])) {
exit(1);
}
});
diff --git a/src/Symfony/Bridge/PhpUnit/README.md b/src/Symfony/Bridge/PhpUnit/README.md
index 7d84a3138d..734df8baa0 100644
--- a/src/Symfony/Bridge/PhpUnit/README.md
+++ b/src/Symfony/Bridge/PhpUnit/README.md
@@ -9,7 +9,8 @@ It comes with the following features:
* auto-register `class_exists` to load Doctrine annotations;
* print a user deprecation notices summary at the end of the test suite.
-By default any non-legacy-tagged deprecation notice will make tests fail.
+By default any non-legacy-tagged or any non-@-silenced deprecation notices will
+make tests fail.
This can be changed by setting the SYMFONY_DEPRECATIONS_HELPER environment
variable to `weak`. This will make the bridge ignore deprecation notices and
is useful to projects that must use deprecated interfaces for backward
@@ -17,6 +18,8 @@ compatibility reasons.
A summary of deprecation notices is displayed at the end of the test suite:
+ * **Unsilenced** reports deprecation notices that were triggered without the
+ recommended @-silencing operator;
* **Legacy** deprecation notices denote tests that explicitly test some legacy
interfaces. There are four ways to mark a test as legacy:
- make its class start with the `Legacy` prefix;
@@ -35,6 +38,12 @@ Add this bridge to the `require-dev` section of your composer.json file
When running `phpunit`, you will see a summary of deprecation notices at the end
of the test suite.
+Deprecation notices in the **Unsilenced** section should just be @-silenced:
+`@trigger_error('...', E_USER_DEPRECATED);`. Without the @-silencing operator,
+users would need to opt-out from deprecation notices. Silencing by default swaps
+this behavior and allows users to opt-in when they are ready to cope with them
+(by adding a custom error handler like the one provided by this bridge.)
+
Deprecation notices in the **Remaining/Other** section need some thought.
You have to decide either to:
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php
index c21268c4ab..cf0d909f09 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Console/Descriptor/AbstractDescriptorTest.php
@@ -72,15 +72,11 @@ abstract class AbstractDescriptorTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyDescribeSynchronizedServiceDefinition(Definition $definition, $expectedDescription)
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$this->assertDescription($expectedDescription, $definition);
}
public function provideLegacySynchronizedServiceDefinitionTestData()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
return $this->getDescriptionTestData(ObjectsProvider::getLegacyContainerDefinitions());
}
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LegacyFragmentRendererPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LegacyFragmentRendererPassTest.php
index a801b91f43..97c98d5d8f 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LegacyFragmentRendererPassTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LegacyFragmentRendererPassTest.php
@@ -20,11 +20,6 @@ use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\FragmentRenderer
*/
class LegacyFragmentRendererPassTest extends \PHPUnit_Framework_TestCase
{
- protected function setUp()
- {
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
- }
-
/**
* Tests that content rendering not implementing FragmentRendererInterface
* trigger an exception.
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LegacyTemplatingAssetHelperPassTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LegacyTemplatingAssetHelperPassTest.php
index f183c849ca..5cc5c9c558 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LegacyTemplatingAssetHelperPassTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Compiler/LegacyTemplatingAssetHelperPassTest.php
@@ -21,11 +21,6 @@ use Symfony\Component\DependencyInjection\Reference;
*/
class LegacyTemplatingAssetHelperPassTest extends \PHPUnit_Framework_TestCase
{
- protected function setUp()
- {
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
- }
-
public function getScopesTests()
{
return array(
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
index 617be624fd..47482433a9 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
@@ -93,8 +93,6 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyInvalidValueAssets()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$processor = new Processor();
$configuration = new Configuration(true);
$processor->processConfiguration($configuration, array(
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
index 918c676afe..57b6e651b0 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php
@@ -208,8 +208,6 @@ abstract class FrameworkExtensionTest extends TestCase
*/
public function testLegacyTemplatingAssets()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$this->checkAssetsPackages($this->createContainerFromFile('legacy_templating_assets'), true);
}
@@ -296,8 +294,6 @@ abstract class FrameworkExtensionTest extends TestCase
*/
public function testLegacyFullyConfiguredValidationService()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
if (!extension_loaded('apc')) {
$this->markTestSkipped('The apc extension is not available.');
}
@@ -399,8 +395,6 @@ abstract class FrameworkExtensionTest extends TestCase
*/
public function testLegacyFormCsrfFieldNameCanBeSetUnderCsrfSettings()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$container = $this->createContainerFromFile('form_csrf_sets_field_name');
$this->assertTrue($container->getParameter('form.type_extension.csrf.enabled'));
@@ -412,8 +406,6 @@ abstract class FrameworkExtensionTest extends TestCase
*/
public function testLegacyFormCsrfFieldNameUnderFormSettingsTakesPrecedence()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$container = $this->createContainerFromFile('form_csrf_under_form_sets_field_name');
$this->assertTrue($container->getParameter('form.type_extension.csrf.enabled'));
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fragment/LegacyContainerAwareHIncludeFragmentRendererTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Fragment/LegacyContainerAwareHIncludeFragmentRendererTest.php
index e6fa0c4cee..2fe31ec0b9 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fragment/LegacyContainerAwareHIncludeFragmentRendererTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fragment/LegacyContainerAwareHIncludeFragmentRendererTest.php
@@ -22,8 +22,6 @@ class LegacyContainerAwareHIncludeFragmentRendererTest extends TestCase
{
public function testRender()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
$container->expects($this->once())
->method('get')
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php
index 89882951d7..48a7737dd8 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/GlobalVariablesTest.php
@@ -31,8 +31,6 @@ class GlobalVariablesTest extends TestCase
*/
public function testLegacyGetSecurity()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$securityContext = $this->getMock('Symfony\Component\Security\Core\SecurityContextInterface');
$this->assertNull($this->globals->getSecurity());
diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/AssetsHelperTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/AssetsHelperTest.php
index c0a2e9c2b8..71528de92e 100644
--- a/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/AssetsHelperTest.php
+++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/AssetsHelperTest.php
@@ -23,8 +23,6 @@ class AssetsHelperTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyGetUrl()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$package = new Package(new StaticVersionStrategy('22', '%s?version=%s'));
$packages = new Packages($package);
$helper = new AssetsHelper($packages);
@@ -37,8 +35,6 @@ class AssetsHelperTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyGetVersion()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$package = new Package(new StaticVersionStrategy('22'));
$imagePackage = new Package(new StaticVersionStrategy('42'));
$packages = new Packages($package, array('images' => $imagePackage));
diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php
index a588230455..72a41bc122 100644
--- a/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php
+++ b/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php
@@ -45,8 +45,6 @@ class SecurityDataCollectorTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyCollectWhenAuthenticationTokenIsNull()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$tokenStorage = $this->getMock('Symfony\Component\Security\Core\SecurityContextInterface');
$collector = new SecurityDataCollector($tokenStorage, $this->getRoleHierarchy());
$collector->collect($this->getRequest(), $this->getResponse());
diff --git a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php
index 7b0b89e926..14c2130a62 100644
--- a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php
+++ b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php
@@ -29,8 +29,6 @@ class TwigExtensionTest extends TestCase
*/
public function testLegacyFormResourcesConfigurationKey($format)
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$container = $this->createContainer();
$container->registerExtension(new TwigExtension());
$this->loadFromFile($container, 'legacy-form-resources-only', $format);
@@ -49,8 +47,6 @@ class TwigExtensionTest extends TestCase
*/
public function testLegacyMergeFormResourcesConfigurationKeyWithFormThemesConfigurationKey($format)
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$container = $this->createContainer();
$container->registerExtension(new TwigExtension());
$this->loadFromFile($container, 'legacy-merge-form-resources-with-form-themes', $format);
diff --git a/src/Symfony/Bundle/TwigBundle/Tests/Extension/LegacyAssetsExtensionTest.php b/src/Symfony/Bundle/TwigBundle/Tests/Extension/LegacyAssetsExtensionTest.php
index 54fd995e8f..b7b5ba4382 100644
--- a/src/Symfony/Bundle/TwigBundle/Tests/Extension/LegacyAssetsExtensionTest.php
+++ b/src/Symfony/Bundle/TwigBundle/Tests/Extension/LegacyAssetsExtensionTest.php
@@ -13,18 +13,12 @@ namespace Symfony\Bundle\TwigBundle\Tests\Extension;
use Symfony\Bundle\TwigBundle\Extension\AssetsExtension;
use Symfony\Bundle\TwigBundle\Tests\TestCase;
-use Symfony\Component\Routing\RequestContext;
/**
* @group legacy
*/
class LegacyAssetsExtensionTest extends TestCase
{
- protected function setUp()
- {
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
- }
-
/**
* @dataProvider provideGetAssetUrlArguments
*/
diff --git a/src/Symfony/Bundle/TwigBundle/Tests/TokenParser/LegacyRenderTokenParserTest.php b/src/Symfony/Bundle/TwigBundle/Tests/TokenParser/LegacyRenderTokenParserTest.php
index 57e361b5db..e67dd1cc07 100644
--- a/src/Symfony/Bundle/TwigBundle/Tests/TokenParser/LegacyRenderTokenParserTest.php
+++ b/src/Symfony/Bundle/TwigBundle/Tests/TokenParser/LegacyRenderTokenParserTest.php
@@ -20,11 +20,6 @@ use Symfony\Bundle\TwigBundle\Node\RenderNode;
*/
class LegacyRenderTokenParserTest extends TestCase
{
- protected function setUp()
- {
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
- }
-
/**
* @dataProvider getTestsForRender
*/
diff --git a/src/Symfony/Component/ClassLoader/Tests/LegacyApcUniversalClassLoaderTest.php b/src/Symfony/Component/ClassLoader/Tests/LegacyApcUniversalClassLoaderTest.php
index 48b46fa3ec..0268a1c456 100644
--- a/src/Symfony/Component/ClassLoader/Tests/LegacyApcUniversalClassLoaderTest.php
+++ b/src/Symfony/Component/ClassLoader/Tests/LegacyApcUniversalClassLoaderTest.php
@@ -20,8 +20,6 @@ class LegacyApcUniversalClassLoaderTest extends \PHPUnit_Framework_TestCase
{
protected function setUp()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
if (!extension_loaded('apc')) {
$this->markTestSkipped('The apc extension is not available.');
}
diff --git a/src/Symfony/Component/ClassLoader/Tests/LegacyUniversalClassLoaderTest.php b/src/Symfony/Component/ClassLoader/Tests/LegacyUniversalClassLoaderTest.php
index 9149e2e863..2588e96034 100644
--- a/src/Symfony/Component/ClassLoader/Tests/LegacyUniversalClassLoaderTest.php
+++ b/src/Symfony/Component/ClassLoader/Tests/LegacyUniversalClassLoaderTest.php
@@ -18,11 +18,6 @@ use Symfony\Component\ClassLoader\UniversalClassLoader;
*/
class LegacyUniversalClassLoaderTest extends \PHPUnit_Framework_TestCase
{
- protected function setUp()
- {
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
- }
-
/**
* @dataProvider getLoadClassTests
*/
diff --git a/src/Symfony/Component/Console/Tests/ApplicationTest.php b/src/Symfony/Component/Console/Tests/ApplicationTest.php
index 1fa6c64af6..dfee2321d5 100644
--- a/src/Symfony/Component/Console/Tests/ApplicationTest.php
+++ b/src/Symfony/Component/Console/Tests/ApplicationTest.php
@@ -495,8 +495,6 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyAsText()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$application = new Application();
$application->add(new \FooCommand());
$this->ensureStaticCommandHelp($application);
@@ -509,8 +507,6 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyAsXml()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$application = new Application();
$application->add(new \FooCommand());
$this->ensureStaticCommandHelp($application);
@@ -679,7 +675,7 @@ class ApplicationTest extends \PHPUnit_Framework_TestCase
}
/**
- * Issue #9285
+ * Issue #9285.
*
* If the "verbose" option is just before an argument in ArgvInput,
* an argument value should not be treated as verbosity value.
diff --git a/src/Symfony/Component/Console/Tests/Command/CommandTest.php b/src/Symfony/Component/Console/Tests/Command/CommandTest.php
index 1f1160efb6..7702ac8341 100644
--- a/src/Symfony/Component/Console/Tests/Command/CommandTest.php
+++ b/src/Symfony/Component/Console/Tests/Command/CommandTest.php
@@ -314,8 +314,6 @@ class CommandTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyAsText()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$command = new \TestCommand();
$command->setApplication(new Application());
$tester = new CommandTester($command);
@@ -328,8 +326,6 @@ class CommandTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyAsXml()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$command = new \TestCommand();
$command->setApplication(new Application());
$tester = new CommandTester($command);
diff --git a/src/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php
index cf07793c3d..e130cdc6bc 100644
--- a/src/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/LegacyDialogHelperTest.php
@@ -22,11 +22,6 @@ use Symfony\Component\Console\Output\StreamOutput;
*/
class LegacyDialogHelperTest extends \PHPUnit_Framework_TestCase
{
- protected function setUp()
- {
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
- }
-
public function testSelect()
{
$dialog = new DialogHelper();
diff --git a/src/Symfony/Component/Console/Tests/Helper/LegacyProgressHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/LegacyProgressHelperTest.php
index e93057a164..7b9cf29f0d 100644
--- a/src/Symfony/Component/Console/Tests/Helper/LegacyProgressHelperTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/LegacyProgressHelperTest.php
@@ -19,11 +19,6 @@ use Symfony\Component\Console\Output\StreamOutput;
*/
class LegacyProgressHelperTest extends \PHPUnit_Framework_TestCase
{
- protected function setUp()
- {
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
- }
-
public function testAdvance()
{
$progress = new ProgressHelper();
diff --git a/src/Symfony/Component/Console/Tests/Helper/LegacyTableHelperTest.php b/src/Symfony/Component/Console/Tests/Helper/LegacyTableHelperTest.php
index b7e31596f7..3b324237e2 100644
--- a/src/Symfony/Component/Console/Tests/Helper/LegacyTableHelperTest.php
+++ b/src/Symfony/Component/Console/Tests/Helper/LegacyTableHelperTest.php
@@ -23,7 +23,6 @@ class LegacyTableHelperTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
$this->stream = fopen('php://memory', 'r+');
}
diff --git a/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php b/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php
index 74d755f54e..7e0a24258f 100644
--- a/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php
+++ b/src/Symfony/Component/Console/Tests/Input/InputDefinitionTest.php
@@ -376,7 +376,7 @@ class InputDefinitionTest extends \PHPUnit_Framework_TestCase
array(new InputDefinition(array(new InputOption('foo'), new InputArgument('foo', InputArgument::REQUIRED))), '[--foo] [--] ', 'puts [--] between options and arguments'),
);
}
-
+
public function testGetShortSynopsis()
{
$definition = new InputDefinition(array(new InputOption('foo'), new InputOption('bar'), new InputArgument('cat')));
@@ -388,8 +388,6 @@ class InputDefinitionTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyAsText()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$definition = new InputDefinition(array(
new InputArgument('foo', InputArgument::OPTIONAL, 'The foo argument'),
new InputArgument('baz', InputArgument::OPTIONAL, 'The baz argument', true),
@@ -400,7 +398,7 @@ class InputDefinitionTest extends \PHPUnit_Framework_TestCase
new InputOption('qux', '', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The qux option', array('http://foo.com/', 'bar')),
new InputOption('qux2', '', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'The qux2 option', array('foo' => 'bar')),
));
-
+
$this->assertStringEqualsFile(self::$fixtures.'/definition_astext.txt', $definition->asText(), '->asText() returns a textual representation of the InputDefinition');
}
@@ -409,8 +407,6 @@ class InputDefinitionTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyAsXml()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$definition = new InputDefinition(array(
new InputArgument('foo', InputArgument::OPTIONAL, 'The foo argument'),
new InputArgument('baz', InputArgument::OPTIONAL, 'The baz argument', true),
diff --git a/src/Symfony/Component/Console/Tests/Input/StringInputTest.php b/src/Symfony/Component/Console/Tests/Input/StringInputTest.php
index 575d527cbe..ccf9289cf3 100644
--- a/src/Symfony/Component/Console/Tests/Input/StringInputTest.php
+++ b/src/Symfony/Component/Console/Tests/Input/StringInputTest.php
@@ -46,8 +46,6 @@ class StringInputTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyInputOptionDefinitionInConstructor()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$definition = new InputDefinition(
array(new InputOption('foo', null, InputOption::VALUE_REQUIRED))
);
diff --git a/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php b/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
index 22b856356e..852976e056 100644
--- a/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
+++ b/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
@@ -169,8 +169,6 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase
public function testHandleError()
{
- $this->iniSet('error_reporting', -1);
-
try {
$handler = ErrorHandler::register();
$handler->throwAt(0, true);
@@ -444,8 +442,6 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyInterface()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
try {
$handler = ErrorHandler::register(0);
$this->assertFalse($handler->handle(0, 'foo', 'foo.php', 12, array()));
diff --git a/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php b/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php
index 6ac3374d8e..92384b6b13 100644
--- a/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php
+++ b/src/Symfony/Component/Debug/Tests/FatalErrorHandler/ClassNotFoundFatalErrorHandlerTest.php
@@ -73,8 +73,6 @@ class ClassNotFoundFatalErrorHandlerTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyHandleClassNotFound()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$prefixes = array('Symfony\Component\Debug\Exception\\' => realpath(__DIR__.'/../../Exception'));
$symfonyUniversalClassLoader = new SymfonyUniversalClassLoader();
$symfonyUniversalClassLoader->registerPrefixes($prefixes);
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php
index 09ae3c413a..4e8efdc8b4 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckDefinitionValidityPassTest.php
@@ -56,8 +56,6 @@ class CheckDefinitionValidityPassTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyProcessDetectsBothFactorySyntaxesUsed()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$container = new ContainerBuilder();
$container->register('a')->setFactory(array('a', 'b'))->setFactoryClass('a');
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Compiler/LegacyResolveParameterPlaceHoldersPassTest.php b/src/Symfony/Component/DependencyInjection/Tests/Compiler/LegacyResolveParameterPlaceHoldersPassTest.php
index 148a30b6c2..e730a1a288 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Compiler/LegacyResolveParameterPlaceHoldersPassTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Compiler/LegacyResolveParameterPlaceHoldersPassTest.php
@@ -21,8 +21,6 @@ class LegacyResolveParameterPlaceHoldersPassTest extends \PHPUnit_Framework_Test
{
public function testFactoryClassParametersShouldBeResolved()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$compilerPass = new ResolveParameterPlaceHoldersPass();
$container = new ContainerBuilder();
diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php
index 1e3f103405..8155e0b7c6 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php
@@ -342,8 +342,6 @@ class ContainerBuilderTest extends \PHPUnit_Framework_TestCase
public function testLegacyCreateServiceFactory()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$builder = new ContainerBuilder();
$builder->register('bar', 'Bar\FooClass');
$builder
@@ -363,8 +361,6 @@ class ContainerBuilderTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyCreateServiceFactoryService()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$builder = new ContainerBuilder();
$builder->register('foo_service', 'Bar\FooClass');
$builder
@@ -735,8 +731,6 @@ class ContainerBuilderTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacySetOnSynchronizedService()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$container = new ContainerBuilder();
$container->register('baz', 'BazClass')
->setSynchronized(true)
@@ -757,8 +751,6 @@ class ContainerBuilderTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacySynchronizedServiceWithScopes()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$container = new ContainerBuilder();
$container->addScope(new Scope('foo'));
$container->register('baz', 'BazClass')
diff --git a/src/Symfony/Component/DependencyInjection/Tests/DefinitionDecoratorTest.php b/src/Symfony/Component/DependencyInjection/Tests/DefinitionDecoratorTest.php
index f9006540a5..732eead140 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/DefinitionDecoratorTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/DefinitionDecoratorTest.php
@@ -55,8 +55,6 @@ class DefinitionDecoratorTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacySetProperty($property, $changeKey)
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$def = new DefinitionDecorator('foo');
$getter = 'get'.ucfirst($property);
diff --git a/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php b/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php
index b6539f3b74..b501f11839 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/DefinitionTest.php
@@ -170,8 +170,6 @@ class DefinitionTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacySetIsSynchronized()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$def = new Definition('stdClass');
$this->assertFalse($def->isSynchronized(), '->isSynchronized() returns false by default');
$this->assertSame($def, $def->setSynchronized(true), '->setSynchronized() implements a fluent interface');
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php
index ba5e12cd50..5da11359fa 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/GraphvizDumperTest.php
@@ -28,8 +28,6 @@ class GraphvizDumperTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyDump()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$container = include self::$fixturesPath.'/containers/legacy-container9.php';
$dumper = new GraphvizDumper($container);
$this->assertEquals(str_replace('%path%', __DIR__, file_get_contents(self::$fixturesPath.'/graphviz/legacy-services9.dot')), $dumper->dump(), '->dump() dumps services');
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php
index 7fa0c17a13..063007e5d3 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php
@@ -129,8 +129,6 @@ class PhpDumperTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacySynchronizedServices()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$container = include self::$fixturesPath.'/containers/container20.php';
$dumper = new PhpDumper($container);
$this->assertEquals(str_replace('%path%', str_replace('\\', '\\\\', self::$fixturesPath.DIRECTORY_SEPARATOR.'includes'.DIRECTORY_SEPARATOR), file_get_contents(self::$fixturesPath.'/php/services20.php')), $dumper->dump(), '->dump() dumps services');
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php
index 9ee103630a..8aa544c728 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/XmlDumperTest.php
@@ -49,8 +49,6 @@ class XmlDumperTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyAddService()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$container = include self::$fixturesPath.'/containers/legacy-container9.php';
$dumper = new XmlDumper($container);
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php b/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php
index c22c7eb40e..8e9f1174c2 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Dumper/YamlDumperTest.php
@@ -45,8 +45,6 @@ class YamlDumperTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyAddService()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$container = include self::$fixturesPath.'/containers/legacy-container9.php';
$dumper = new YamlDumper($container);
diff --git a/src/Symfony/Component/DependencyInjection/Tests/LegacyContainerBuilderTest.php b/src/Symfony/Component/DependencyInjection/Tests/LegacyContainerBuilderTest.php
index b8512a2610..40aec20065 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/LegacyContainerBuilderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/LegacyContainerBuilderTest.php
@@ -19,11 +19,6 @@ use Symfony\Component\DependencyInjection\Reference;
*/
class LegacyContainerBuilderTest extends \PHPUnit_Framework_TestCase
{
- protected function setUp()
- {
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
- }
-
/**
* @covers Symfony\Component\DependencyInjection\ContainerBuilder::createService
*/
diff --git a/src/Symfony/Component/DependencyInjection/Tests/LegacyDefinitionTest.php b/src/Symfony/Component/DependencyInjection/Tests/LegacyDefinitionTest.php
index 437b77b31b..b85d81f481 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/LegacyDefinitionTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/LegacyDefinitionTest.php
@@ -18,11 +18,6 @@ use Symfony\Component\DependencyInjection\Definition;
*/
class LegacyDefinitionTest extends \PHPUnit_Framework_TestCase
{
- protected function setUp()
- {
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
- }
-
public function testSetGetFactoryClass()
{
$def = new Definition('stdClass');
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
index 56f599b7cc..8bf524ae4f 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/XmlFileLoaderTest.php
@@ -195,8 +195,6 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyLoadServices()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$container = new ContainerBuilder();
$loader = new XmlFileLoader($container, new FileLocator(self::$fixturesPath.'/xml'));
$loader->load('legacy-services6.xml');
diff --git a/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php b/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
index f329aace79..28cf0ebf62 100644
--- a/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
+++ b/src/Symfony/Component/DependencyInjection/Tests/Loader/YamlFileLoaderTest.php
@@ -124,8 +124,6 @@ class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyLoadServices()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$container = new ContainerBuilder();
$loader = new YamlFileLoader($container, new FileLocator(self::$fixturesPath.'/yaml'));
$loader->load('legacy-services6.yml');
diff --git a/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php b/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php
index 5ff5be84d1..f9c7e0e8be 100644
--- a/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php
+++ b/src/Symfony/Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php
@@ -126,8 +126,6 @@ abstract class AbstractEventDispatcherTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyDispatch()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$event = new Event();
$return = $this->dispatcher->dispatch(self::preFoo, $event);
$this->assertEquals('pre.foo', $event->getName());
@@ -255,8 +253,6 @@ abstract class AbstractEventDispatcherTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyEventReceivesTheDispatcherInstance()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$dispatcher = null;
$this->dispatcher->addListener('test', function ($event) use (&$dispatcher) {
$dispatcher = $event->getDispatcher();
diff --git a/src/Symfony/Component/EventDispatcher/Tests/EventTest.php b/src/Symfony/Component/EventDispatcher/Tests/EventTest.php
index 4bd2697220..9a822670cd 100644
--- a/src/Symfony/Component/EventDispatcher/Tests/EventTest.php
+++ b/src/Symfony/Component/EventDispatcher/Tests/EventTest.php
@@ -65,7 +65,6 @@ class EventTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacySetDispatcher()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
$this->event->setDispatcher($this->dispatcher);
$this->assertSame($this->dispatcher, $this->event->getDispatcher());
}
@@ -75,7 +74,6 @@ class EventTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyGetDispatcher()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
$this->assertNull($this->event->getDispatcher());
}
@@ -84,7 +82,6 @@ class EventTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyGetName()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
$this->assertNull($this->event->getName());
}
@@ -93,7 +90,6 @@ class EventTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacySetName()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
$this->event->setName('foo');
$this->assertEquals('foo', $this->event->getName());
}
diff --git a/src/Symfony/Component/Form/Tests/Extension/Csrf/CsrfProvider/LegacySessionCsrfProviderTest.php b/src/Symfony/Component/Form/Tests/Extension/Csrf/CsrfProvider/LegacySessionCsrfProviderTest.php
index eb4f58c8b6..8618de1804 100644
--- a/src/Symfony/Component/Form/Tests/Extension/Csrf/CsrfProvider/LegacySessionCsrfProviderTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/Csrf/CsrfProvider/LegacySessionCsrfProviderTest.php
@@ -23,8 +23,6 @@ class LegacySessionCsrfProviderTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$this->session = $this->getMock(
'Symfony\Component\HttpFoundation\Session\Session',
array(),
diff --git a/src/Symfony/Component/Form/Tests/Extension/HttpFoundation/EventListener/LegacyBindRequestListenerTest.php b/src/Symfony/Component/Form/Tests/Extension/HttpFoundation/EventListener/LegacyBindRequestListenerTest.php
index 521f7b3c17..37765991cc 100644
--- a/src/Symfony/Component/Form/Tests/Extension/HttpFoundation/EventListener/LegacyBindRequestListenerTest.php
+++ b/src/Symfony/Component/Form/Tests/Extension/HttpFoundation/EventListener/LegacyBindRequestListenerTest.php
@@ -37,8 +37,6 @@ class LegacyBindRequestListenerTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$path = tempnam(sys_get_temp_dir(), 'sf2');
touch($path);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php
index 25e963a7eb..44ad61b5e7 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Flash/FlashBagTest.php
@@ -138,8 +138,6 @@ class FlashBagTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyGetIterator()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$flashes = array('hello' => 'world', 'beep' => 'boop', 'notice' => 'nope');
foreach ($flashes as $key => $val) {
$this->bag->set($key, $val);
diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/LegacyPdoSessionHandlerTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/LegacyPdoSessionHandlerTest.php
index 92f890152d..7a1e491dc1 100644
--- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/LegacyPdoSessionHandlerTest.php
+++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/LegacyPdoSessionHandlerTest.php
@@ -22,8 +22,6 @@ class LegacyPdoSessionHandlerTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
if (!class_exists('PDO') || !in_array('sqlite', \PDO::getAvailableDrivers())) {
$this->markTestSkipped('This test requires SQLite support in your environment');
}
diff --git a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/FragmentRendererPassTest.php b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/FragmentRendererPassTest.php
index a46a07cf1d..3e2bfd072a 100644
--- a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/FragmentRendererPassTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/FragmentRendererPassTest.php
@@ -23,8 +23,6 @@ class FragmentRendererPassTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyFragmentRedererWithoutAlias()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
// no alias
$services = array(
'my_content_renderer' => array(array()),
diff --git a/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php b/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php
index 605ea9dd24..84ff0d6f50 100644
--- a/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/EventListener/ProfilerListenerTest.php
@@ -29,8 +29,6 @@ class ProfilerListenerTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyEventsWithoutRequestStack()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$profile = $this->getMockBuilder('Symfony\Component\HttpKernel\Profiler\Profile')
->disableOriginalConstructor()
->getMock();
diff --git a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php
index 2b75ba222f..c9e00dd68e 100644
--- a/src/Symfony/Component/HttpKernel/Tests/KernelTest.php
+++ b/src/Symfony/Component/HttpKernel/Tests/KernelTest.php
@@ -344,8 +344,6 @@ EOF;
protected function getKernelMockForIsClassInActiveBundleTest()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$bundle = new FooBarBundle();
$kernel = $this->getKernel(array('getBundles'));
diff --git a/src/Symfony/Component/Locale/Tests/LocaleTest.php b/src/Symfony/Component/Locale/Tests/LocaleTest.php
index 149c4c7a95..a8a375a133 100644
--- a/src/Symfony/Component/Locale/Tests/LocaleTest.php
+++ b/src/Symfony/Component/Locale/Tests/LocaleTest.php
@@ -23,8 +23,6 @@ class LocaleTest extends \PHPUnit_Framework_TestCase
{
protected function setUp()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
// Locale extends \Locale, so intl must be present
IntlTestHelper::requireIntl($this);
}
diff --git a/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php b/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php
index 44b5ab7961..146d6fadd5 100644
--- a/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php
+++ b/src/Symfony/Component/Locale/Tests/Stub/StubLocaleTest.php
@@ -21,8 +21,6 @@ class StubLocaleTest extends \PHPUnit_Framework_TestCase
{
protected function setUp()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
// Locale extends \Locale, so intl must be present
IntlTestHelper::requireIntl($this);
}
diff --git a/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsResolverTest.php b/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsResolverTest.php
index d44296cd1b..ee89f52797 100644
--- a/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsResolverTest.php
+++ b/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsResolverTest.php
@@ -26,8 +26,6 @@ class LegacyOptionsResolverTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$this->resolver = new OptionsResolver();
}
diff --git a/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsTest.php b/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsTest.php
index 87ac053af2..b65a09002e 100644
--- a/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsTest.php
+++ b/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsTest.php
@@ -26,8 +26,6 @@ class LegacyOptionsTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$this->options = new OptionsResolver();
}
diff --git a/src/Symfony/Component/Process/Tests/AbstractProcessTest.php b/src/Symfony/Component/Process/Tests/AbstractProcessTest.php
index 2a4d583cb2..f4aab7df93 100644
--- a/src/Symfony/Component/Process/Tests/AbstractProcessTest.php
+++ b/src/Symfony/Component/Process/Tests/AbstractProcessTest.php
@@ -238,8 +238,6 @@ abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyValidInput($expected, $value)
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$process = $this->getProcess('php -v');
$process->setInput($value);
$this->assertSame($expected, $process->getInput());
diff --git a/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php b/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php
index 5eda4064f0..3b340b33ee 100644
--- a/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php
+++ b/src/Symfony/Component/Routing/Tests/Annotation/RouteTest.php
@@ -52,8 +52,6 @@ class RouteTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyGetPattern()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$route = new Route(array('value' => '/Blog'));
$this->assertEquals($route->getPattern(), '/Blog');
}
diff --git a/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php b/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php
index 0005e3a534..29460c7aeb 100644
--- a/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php
+++ b/src/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php
@@ -461,8 +461,6 @@ class UrlGeneratorTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyGenerateNetworkPath()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$routes = $this->getRoutes('test', new Route('/{name}', array(), array('_scheme' => 'http'), array(), '{locale}.example.com'));
$this->assertSame('//fr.example.com/app.php/Fabien', $this->getGenerator($routes)->generate('test',
diff --git a/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php
index 37bbc0cd69..78065070a0 100644
--- a/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php
+++ b/src/Symfony/Component/Routing/Tests/Loader/XmlFileLoaderTest.php
@@ -50,8 +50,6 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyRouteDefinitionLoading()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$loader = new XmlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures')));
$routeCollection = $loader->load('legacy_validpattern.xml');
$route = $routeCollection->get('blog_show_legacy');
diff --git a/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php b/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php
index f9b7547a1b..17e07dab19 100644
--- a/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php
+++ b/src/Symfony/Component/Routing/Tests/Loader/YamlFileLoaderTest.php
@@ -86,8 +86,6 @@ class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyRouteDefinitionLoading()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$loader = new YamlFileLoader(new FileLocator(array(__DIR__.'/../Fixtures')));
$routeCollection = $loader->load('legacy_validpattern.yml');
$route = $routeCollection->get('blog_show_legacy');
diff --git a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/LegacyApacheMatcherDumperTest.php b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/LegacyApacheMatcherDumperTest.php
index 6d34c96d56..4bf513e9a6 100644
--- a/src/Symfony/Component/Routing/Tests/Matcher/Dumper/LegacyApacheMatcherDumperTest.php
+++ b/src/Symfony/Component/Routing/Tests/Matcher/Dumper/LegacyApacheMatcherDumperTest.php
@@ -27,11 +27,6 @@ class LegacyApacheMatcherDumperTest extends \PHPUnit_Framework_TestCase
self::$fixturesPath = realpath(__DIR__.'/../../Fixtures/');
}
- protected function setUp()
- {
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
- }
-
public function testDump()
{
$dumper = new ApacheMatcherDumper($this->getRouteCollection());
diff --git a/src/Symfony/Component/Routing/Tests/Matcher/LegacyApacheUrlMatcherTest.php b/src/Symfony/Component/Routing/Tests/Matcher/LegacyApacheUrlMatcherTest.php
index f42b7f206b..931f910df4 100644
--- a/src/Symfony/Component/Routing/Tests/Matcher/LegacyApacheUrlMatcherTest.php
+++ b/src/Symfony/Component/Routing/Tests/Matcher/LegacyApacheUrlMatcherTest.php
@@ -24,7 +24,6 @@ class LegacyApacheUrlMatcherTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
$this->server = $_SERVER;
}
diff --git a/src/Symfony/Component/Routing/Tests/RouteTest.php b/src/Symfony/Component/Routing/Tests/RouteTest.php
index 11c0cd8dcf..85273a696a 100644
--- a/src/Symfony/Component/Routing/Tests/RouteTest.php
+++ b/src/Symfony/Component/Routing/Tests/RouteTest.php
@@ -169,8 +169,6 @@ class RouteTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacySchemeRequirement()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$route = new Route('/');
$route->setRequirement('_scheme', 'http|https');
$this->assertEquals('http|https', $route->getRequirement('_scheme'));
@@ -199,8 +197,6 @@ class RouteTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyMethodRequirement()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$route = new Route('/');
$route->setRequirement('_method', 'GET|POST');
$this->assertEquals('GET|POST', $route->getRequirement('_method'));
@@ -233,8 +229,6 @@ class RouteTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyPattern()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$route = new Route('/{foo}');
$this->assertEquals('/{foo}', $route->getPattern());
diff --git a/src/Symfony/Component/Security/Core/Tests/LegacySecurityContextTest.php b/src/Symfony/Component/Security/Core/Tests/LegacySecurityContextTest.php
index f1f7861e98..c5da22d315 100644
--- a/src/Symfony/Component/Security/Core/Tests/LegacySecurityContextTest.php
+++ b/src/Symfony/Component/Security/Core/Tests/LegacySecurityContextTest.php
@@ -26,8 +26,6 @@ class LegacySecurityContextTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$this->tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface');
$this->authorizationChecker = $this->getMock('Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface');
$this->securityContext = new SecurityContext($this->tokenStorage, $this->authorizationChecker);
diff --git a/src/Symfony/Component/Security/Tests/Core/LegacySecurityContextInterfaceTest.php b/src/Symfony/Component/Security/Tests/Core/LegacySecurityContextInterfaceTest.php
index 3fad2b15aa..57517bf7f4 100644
--- a/src/Symfony/Component/Security/Tests/Core/LegacySecurityContextInterfaceTest.php
+++ b/src/Symfony/Component/Security/Tests/Core/LegacySecurityContextInterfaceTest.php
@@ -24,8 +24,6 @@ class LegacySecurityContextInterfaceTest extends \PHPUnit_Framework_TestCase
*/
public function testConstantSync()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$this->assertSame(Security::ACCESS_DENIED_ERROR, SecurityContextInterface::ACCESS_DENIED_ERROR);
$this->assertSame(Security::AUTHENTICATION_ERROR, SecurityContextInterface::AUTHENTICATION_ERROR);
$this->assertSame(Security::LAST_USERNAME, SecurityContextInterface::LAST_USERNAME);
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php
index e8156dd10f..92051863d5 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/GetSetMethodNormalizerTest.php
@@ -105,8 +105,6 @@ class GetSetMethodNormalizerTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyDenormalizeOnCamelCaseFormat()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$this->normalizer->setCamelizedAttributes(array('camel_case'));
$obj = $this->normalizer->denormalize(
array('camel_case' => 'camelCase'),
@@ -136,8 +134,6 @@ class GetSetMethodNormalizerTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyCamelizedAttributesNormalize()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$obj = new GetCamelizedDummy('dunglas.fr');
$obj->setFooBar('les-tilleuls.coop');
$obj->setBar_foo('lostinthesupermarket.fr');
@@ -162,8 +158,6 @@ class GetSetMethodNormalizerTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyCamelizedAttributesDenormalize()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$obj = new GetCamelizedDummy('dunglas.fr');
$obj->setFooBar('les-tilleuls.coop');
$obj->setBar_foo('lostinthesupermarket.fr');
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php
index 14a268f5bc..7d9da645c4 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/ObjectNormalizerTest.php
@@ -102,8 +102,6 @@ class ObjectNormalizerTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyDenormalizeOnCamelCaseFormat()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$this->normalizer->setCamelizedAttributes(array('camel_case'));
$obj = $this->normalizer->denormalize(
array('camel_case' => 'camelCase'),
diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php
index 52ce54087c..62e6d5d925 100644
--- a/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php
+++ b/src/Symfony/Component/Serializer/Tests/Normalizer/PropertyNormalizerTest.php
@@ -68,8 +68,6 @@ class PropertyNormalizerTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyDenormalizeOnCamelCaseFormat()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$this->normalizer->setCamelizedAttributes(array('camel_case'));
$obj = $this->normalizer->denormalize(
array('camel_case' => 'value'),
@@ -83,8 +81,6 @@ class PropertyNormalizerTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyCamelizedAttributesNormalize()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$obj = new PropertyCamelizedDummy('dunglas.fr');
$obj->fooBar = 'les-tilleuls.coop';
$obj->bar_foo = 'lostinthesupermarket.fr';
@@ -109,8 +105,6 @@ class PropertyNormalizerTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyCamelizedAttributesDenormalize()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$obj = new PropertyCamelizedDummy('dunglas.fr');
$obj->fooBar = 'les-tilleuls.coop';
$obj->bar_foo = 'lostinthesupermarket.fr';
diff --git a/src/Symfony/Component/Templating/Tests/Helper/LegacyAssetsHelperTest.php b/src/Symfony/Component/Templating/Tests/Helper/LegacyAssetsHelperTest.php
index c723b91e6f..d107e9ec4d 100644
--- a/src/Symfony/Component/Templating/Tests/Helper/LegacyAssetsHelperTest.php
+++ b/src/Symfony/Component/Templating/Tests/Helper/LegacyAssetsHelperTest.php
@@ -18,11 +18,6 @@ use Symfony\Component\Templating\Helper\AssetsHelper;
*/
class LegacyAssetsHelperTest extends \PHPUnit_Framework_TestCase
{
- protected function setUp()
- {
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
- }
-
public function testGetVersion()
{
$helper = new AssetsHelper(null, array(), 'foo');
diff --git a/src/Symfony/Component/Templating/Tests/Helper/LegacyCoreAssetsHelperTest.php b/src/Symfony/Component/Templating/Tests/Helper/LegacyCoreAssetsHelperTest.php
index 1e5846804b..890a942208 100644
--- a/src/Symfony/Component/Templating/Tests/Helper/LegacyCoreAssetsHelperTest.php
+++ b/src/Symfony/Component/Templating/Tests/Helper/LegacyCoreAssetsHelperTest.php
@@ -22,8 +22,6 @@ class LegacyCoreAssetsHelperTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$this->package = $this->getMock('Symfony\Component\Templating\Asset\PackageInterface');
}
diff --git a/src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php b/src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php
index a42a1185d9..87e78508e5 100644
--- a/src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php
+++ b/src/Symfony/Component/Templating/Tests/Loader/LoaderTest.php
@@ -29,8 +29,6 @@ class LoaderTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyGetSetDebugger()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$loader = new ProjectTemplateLoader4();
$debugger = $this->getMock('Symfony\Component\Templating\DebuggerInterface');
$loader->setDebugger($debugger);
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php
index e23709f3fc..b5e2a7a97d 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php
@@ -51,10 +51,6 @@ abstract class AbstractConstraintValidatorTest extends \PHPUnit_Framework_TestCa
protected function setUp()
{
- if (Validation::API_VERSION_2_5 !== $this->getApiVersion()) {
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
- }
-
$this->group = 'MyGroup';
$this->metadata = null;
$this->object = null;
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php
index b53f6c6995..b619291665 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/CallbackValidatorTest.php
@@ -191,8 +191,6 @@ class CallbackValidatorTest extends AbstractConstraintValidatorTest
*/
public function testLegacySingleMethodBc()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$object = new CallbackValidatorTest_Object();
$constraint = new Callback(array('validate'));
@@ -209,8 +207,6 @@ class CallbackValidatorTest extends AbstractConstraintValidatorTest
*/
public function testLegacySingleMethodBcExplicitName()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$object = new CallbackValidatorTest_Object();
$constraint = new Callback(array('methods' => array('validate')));
@@ -227,8 +223,6 @@ class CallbackValidatorTest extends AbstractConstraintValidatorTest
*/
public function testLegacyMultipleMethodsBc()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$object = new CallbackValidatorTest_Object();
$constraint = new Callback(array('validate', 'validateStatic'));
@@ -247,8 +241,6 @@ class CallbackValidatorTest extends AbstractConstraintValidatorTest
*/
public function testLegacyMultipleMethodsBcExplicitName()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$object = new CallbackValidatorTest_Object();
$constraint = new Callback(array(
'methods' => array('validate', 'validateStatic'),
@@ -269,8 +261,6 @@ class CallbackValidatorTest extends AbstractConstraintValidatorTest
*/
public function testLegacySingleStaticMethodBc()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$object = new CallbackValidatorTest_Object();
$constraint = new Callback(array(
array(__CLASS__.'_Class', 'validateCallback'),
@@ -289,8 +279,6 @@ class CallbackValidatorTest extends AbstractConstraintValidatorTest
*/
public function testLegacySingleStaticMethodBcExplicitName()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$object = new CallbackValidatorTest_Object();
$constraint = new Callback(array(
'methods' => array(array(__CLASS__.'_Class', 'validateCallback')),
@@ -329,8 +317,6 @@ class CallbackValidatorTest extends AbstractConstraintValidatorTest
*/
public function testLegacyExpectEitherCallbackOrMethods()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$object = new CallbackValidatorTest_Object();
$this->validator->validate($object, new Callback(array(
diff --git a/src/Symfony/Component/Validator/Tests/Constraints/GroupSequenceTest.php b/src/Symfony/Component/Validator/Tests/Constraints/GroupSequenceTest.php
index 30f0245372..aa2d601042 100644
--- a/src/Symfony/Component/Validator/Tests/Constraints/GroupSequenceTest.php
+++ b/src/Symfony/Component/Validator/Tests/Constraints/GroupSequenceTest.php
@@ -37,8 +37,6 @@ class GroupSequenceTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyIterate()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$sequence = new GroupSequence(array('Group 1', 'Group 2'));
$this->assertSame(array('Group 1', 'Group 2'), iterator_to_array($sequence));
@@ -49,8 +47,6 @@ class GroupSequenceTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyCount()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$sequence = new GroupSequence(array('Group 1', 'Group 2'));
$this->assertCount(2, $sequence);
@@ -61,8 +57,6 @@ class GroupSequenceTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyArrayAccess()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$sequence = new GroupSequence(array('Group 1', 'Group 2'));
$this->assertSame('Group 1', $sequence[0]);
@@ -85,8 +79,6 @@ class GroupSequenceTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyGetExpectsExistingKey()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$sequence = new GroupSequence(array('Group 1', 'Group 2'));
$sequence[2];
@@ -97,8 +89,6 @@ class GroupSequenceTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyUnsetIgnoresNonExistingKeys()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$sequence = new GroupSequence(array('Group 1', 'Group 2'));
// should not fail
diff --git a/src/Symfony/Component/Validator/Tests/LegacyExecutionContextTest.php b/src/Symfony/Component/Validator/Tests/LegacyExecutionContextTest.php
index 4fec2aacb5..f0139c0da5 100644
--- a/src/Symfony/Component/Validator/Tests/LegacyExecutionContextTest.php
+++ b/src/Symfony/Component/Validator/Tests/LegacyExecutionContextTest.php
@@ -41,8 +41,6 @@ class LegacyExecutionContextTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$this->visitor = $this->getMockBuilder('Symfony\Component\Validator\ValidationVisitor')
->disableOriginalConstructor()
->getMock();
diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Cache/LegacyApcCacheTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Cache/LegacyApcCacheTest.php
index bb69cf5e74..9d39784280 100644
--- a/src/Symfony/Component/Validator/Tests/Mapping/Cache/LegacyApcCacheTest.php
+++ b/src/Symfony/Component/Validator/Tests/Mapping/Cache/LegacyApcCacheTest.php
@@ -20,8 +20,6 @@ class LegacyApcCacheTest extends \PHPUnit_Framework_TestCase
{
protected function setUp()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
if (!extension_loaded('apc') || !ini_get('apc.enable_cli')) {
$this->markTestSkipped('APC is not loaded.');
}
diff --git a/src/Symfony/Component/Validator/Tests/Mapping/LegacyElementMetadataTest.php b/src/Symfony/Component/Validator/Tests/Mapping/LegacyElementMetadataTest.php
index c77e6fe9aa..b68c88293f 100644
--- a/src/Symfony/Component/Validator/Tests/Mapping/LegacyElementMetadataTest.php
+++ b/src/Symfony/Component/Validator/Tests/Mapping/LegacyElementMetadataTest.php
@@ -24,8 +24,6 @@ class LegacyElementMetadataTest extends \PHPUnit_Framework_TestCase
protected function setUp()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$this->metadata = new TestElementMetadata();
}
diff --git a/src/Symfony/Component/Validator/Tests/Mapping/MemberMetadataTest.php b/src/Symfony/Component/Validator/Tests/Mapping/MemberMetadataTest.php
index a4473bc68a..fafde341ac 100644
--- a/src/Symfony/Component/Validator/Tests/Mapping/MemberMetadataTest.php
+++ b/src/Symfony/Component/Validator/Tests/Mapping/MemberMetadataTest.php
@@ -40,8 +40,6 @@ class MemberMetadataTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyAddValidSetsMemberToCascaded()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$result = $this->metadata->addConstraint(new Valid());
$this->assertEquals(array(), $this->metadata->getConstraints());
@@ -54,8 +52,6 @@ class MemberMetadataTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyAddOtherConstraintDoesNotSetMemberToCascaded()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$result = $this->metadata->addConstraint($constraint = new ConstraintA());
$this->assertEquals(array($constraint), $this->metadata->getConstraints());
diff --git a/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php b/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php
index 4a041afbff..ae694b468b 100644
--- a/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php
+++ b/src/Symfony/Component/Validator/Tests/Validator/Abstract2Dot5ApiTest.php
@@ -578,8 +578,6 @@ abstract class Abstract2Dot5ApiTest extends AbstractValidatorTest
*/
public function testLegacyPropertyMetadataMustImplementPropertyMetadataInterface()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$entity = new Entity();
// Legacy interface
diff --git a/src/Symfony/Component/Validator/Tests/Validator/AbstractLegacyApiTest.php b/src/Symfony/Component/Validator/Tests/Validator/AbstractLegacyApiTest.php
index 77ec10212a..5f4167dcd8 100644
--- a/src/Symfony/Component/Validator/Tests/Validator/AbstractLegacyApiTest.php
+++ b/src/Symfony/Component/Validator/Tests/Validator/AbstractLegacyApiTest.php
@@ -42,8 +42,6 @@ abstract class AbstractLegacyApiTest extends AbstractValidatorTest
protected function setUp()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
parent::setUp();
$this->validator = $this->createValidator($this->metadataFactory);
diff --git a/src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php b/src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php
index d8833dedcf..69c025d459 100644
--- a/src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php
+++ b/src/Symfony/Component/Validator/Tests/Validator/AbstractValidatorTest.php
@@ -844,8 +844,6 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyValidatePropertyFailsIfPropertiesNotSupported()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
// $metadata does not implement PropertyMetadataContainerInterface
$metadata = $this->getMock('Symfony\Component\Validator\MetadataInterface');
@@ -977,8 +975,6 @@ abstract class AbstractValidatorTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyValidatePropertyValueFailsIfPropertiesNotSupported()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
// $metadata does not implement PropertyMetadataContainerInterface
$metadata = $this->getMock('Symfony\Component\Validator\MetadataInterface');
diff --git a/src/Symfony/Component/Yaml/Tests/YamlTest.php b/src/Symfony/Component/Yaml/Tests/YamlTest.php
index a7261562d5..8db65e3990 100644
--- a/src/Symfony/Component/Yaml/Tests/YamlTest.php
+++ b/src/Symfony/Component/Yaml/Tests/YamlTest.php
@@ -28,8 +28,6 @@ class YamlTest extends \PHPUnit_Framework_TestCase
*/
public function testLegacyParseFromFile()
{
- $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED);
-
$filename = __DIR__.'/Fixtures/index.yml';
$contents = file_get_contents($filename);
$parsedByFilename = Yaml::parse($filename);