Skip to content

Commit

Permalink
Update php-cs-fixer's config to play better with post-2.3.x versions …
Browse files Browse the repository at this point in the history
…and fix a couple of violations that still happen with newer versions
  • Loading branch information
luispabon committed Dec 13, 2017
1 parent 455c41a commit 1530c4c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions .php_cs.dist
Expand Up @@ -36,6 +36,7 @@ return PhpCsFixer\Config::create()
'simplified_null_return' => true,
'strict_comparison' => true,
'strict_param' => true,
'yoda_style' => false,
])
->setFinder(
PhpCsFixer\Finder::create()
Expand Down
2 changes: 1 addition & 1 deletion src/Runners/PHPUnit/Configuration.php
Expand Up @@ -134,7 +134,7 @@ public function getSuiteByName(string $suiteName)
unset($excludedPaths[$dir]);
}
}
// not breaking on purpose
// no break on purpose
default:
foreach ($this->getSuitePaths((string) $nodeContent) as $path) {
$suites[(string) $node['name']][] = new SuitePath(
Expand Down
11 changes: 6 additions & 5 deletions src/Runners/PHPUnit/ExecutableTest.php
Expand Up @@ -279,10 +279,12 @@ protected function assertValidCommandLineLength(string $cmd)
throw new \RuntimeException('Command line is too long, try to decrease max batch size');
}
}
// TODO: Implement command line length validation for linux/osx/freebsd
// Please note that on unix environment variables also became part of command line
// linux: echo | xargs --show-limits
// osx/linux: getconf ARG_MAX
/*
* @todo Implement command line length validation for linux/osx/freebsd.
* Please note that on unix environment variables also became part of command line:
* - linux: echo | xargs --show-limits
* - osx/linux: getconf ARG_MAX
*/
}

/**
Expand Down Expand Up @@ -320,7 +322,6 @@ protected function getCommandString(string $binary, array $options = [])
$arguments[] = $this->fullyQualifiedClassName ?? '';
$arguments[] = $this->getPath();


return (new Process($arguments))->getCommandLine();
}

Expand Down
3 changes: 2 additions & 1 deletion test/functional/PHPUnitTest.php
Expand Up @@ -21,7 +21,8 @@ public function testWithBootstrapThatDoesNotExist()
// The [RuntimeException] message appears only on lower 6.x versions of Phpunit
$this->assertRegExp(
'/(\[RuntimeException\]|Bootstrap specified but could not be found)/',
$errors, 'Expected exception name not found in output'
$errors,
'Expected exception name not found in output'
);
}

Expand Down

0 comments on commit 1530c4c

Please sign in to comment.