Fix some PHP 8.1 deprecation warnings, fixes #10008
parent
f5a03b950d
commit
10ae1d7b08
|
@ -79,6 +79,7 @@ class Pool implements \Countable
|
|||
/**
|
||||
* Returns how many packages have been loaded into the pool
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function count()
|
||||
{
|
||||
return \count($this->packages);
|
||||
|
|
|
@ -283,6 +283,7 @@ class ArrayRepository implements RepositoryInterface
|
|||
*
|
||||
* @return int Number of packages
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function count()
|
||||
{
|
||||
if (null === $this->packages) {
|
||||
|
|
|
@ -68,17 +68,6 @@ class HhvmDetectorTest extends TestCase
|
|||
self::assertSame(self::getVersionParser()->normalize($version), self::getVersionParser()->normalize($detectedVersion));
|
||||
}
|
||||
|
||||
/** @runInSeparateProcess */
|
||||
public function testHHVMVersionWhenRunningInHHVMWithMockedConstant()
|
||||
{
|
||||
if (!defined('HHVM_VERSION_ID')) {
|
||||
define('HHVM_VERSION', '2.2.1');
|
||||
define('HHVM_VERSION_ID', 20201);
|
||||
}
|
||||
$version = $this->hhvmDetector->getVersion();
|
||||
self::assertSame(self::getVersionParser()->normalize(self::versionIdToVersion()), self::getVersionParser()->normalize($version));
|
||||
}
|
||||
|
||||
private static function versionIdToVersion()
|
||||
{
|
||||
if (!defined('HHVM_VERSION_ID')) {
|
||||
|
|
|
@ -111,7 +111,7 @@ class ProcessExecutorTest extends TestCase
|
|||
$output = new BufferedOutput(OutputInterface::VERBOSITY_NORMAL, true);
|
||||
$process = new ProcessExecutor(new ConsoleIO(new ArrayInput(array()), $output, new HelperSet(array())));
|
||||
|
||||
$process->execute('php -r "echo \'<error>foo</error>\'.PHP_EOL;"');
|
||||
$process->execute('php -ddisplay_errors=0 -derror_reporting=0 -r "echo \'<error>foo</error>\'.PHP_EOL;"');
|
||||
$this->assertSame('<error>foo</error>'.PHP_EOL, $output->fetch());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue