Update vendored libs

This commit is contained in:
Frédéric Guillot
2020-06-08 22:46:20 -07:00
parent dfb0a2d915
commit f60e4a0c59
292 changed files with 9402 additions and 9487 deletions

View File

@@ -19,7 +19,7 @@ class DescriptorCommand1 extends Command
{
$this
->setName('descriptor:command1')
->setAliases(array('alias1', 'alias2'))
->setAliases(['alias1', 'alias2'])
->setDescription('command 1 description')
->setHelp('command 1 help')
;

View File

@@ -19,7 +19,7 @@ class DescriptorCommand4 extends Command
{
$this
->setName('descriptor:command4')
->setAliases(array('descriptor:alias_command4', 'command4:descriptor'))
->setAliases(['descriptor:alias_command4', 'command4:descriptor'])
;
}
}

View File

@@ -25,7 +25,7 @@ class DummyOutput extends BufferedOutput
*/
public function getLogs()
{
$logs = array();
$logs = [];
foreach (explode(PHP_EOL, trim($this->fetch())) as $message) {
preg_match('/^\[(.*)\] (.*)/', $message, $matches);
$logs[] = sprintf('%s %s', $matches[1], $matches[2]);

View File

@@ -14,7 +14,7 @@ class Foo1Command extends Command
$this
->setName('foo:bar1')
->setDescription('The foo:bar1 command')
->setAliases(array('afoobar1'))
->setAliases(['afoobar1'])
;
}

View File

@@ -11,7 +11,7 @@ class Foo2Command extends Command
$this
->setName('foo1:bar')
->setDescription('The foo1:bar command')
->setAliases(array('afoobar2'))
->setAliases(['afoobar2'])
;
}

View File

@@ -1,6 +1,5 @@
<?php
use Symfony\Component\Console\Command\Command;
class Foo6Command extends Command

View File

@@ -14,7 +14,7 @@ class FooCommand extends Command
$this
->setName('foo:bar')
->setDescription('The foo:bar command')
->setAliases(array('afoobar'))
->setAliases(['afoobar'])
;
}

View File

@@ -15,7 +15,7 @@ class FooOptCommand extends Command
$this
->setName('foo:bar')
->setDescription('The foo:bar command')
->setAliases(array('afoobar'))
->setAliases(['afoobar'])
->addOption('fooopt', 'fo', InputOption::VALUE_OPTIONAL, 'fooopt description')
;
}

View File

@@ -14,7 +14,7 @@ class FooSubnamespaced1Command extends Command
$this
->setName('foo:bar:baz')
->setDescription('The foo:bar:baz command')
->setAliases(array('foobarbaz'))
->setAliases(['foobarbaz'])
;
}

View File

@@ -14,7 +14,7 @@ class FooSubnamespaced2Command extends Command
$this
->setName('foo:go:bret')
->setDescription('The foo:bar:go command')
->setAliases(array('foobargo'))
->setAliases(['foobargo'])
;
}

View File

@@ -0,0 +1,21 @@
<?php
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class FooWithoutAliasCommand extends Command
{
protected function configure()
{
$this
->setName('foo')
->setDescription('The foo command')
;
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$output->writeln('called');
}
}

View File

@@ -20,12 +20,12 @@ return function (InputInterface $input, OutputInterface $output) {
//Ensure edge case by appending empty strings to history:
$output->write('Lorem ipsum dolor sit amet');
$output->write(array('', '', ''));
$output->write(['', '', '']);
$output->title('Fourth title');
//Ensure have manual control over number of blank lines:
$output->writeln('Lorem ipsum dolor sit amet');
$output->writeln(array('', '')); //Should append an extra blank line
$output->writeln(['', '']); //Should append an extra blank line
$output->title('Fifth title');
$output->writeln('Lorem ipsum dolor sit amet');

View File

@@ -0,0 +1,34 @@
<?php
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
//Ensure has single blank line after any text and a title
return function (InputInterface $input, OutputInterface $output) {
$output = new SymfonyStyle($input, $output);
$output->write('Lorem ipsum dolor sit amet');
$output->title('First title');
$output->writeln('Lorem ipsum dolor sit amet');
$output->title('Second title');
$output->write('Lorem ipsum dolor sit amet');
$output->write('');
$output->title('Third title');
//Ensure edge case by appending empty strings to history:
$output->write('Lorem ipsum dolor sit amet');
$output->write(new \ArrayIterator(['', '', '']));
$output->title('Fourth title');
//Ensure have manual control over number of blank lines:
$output->writeln('Lorem ipsum dolor sit amet');
$output->writeln(new \ArrayIterator(['', ''])); //Should append an extra blank line
$output->title('Fifth title');
$output->writeln('Lorem ipsum dolor sit amet');
$output->newLine(2); //Should append an extra blank line
$output->title('Fifth title');
};

View File

@@ -9,29 +9,29 @@ return function (InputInterface $input, OutputInterface $output) {
$output = new SymfonyStyle($input, $output);
$output->writeln('Lorem ipsum dolor sit amet');
$output->listing(array(
$output->listing([
'Lorem ipsum dolor sit amet',
'consectetur adipiscing elit',
));
]);
//Even using write:
$output->write('Lorem ipsum dolor sit amet');
$output->listing(array(
$output->listing([
'Lorem ipsum dolor sit amet',
'consectetur adipiscing elit',
));
]);
$output->write('Lorem ipsum dolor sit amet');
$output->text(array(
$output->text([
'Lorem ipsum dolor sit amet',
'consectetur adipiscing elit',
));
]);
$output->newLine();
$output->write('Lorem ipsum dolor sit amet');
$output->comment(array(
$output->comment([
'Lorem ipsum dolor sit amet',
'consectetur adipiscing elit',
));
]);
};

View File

@@ -8,9 +8,9 @@ use Symfony\Component\Console\Style\SymfonyStyle;
return function (InputInterface $input, OutputInterface $output) {
$output = new SymfonyStyle($input, $output);
$output->listing(array(
$output->listing([
'Lorem ipsum dolor sit amet',
'consectetur adipiscing elit',
));
]);
$output->success('Lorem ipsum dolor sit amet');
};

View File

@@ -9,7 +9,7 @@ return function (InputInterface $input, OutputInterface $output) {
$output = new SymfonyStyle($input, $output);
$output->title('Title');
$output->askHidden('Hidden question');
$output->choice('Choice question with default', array('choice1', 'choice2'), 'choice1');
$output->choice('Choice question with default', ['choice1', 'choice2'], 'choice1');
$output->confirm('Confirmation with yes default', true);
$output->text('Duis aute irure dolor in reprehenderit in voluptate velit esse');
};

View File

@@ -1,25 +1,25 @@
<?php
use Symfony\Component\Console\Helper\TableCell;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use Symfony\Component\Console\Helper\TableCell;
//Ensure formatting tables when using multiple headers with TableCell
return function (InputInterface $input, OutputInterface $output) {
$headers = array(
array(new TableCell('Main table title', array('colspan' => 3))),
array('ISBN', 'Title', 'Author'),
);
$headers = [
[new TableCell('Main table title', ['colspan' => 3])],
['ISBN', 'Title', 'Author'],
];
$rows = array(
array(
$rows = [
[
'978-0521567817',
'De Monarchia',
new TableCell("Dante Alighieri\nspans multiple rows", array('rowspan' => 2)),
),
array('978-0804169127', 'Divine Comedy'),
);
new TableCell("Dante Alighieri\nspans multiple rows", ['rowspan' => 2]),
],
['978-0804169127', 'Divine Comedy'],
];
$output = new SymfonyStyle($input, $output);
$output->table($headers, $rows);

View File

@@ -7,5 +7,5 @@ use Symfony\Component\Console\Style\SymfonyStyle;
//Ensure that all lines are aligned to the begin of the first line in a multi-line block
return function (InputInterface $input, OutputInterface $output) {
$output = new SymfonyStyle($input, $output);
$output->block(array('Custom block', 'Second custom block line'), 'CUSTOM', 'fg=white;bg=green', 'X ', true);
$output->block(['Custom block', 'Second custom block line'], 'CUSTOM', 'fg=white;bg=green', 'X ', true);
};

View File

@@ -0,0 +1,32 @@
Lorem ipsum dolor sit amet
First title
===========
Lorem ipsum dolor sit amet
Second title
============
Lorem ipsum dolor sit amet
Third title
===========
Lorem ipsum dolor sit amet
Fourth title
============
Lorem ipsum dolor sit amet
Fifth title
===========
Lorem ipsum dolor sit amet
Fifth title
===========

View File

@@ -0,0 +1,22 @@
<?php
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class TestAmbiguousCommandRegistering extends Command
{
protected function configure()
{
$this
->setName('test-ambiguous')
->setDescription('The test-ambiguous command')
->setAliases(['test'])
;
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$output->write('test-ambiguous');
}
}

View File

@@ -0,0 +1,21 @@
<?php
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class TestAmbiguousCommandRegistering2 extends Command
{
protected function configure()
{
$this
->setName('test-ambiguous2')
->setDescription('The test-ambiguous2 command')
;
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$output->write('test-ambiguous2');
}
}

View File

@@ -10,7 +10,7 @@ class TestCommand extends Command
{
$this
->setName('namespace:name')
->setAliases(array('name'))
->setAliases(['name'])
->setDescription('description')
->setHelp('help')
;

View File

@@ -1,5 +1,5 @@
In ApplicationTest.php line 716:
In ApplicationTest.php line %d:
エラーメッセージ

View File

@@ -1,5 +1,5 @@
In ApplicationTest.php line 716:
In ApplicationTest.php line %d:
 
 エラーメッセージ 
 

View File

@@ -1,5 +1,5 @@
In ApplicationTest.php line 730:
In ApplicationTest.php line %d:
コマンドの実行中にエラーが
発生しました。

View File

@@ -1,5 +1,5 @@
In ApplicationTest.php line 744:
In ApplicationTest.php line %d:
dont break here <
info>!</info>

View File

@@ -1,5 +1,5 @@
In ApplicationTest.php line 761:
In ApplicationTest.php line %d:
line 1 with extra spaces
line 2

View File

@@ -1,3 +1,6 @@
Description:
Lists commands
Usage:
list [options] [--] [<namespace>]

View File

@@ -1,3 +1,6 @@
Description:
Lists commands
Usage:
list [options] [--] [<namespace>]

View File

@@ -1,3 +1,6 @@
<comment>Description:</comment>
command 1 description
<comment>Usage:</comment>
descriptor:command1
alias1

View File

@@ -1,3 +1,6 @@
<comment>Description:</comment>
command 2 description
<comment>Usage:</comment>
descriptor:command2 [options] [--] \<argument_name>
descriptor:command2 -o|--option_name \<argument_name>

View File

@@ -1,3 +1,6 @@
<comment>Description:</comment>
command åèä description
<comment>Usage:</comment>
descriptor:åèä [options] [--] \<argument_åèä>
descriptor:åèä -o|--option_name \<argument_name>