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

@@ -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);
};