minor #33567 Re-enable previously failing PHP 7.4 test cases (nicolas-grekas)
This PR was merged into the 3.4 branch.
Discussion
----------
Re-enable previously failing PHP 7.4 test cases
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | Fix #32995
| License | MIT
| Doc PR | -
The remaining PHP 7.4 issue has been fixed by Nikita in https://github.com/php/php-src/pull/4697
This should be green once Travis updates their php7.4snapshot
Commits
-------
9e4e191535
Re-enable previously failing PHP 7.4 test cases
This commit is contained in:
commit
1ab8fff4f2
11
.travis.yml
11
.travis.yml
|
@ -28,11 +28,6 @@ matrix:
|
|||
env: deps=high
|
||||
- php: 7.4snapshot
|
||||
env: deps=low
|
||||
- php: 7.4snapshot
|
||||
env: deps=
|
||||
allow_failures:
|
||||
- php: 7.4snapshot
|
||||
env: deps=
|
||||
fast_finish: true
|
||||
|
||||
cache:
|
||||
|
@ -76,12 +71,6 @@ before_install:
|
|||
export COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
|
||||
find ~/.phpenv -name xdebug.ini -delete
|
||||
|
||||
if [[ $TRAVIS_PHP_VERSION = 7.4* && $deps ]]; then
|
||||
export PHPUNIT_X="$PHPUNIT_X,issue-32995"
|
||||
elif [[ $TRAVIS_PHP_VERSION = 7.4* ]]; then
|
||||
export PHPUNIT_X="$PHPUNIT --group issue-32995"
|
||||
fi
|
||||
|
||||
if [[ $TRAVIS_PHP_VERSION = 5.* || $TRAVIS_PHP_VERSION = hhvm* ]]; then
|
||||
composer () {
|
||||
$HOME/.phpenv/versions/7.1/bin/php $HOME/.phpenv/versions/7.1/bin/composer config platform.php $(echo ' <?php echo preg_replace("/-.*/", "", PHP_VERSION);' | php /dev/stdin)
|
||||
|
|
|
@ -109,7 +109,7 @@ class DeprecationErrorHandler
|
|||
'remaining vendor' => array(),
|
||||
);
|
||||
$deprecationHandler = function ($type, $msg, $file, $line, $context = array()) use (&$deprecations, $getMode, $UtilPrefix, $inVendors) {
|
||||
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) || DeprecationErrorHandler::MODE_DISABLED === $mode = $getMode()) {
|
||||
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type && (E_WARNING !== $type || false === strpos($msg, '" targeting switch is equivalent to "break'))) || DeprecationErrorHandler::MODE_DISABLED === $mode = $getMode()) {
|
||||
return \call_user_func(DeprecationErrorHandler::getPhpUnitErrorHandler(), $type, $msg, $file, $line, $context);
|
||||
}
|
||||
|
||||
|
@ -285,7 +285,7 @@ class DeprecationErrorHandler
|
|||
{
|
||||
$deprecations = array();
|
||||
$previousErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = array()) use (&$deprecations, &$previousErrorHandler) {
|
||||
if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) {
|
||||
if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type && (E_WARNING !== $type || false === strpos($msg, '" targeting switch is equivalent to "break'))) {
|
||||
if ($previousErrorHandler) {
|
||||
return $previousErrorHandler($type, $msg, $file, $line, $context);
|
||||
}
|
||||
|
|
|
@ -21,11 +21,6 @@ use Symfony\Component\Validator\ValidatorBuilder;
|
|||
|
||||
class ValidatorCacheWarmerTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @group issue-32995
|
||||
*
|
||||
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||
*/
|
||||
public function testWarmUp()
|
||||
{
|
||||
$validatorBuilder = new ValidatorBuilder();
|
||||
|
|
|
@ -72,29 +72,12 @@ bar';
|
|||
{
|
||||
$command = new YamlLintCommand();
|
||||
$expected = <<<EOF
|
||||
The <info>%command.name%</info> command lints a YAML file and outputs to STDOUT
|
||||
the first encountered syntax error.
|
||||
|
||||
You can validates YAML contents passed from STDIN:
|
||||
|
||||
<info>cat filename | php %command.full_name%</info>
|
||||
|
||||
You can also validate the syntax of a file:
|
||||
|
||||
<info>php %command.full_name% filename</info>
|
||||
|
||||
Or of a whole directory:
|
||||
|
||||
<info>php %command.full_name% dirname</info>
|
||||
<info>php %command.full_name% dirname --format=json</info>
|
||||
|
||||
Or find all files in a bundle:
|
||||
|
||||
<info>php %command.full_name% @AcmeDemoBundle</info>
|
||||
|
||||
EOF;
|
||||
|
||||
$this->assertEquals($expected, $command->getHelp());
|
||||
$this->assertStringContainsString($expected, $command->getHelp());
|
||||
}
|
||||
|
||||
public function testLintFilesFromBundleDirectory()
|
||||
|
|
|
@ -75,22 +75,12 @@ EOF
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @group issue-32995
|
||||
*
|
||||
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||
*/
|
||||
public function testBadParentWithTimestamp()
|
||||
{
|
||||
$res = new ClassExistenceResource(BadParent::class, false);
|
||||
$this->assertTrue($res->isFresh(time()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @group issue-32995
|
||||
*
|
||||
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||
*/
|
||||
public function testBadParentWithNoTimestamp()
|
||||
{
|
||||
$this->expectException('ReflectionException');
|
||||
|
|
|
@ -382,8 +382,7 @@ class ErrorHandler
|
|||
*/
|
||||
public function handleError($type, $message, $file, $line)
|
||||
{
|
||||
// @deprecated to be removed in Symfony 5.0
|
||||
if (\PHP_VERSION_ID >= 70300 && $message && '"' === $message[0] && 0 === strpos($message, '"continue') && preg_match('/^"continue(?: \d++)?" targeting switch is equivalent to "break(?: \d++)?"\. Did you mean to use "continue(?: \d++)?"\?$/', $message)) {
|
||||
if (\PHP_VERSION_ID >= 70300 && E_WARNING === $type && '"' === $message[0] && false !== strpos($message, '" targeting switch is equivalent to "break')) {
|
||||
$type = E_DEPRECATED;
|
||||
}
|
||||
|
||||
|
|
|
@ -377,11 +377,6 @@ class AutowirePassTest extends TestCase
|
|||
$pass->process($container);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group issue-32995
|
||||
*
|
||||
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||
*/
|
||||
public function testParentClassNotFoundThrowsException()
|
||||
{
|
||||
$this->expectException('Symfony\Component\DependencyInjection\Exception\AutowiringFailedException');
|
||||
|
@ -693,11 +688,6 @@ class AutowirePassTest extends TestCase
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @group issue-32995
|
||||
*
|
||||
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||
*/
|
||||
public function testIgnoreServiceWithClassNotExisting()
|
||||
{
|
||||
$container = new ContainerBuilder();
|
||||
|
@ -896,11 +886,6 @@ class AutowirePassTest extends TestCase
|
|||
$pass->process($container);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group issue-32995
|
||||
*
|
||||
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||
*/
|
||||
public function testExceptionWhenAliasDoesNotExist()
|
||||
{
|
||||
$this->expectException('Symfony\Component\DependencyInjection\Exception\AutowiringFailedException');
|
||||
|
|
|
@ -61,11 +61,6 @@ class ResolveBindingsPassTest extends TestCase
|
|||
$pass->process($container);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group issue-32995
|
||||
*
|
||||
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||
*/
|
||||
public function testMissingParent()
|
||||
{
|
||||
$this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException');
|
||||
|
|
|
@ -893,11 +893,6 @@ class PhpDumperTest extends TestCase
|
|||
$this->assertStringEqualsFile(self::$fixturesPath.'/php/services_inline_self_ref.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Inline_Self_Ref']));
|
||||
}
|
||||
|
||||
/**
|
||||
* @group issue-32995
|
||||
*
|
||||
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||
*/
|
||||
public function testHotPathOptimizations()
|
||||
{
|
||||
$container = include self::$fixturesPath.'/containers/container_inline_requires.php';
|
||||
|
|
|
@ -107,11 +107,6 @@ class FileLoaderTest extends TestCase
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group issue-32995
|
||||
*
|
||||
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||
*/
|
||||
public function testRegisterClassesWithExclude()
|
||||
{
|
||||
$container = new ContainerBuilder();
|
||||
|
@ -141,11 +136,6 @@ class FileLoaderTest extends TestCase
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @group issue-32995
|
||||
*
|
||||
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||
*/
|
||||
public function testNestedRegisterClasses()
|
||||
{
|
||||
$container = new ContainerBuilder();
|
||||
|
@ -174,11 +164,6 @@ class FileLoaderTest extends TestCase
|
|||
$this->assertFalse($alias->isPrivate());
|
||||
}
|
||||
|
||||
/**
|
||||
* @group issue-32995
|
||||
*
|
||||
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
|
||||
*/
|
||||
public function testMissingParentClass()
|
||||
{
|
||||
$container = new ContainerBuilder();
|
||||
|
|
|
@ -75,7 +75,7 @@ class ProcessTest extends TestCase
|
|||
$process = $this->getProcessForCode('sleep(3)');
|
||||
$process->run();
|
||||
$actualError = error_get_last();
|
||||
$this->assertEquals('Test Error', $actualError['message']);
|
||||
$this->assertEquals('Test Error', $actualError['message'], print_r($actualError, true));
|
||||
$this->assertEquals(E_USER_NOTICE, $actualError['type']);
|
||||
}
|
||||
|
||||
|
|
Reference in New Issue