Skip to content

Commit

Permalink
Merge branch '6.4' into 7.0
Browse files Browse the repository at this point in the history
* 6.4:
  [Serializer] Improve exception message in UnwrappingDenormalizer
  [PropertyInfo] Update DoctrineExtractor for new DBAL 4 BIGINT type
  Update security.nl.xlf
  [Validator] IBAN Check digits should always between 2 and 98
  [Security] Populate translations for trans-unit 20
  add missing plural translation messages
  filter out empty HTTP header parts
  [String] Fix folded in compat mode
  Remove calls to `getMockForAbstractClass()`
  [ErrorHandler] Do not call xdebug_get_function_stack() with xdebug >= 3.0 when not in develop mode
  [Serializer] Fix type for missing property
  add test for JSON response with null as content
  [Filesystem] Fix dumpFile `stat failed` error hitting custom handler
  Return false in isTtySupported() when open_basedir restrictions prevent access to /dev/tty.
  Remove calls to `TestCase::iniSet()` and calls to deprecated methods of `MockBuilder`
  [PhpUnitBridge] Fix `DeprecationErrorHandler` with PhpUnit 10
  • Loading branch information
fabpot committed May 17, 2024
2 parents 3839e56 + 64b6202 commit 820da2d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,7 @@ public static function isTtySupported(): bool
{
static $isTtySupported;

return $isTtySupported ??= ('/' === \DIRECTORY_SEPARATOR && stream_isatty(\STDOUT));
return $isTtySupported ??= ('/' === \DIRECTORY_SEPARATOR && stream_isatty(\STDOUT) && @is_writable('/dev/tty'));
}

/**
Expand Down
12 changes: 8 additions & 4 deletions Tests/ExecutableFinderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,16 @@ public function testFindWithOpenBaseDir()
}

putenv('PATH='.\dirname(\PHP_BINARY));
$this->iniSet('open_basedir', \dirname(\PHP_BINARY).\PATH_SEPARATOR.'/');
$initialOpenBaseDir = ini_set('open_basedir', \dirname(\PHP_BINARY).\PATH_SEPARATOR.'/');

$finder = new ExecutableFinder();
$result = $finder->find($this->getPhpBinaryName());
try {
$finder = new ExecutableFinder();
$result = $finder->find($this->getPhpBinaryName());

$this->assertSamePath(\PHP_BINARY, $result);
$this->assertSamePath(\PHP_BINARY, $result);
} finally {
ini_set('open_basedir', $initialOpenBaseDir);
}
}

public function testFindBatchExecutableOnWindows()
Expand Down

0 comments on commit 820da2d

Please sign in to comment.