8000 Disable PHPUnit result cache on the CI by nicolas-grekas · Pull Request #33110 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Disable PHPUnit result cache on the CI #33110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ init:
- SET "SYMFONY_REQUIRE=>=3.4"
- SET ANSICON=121x90 (121x90)
- SET SYMFONY_PHPUNIT_VERSION=4.8
- SET SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE=1
- REG ADD "HKEY_CURRENT_USER\Software\Microsoft\Command Processor" /v DelayedExpansion /t REG_DWORD /d 1 /f

install:
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ env:
- MIN_PHP=5.5.9
- SYMFONY_PROCESS_PHP_TEST_BINARY=~/.phpenv/versions/5.6/bin/php
- SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1
- SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE=1

matrix:
include:
Expand Down
8 changes: 8 additions & 0 deletions src/Symfony/Bridge/PhpUnit/bin/simple-phpunit
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ EOPHP
global $argv, $argc;
$argv = isset($_SERVER['argv']) ? $_SERVER['argv'] : array();
$argc = isset($_SERVER['argc']) ? $_SERVER['argc'] : 0;

if ($PHPUNIT_VERSION < 8.0) {
$argv = array_filter($argv, function ($v) use (&$argc) { if ('--do-not-cache-result' !== $v) return true; --$argc; });
} elseif (filter_var(getenv('SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE'), FILTER_VALIDATE_BOOLEAN)) {
$argv[] = '--do-not-cache-result';
++$argc;
}

$components = array();
$cmd = array_map('escapeshellarg', $argv);
$exit = 0;
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Component/Config/Definition/BaseNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@ final public function normalize($value)
/**
* Normalizes the value before any other normalization is applied.
*
* @param $value
* @param mixed $value
*
* @return The normalized array value
* @return mixed The normalized array value
*/
protected function preNormalize($value)
{
Expand Down
0