Merge branch '4.3' into 4.4
* 4.3: Replace warning by isolated test
This commit is contained in:
commit
6888e702b9
@ -11,7 +11,6 @@
|
|||||||
|
|
||||||
namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer;
|
namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer;
|
||||||
|
|
||||||
use PHPUnit\Framework\Warning;
|
|
||||||
use Symfony\Bundle\FrameworkBundle\CacheWarmer\ValidatorCacheWarmer;
|
use Symfony\Bundle\FrameworkBundle\CacheWarmer\ValidatorCacheWarmer;
|
||||||
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
|
||||||
use Symfony\Component\Cache\Adapter\NullAdapter;
|
use Symfony\Component\Cache\Adapter\NullAdapter;
|
||||||
@ -21,12 +20,11 @@ use Symfony\Component\Validator\ValidatorBuilder;
|
|||||||
|
|
||||||
class ValidatorCacheWarmerTest extends TestCase
|
class ValidatorCacheWarmerTest extends TestCase
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||||
|
*/
|
||||||
public function testWarmUp()
|
public function testWarmUp()
|
||||||
{
|
{
|
||||||
if (\PHP_VERSION_ID >= 70400) {
|
|
||||||
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$validatorBuilder = new ValidatorBuilder();
|
$validatorBuilder = new ValidatorBuilder();
|
||||||
$validatorBuilder->addXmlMapping(__DIR__.'/../Fixtures/Validation/Resources/person.xml');
|
$validatorBuilder->addXmlMapping(__DIR__.'/../Fixtures/Validation/Resources/person.xml');
|
||||||
$validatorBuilder->addYamlMapping(__DIR__.'/../Fixtures/Validation/Resources/author.yml');
|
$validatorBuilder->addYamlMapping(__DIR__.'/../Fixtures/Validation/Resources/author.yml');
|
||||||
|
@ -254,12 +254,11 @@ abstract class AdapterTestCase extends CachePoolTest
|
|||||||
$this->assertTrue($this->isPruned($cache, 'qux'));
|
$this->assertTrue($this->isPruned($cache, 'qux'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||||
|
*/
|
||||||
public function testSavingObject()
|
public function testSavingObject()
|
||||||
{
|
{
|
||||||
if (\PHP_VERSION_ID >= 70400) {
|
|
||||||
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
|
|
||||||
}
|
|
||||||
|
|
||||||
parent::testSavingObject();
|
parent::testSavingObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
namespace Symfony\Component\Config\Tests\Resource;
|
namespace Symfony\Component\Config\Tests\Resource;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use PHPUnit\Framework\Warning;
|
|
||||||
use Symfony\Component\Config\Resource\ClassExistenceResource;
|
use Symfony\Component\Config\Resource\ClassExistenceResource;
|
||||||
use Symfony\Component\Config\Tests\Fixtures\BadParent;
|
use Symfony\Component\Config\Tests\Fixtures\BadParent;
|
||||||
use Symfony\Component\Config\Tests\Fixtures\Resource\ConditionalClass;
|
use Symfony\Component\Config\Tests\Fixtures\Resource\ConditionalClass;
|
||||||
@ -76,23 +75,22 @@ EOF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||||
|
*/
|
||||||
public function testBadParentWithTimestamp()
|
public function testBadParentWithTimestamp()
|
||||||
{
|
{
|
||||||
if (\PHP_VERSION_ID >= 70400) {
|
|
||||||
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$res = new ClassExistenceResource(BadParent::class, false);
|
$res = new ClassExistenceResource(BadParent::class, false);
|
||||||
$this->assertTrue($res->isFresh(time()));
|
$this->assertTrue($res->isFresh(time()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||||
|
*/
|
||||||
public function testBadParentWithNoTimestamp()
|
public function testBadParentWithNoTimestamp()
|
||||||
{
|
{
|
||||||
$this->expectException('ReflectionException');
|
$this->expectException('ReflectionException');
|
||||||
$this->expectExceptionMessage('Class Symfony\Component\Config\Tests\Fixtures\MissingParent not found');
|
$this->expectExceptionMessage('Class Symfony\Component\Config\Tests\Fixtures\MissingParent not found');
|
||||||
if (\PHP_VERSION_ID >= 70400) {
|
|
||||||
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$res = new ClassExistenceResource(BadParent::class, false);
|
$res = new ClassExistenceResource(BadParent::class, false);
|
||||||
$res->isFresh(0);
|
$res->isFresh(0);
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
namespace Symfony\Component\DependencyInjection\Tests\Compiler;
|
namespace Symfony\Component\DependencyInjection\Tests\Compiler;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use PHPUnit\Framework\Warning;
|
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
use Psr\Log\NullLogger;
|
use Psr\Log\NullLogger;
|
||||||
use Symfony\Component\Config\FileLocator;
|
use Symfony\Component\Config\FileLocator;
|
||||||
@ -350,12 +349,11 @@ class AutowirePassTest extends TestCase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||||
|
*/
|
||||||
public function testParentClassNotFoundThrowsException()
|
public function testParentClassNotFoundThrowsException()
|
||||||
{
|
{
|
||||||
if (\PHP_VERSION_ID >= 70400) {
|
|
||||||
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$container = new ContainerBuilder();
|
$container = new ContainerBuilder();
|
||||||
|
|
||||||
$aDefinition = $container->register('a', __NAMESPACE__.'\BadParentTypeHintedArgument');
|
$aDefinition = $container->register('a', __NAMESPACE__.'\BadParentTypeHintedArgument');
|
||||||
@ -627,12 +625,11 @@ class AutowirePassTest extends TestCase
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||||
|
*/
|
||||||
public function testIgnoreServiceWithClassNotExisting()
|
public function testIgnoreServiceWithClassNotExisting()
|
||||||
{
|
{
|
||||||
if (\PHP_VERSION_ID >= 70400) {
|
|
||||||
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$container = new ContainerBuilder();
|
$container = new ContainerBuilder();
|
||||||
|
|
||||||
$container->register('class_not_exist', __NAMESPACE__.'\OptionalServiceClass');
|
$container->register('class_not_exist', __NAMESPACE__.'\OptionalServiceClass');
|
||||||
@ -833,12 +830,11 @@ class AutowirePassTest extends TestCase
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||||
|
*/
|
||||||
public function testExceptionWhenAliasDoesNotExist()
|
public function testExceptionWhenAliasDoesNotExist()
|
||||||
{
|
{
|
||||||
if (\PHP_VERSION_ID >= 70400) {
|
|
||||||
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$container = new ContainerBuilder();
|
$container = new ContainerBuilder();
|
||||||
|
|
||||||
// multiple I instances... but no IInterface alias
|
// multiple I instances... but no IInterface alias
|
||||||
|
@ -62,13 +62,13 @@ class ResolveBindingsPassTest extends TestCase
|
|||||||
$pass->process($container);
|
$pass->process($container);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||||
|
*/
|
||||||
public function testMissingParent()
|
public function testMissingParent()
|
||||||
{
|
{
|
||||||
$this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException');
|
$this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException');
|
||||||
$this->expectExceptionMessage('A binding is configured for an argument named "$quz" for service "Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists", but no corresponding argument has been found. It may be unused and should be removed, or it may have a typo.');
|
$this->expectExceptionMessage('A binding is configured for an argument named "$quz" for service "Symfony\Component\DependencyInjection\Tests\Fixtures\ParentNotExists", but no corresponding argument has been found. It may be unused and should be removed, or it may have a typo.');
|
||||||
if (\PHP_VERSION_ID >= 70400) {
|
|
||||||
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$container = new ContainerBuilder();
|
$container = new ContainerBuilder();
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
namespace Symfony\Component\DependencyInjection\Tests\Dumper;
|
namespace Symfony\Component\DependencyInjection\Tests\Dumper;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use PHPUnit\Framework\Warning;
|
|
||||||
use Psr\Container\ContainerInterface;
|
use Psr\Container\ContainerInterface;
|
||||||
use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper;
|
use Symfony\Bridge\ProxyManager\LazyProxy\PhpDumper\ProxyDumper;
|
||||||
use Symfony\Component\Config\FileLocator;
|
use Symfony\Component\Config\FileLocator;
|
||||||
@ -1099,12 +1098,11 @@ class PhpDumperTest extends TestCase
|
|||||||
$this->assertStringEqualsFile(self::$fixturesPath.'/php/services_inline_self_ref.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Inline_Self_Ref']));
|
$this->assertStringEqualsFile(self::$fixturesPath.'/php/services_inline_self_ref.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Inline_Self_Ref']));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||||
|
*/
|
||||||
public function testHotPathOptimizations()
|
public function testHotPathOptimizations()
|
||||||
{
|
{
|
||||||
if (\PHP_VERSION_ID >= 70400) {
|
|
||||||
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$container = include self::$fixturesPath.'/containers/container_inline_requires.php';
|
$container = include self::$fixturesPath.'/containers/container_inline_requires.php';
|
||||||
$container->setParameter('inline_requires', true);
|
$container->setParameter('inline_requires', true);
|
||||||
$container->compile();
|
$container->compile();
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
namespace Symfony\Component\DependencyInjection\Tests\Loader;
|
namespace Symfony\Component\DependencyInjection\Tests\Loader;
|
||||||
|
|
||||||
use PHPUnit\Framework\TestCase;
|
use PHPUnit\Framework\TestCase;
|
||||||
use PHPUnit\Framework\Warning;
|
|
||||||
use Psr\Container\ContainerInterface as PsrContainerInterface;
|
use Psr\Container\ContainerInterface as PsrContainerInterface;
|
||||||
use Symfony\Component\Config\FileLocator;
|
use Symfony\Component\Config\FileLocator;
|
||||||
use Symfony\Component\Config\Loader\LoaderResolver;
|
use Symfony\Component\Config\Loader\LoaderResolver;
|
||||||
@ -107,12 +106,11 @@ class FileLoaderTest extends TestCase
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||||
|
*/
|
||||||
public function testRegisterClassesWithExclude()
|
public function testRegisterClassesWithExclude()
|
||||||
{
|
{
|
||||||
if (\PHP_VERSION_ID >= 70400) {
|
|
||||||
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$container = new ContainerBuilder();
|
$container = new ContainerBuilder();
|
||||||
$container->setParameter('other_dir', 'OtherDir');
|
$container->setParameter('other_dir', 'OtherDir');
|
||||||
$loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath.'/Fixtures'));
|
$loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath.'/Fixtures'));
|
||||||
@ -140,12 +138,11 @@ class FileLoaderTest extends TestCase
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||||
|
*/
|
||||||
public function testRegisterClassesWithExcludeAsArray()
|
public function testRegisterClassesWithExcludeAsArray()
|
||||||
{
|
{
|
||||||
if (\PHP_VERSION_ID >= 70400) {
|
|
||||||
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$container = new ContainerBuilder();
|
$container = new ContainerBuilder();
|
||||||
$container->setParameter('sub_dir', 'Sub');
|
$container->setParameter('sub_dir', 'Sub');
|
||||||
$loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath.'/Fixtures'));
|
$loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath.'/Fixtures'));
|
||||||
@ -163,12 +160,11 @@ class FileLoaderTest extends TestCase
|
|||||||
$this->assertFalse($container->has(DeeperBaz::class));
|
$this->assertFalse($container->has(DeeperBaz::class));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||||
|
*/
|
||||||
public function testNestedRegisterClasses()
|
public function testNestedRegisterClasses()
|
||||||
{
|
{
|
||||||
if (\PHP_VERSION_ID >= 70400) {
|
|
||||||
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$container = new ContainerBuilder();
|
$container = new ContainerBuilder();
|
||||||
$loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath.'/Fixtures'));
|
$loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath.'/Fixtures'));
|
||||||
|
|
||||||
@ -195,12 +191,11 @@ class FileLoaderTest extends TestCase
|
|||||||
$this->assertFalse($alias->isPrivate());
|
$this->assertFalse($alias->isPrivate());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||||
|
*/
|
||||||
public function testMissingParentClass()
|
public function testMissingParentClass()
|
||||||
{
|
{
|
||||||
if (\PHP_VERSION_ID >= 70400) {
|
|
||||||
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78351.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$container = new ContainerBuilder();
|
$container = new ContainerBuilder();
|
||||||
$container->setParameter('bad_classes_dir', 'BadClasses');
|
$container->setParameter('bad_classes_dir', 'BadClasses');
|
||||||
$loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath.'/Fixtures'));
|
$loader = new TestFileLoader($container, new FileLocator(self::$fixturesPath.'/Fixtures'));
|
||||||
|
@ -76,9 +76,6 @@ class VarExporterTest extends TestCase
|
|||||||
*/
|
*/
|
||||||
public function testExport(string $testName, $value, bool $staticValueExpected = false)
|
public function testExport(string $testName, $value, bool $staticValueExpected = false)
|
||||||
{
|
{
|
||||||
if (\PHP_VERSION_ID >= 70400 && 'datetime' === $testName) {
|
|
||||||
throw new Warning('PHP 7.4 breaks this test, see https://bugs.php.net/78383.');
|
|
||||||
}
|
|
||||||
if (\PHP_VERSION_ID >= 70400 && \in_array($testName, ['spl-object-storage', 'array-object-custom', 'array-iterator', 'array-object', 'final-array-iterator'])) {
|
if (\PHP_VERSION_ID >= 70400 && \in_array($testName, ['spl-object-storage', 'array-object-custom', 'array-iterator', 'array-object', 'final-array-iterator'])) {
|
||||||
throw new Warning('PHP 7.4 breaks this test.');
|
throw new Warning('PHP 7.4 breaks this test.');
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user