Skip to content

Commit f6ebee6

Browse files
committed
downgrade symfony/yaml
1 parent 158de6e commit f6ebee6

13 files changed

+196
-161
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "One-click WordPress plugin that converts all posts, pages, taxonomies, metadata, and settings to Markdown and YAML which can be dropped into Jekyll.",
44
"require": {
55
"league/html-to-markdown": "^5.0",
6-
"symfony/yaml": "^5.0 || ^6.0"
6+
"symfony/yaml": "^5.0"
77
},
88
"license": "GPLv3 or later",
99
"authors": [{

vendor/composer/autoload_files.php

-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@
2020
'6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
2121
'3937806105cc8e221b8fa8db5b70d2f2' => $vendorDir . '/wp-cli/mustangostang-spyc/includes/functions.php',
2222
'be01b9b16925dcb22165c40b46681ac6' => $vendorDir . '/wp-cli/php-cli-tools/lib/cli/cli.php',
23-
'04c6c5c2f7095ccf6c481d3e53e1776f' => $vendorDir . '/mustangostang/spyc/Spyc.php',
2423
'7d3b315c4f303f2fc14aca642a738e50' => $vendorDir . '/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php',
2524
);

vendor/composer/autoload_static.php

-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ class ComposerStaticInit85c237256145ae68b71a77045d81d88a
2121
'6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
2222
'3937806105cc8e221b8fa8db5b70d2f2' => __DIR__ . '/..' . '/wp-cli/mustangostang-spyc/includes/functions.php',
2323
'be01b9b16925dcb22165c40b46681ac6' => __DIR__ . '/..' . '/wp-cli/php-cli-tools/lib/cli/cli.php',
24-
'04c6c5c2f7095ccf6c481d3e53e1776f' => __DIR__ . '/..' . '/mustangostang/spyc/Spyc.php',
2524
'7d3b315c4f303f2fc14aca642a738e50' => __DIR__ . '/..' . '/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php',
2625
);
2726

vendor/composer/installed.json

+11-64
Original file line numberDiff line numberDiff line change
@@ -622,59 +622,6 @@
622622
},
623623
"install-path": "../mustache/mustache"
624624
},
625-
{
626-
"name": "mustangostang/spyc",
627-
"version": "0.6.3",
628-
"version_normalized": "0.6.3.0",
629-
"source": {
630-
"type": "git",
631-
"url": "[email protected]:mustangostang/spyc.git",
632-
"reference": "4627c838b16550b666d15aeae1e5289dd5b77da0"
633-
},
634-
"dist": {
635-
"type": "zip",
636-
"url": "https://api.github.com/repos/mustangostang/spyc/zipball/4627c838b16550b666d15aeae1e5289dd5b77da0",
637-
"reference": "4627c838b16550b666d15aeae1e5289dd5b77da0",
638-
"shasum": ""
639-
},
640-
"require": {
641-
"php": ">=5.3.1"
642-
},
643-
"require-dev": {
644-
"phpunit/phpunit": "4.3.*@dev"
645-
},
646-
"time": "2019-09-10T13:16:29+00:00",
647-
"type": "library",
648-
"extra": {
649-
"branch-alias": {
650-
"dev-master": "0.5.x-dev"
651-
}
652-
},
653-
"installation-source": "dist",
654-
"autoload": {
655-
"files": [
656-
"Spyc.php"
657-
]
658-
},
659-
"notification-url": "https://packagist.org/downloads/",
660-
"license": [
661-
"MIT"
662-
],
663-
"authors": [
664-
{
665-
"name": "mustangostang",
666-
"email": "[email protected]"
667-
}
668-
],
669-
"description": "A simple YAML loader/dumper class for PHP",
670-
"homepage": "https://github.com/mustangostang/spyc/",
671-
"keywords": [
672-
"spyc",
673-
"yaml",
674-
"yml"
675-
],
676-
"install-path": "../mustangostang/spyc"
677-
},
678625
{
679626
"name": "myclabs/deep-copy",
680627
"version": "1.10.2",
@@ -4175,33 +4122,34 @@
41754122
},
41764123
{
41774124
"name": "symfony/yaml",
4178-
"version": "v6.0.2",
4179-
"version_normalized": "6.0.2.0",
4125+
"version": "v5.4.2",
4126+
"version_normalized": "5.4.2.0",
41804127
"source": {
41814128
"type": "git",
41824129
"url": "https://github.com/symfony/yaml.git",
4183-
"reference": "ed602f38b8636a2ea21af760d2578f3d2f92fc60"
4130+
"reference": "b9eb163846a61bb32dfc147f7859e274fab38b58"
41844131
},
41854132
"dist": {
41864133
"type": "zip",
4187-
"url": "https://api.github.com/repos/symfony/yaml/zipball/ed602f38b8636a2ea21af760d2578f3d2f92fc60",
4188-
"reference": "ed602f38b8636a2ea21af760d2578f3d2f92fc60",
4134+
"url": "https://api.github.com/repos/symfony/yaml/zipball/b9eb163846a61bb32dfc147f7859e274fab38b58",
4135+
"reference": "b9eb163846a61bb32dfc147f7859e274fab38b58",
41894136
"shasum": ""
41904137
},
41914138
"require": {
4192-
"php": ">=8.0.2",
4139+
"php": ">=7.2.5",
4140+
"symfony/deprecation-contracts": "^2.1|^3",
41934141
"symfony/polyfill-ctype": "^1.8"
41944142
},
41954143
"conflict": {
4196-
"symfony/console": "<5.4"
4144+
"symfony/console": "<5.3"
41974145
},
41984146
"require-dev": {
4199-
"symfony/console": "^5.4|^6.0"
4147+
"symfony/console": "^5.3|^6.0"
42004148
},
42014149
"suggest": {
42024150
"symfony/console": "For validating YAML files using the lint command"
42034151
},
4204-
"time": "2021-12-16T22:13:01+00:00",
4152+
"time": "2021-12-16T21:58:21+00:00",
42054153
"bin": [
42064154
"Resources/bin/yaml-lint"
42074155
],
@@ -4232,7 +4180,7 @@
42324180
"description": "Loads and dumps YAML files",
42334181
"homepage": "https://symfony.com",
42344182
"support": {
4235-
"source": "https://github.com/symfony/yaml/tree/v6.0.2"
4183+
"source": "https://github.com/symfony/yaml/tree/v5.4.2"
42364184
},
42374185
"funding": [
42384186
{
@@ -4717,7 +4665,6 @@
47174665
"squizlabs/php_codesniffer",
47184666
"symfony/config",
47194667
"symfony/console",
4720-
"symfony/deprecation-contracts",
47214668
"symfony/filesystem",
47224669
"symfony/finder",
47234670
"symfony/polyfill-intl-grapheme",

vendor/composer/installed.php

+6-15
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
'type' => 'library',
66
'install_path' => __DIR__ . '/../../',
77
'aliases' => array(),
8-
'reference' => '5021c22e155cca0977a7ec5448e087058380c1aa',
8+
'reference' => '158de6e273b64eaea79ace3a0677f59637b3938a',
99
'name' => 'benbalter/wordpress-to-jekyll-exporter',
1010
'dev' => true,
1111
),
@@ -16,7 +16,7 @@
1616
'type' => 'library',
1717
'install_path' => __DIR__ . '/../../',
1818
'aliases' => array(),
19-
'reference' => '5021c22e155cca0977a7ec5448e087058380c1aa',
19+
'reference' => '158de6e273b64eaea79ace3a0677f59637b3938a',
2020
'dev_requirement' => false,
2121
),
2222
'dealerdirect/phpcodesniffer-composer-installer' => array(
@@ -82,15 +82,6 @@
8282
'reference' => '579ffa5c96e1d292c060b3dd62811ff01ad8c24e',
8383
'dev_requirement' => true,
8484
),
85-
'mustangostang/spyc' => array(
86-
'pretty_version' => '0.6.3',
87-
'version' => '0.6.3.0',
88-
'type' => 'library',
89-
'install_path' => __DIR__ . '/../mustangostang/spyc',
90-
'aliases' => array(),
91-
'reference' => '4627c838b16550b666d15aeae1e5289dd5b77da0',
92-
'dev_requirement' => false,
93-
),
9485
'myclabs/deep-copy' => array(
9586
'pretty_version' => '1.10.2',
9687
'version' => '1.10.2.0',
@@ -491,7 +482,7 @@
491482
'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
492483
'aliases' => array(),
493484
'reference' => 'c726b64c1ccfe2896cb7df2e1331c357ad1c8ced',
494-
'dev_requirement' => true,
485+
'dev_requirement' => false,
495486
),
496487
'symfony/filesystem' => array(
497488
'pretty_version' => 'v6.0.0',
@@ -584,12 +575,12 @@
584575
'dev_requirement' => true,
585576
),
586577
'symfony/yaml' => array(
587-
'pretty_version' => 'v6.0.2',
588-
'version' => '6.0.2.0',
578+
'pretty_version' => 'v5.4.2',
579+
'version' => '5.4.2.0',
589580
'type' => 'library',
590581
'install_path' => __DIR__ . '/../symfony/yaml',
591582
'aliases' => array(),
592-
'reference' => 'ed602f38b8636a2ea21af760d2578f3d2f92fc60',
583+
'reference' => 'b9eb163846a61bb32dfc147f7859e274fab38b58',
593584
'dev_requirement' => false,
594585
),
595586
'theseer/tokenizer' => array(

vendor/symfony/yaml/Command/LintCommand.php

+16-10
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Yaml\Command;
1313

14-
use Symfony\Component\Console\Attribute\AsCommand;
1514
use Symfony\Component\Console\CI\GithubActionReporter;
1615
use Symfony\Component\Console\Command\Command;
1716
use Symfony\Component\Console\Completion\CompletionInput;
@@ -33,21 +32,23 @@
3332
* @author Grégoire Pineau <[email protected]>
3433
* @author Robin Chalas <[email protected]>
3534
*/
36-
#[AsCommand(name: 'lint:yaml', description: 'Lint a YAML file and outputs encountered errors')]
3735
class LintCommand extends Command
3836
{
37+
protected static $defaultName = 'lint:yaml';
38+
protected static $defaultDescription = 'Lint a YAML file and outputs encountered errors';
39+
3940
private $parser;
40-
private ?string $format = null;
41-
private bool $displayCorrectFiles;
42-
private ?\Closure $directoryIteratorProvider;
43-
private ?\Closure $isReadableProvider;
41+
private $format;
42+
private $displayCorrectFiles;
43+
private $directoryIteratorProvider;
44+
private $isReadableProvider;
4445

4546
public function __construct(string $name = null, callable $directoryIteratorProvider = null, callable $isReadableProvider = null)
4647
{
4748
parent::__construct($name);
4849

49-
$this->directoryIteratorProvider = null === $directoryIteratorProvider || $directoryIteratorProvider instanceof \Closure ? $directoryIteratorProvider : \Closure::fromCallable($directoryIteratorProvider);
50-
$this->isReadableProvider = null === $isReadableProvider || $isReadableProvider instanceof \Closure ? $isReadableProvider : \Closure::fromCallable($isReadableProvider);
50+
$this->directoryIteratorProvider = $directoryIteratorProvider;
51+
$this->isReadableProvider = $isReadableProvider;
5152
}
5253

5354
/**
@@ -56,6 +57,7 @@ public function __construct(string $name = null, callable $directoryIteratorProv
5657
protected function configure()
5758
{
5859
$this
60+
->setDescription(self::$defaultDescription)
5961
->addArgument('filename', InputArgument::IS_ARRAY, 'A file, a directory or "-" for reading from STDIN')
6062
->addOption('format', null, InputOption::VALUE_REQUIRED, 'The output format')
6163
->addOption('exclude', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Path(s) to exclude')
@@ -86,7 +88,7 @@ protected function configure()
8688
;
8789
}
8890

89-
protected function execute(InputInterface $input, OutputInterface $output): int
91+
protected function execute(InputInterface $input, OutputInterface $output)
9092
{
9193
$io = new SymfonyStyle($input, $output);
9294
$filenames = (array) $input->getArgument('filename');
@@ -242,7 +244,11 @@ private function getFiles(string $fileOrDirectory): iterable
242244

243245
private function getParser(): Parser
244246
{
245-
return $this->parser ??= new Parser();
247+
if (!$this->parser) {
248+
$this->parser = new Parser();
249+
}
250+
251+
return $this->parser;
246252
}
247253

248254
private function getDirectoryIterator(string $directory): iterable

vendor/symfony/yaml/Dumper.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ class Dumper
2424
{
2525
/**
2626
* The amount of spaces to use for indentation of nested nodes.
27+
*
28+
* @var int
2729
*/
28-
private int $indentation;
30+
protected $indentation;
2931

3032
public function __construct(int $indentation = 4)
3133
{
@@ -44,7 +46,7 @@ public function __construct(int $indentation = 4)
4446
* @param int $indent The level of indentation (used internally)
4547
* @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string
4648
*/
47-
public function dump(mixed $input, int $inline = 0, int $indent = 0, int $flags = 0): string
49+
public function dump($input, int $inline = 0, int $indent = 0, int $flags = 0): string
4850
{
4951
$output = '';
5052
$prefix = $indent ? str_repeat(' ', $indent) : '';

vendor/symfony/yaml/Exception/ParseException.php

+13-7
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
*/
1919
class ParseException extends RuntimeException
2020
{
21-
private ?string $parsedFile;
22-
private int $parsedLine;
23-
private ?string $snippet;
24-
private string $rawMessage;
21+
private $parsedFile;
22+
private $parsedLine;
23+
private $snippet;
24+
private $rawMessage;
2525

2626
/**
2727
* @param string $message The error message
@@ -43,8 +43,10 @@ public function __construct(string $message, int $parsedLine = -1, string $snipp
4343

4444
/**
4545
* Gets the snippet of code near the error.
46+
*
47+
* @return string
4648
*/
47-
public function getSnippet(): string
49+
public function getSnippet()
4850
{
4951
return $this->snippet;
5052
}
@@ -63,8 +65,10 @@ public function setSnippet(string $snippet)
6365
* Gets the filename where the error occurred.
6466
*
6567
* This method returns null if a string is parsed.
68+
*
69+
* @return string
6670
*/
67-
public function getParsedFile(): string
71+
public function getParsedFile()
6872
{
6973
return $this->parsedFile;
7074
}
@@ -81,8 +85,10 @@ public function setParsedFile(string $parsedFile)
8185

8286
/**
8387
* Gets the line where the error occurred.
88+
*
89+
* @return int
8490
*/
85-
public function getParsedLine(): int
91+
public function getParsedLine()
8692
{
8793
return $this->parsedLine;
8894
}

0 commit comments

Comments
 (0)