10000 minor #33567 Re-enable previously failing PHP 7.4 test cases (nicolas… · symfony/symfony@1ab8fff · GitHub
[go: up one dir, main page]

Skip to content

Commit 1ab8fff

Browse files
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 php/php-src#4697 This should be green once Travis updates their php7.4snapshot Commits ------- 9e4e191 Re-enable previously failing PHP 7.4 test cases
2 parents 6bf2dd9 + 9e4e191 commit 1ab8fff

File tree

11 files changed

+5
-89
lines changed

11 files changed

+5
-89
lines changed

.travis.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ matrix:
2828
env: deps=high
2929
- php: 7.4snapshot
3030
env: deps=low
31-
- php: 7.4snapshot
32-
env: deps=
33-
allow_failures:
34-
- php: 7.4snapshot
35-
env: deps=
3631
fast_finish: true
3732

3833
cache:
@@ -76,12 +71,6 @@ before_install:
7671
export COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
7772
find ~/.phpenv -name xdebug.ini -delete
7873
79-
if [[ $TRAVIS_PHP_VERSION = 7.4* && $deps ]]; then
80-
export PHPUNIT_X="$PHPUNIT_X,issue-32995"
81-
elif [[ $TRAVIS_PHP_VERSION = 7.4* ]]; then
82-
export PHPUNIT_X="$PHPUNIT --group issue-32995"
83-
fi
84-
8574
if [[ $TRAVIS_PHP_VERSION = 5.* || $TRAVIS_PHP_VERSION = hhvm* ]]; then
8675
composer () {
8776
$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)

src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public static function register($mode = 0)
109109
'remaining vendor' => array(),
110110
);
111111
$deprecationHandler = function ($type, $msg, $file, $line, $context = array()) use (&$deprecations, $getMode, $UtilPrefix, $inVendors) {
112-
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) || DeprecationErrorHandler::MODE_DISABLED === $mode = $getMode()) {
112+
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()) {
113113
return \call_user_func(DeprecationErrorHandler::getPhpUnitErrorHandler(), $type, $msg, $file, $line, $context);
114114
}
115115

@@ -285,7 +285,7 @@ public static function collectDeprecations($outputFile)
285285
{
286286
$deprecations = array();
287287
$previousErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = array()) use (&$deprecations, &$previousErrorHandler) {
288-
if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) {
288+
if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type && (E_WARNING !== $type || false === strpos($msg, '" targeting switch is equivalent to "break'))) {
289289
if ($previousErrorHandler) {
290290
return $previousErrorHandler($type, $msg, $file, $line, $context);
291291
}

src/Symfony/Bundle/FrameworkBundle/Tests/CacheWarmer/ValidatorCacheWarmerTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@
2121

2222
class ValidatorCacheWarmerTest extends TestCase
2323
{
24-
/**
25-
* @group issue-32995
26-
*
27- * @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
28-
*/
2924
public function testWarmUp()
3025
{
3126
$validatorBuilder = new ValidatorBuilder();

src/Symfony/Bundle/FrameworkBundle/Tests/Command/YamlLintCommandTest.php

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -72,29 +72,12 @@ public function testGetHelp()
7272
{
7373
$command = new YamlLintCommand();
7474
$expected = <<<EOF
75-
The <info>%command.name%</info> command lints a YAML file and outputs to STDOUT
76-
the first encountered syntax error.
77-
78-
You can validates YAML contents passed from STDIN:
79-
80-
<info>cat filename | php %command.full_name%</info>
81-
82-
You can also validate the syntax of a file:
83-
84-
<info>php %command.full_name% filename</info>
85-
86-
Or of a whole directory:
87-
88-
<info>php %command.full_name% dirname</info>
89-
<info>php %command.full_name% dirname --format=json</info>
90-
9175
Or find all files in a bundle:
9276
9377
<info>php %command.full_name% @AcmeDemoBundle</info>
94-
9578
EOF;
9679

97-
$this->assertEquals($expected, $command->getHelp());
80+
$this->assertStringContainsString($expected, $command->getHelp());
9881
}
9982

10083
public function testLintFilesFromBundleDirectory()

src/Symfony/Component/Config/Tests/Resource/ClassExistenceResourceTest.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,12 @@ public function testExistsKo()
7575
}
7676
}
7777

78-
/**
79-
* @group issue-32995
80-
*
81-
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
82-
*/
8378
public function testBadParentWithTimestamp()
8479
{
8580
$res = new ClassExistenceResource(BadParent::class, false);
8681
$this->assertTrue($res->isFresh(time()));
8782
}
8883

89-
/**
90-
* @group issue-32995
91-
*
92-
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
93-
*/
9484
public function testBadParentWithNoTimestamp()
9585
{
9686
$this->expectException('ReflectionException');

src/Symfony/Component/Debug/ErrorHandler.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,7 @@ private function reRegister($prev)
382382
*/
383383
public function handleError($type, $message, $file, $line)
384384
{
385-
// @deprecated to be removed in Symfony 5.0
386-
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)) {
385+
if (\PHP_VERSION_ID >= 70300 && E_WARNING === $type && '"' === $message[0] && false !== strpos($message, '" targeting switch is equivalent to "break')) {
387386
$type = E_DEPRECATED;
388387
}
389388

src/Symfony/Component/DependencyInjection/Tests/Compiler/AutowirePassTest.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -377,11 +377,6 @@ public function testClassNotFoundThrowsException()
377377
$pass->process($container);
378378
}
379379

380-
/**
381-
* @group issue-32995
382-
*
383-
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
384-
*/
385380
public function testParentClassNotFoundThrowsException()
386381
{
387382
$this->expectException('Symfony\Component\DependencyInjection\Exception\AutowiringFailedException');
@@ -693,11 +688,6 @@ public function getCreateResourceTests()
693688
];
694689
}
695690

696-
/**
697-
* @group issue-32995
698-
*
699-
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
700-
*/
701691
public function testIgnoreServiceWithClassNotExisting()
702692
{
703693
$container = new ContainerBuilder();
@@ -896,11 +886,6 @@ public function testExceptionWhenAliasExists()
896886
$pass->process($container);
897887
}
898888

899-
/**
900-
* @group issue-32995
901-
*
902-
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
903-
*/
904889
public function testExceptionWhenAliasDoesNotExist()
905890
{
906891
$this->expectException('Symfony\Component\DependencyInjection\Exception\AutowiringFailedException');

src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveBindingsPassTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@ public function testUnusedBinding()
6161
$pass->process($container);
6262
}
6363

64-
/**
65-
* @group issue-32995
66-
*
67-
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
68-
*/
6964
public function testMissingParent()
7065
{
7166
$this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException');

src/Symfony/Component/DependencyInjection/Tests/Dumper/PhpDumperTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -893,11 +893,6 @@ public function testInlineSelfRef()
893893
$this->assertStringEqualsFile(self::$fixturesPath.'/php/services_inline_self_ref.php', $dumper->dump(['class' => 'Symfony_DI_PhpDumper_Test_Inline_Self_Ref']));
894894
}
895895

896-
/**
897-
* @group issue-32995
898-
*
899-
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
900-
*/
901896
public function testHotPathOptimizations()
902897
{
903898
$container = include self::$fixturesPath.'/containers/container_inline_requires.php';

src/Symfony/Component/DependencyInjection/Tests/Loader/FileLoaderTest.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,6 @@ public function testRegisterClasses()
107107
);
108108
}
109109

110-
/**
111-
* @group issue-32995
112-
*
113-
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
114-
*/
115110
public function testRegisterClassesWithExclude()
116111
{
117112
$container = new ContainerBuilder();
@@ -141,11 +136,6 @@ public function testRegisterClassesWithExclude()
141136
);
142137
}
143138

144-
/**
145-
* @group issue-32995
146-
*
147-
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
148-
*/
149139
public function testNestedRegisterClasses()
150140
{
151141
$container = new ContainerBuilder();
@@ -174,11 +164,6 @@ public function testNestedRegisterClasses()
174164
$this->assertFalse($alias->isPrivate());
175165
}
176166

177-
/**
178-
* @group issue-32995
179-
*
180-
* @runInSeparateProcess https://github.com/symfony/symfony/issues/32995
181-
*/
182167
public function testMissingParentClass()
183168
{
184169
$container = new ContainerBuilder();

src/Symfony/Component/Process/Tests/ProcessTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function testThatProcessDoesNotThrowWarningDuringRun()
7575
$process = $this->getProcessForCode('sleep(3)');
7676
$process->run();
7777
$actualError = error_get_last();
78-
$this->assertEquals('Test Error', $actualError['message']);
78+
$this->assertEquals('Test Error', $actualError['message'], print_r($actualError, true));
7979
$this->assertEquals(E_USER_NOTICE, $actualError['type']);
8080
}
8181

0 commit comments

Comments
 (0)
0