8000 Disable PHPUnit result cache on the CI · symfony/symfony@912d7db · GitHub
[go: up one dir, main page]

Skip to content

Commit 912d7db

Browse files
Disable PHPUnit result cache on the CI
1 parent 6b1ddd1 commit 912d7db

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

.appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ init:
1313
- SET "SYMFONY_REQUIRE=>=3.4"
1414
- SET ANSICON=121x90 (121x90)
1515
- SET SYMFONY_PHPUNIT_VERSION=4.8
16+
- SET SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE=1
1617
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v DelayedExpansion /t REG_DWORD /d 1 /f
1718

1819
install:

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ env:
1818
- MIN_PHP=5.5.9
1919
- SYMFONY_PROCESS_PHP_TEST_BINARY=~/.phpenv/versions/5.6/bin/php
2020
- SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1
21+
- SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE=1
2122

2223
matrix:
2324
include:

src/Symfony/Bridge/PhpUnit/bin/simple-phpunit

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,14 @@ EOPHP
133133
global $argv, $argc;
134134
$argv = isset($_SERVER['argv']) ? $_SERVER['argv'] : array();
135135
$argc = isset($_SERVER['argc']) ? $_SERVER['argc'] : 0;
136+
137+
if ($PHPUNIT_VERSION < 8.0) {
138+
$argv = array_filter($argv, function ($v) use (&$argc) { if ('--do-not-cache-result' !== $v) return true; --$argc; });
139+
} elseif (filter_var(getenv('SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE'), FILTER_VALIDATE_BOOLEAN)) {
140+
$argv[] = '--do-not-cache-result';
141+
++$argc;
142+
}
143+
136144
$components = array();
137145
$cmd = array_map('escapeshellarg', $argv);
138146
$exit = 0;

src/Symfony/Component/Config/Definition/BaseNode.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,9 @@ final public function normalize($value)
280280
/**
281281
* Normalizes the value before any other normalization is applied.
282282
*
283-
* @param $value
283+
* @param mixed $value
284284
*
285-
* @return The normalized array value
285+
* @return mixed The normalized array value
286286
*/
287287
protected function preNormalize($value)
288288
{

0 commit comments

Comments
 (0)
0