composeer update

This commit is contained in:
2019-06-23 11:49:01 +00:00
parent fc2380d68c
commit e9efe70112
327 changed files with 5194 additions and 2278 deletions

View File

@@ -97,7 +97,9 @@ class JsonDescriptor extends Descriptor
*/
private function writeData(array $data, array $options)
{
$this->write(json_encode($data, isset($options['json_encoding']) ? $options['json_encoding'] : 0));
$flags = isset($options['json_encoding']) ? $options['json_encoding'] : 0;
$this->write(json_encode($data, $flags));
}
/**

View File

@@ -187,7 +187,7 @@ class OutputFormatterStyle implements OutputFormatterStyleInterface
$unsetCodes = [];
if (null === $this->handlesHrefGracefully) {
$this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR');
$this->handlesHrefGracefully = 'JetBrains-JediTerm' !== getenv('TERMINAL_EMULATOR') && !getenv('KONSOLE_VERSION');
}
if (null !== $this->foreground) {

View File

@@ -709,7 +709,7 @@ class ApplicationTest extends TestCase
$application = $this->getMockBuilder('Symfony\Component\Console\Application')->setMethods(['getNamespaces'])->getMock();
$application->expects($this->once())
->method('getNamespaces')
->will($this->returnValue(['foo:sublong', 'bar:sub']));
->willReturn(['foo:sublong', 'bar:sub']);
$this->assertEquals('foo:sublong', $application->findNamespace('f:sub'));
}
@@ -853,7 +853,7 @@ class ApplicationTest extends TestCase
$application->setAutoExit(false);
$application->expects($this->any())
->method('getTerminalWidth')
->will($this->returnValue(120));
->willReturn(120);
$application->register('foo')->setCode(function () {
throw new \InvalidArgumentException("\n\nline 1 with extra spaces \nline 2\n\nline 4\n");
});

View File

@@ -321,7 +321,7 @@ class CommandTest extends TestCase
$command = $this->getMockBuilder('TestCommand')->setMethods(['execute'])->getMock();
$command->expects($this->once())
->method('execute')
->will($this->returnValue('2.3'));
->willReturn('2.3');
$exitCode = $command->run(new StringInput(''), new NullOutput());
$this->assertSame(2, $exitCode, '->run() returns integer exit code (casts numeric to int)');
}

View File

@@ -21,7 +21,7 @@ abstract class AbstractQuestionHelperTest extends TestCase
$mock = $this->getMockBuilder(StreamableInputInterface::class)->getMock();
$mock->expects($this->any())
->method('isInteractive')
->will($this->returnValue($interactive));
->willReturn($interactive);
if ($stream) {
$mock->expects($this->any())

View File

@@ -114,7 +114,7 @@ class HelperSetTest extends TestCase
$mock_helper = $this->getMockBuilder('\Symfony\Component\Console\Helper\HelperInterface')->getMock();
$mock_helper->expects($this->any())
->method('getName')
->will($this->returnValue($name));
->willReturn($name);
if ($helperset) {
$mock_helper->expects($this->any())

View File

@@ -760,7 +760,7 @@ class QuestionHelperTest extends AbstractQuestionHelperTest
$mock = $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface')->getMock();
$mock->expects($this->any())
->method('isInteractive')
->will($this->returnValue($interactive));
->willReturn($interactive);
return $mock;
}

View File

@@ -154,7 +154,7 @@ class SymfonyQuestionHelperTest extends AbstractQuestionHelperTest
$mock = $this->getMockBuilder('Symfony\Component\Console\Input\InputInterface')->getMock();
$mock->expects($this->any())
->method('isInteractive')
->will($this->returnValue($interactive));
->willReturn($interactive);
return $mock;
}

View File

@@ -166,7 +166,7 @@ class ConsoleLoggerTest extends TestCase
} else {
$dummy = $this->getMock('Symfony\Component\Console\Tests\Logger\DummyTest', ['__toString']);
}
$dummy->method('__toString')->will($this->returnValue('DUMMY'));
$dummy->method('__toString')->willReturn('DUMMY');
$this->getLogger()->warning($dummy);