minor #29776 remove no longer needed PHP version checks (xabbuh)

This PR was merged into the 3.4 branch.

Discussion
----------

remove no longer needed PHP version checks

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

99448c6e78 remove no longer needed PHP version checks
This commit is contained in:
Fabien Potencier 2019-01-04 16:46:05 +01:00
commit 3ee1adbd90
2 changed files with 3 additions and 6 deletions

View File

@ -16,7 +16,7 @@ array_shift($dirs);
$mergeBase = trim(shell_exec(sprintf('git merge-base "%s" HEAD', array_shift($dirs))));
$packages = array();
$flags = \PHP_VERSION_ID >= 50400 ? JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE : 0;
$flags = JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
foreach ($dirs as $k => $dir) {
if (!system("git diff --name-only $mergeBase -- $dir", $exitStatus)) {

View File

@ -125,11 +125,8 @@ EOTXT;
$collector->dump($data);
$line = __LINE__ - 1;
$output = preg_replace("/\033\[[^m]*m/", '', ob_get_clean());
if (\PHP_VERSION_ID >= 50400) {
$this->assertSame("DumpDataCollectorTest.php on line {$line}:\n456\n", $output);
} else {
$this->assertSame("\"DumpDataCollectorTest.php on line {$line}:\"\n456\n", $output);
}
$this->assertSame("DumpDataCollectorTest.php on line {$line}:\n456\n", $output);
ob_start();
$collector->__destruct();