Skip to content

Commit 553855b

Browse files
minor symfony#18960 [appveyor] Ignore STATUS_HEAP_CORRUPTION errors on Windows (nicolas-grekas)
This PR was merged into the 2.7 branch. Discussion ---------- [appveyor] Ignore STATUS_HEAP_CORRUPTION errors on Windows | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - As in e.g. https://ci.appveyor.com/project/fabpot/symfony/build/1.0.9382#L1505 Commits ------- 574f4e4 [appveyor] Ignore STATUS_HEAP_CORRUPTION errors on Windows
2 parents e5ffcb2 + 574f4e4 commit 553855b

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

phpunit

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ if (!file_exists("$PHPUNIT_DIR/phpunit-$PHPUNIT_VERSION/phpunit") || md5_file(__
5353
chdir("phpunit-$PHPUNIT_VERSION");
5454
passthru("$COMPOSER remove --no-update phpspec/prophecy");
5555
passthru("$COMPOSER remove --no-update symfony/yaml");
56+
if (5.1 <= $PHPUNIT_VERSION && $PHPUNIT_VERSION < 5.4) {
57+
passthru("$COMPOSER require --no-update phpunit/phpunit-mock-objects \"~3.1.0\"");
58+
}
5659
passthru("$COMPOSER require --dev --no-update symfony/phpunit-bridge \">=3.1@dev\"");
5760
passthru("$COMPOSER install --prefer-dist --no-progress --ansi", $exit);
5861
if ($exit) {
@@ -170,8 +173,11 @@ if (isset($argv[1]) && 'symfony' === $argv[1]) {
170173
unlink($file);
171174
}
172175

173-
// Fail on any individual component failures but ignore STATUS_STACK_BUFFER_OVERRUN (-1073740791/0xC0000409) and STATUS_ACCESS_VIOLATION (-1073741819/0xC0000005) on Windows when APCu is enabled
174-
if ($procStatus && ('\\' !== DIRECTORY_SEPARATOR || !extension_loaded('apcu') || !ini_get('apc.enable_cli') || (-1073740791 !== $procStatus && -1073741819 !== $procStatus))) {
176+
// Fail on any individual component failures but ignore some error codes on Windows when APCu is enabled:
177+
// STATUS_STACK_BUFFER_OVERRUN (-1073740791/0xC0000409)
178+
// STATUS_ACCESS_VIOLATION (-1073741819/0xC0000005)
179+
// STATUS_HEAP_CORRUPTION (-1073740940/0xC0000374)
180+
if ($procStatus && ('\\' !== DIRECTORY_SEPARATOR || !extension_loaded('apcu') || !ini_get('apc.enable_cli') || !in_array($procStatus, array(-1073740791, -1073741819, -1073740940)))) {
175181
$exit = $procStatus;
176182
echo "\033[41mKO\033[0m $component\n\n";
177183
} else {

src/Symfony/Component/HttpKernel/Tests/DataCollector/DumpDataCollectorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function testFlush()
128128
$line = __LINE__ - 1;
129129

130130
ob_start();
131-
$collector = null;
131+
$collector->__destruct();
132132
if (PHP_VERSION_ID >= 50400) {
133133
$this->assertSame("DumpDataCollectorTest.php on line {$line}:\n456\n", ob_get_clean());
134134
} else {

0 commit comments

Comments
 (0)