Skip to content

Commit

Permalink
downgrade symfony/yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
benbalter committed Jan 26, 2022
1 parent 158de6e commit f6ebee6
Show file tree
Hide file tree
Showing 13 changed files with 196 additions and 161 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "One-click WordPress plugin that converts all posts, pages, taxonomies, metadata, and settings to Markdown and YAML which can be dropped into Jekyll.",
"require": {
"league/html-to-markdown": "^5.0",
"symfony/yaml": "^5.0 || ^6.0"
"symfony/yaml": "^5.0"
},
"license": "GPLv3 or later",
"authors": [{
Expand Down
1 change: 0 additions & 1 deletion vendor/composer/autoload_files.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,5 @@
'6124b4c8570aa390c21fafd04a26c69f' => $vendorDir . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'3937806105cc8e221b8fa8db5b70d2f2' => $vendorDir . '/wp-cli/mustangostang-spyc/includes/functions.php',
'be01b9b16925dcb22165c40b46681ac6' => $vendorDir . '/wp-cli/php-cli-tools/lib/cli/cli.php',
'04c6c5c2f7095ccf6c481d3e53e1776f' => $vendorDir . '/mustangostang/spyc/Spyc.php',
'7d3b315c4f303f2fc14aca642a738e50' => $vendorDir . '/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php',
);
1 change: 0 additions & 1 deletion vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class ComposerStaticInit85c237256145ae68b71a77045d81d88a
'6124b4c8570aa390c21fafd04a26c69f' => __DIR__ . '/..' . '/myclabs/deep-copy/src/DeepCopy/deep_copy.php',
'3937806105cc8e221b8fa8db5b70d2f2' => __DIR__ . '/..' . '/wp-cli/mustangostang-spyc/includes/functions.php',
'be01b9b16925dcb22165c40b46681ac6' => __DIR__ . '/..' . '/wp-cli/php-cli-tools/lib/cli/cli.php',
'04c6c5c2f7095ccf6c481d3e53e1776f' => __DIR__ . '/..' . '/mustangostang/spyc/Spyc.php',
'7d3b315c4f303f2fc14aca642a738e50' => __DIR__ . '/..' . '/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php',
);

Expand Down
75 changes: 11 additions & 64 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -622,59 +622,6 @@
},
"install-path": "../mustache/mustache"
},
{
"name": "mustangostang/spyc",
"version": "0.6.3",
"version_normalized": "0.6.3.0",
"source": {
"type": "git",
"url": "[email protected]:mustangostang/spyc.git",
"reference": "4627c838b16550b666d15aeae1e5289dd5b77da0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/mustangostang/spyc/zipball/4627c838b16550b666d15aeae1e5289dd5b77da0",
"reference": "4627c838b16550b666d15aeae1e5289dd5b77da0",
"shasum": ""
},
"require": {
"php": ">=5.3.1"
},
"require-dev": {
"phpunit/phpunit": "4.3.*@dev"
},
"time": "2019-09-10T13:16:29+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "0.5.x-dev"
}
},
"installation-source": "dist",
"autoload": {
"files": [
"Spyc.php"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "mustangostang",
"email": "[email protected]"
}
],
"description": "A simple YAML loader/dumper class for PHP",
"homepage": "https://github.com/mustangostang/spyc/",
"keywords": [
"spyc",
"yaml",
"yml"
],
"install-path": "../mustangostang/spyc"
},
{
"name": "myclabs/deep-copy",
"version": "1.10.2",
Expand Down Expand Up @@ -4175,33 +4122,34 @@
},
{
"name": "symfony/yaml",
"version": "v6.0.2",
"version_normalized": "6.0.2.0",
"version": "v5.4.2",
"version_normalized": "5.4.2.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "ed602f38b8636a2ea21af760d2578f3d2f92fc60"
"reference": "b9eb163846a61bb32dfc147f7859e274fab38b58"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/ed602f38b8636a2ea21af760d2578f3d2f92fc60",
"reference": "ed602f38b8636a2ea21af760d2578f3d2f92fc60",
"url": "https://api.github.com/repos/symfony/yaml/zipball/b9eb163846a61bb32dfc147f7859e274fab38b58",
"reference": "b9eb163846a61bb32dfc147f7859e274fab38b58",
"shasum": ""
},
"require": {
"php": ">=8.0.2",
"php": ">=7.2.5",
"symfony/deprecation-contracts": "^2.1|^3",
"symfony/polyfill-ctype": "^1.8"
},
"conflict": {
"symfony/console": "<5.4"
"symfony/console": "<5.3"
},
"require-dev": {
"symfony/console": "^5.4|^6.0"
"symfony/console": "^5.3|^6.0"
},
"suggest": {
"symfony/console": "For validating YAML files using the lint command"
},
"time": "2021-12-16T22:13:01+00:00",
"time": "2021-12-16T21:58:21+00:00",
"bin": [
"Resources/bin/yaml-lint"
],
Expand Down Expand Up @@ -4232,7 +4180,7 @@
"description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/yaml/tree/v6.0.2"
"source": "https://github.com/symfony/yaml/tree/v5.4.2"
},
"funding": [
{
Expand Down Expand Up @@ -4717,7 +4665,6 @@
"squizlabs/php_codesniffer",
"symfony/config",
"symfony/console",
"symfony/deprecation-contracts",
"symfony/filesystem",
"symfony/finder",
"symfony/polyfill-intl-grapheme",
Expand Down
21 changes: 6 additions & 15 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '5021c22e155cca0977a7ec5448e087058380c1aa',
'reference' => '158de6e273b64eaea79ace3a0677f59637b3938a',
'name' => 'benbalter/wordpress-to-jekyll-exporter',
'dev' => true,
),
Expand All @@ -16,7 +16,7 @@
'type' => 'library',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '5021c22e155cca0977a7ec5448e087058380c1aa',
'reference' => '158de6e273b64eaea79ace3a0677f59637b3938a',
'dev_requirement' => false,
),
'dealerdirect/phpcodesniffer-composer-installer' => array(
Expand Down Expand Up @@ -82,15 +82,6 @@
'reference' => '579ffa5c96e1d292c060b3dd62811ff01ad8c24e',
'dev_requirement' => true,
),
'mustangostang/spyc' => array(
'pretty_version' => '0.6.3',
'version' => '0.6.3.0',
'type' => 'library',
'install_path' => __DIR__ . '/../mustangostang/spyc',
'aliases' => array(),
'reference' => '4627c838b16550b666d15aeae1e5289dd5b77da0',
'dev_requirement' => false,
),
'myclabs/deep-copy' => array(
'pretty_version' => '1.10.2',
'version' => '1.10.2.0',
Expand Down Expand Up @@ -491,7 +482,7 @@
'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
'aliases' => array(),
'reference' => 'c726b64c1ccfe2896cb7df2e1331c357ad1c8ced',
'dev_requirement' => true,
'dev_requirement' => false,
),
'symfony/filesystem' => array(
'pretty_version' => 'v6.0.0',
Expand Down Expand Up @@ -584,12 +575,12 @@
'dev_requirement' => true,
),
'symfony/yaml' => array(
'pretty_version' => 'v6.0.2',
'version' => '6.0.2.0',
'pretty_version' => 'v5.4.2',
'version' => '5.4.2.0',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/yaml',
'aliases' => array(),
'reference' => 'ed602f38b8636a2ea21af760d2578f3d2f92fc60',
'reference' => 'b9eb163846a61bb32dfc147f7859e274fab38b58',
'dev_requirement' => false,
),
'theseer/tokenizer' => array(
Expand Down
26 changes: 16 additions & 10 deletions vendor/symfony/yaml/Command/LintCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace Symfony\Component\Yaml\Command;

use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\CI\GithubActionReporter;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Completion\CompletionInput;
Expand All @@ -33,21 +32,23 @@
* @author Grégoire Pineau <[email protected]>
* @author Robin Chalas <[email protected]>
*/
#[AsCommand(name: 'lint:yaml', description: 'Lint a YAML file and outputs encountered errors')]
class LintCommand extends Command
{
protected static $defaultName = 'lint:yaml';
protected static $defaultDescription = 'Lint a YAML file and outputs encountered errors';

private $parser;
private ?string $format = null;
private bool $displayCorrectFiles;
private ?\Closure $directoryIteratorProvider;
private ?\Closure $isReadableProvider;
private $format;
private $displayCorrectFiles;
private $directoryIteratorProvider;
private $isReadableProvider;

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

$this->directoryIteratorProvider = null === $directoryIteratorProvider || $directoryIteratorProvider instanceof \Closure ? $directoryIteratorProvider : \Closure::fromCallable($directoryIteratorProvider);
$this->isReadableProvider = null === $isReadableProvider || $isReadableProvider instanceof \Closure ? $isReadableProvider : \Closure::fromCallable($isReadableProvider);
$this->directoryIteratorProvider = $directoryIteratorProvider;
$this->isReadableProvider = $isReadableProvider;
}

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

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

private function getParser(): Parser
{
return $this->parser ??= new Parser();
if (!$this->parser) {
$this->parser = new Parser();
}

return $this->parser;
}

private function getDirectoryIterator(string $directory): iterable
Expand Down
6 changes: 4 additions & 2 deletions vendor/symfony/yaml/Dumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ class Dumper
{
/**
* The amount of spaces to use for indentation of nested nodes.
*
* @var int
*/
private int $indentation;
protected $indentation;

public function __construct(int $indentation = 4)
{
Expand All @@ -44,7 +46,7 @@ public function __construct(int $indentation = 4)
* @param int $indent The level of indentation (used internally)
* @param int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string
*/
public function dump(mixed $input, int $inline = 0, int $indent = 0, int $flags = 0): string
public function dump($input, int $inline = 0, int $indent = 0, int $flags = 0): string
{
$output = '';
$prefix = $indent ? str_repeat(' ', $indent) : '';
Expand Down
20 changes: 13 additions & 7 deletions vendor/symfony/yaml/Exception/ParseException.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
*/
class ParseException extends RuntimeException
{
private ?string $parsedFile;
private int $parsedLine;
private ?string $snippet;
private string $rawMessage;
private $parsedFile;
private $parsedLine;
private $snippet;
private $rawMessage;

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

/**
* Gets the snippet of code near the error.
*
* @return string
*/
public function getSnippet(): string
public function getSnippet()
{
return $this->snippet;
}
Expand All @@ -63,8 +65,10 @@ public function setSnippet(string $snippet)
* Gets the filename where the error occurred.
*
* This method returns null if a string is parsed.
*
* @return string
*/
public function getParsedFile(): string
public function getParsedFile()
{
return $this->parsedFile;
}
Expand All @@ -81,8 +85,10 @@ public function setParsedFile(string $parsedFile)

/**
* Gets the line where the error occurred.
*
* @return int
*/
public function getParsedLine(): int
public function getParsedLine()
{
return $this->parsedLine;
}
Expand Down
Loading

0 comments on commit f6ebee6

Please sign in to comment.