From e4206a676d8a9e033fb0eb0c213b5f603a17e352 Mon Sep 17 00:00:00 2001 From: Jamie Date: Mon, 20 Dec 2021 13:30:25 +0000 Subject: [PATCH 01/13] Update .gitattributes. --- .gitattributes | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.gitattributes b/.gitattributes index 1a63203..810e21a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,9 +1,10 @@ -/.semaphore export-ignore -/tests export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore -/.php-cs-fixer.dist.php export-ignore -/composer.lock export-ignore -/LICENSE export-ignore -/phpunit.xml.dist export-ignore -/README.md export-ignore +/.github export-ignore +/docker export-ignore +/tests export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/.php-cs-fixer.dist.php export-ignore +/LICENSE export-ignore +/phpunit.xml.dist export-ignore +/php-demandware-xml export-ignore +/README.md export-ignore From bdcfe6ee6cf8cdeb12434d74c4099f2102769757 Mon Sep 17 00:00:00 2001 From: Jamie Date: Mon, 20 Dec 2021 13:31:49 +0000 Subject: [PATCH 02/13] Update Docker version. --- docker/php-cli/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/php-cli/Dockerfile b/docker/php-cli/Dockerfile index c7737f3..f6f4aba 100644 --- a/docker/php-cli/Dockerfile +++ b/docker/php-cli/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.4.15-cli-alpine +FROM php:8.0.12-cli-alpine RUN apk add --update --no-cache git openssh zip unzip p7zip RUN cp "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini" From a2f1d9912596906e10e411ceea2e32b21910705f Mon Sep 17 00:00:00 2001 From: Jamie Date: Mon, 20 Dec 2021 13:43:05 +0000 Subject: [PATCH 03/13] Update packages. --- composer.json | 13 +- composer.lock | 815 ++++++++++++++++++++++++++------------------------ 2 files changed, 434 insertions(+), 394 deletions(-) diff --git a/composer.json b/composer.json index 8d7aa78..4ec5129 100644 --- a/composer.json +++ b/composer.json @@ -10,16 +10,17 @@ "xml" ], "require": { - "php": "^7.4 || ^8.0", - "ext-SimpleXML": "^7.4 || ^8.0", - "ext-json": "^7.4 || ^8.0", - "ext-xmlreader": "^7.4 || ^8.0", - "ext-xmlwriter": "^7.4 || ^8.0" + "php": "^8.0", + "ext-SimpleXML": "^8.0", + "ext-json": "^8.0", + "ext-xmlreader": "^8.0", + "ext-xmlwriter": "^8.0" }, "require-dev": { "ergebnis/composer-normalize": "^2.6", "fusionspim/php-cs-fixer-config": "^9.0", - "phpunit/phpunit": "9.5.*" + "phpunit/phpunit": "9.5.*", + "rector/rector": "^0.12.8" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index c516aa7..35991f4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,9 +4,80 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "adccf24f69826a585df69ee62ab9b530", + "content-hash": "e0217602b5d5a2c36da3ab63e8795b81", "packages": [], "packages-dev": [ + { + "name": "composer/pcre", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "3d322d715c43a1ac36c7fe215fa59336265500f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/3d322d715c43a1ac36c7fe215fa59336265500f2", + "reference": "3d322d715c43a1ac36c7fe215fa59336265500f2", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/1.0.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-12-06T15:17:27+00:00" + }, { "name": "composer/semver", "version": "3.2.6", @@ -90,25 +161,27 @@ }, { "name": "composer/xdebug-handler", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339" + "reference": "6555461e76962fd0379c444c46fd558a0fcfb65e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/84674dd3a7575ba617f5a76d7e9e29a7d3891339", - "reference": "84674dd3a7575ba617f5a76d7e9e29a7d3891339", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6555461e76962fd0379c444c46fd558a0fcfb65e", + "reference": "6555461e76962fd0379c444c46fd558a0fcfb65e", "shasum": "" }, "require": { + "composer/pcre": "^1", "php": "^5.3.2 || ^7.0 || ^8.0", "psr/log": "^1 || ^2 || ^3" }, "require-dev": { - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^4.2 || ^5.0 || ^6.0" }, "type": "library", "autoload": { @@ -134,7 +207,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/2.0.2" + "source": "https://github.com/composer/xdebug-handler/tree/2.0.3" }, "funding": [ { @@ -150,7 +223,7 @@ "type": "tidelift" } ], - "time": "2021-07-31T17:03:58+00:00" + "time": "2021-12-08T13:07:32+00:00" }, { "name": "doctrine/annotations", @@ -589,16 +662,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.3.2", + "version": "v3.4.0", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "06bdbdfcd619183dd7a1a6948360f8af73b9ecec" + "reference": "47177af1cfb9dab5d1cc4daf91b7179c2efe7fad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/06bdbdfcd619183dd7a1a6948360f8af73b9ecec", - "reference": "06bdbdfcd619183dd7a1a6948360f8af73b9ecec", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/47177af1cfb9dab5d1cc4daf91b7179c2efe7fad", + "reference": "47177af1cfb9dab5d1cc4daf91b7179c2efe7fad", "shasum": "" }, "require": { @@ -609,33 +682,32 @@ "ext-tokenizer": "*", "php": "^7.2.5 || ^8.0", "php-cs-fixer/diff": "^2.0", - "symfony/console": "^5.1.3", - "symfony/event-dispatcher": "^5.0", - "symfony/filesystem": "^5.0", - "symfony/finder": "^5.0", - "symfony/options-resolver": "^5.0", + "symfony/console": "^4.4.20 || ^5.1.3 || ^6.0", + "symfony/event-dispatcher": "^4.4.20 || ^5.0 || ^6.0", + "symfony/filesystem": "^4.4.20 || ^5.0 || ^6.0", + "symfony/finder": "^4.4.20 || ^5.0 || ^6.0", + "symfony/options-resolver": "^4.4.20 || ^5.0 || ^6.0", "symfony/polyfill-mbstring": "^1.23", - "symfony/polyfill-php72": "^1.23", "symfony/polyfill-php80": "^1.23", "symfony/polyfill-php81": "^1.23", - "symfony/process": "^5.0", - "symfony/stopwatch": "^5.0" + "symfony/process": "^4.4.20 || ^5.0 || ^6.0", + "symfony/stopwatch": "^4.4.20 || ^5.0 || ^6.0" }, "require-dev": { "justinrainbow/json-schema": "^5.2", "keradus/cli-executor": "^1.5", "mikey179/vfsstream": "^1.6.8", - "php-coveralls/php-coveralls": "^2.4.3", + "php-coveralls/php-coveralls": "^2.5.2", "php-cs-fixer/accessible-object": "^1.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy": "^1.10.3", + "phpspec/prophecy": "^1.15", "phpspec/prophecy-phpunit": "^1.1 || ^2.0", - "phpunit/phpunit": "^7.5.20 || ^8.5.14 || ^9.5", + "phpunit/phpunit": "^8.5.21 || ^9.5", "phpunitgoodpractices/polyfill": "^1.5", "phpunitgoodpractices/traits": "^1.9.1", - "symfony/phpunit-bridge": "^5.2.4", - "symfony/yaml": "^5.0" + "symfony/phpunit-bridge": "^5.2.4 || ^6.0", + "symfony/yaml": "^4.4.20 || ^5.0 || ^6.0" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -667,7 +739,7 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.3.2" + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.4.0" }, "funding": [ { @@ -675,7 +747,7 @@ "type": "github" } ], - "time": "2021-11-15T18:06:47+00:00" + "time": "2021-12-11T16:25:08+00:00" }, { "name": "fusionspim/php-cs-fixer-config", @@ -792,16 +864,16 @@ }, { "name": "kubawerlos/php-cs-fixer-custom-fixers", - "version": "v3.4.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers.git", - "reference": "c8f4d1100c4d98ea38959e8cc508c2c0889fdfc4" + "reference": "d8f5d4ba3a3c68f7d6670c282c4bc9e507c1d16c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/c8f4d1100c4d98ea38959e8cc508c2c0889fdfc4", - "reference": "c8f4d1100c4d98ea38959e8cc508c2c0889fdfc4", + "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/d8f5d4ba3a3c68f7d6670c282c4bc9e507c1d16c", + "reference": "d8f5d4ba3a3c68f7d6670c282c4bc9e507c1d16c", "shasum": "" }, "require": { @@ -809,7 +881,7 @@ "ext-tokenizer": "*", "friendsofphp/php-cs-fixer": "^3.1.0", "php": "^7.2 || ^8.0", - "symfony/finder": "^3.0 || ^4.0 || ^5.0" + "symfony/finder": "^4.0 || ^5.0 || ^6.0" }, "require-dev": { "phpunit/phpunit": "^8.5.3 || ^9.1.1" @@ -833,9 +905,9 @@ "description": "A set of custom fixers for PHP CS Fixer", "support": { "issues": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/issues", - "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.4.1" + "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.6.0" }, - "time": "2021-11-22T21:48:43+00:00" + "time": "2021-12-10T23:53:20+00:00" }, { "name": "localheinz/diff", @@ -957,16 +1029,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.13.0", + "version": "v4.13.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "50953a2691a922aa1769461637869a0a2faa3f53" + "reference": "210577fe3cf7badcc5814d99455df46564f3c077" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/50953a2691a922aa1769461637869a0a2faa3f53", - "reference": "50953a2691a922aa1769461637869a0a2faa3f53", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", + "reference": "210577fe3cf7badcc5814d99455df46564f3c077", "shasum": "" }, "require": { @@ -1007,9 +1079,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" }, - "time": "2021-09-20T12:20:58+00:00" + "time": "2021-11-30T19:35:32+00:00" }, { "name": "phar-io/manifest", @@ -1229,16 +1301,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", "shasum": "" }, "require": { @@ -1249,7 +1321,8 @@ "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "~1.3.2" + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -1279,22 +1352,22 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" }, - "time": "2020-09-03T19:13:55+00:00" + "time": "2021-10-19T17:43:47+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.5.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f" + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/30f38bffc6f24293dadd1823936372dfa9e86e2f", - "reference": "30f38bffc6f24293dadd1823936372dfa9e86e2f", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae", + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae", "shasum": "" }, "require": { @@ -1329,22 +1402,22 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1" }, - "time": "2021-09-17T15:28:14+00:00" + "time": "2021-10-02T14:08:47+00:00" }, { "name": "phpspec/prophecy", - "version": "1.14.0", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", - "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", "shasum": "" }, "require": { @@ -1396,29 +1469,93 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.14.0" + "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" + }, + "time": "2021-12-08T12:19:24+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "cbe085f9fdead5b6d62e4c022ca52dc9427a10ee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/cbe085f9fdead5b6d62e4c022ca52dc9427a10ee", + "reference": "cbe085f9fdead5b6d62e4c022ca52dc9427a10ee", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ] }, - "time": "2021-09-10T09:02:12+00:00" + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "support": { + "issues": "https://github.com/phpstan/phpstan/issues", + "source": "https://github.com/phpstan/phpstan/tree/1.2.0" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpstan", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2021-11-18T14:09:01+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "9.2.7", + "version": "9.2.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218" + "reference": "d5850aaf931743067f4bfc1ae4cbd06468400687" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d4c798ed8d51506800b441f7a13ecb0f76f12218", - "reference": "d4c798ed8d51506800b441f7a13ecb0f76f12218", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/d5850aaf931743067f4bfc1ae4cbd06468400687", + "reference": "d5850aaf931743067f4bfc1ae4cbd06468400687", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.12.0", + "nikic/php-parser": "^4.13.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -1467,7 +1604,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.7" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.10" }, "funding": [ { @@ -1475,20 +1612,20 @@ "type": "github" } ], - "time": "2021-09-17T05:39:03+00:00" + "time": "2021-12-05T09:12:13+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "3.0.5", + "version": "3.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8" + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/aa4be8575f26070b100fccb67faabb28f21f66f8", - "reference": "aa4be8575f26070b100fccb67faabb28f21f66f8", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", "shasum": "" }, "require": { @@ -1527,7 +1664,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.5" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" }, "funding": [ { @@ -1535,7 +1672,7 @@ "type": "github" } ], - "time": "2020-09-28T05:57:25+00:00" + "time": "2021-12-02T12:48:52+00:00" }, { "name": "phpunit/php-invoker", @@ -1823,20 +1960,20 @@ }, { "name": "psr/cache", - "version": "1.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { @@ -1856,7 +1993,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interface for caching libraries", @@ -1866,28 +2003,33 @@ "psr-6" ], "support": { - "source": "https://github.com/php-fig/cache/tree/master" + "source": "https://github.com/php-fig/cache/tree/3.0.0" }, - "time": "2016-08-06T20:24:11+00:00" + "time": "2021-02-03T23:26:27+00:00" }, { "name": "psr/container", - "version": "1.1.2", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -1914,9 +2056,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-11-05T16:50:12+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "name": "psr/event-dispatcher", @@ -1970,30 +2112,30 @@ }, { "name": "psr/log", - "version": "1.1.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2014,9 +2156,69 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/3.0.0" + }, + "time": "2021-07-14T16:46:02+00:00" + }, + { + "name": "rector/rector", + "version": "0.12.8", + "source": { + "type": "git", + "url": "https://github.com/rectorphp/rector.git", + "reference": "dd40e9e1971b1fdb5fb8d818e3ee691a31ac638b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/dd40e9e1971b1fdb5fb8d818e3ee691a31ac638b", + "reference": "dd40e9e1971b1fdb5fb8d818e3ee691a31ac638b", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0", + "phpstan/phpstan": "^1.1.1" + }, + "conflict": { + "phpstan/phpdoc-parser": "<1.2", + "rector/rector-cakephp": "*", + "rector/rector-doctrine": "*", + "rector/rector-laravel": "*", + "rector/rector-nette": "*", + "rector/rector-phpoffice": "*", + "rector/rector-phpunit": "*", + "rector/rector-prefixed": "*", + "rector/rector-symfony": "*" + }, + "bin": [ + "bin/rector" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.12-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Prefixed and PHP 7.1 downgraded version of rector/rector", + "support": { + "issues": "https://github.com/rectorphp/rector/issues", + "source": "https://github.com/rectorphp/rector/tree/0.12.8" }, - "time": "2021-05-03T11:20:27+00:00" + "funding": [ + { + "url": "https://github.com/tomasvotruba", + "type": "github" + } + ], + "time": "2021-12-13T23:55:00+00:00" }, { "name": "sebastian/cli-parser", @@ -2447,16 +2649,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.3", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65" + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/d89cc98761b8cb5a1a235a6b703ae50d34080e65", - "reference": "d89cc98761b8cb5a1a235a6b703ae50d34080e65", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", "shasum": "" }, "require": { @@ -2505,14 +2707,14 @@ } ], "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "homepage": "https://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.3" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" }, "funding": [ { @@ -2520,7 +2722,7 @@ "type": "github" } ], - "time": "2020-09-28T05:24:23+00:00" + "time": "2021-11-11T14:18:36+00:00" }, { "name": "sebastian/global-state", @@ -2984,45 +3186,42 @@ }, { "name": "symfony/console", - "version": "v5.3.11", + "version": "v6.0.1", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "3e7ab8f5905058984899b05a4648096f558bfeba" + "reference": "fafd9802d386bf1c267e0249ddb7ceb14dcfdad4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/3e7ab8f5905058984899b05a4648096f558bfeba", - "reference": "3e7ab8f5905058984899b05a4648096f558bfeba", + "url": "https://api.github.com/repos/symfony/console/zipball/fafd9802d386bf1c267e0249ddb7ceb14dcfdad4", + "reference": "fafd9802d386bf1c267e0249ddb7ceb14dcfdad4", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.8", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2", - "symfony/string": "^5.1" + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.4|^6.0" }, "conflict": { - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/event-dispatcher": "^4.4|^5.0", - "symfony/lock": "^4.4|^5.0", - "symfony/process": "^4.4|^5.0", - "symfony/var-dumper": "^4.4|^5.0" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -3062,7 +3261,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.3.11" + "source": "https://github.com/symfony/console/tree/v6.0.1" }, "funding": [ { @@ -3078,29 +3277,29 @@ "type": "tidelift" } ], - "time": "2021-11-21T19:41:05+00:00" + "time": "2021-12-09T12:47:37+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.0", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8" + "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", - "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", + "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -3129,7 +3328,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.0" }, "funding": [ { @@ -3145,44 +3344,42 @@ "type": "tidelift" } ], - "time": "2021-07-12T14:48:14+00:00" + "time": "2021-11-01T23:48:49+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.3.11", + "version": "v6.0.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "661a7a6e085394f8513945669e31f7c1338a7e69" + "reference": "4f06d19a5f78087061f9de6df3269c139c3d289d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/661a7a6e085394f8513945669e31f7c1338a7e69", - "reference": "661a7a6e085394f8513945669e31f7c1338a7e69", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/4f06d19a5f78087061f9de6df3269c139c3d289d", + "reference": "4f06d19a5f78087061f9de6df3269c139c3d289d", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/event-dispatcher-contracts": "^2", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2", + "symfony/event-dispatcher-contracts": "^2|^3" }, "conflict": { - "symfony/dependency-injection": "<4.4" + "symfony/dependency-injection": "<5.4" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" + "symfony/event-dispatcher-implementation": "2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/error-handler": "^4.4|^5.0", - "symfony/expression-language": "^4.4|^5.0", - "symfony/http-foundation": "^4.4|^5.0", - "symfony/service-contracts": "^1.1|^2", - "symfony/stopwatch": "^4.4|^5.0" + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/error-handler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/stopwatch": "^5.4|^6.0" }, "suggest": { "symfony/dependency-injection": "", @@ -3214,7 +3411,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.3.11" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.1" }, "funding": [ { @@ -3230,24 +3427,24 @@ "type": "tidelift" } ], - "time": "2021-11-17T12:16:12+00:00" + "time": "2021-12-08T15:13:44+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.0", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "66bea3b09be61613cd3b4043a65a8ec48cfa6d2a" + "reference": "aa5422287b75594b90ee9cd807caf8f0df491385" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/66bea3b09be61613cd3b4043a65a8ec48cfa6d2a", - "reference": "66bea3b09be61613cd3b4043a65a8ec48cfa6d2a", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/aa5422287b75594b90ee9cd807caf8f0df491385", + "reference": "aa5422287b75594b90ee9cd807caf8f0df491385", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "psr/event-dispatcher": "^1" }, "suggest": { @@ -3256,7 +3453,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -3293,7 +3490,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.0" }, "funding": [ { @@ -3309,26 +3506,26 @@ "type": "tidelift" } ], - "time": "2021-07-12T14:48:14+00:00" + "time": "2021-07-15T12:33:35+00:00" }, { "name": "symfony/filesystem", - "version": "v5.3.4", + "version": "v6.0.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32" + "reference": "52b3c9cce673b014915445a432339f282e002ce6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/343f4fe324383ca46792cae728a3b6e2f708fb32", - "reference": "343f4fe324383ca46792cae728a3b6e2f708fb32", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/52b3c9cce673b014915445a432339f282e002ce6", + "reference": "52b3c9cce673b014915445a432339f282e002ce6", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-php80": "^1.16" + "symfony/polyfill-mbstring": "~1.8" }, "type": "library", "autoload": { @@ -3356,7 +3553,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.3.4" + "source": "https://github.com/symfony/filesystem/tree/v6.0.0" }, "funding": [ { @@ -3372,25 +3569,24 @@ "type": "tidelift" } ], - "time": "2021-07-21T12:40:44+00:00" + "time": "2021-10-29T07:35:21+00:00" }, { "name": "symfony/finder", - "version": "v5.3.7", + "version": "v6.0.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93" + "reference": "07debda41a4d32d33e59e6ab302af1701e15f173" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/a10000ada1e600d109a6c7632e9ac42e8bf2fb93", - "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93", + "url": "https://api.github.com/repos/symfony/finder/zipball/07debda41a4d32d33e59e6ab302af1701e15f173", + "reference": "07debda41a4d32d33e59e6ab302af1701e15f173", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -3418,7 +3614,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.3.7" + "source": "https://github.com/symfony/finder/tree/v6.0.0" }, "funding": [ { @@ -3434,27 +3630,25 @@ "type": "tidelift" } ], - "time": "2021-08-04T21:20:46+00:00" + "time": "2021-11-28T15:34:37+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.3.7", + "version": "v6.0.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "4b78e55b179003a42523a362cc0e8327f7a69b5e" + "reference": "be0facf48a42a232d6c0daadd76e4eb5657a4798" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/4b78e55b179003a42523a362cc0e8327f7a69b5e", - "reference": "4b78e55b179003a42523a362cc0e8327f7a69b5e", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/be0facf48a42a232d6c0daadd76e4eb5657a4798", + "reference": "be0facf48a42a232d6c0daadd76e4eb5657a4798", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2", + "symfony/deprecation-contracts": "^2.1|^3" }, "type": "library", "autoload": { @@ -3487,7 +3681,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.3.7" + "source": "https://github.com/symfony/options-resolver/tree/v6.0.0" }, "funding": [ { @@ -3503,7 +3697,7 @@ "type": "tidelift" } ], - "time": "2021-08-04T21:20:46+00:00" + "time": "2021-11-23T19:05:29+00:00" }, { "name": "symfony/polyfill-ctype", @@ -3829,161 +4023,6 @@ ], "time": "2021-05-27T12:26:48+00:00" }, - { - "name": "symfony/polyfill-php72", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-05-27T09:17:38+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-02-19T12:13:01+00:00" - }, { "name": "symfony/polyfill-php80", "version": "v1.23.1", @@ -4148,21 +4187,20 @@ }, { "name": "symfony/process", - "version": "v5.3.11", + "version": "v6.0.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "6c99204de85d04ca17f16c466fc61896960b0636" + "reference": "d970c45c2186aa4331d1656950a82df64e232580" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/6c99204de85d04ca17f16c466fc61896960b0636", - "reference": "6c99204de85d04ca17f16c466fc61896960b0636", + "url": "https://api.github.com/repos/symfony/process/zipball/d970c45c2186aa4331d1656950a82df64e232580", + "reference": "d970c45c2186aa4331d1656950a82df64e232580", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -4190,7 +4228,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.3.11" + "source": "https://github.com/symfony/process/tree/v6.0.0" }, "funding": [ { @@ -4206,26 +4244,25 @@ "type": "tidelift" } ], - "time": "2021-11-17T12:16:12+00:00" + "time": "2021-11-28T15:34:37+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.0", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc" + "reference": "36715ebf9fb9db73db0cb24263c79077c6fe8603" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", - "reference": "1ab11b933cd6bc5464b08e81e2c5b07dec58b0fc", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/36715ebf9fb9db73db0cb24263c79077c6fe8603", + "reference": "36715ebf9fb9db73db0cb24263c79077c6fe8603", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1" + "php": ">=8.0.2", + "psr/container": "^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -4236,7 +4273,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -4273,7 +4310,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.0" + "source": "https://github.com/symfony/service-contracts/tree/v3.0.0" }, "funding": [ { @@ -4289,25 +4326,25 @@ "type": "tidelift" } ], - "time": "2021-11-04T16:48:04+00:00" + "time": "2021-11-04T17:53:12+00:00" }, { "name": "symfony/stopwatch", - "version": "v5.3.4", + "version": "v6.0.0", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "b24c6a92c6db316fee69e38c80591e080e41536c" + "reference": "0e0ed55d1ffdfadd03af180443fbdca9876483b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/b24c6a92c6db316fee69e38c80591e080e41536c", - "reference": "b24c6a92c6db316fee69e38c80591e080e41536c", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/0e0ed55d1ffdfadd03af180443fbdca9876483b3", + "reference": "0e0ed55d1ffdfadd03af180443fbdca9876483b3", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/service-contracts": "^1.0|^2" + "php": ">=8.0.2", + "symfony/service-contracts": "^1|^2|^3" }, "type": "library", "autoload": { @@ -4335,7 +4372,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v5.3.4" + "source": "https://github.com/symfony/stopwatch/tree/v6.0.0" }, "funding": [ { @@ -4351,35 +4388,37 @@ "type": "tidelift" } ], - "time": "2021-07-10T08:58:57+00:00" + "time": "2021-11-23T19:05:29+00:00" }, { "name": "symfony/string", - "version": "v5.3.10", + "version": "v6.0.1", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c" + "reference": "0cfed595758ec6e0a25591bdc8ca733c1896af32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c", - "reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c", + "url": "https://api.github.com/repos/symfony/string/zipball/0cfed595758ec6e0a25591bdc8ca733c1896af32", + "reference": "0cfed595758ec6e0a25591bdc8ca733c1896af32", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.0" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0", - "symfony/http-client": "^4.4|^5.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0" + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { @@ -4418,7 +4457,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.3.10" + "source": "https://github.com/symfony/string/tree/v6.0.1" }, "funding": [ { @@ -4434,7 +4473,7 @@ "type": "tidelift" } ], - "time": "2021-10-27T18:21:46+00:00" + "time": "2021-12-08T15:13:44+00:00" }, { "name": "theseer/tokenizer", @@ -4551,11 +4590,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.4 || ^8.0", - "ext-simplexml": "^7.4 || ^8.0", - "ext-json": "^7.4 || ^8.0", - "ext-xmlreader": "^7.4 || ^8.0", - "ext-xmlwriter": "^7.4 || ^8.0" + "php": "^8.0", + "ext-simplexml": "^8.0", + "ext-json": "^8.0", + "ext-xmlreader": "^8.0", + "ext-xmlwriter": "^8.0" }, "platform-dev": [], "plugin-api-version": "2.1.0" From b27abc88bef09f8d1ed5ea00f3cb6d681a13df28 Mon Sep 17 00:00:00 2001 From: Jamie Date: Mon, 20 Dec 2021 13:49:05 +0000 Subject: [PATCH 04/13] Add alias. --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 4ec5129..08a4ddb 100644 --- a/composer.json +++ b/composer.json @@ -37,6 +37,7 @@ "php-cs-fixer fix --config=.php-cs-fixer.dist.php", "composer normalize" ], + "fix-rector": "vendor/bin/rector process src tests", "test": [ "phpunit --stop-on-failure --stop-on-error" ] From 3416e191ed52f8ffc2c1bea7ecaded9e8f2b9b1f Mon Sep 17 00:00:00 2001 From: Jamie Date: Mon, 20 Dec 2021 13:49:12 +0000 Subject: [PATCH 05/13] Add Rector config. --- rector.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 rector.php diff --git a/rector.php b/rector.php new file mode 100644 index 0000000..e36f765 --- /dev/null +++ b/rector.php @@ -0,0 +1,25 @@ +parameters(); + // $parameters->set(Option::PATHS, [ + // __DIR__ . '/src' + // ]); + + // Define what rule sets will be applied + $containerConfigurator->import(LevelSetList::UP_TO_PHP_80); + + // get services (needed for register a single rule) + // $services = $containerConfigurator->services(); + + // register a single rule + // $services->set(TypedPropertyRector::class); +}; From eda11ae5a9ed691f2a658d9691ed87848d8ff84a Mon Sep 17 00:00:00 2001 From: Jamie Date: Mon, 20 Dec 2021 13:53:20 +0000 Subject: [PATCH 06/13] Add missing ext dep. --- composer.json | 3 ++- composer.lock | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 08a4ddb..345c0a2 100644 --- a/composer.json +++ b/composer.json @@ -11,8 +11,9 @@ ], "require": { "php": "^8.0", - "ext-SimpleXML": "^8.0", "ext-json": "^8.0", + "ext-libxml": "^8.0", + "ext-SimpleXML": "^8.0", "ext-xmlreader": "^8.0", "ext-xmlwriter": "^8.0" }, diff --git a/composer.lock b/composer.lock index 35991f4..7677014 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e0217602b5d5a2c36da3ab63e8795b81", + "content-hash": "4f071a3af47f1015c5e1c46e3636541d", "packages": [], "packages-dev": [ { @@ -4591,8 +4591,9 @@ "prefer-lowest": false, "platform": { "php": "^8.0", - "ext-simplexml": "^8.0", "ext-json": "^8.0", + "ext-libxml": "^8.0", + "ext-simplexml": "^8.0", "ext-xmlreader": "^8.0", "ext-xmlwriter": "^8.0" }, From 285293147ddcb0ec0ff07afcd87eb48018ca11cc Mon Sep 17 00:00:00 2001 From: Jamie Date: Mon, 20 Dec 2021 13:53:35 +0000 Subject: [PATCH 07/13] Remove PHP 7.4 from CI builds. --- .github/workflows/continuous-integration.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index a478c12..1826cee 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -15,7 +15,6 @@ jobs: strategy: matrix: php-version: - - '7.4' - '8.0' steps: - uses: actions/checkout@v2 From 57b0982d3e4c3a861b7f09b435045f17294ff141 Mon Sep 17 00:00:00 2001 From: Jamie Date: Mon, 20 Dec 2021 14:35:13 +0000 Subject: [PATCH 08/13] Upgrade code to PHP 8. --- src/Parser.php | 26 +++---- src/Parser/AssignmentNodeParser.php | 5 +- src/Parser/BundleNodeParser.php | 6 +- src/Parser/CategoryNodeParser.php | 5 +- src/Parser/ProductNodeParser.php | 7 +- src/Parser/SetNodeParser.php | 7 +- src/Parser/VariationNodeParser.php | 7 +- src/Writer/Entity/Assignment.php | 8 +- src/Writer/Entity/Category.php | 34 ++++----- src/Writer/Entity/CustomAttribute.php | 7 +- src/Writer/Entity/DeletedAssignment.php | 7 +- src/Writer/Entity/DeletedCategory.php | 5 +- src/Writer/Entity/DeletedProduct.php | 5 +- src/Writer/Entity/Product.php | 74 +++++++++---------- src/Writer/Entity/Variant.php | 6 +- .../EntityWriter/AssignmentXmlWriter.php | 7 +- src/Writer/EntityWriter/CategoryXmlWriter.php | 7 +- .../EntityWriter/CustomAttributeWriter.php | 7 +- .../DeletedAssignmentXmlWriter.php | 7 +- .../EntityWriter/DeletedCategoryXmlWriter.php | 7 +- .../EntityWriter/DeletedProductXmlWriter.php | 7 +- src/Writer/EntityWriter/ProductXmlWriter.php | 7 +- src/Writer/EntityWriter/VariantXmlWriter.php | 7 +- src/Writer/Xml/NilEmptyWriter.php | 5 +- src/Writer/Xml/NotEmptyWriter.php | 5 +- src/Writer/Xml/XmlFormatter.php | 6 +- src/Writer/Xml/XmlWriter.php | 8 +- tests/FixtureHelper.php | 2 +- tests/Writer/Xml/XmlFormatterTest.php | 5 +- 29 files changed, 100 insertions(+), 196 deletions(-) diff --git a/src/Parser.php b/src/Parser.php index 9f06835..f586566 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -8,12 +8,10 @@ class Parser { - protected $file; - protected $parsed = []; + protected array $parsed = []; - public function __construct(string $file) + public function __construct(protected string $file) { - $this->file = $file; } public function validate(bool $useSchema = true): bool @@ -61,19 +59,13 @@ public function validate(bool $useSchema = true): bool protected function libXmlErrorToException($error): XMLException { - switch ($error->level) { - case LIBXML_ERR_WARNING: - $level = 'Warning'; - break; - - case LIBXML_ERR_ERROR: - $level = 'Error'; - break; - - case LIBXML_ERR_FATAL: - $level = 'Fatal'; - break; - } + $level = null; + $level = match ($error->level) { + LIBXML_ERR_WARNING => 'Warning', + LIBXML_ERR_ERROR => 'Error', + LIBXML_ERR_FATAL => 'Fatal', + default => new XmlException($level . ': ' . trim($error->message) . ' in ' . basename($error->file) . ' on line ' . $error->line . ' column ' . $error->column, $error->code), + }; return new XmlException($level . ': ' . trim($error->message) . ' in ' . basename($error->file) . ' on line ' . $error->line . ' column ' . $error->column, $error->code); } diff --git a/src/Parser/AssignmentNodeParser.php b/src/Parser/AssignmentNodeParser.php index 9a7af7c..97fa9eb 100644 --- a/src/Parser/AssignmentNodeParser.php +++ b/src/Parser/AssignmentNodeParser.php @@ -6,11 +6,8 @@ class AssignmentNodeParser implements NodeParserInterface { - protected $reader; - - public function __construct(XMLReader $reader) + public function __construct(protected XMLReader $reader) { - $this->reader = $reader; } public function isMatch(): bool diff --git a/src/Parser/BundleNodeParser.php b/src/Parser/BundleNodeParser.php index d08dcf6..b10550e 100644 --- a/src/Parser/BundleNodeParser.php +++ b/src/Parser/BundleNodeParser.php @@ -8,12 +8,10 @@ class BundleNodeParser implements NodeParserInterface { use CommonDetailsNodeParserTrait; - protected $reader; - protected $element; + protected SimpleXMLElement|null $element = null; - public function __construct(XMLReader $reader) + public function __construct(protected XMLReader $reader) { - $this->reader = $reader; } public function isMatch(): bool diff --git a/src/Parser/CategoryNodeParser.php b/src/Parser/CategoryNodeParser.php index 7e38109..65b61c0 100644 --- a/src/Parser/CategoryNodeParser.php +++ b/src/Parser/CategoryNodeParser.php @@ -8,11 +8,8 @@ class CategoryNodeParser implements NodeParserInterface { use CommonDetailsNodeParserTrait; - protected $reader; - - public function __construct(XMLReader $reader) + public function __construct(protected XMLReader $reader) { - $this->reader = $reader; } public function isMatch(): bool diff --git a/src/Parser/ProductNodeParser.php b/src/Parser/ProductNodeParser.php index 5439bc2..0d947e3 100644 --- a/src/Parser/ProductNodeParser.php +++ b/src/Parser/ProductNodeParser.php @@ -7,13 +7,10 @@ class ProductNodeParser implements NodeParserInterface { use CommonDetailsNodeParserTrait; + protected SimpleXMLElement|null $element = null; - protected $reader; - protected $element; - - public function __construct(XMLReader $reader) + public function __construct(protected XMLReader $reader) { - $this->reader = $reader; } public function isMatch(): bool diff --git a/src/Parser/SetNodeParser.php b/src/Parser/SetNodeParser.php index 169d7d9..bb38165 100644 --- a/src/Parser/SetNodeParser.php +++ b/src/Parser/SetNodeParser.php @@ -7,13 +7,10 @@ class SetNodeParser implements NodeParserInterface { use CommonDetailsNodeParserTrait; + protected SimpleXMLElement $element = null; - protected $reader; - protected $element; - - public function __construct(XMLReader $reader) + public function __construct(protected XMLReader $reader) { - $this->reader = $reader; } public function isMatch(): bool diff --git a/src/Parser/VariationNodeParser.php b/src/Parser/VariationNodeParser.php index f418250..8505370 100644 --- a/src/Parser/VariationNodeParser.php +++ b/src/Parser/VariationNodeParser.php @@ -7,13 +7,10 @@ class VariationNodeParser implements NodeParserInterface { use CommonDetailsNodeParserTrait; + protected SimpleXMLElement|null $element = null; - protected $reader; - protected $element; - - public function __construct(XMLReader $reader) + public function __construct(protected XMLReader $reader) { - $this->reader = $reader; } public function isMatch(): bool diff --git a/src/Writer/Entity/Assignment.php b/src/Writer/Entity/Assignment.php index af538ee..f0411e5 100644 --- a/src/Writer/Entity/Assignment.php +++ b/src/Writer/Entity/Assignment.php @@ -6,14 +6,10 @@ class Assignment implements WriteableEntityInteface { - public $productId; - public $categoryId; - public $primary; + public bool|null $primary = null; - public function __construct(string $productId, string $categoryId) + public function __construct(public string $productId, public string $categoryId) { - $this->productId = $productId; - $this->categoryId = $categoryId; } public function setPrimary(bool $primary): void diff --git a/src/Writer/Entity/Category.php b/src/Writer/Entity/Category.php index 72d2305..c4179d1 100644 --- a/src/Writer/Entity/Category.php +++ b/src/Writer/Entity/Category.php @@ -8,22 +8,20 @@ class Category implements WriteableEntityInteface { - public $id; - public $displayName; - public $onlineFlag; - public $onlineFrom; - public $onlineTo; - public $parentId; - public $template; - public $sitemapIncludedFlag; - public $sitemapChangeFrequency; - public $sitemapPriority; - public $pageAttributes = []; - public $customAttributes = []; - - public function __construct(string $id) + public string|null $displayName = null; + public bool|null $onlineFlag = null; + public DateTimeInterface|null $onlineFrom = null; + public DateTimeInterface|null $onlineTo = null; + public string|null $parentId = null; + public string|null $template = null; + public bool|null $sitemapIncludedFlag = null; + public string|null $sitemapChangeFrequency = null; + public string|null $sitemapPriority = null; + public array $pageAttributes = []; + public array $customAttributes = []; + + public function __construct(public string $id) { - $this->id = $id; } public function setDisplayName(string $displayName): void @@ -36,7 +34,7 @@ public function setOnlineFlag(bool $onlineFlag): void $this->onlineFlag = $onlineFlag; } - public function setOnlineFromTo(?DateTimeInterface $from, ?DateTimeInterface $to): void + public function setOnlineFromTo(DateTimeInterface|null $from, DateTimeInterface|null $to): void { if ($from !== null) { $this->onlineFrom = $from; @@ -57,7 +55,7 @@ public function setTemplate(string $template): void $this->template = $template; } - public function setSitemap(?float $sitemapPriority = null, bool $sitemapIncludedFlag = true, string $sitemapChangeFrequency = 'weekly'): void + public function setSitemap(float|null $sitemapPriority = null, bool $sitemapIncludedFlag = true, string $sitemapChangeFrequency = 'weekly'): void { if ($sitemapPriority !== null && $sitemapPriority > 1) { throw new InvalidArgumentException('Sitemap priority must be 1.0 or less'); @@ -71,7 +69,7 @@ public function setSitemap(?float $sitemapPriority = null, bool $sitemapIncluded $this->sitemapChangeFrequency = $sitemapChangeFrequency; } - public function setPageAttributes(?string $pageTitle = null, ?string $pageDescription = null, ?string $pageKeywords = null, ?string $pageUrl = null): void + public function setPageAttributes(string|null $pageTitle = null, string|null $pageDescription = null, string|null $pageKeywords = null, string|null $pageUrl = null): void { $this->pageAttributes = [ 'page-title' => $pageTitle, diff --git a/src/Writer/Entity/CustomAttribute.php b/src/Writer/Entity/CustomAttribute.php index c634b27..812ce12 100644 --- a/src/Writer/Entity/CustomAttribute.php +++ b/src/Writer/Entity/CustomAttribute.php @@ -6,13 +6,8 @@ class CustomAttribute implements WriteableEntityInteface { - public $id; - public $value; - - public function __construct(string $id, $value = null) + public function __construct(public string $id, public $value = null) { - $this->id = $id; - $this->value = $value; } public function write(XmlWriter $writer): void diff --git a/src/Writer/Entity/DeletedAssignment.php b/src/Writer/Entity/DeletedAssignment.php index 8287fdf..3881582 100644 --- a/src/Writer/Entity/DeletedAssignment.php +++ b/src/Writer/Entity/DeletedAssignment.php @@ -6,13 +6,8 @@ class DeletedAssignment implements WriteableEntityInteface { - public $productId; - public $categoryId; - - public function __construct(string $productId, string $categoryId) + public function __construct(public string $productId, public string $categoryId) { - $this->productId = $productId; - $this->categoryId = $categoryId; } public function write(XmlWriter $writer): void diff --git a/src/Writer/Entity/DeletedCategory.php b/src/Writer/Entity/DeletedCategory.php index 1b4da56..47e5bbf 100644 --- a/src/Writer/Entity/DeletedCategory.php +++ b/src/Writer/Entity/DeletedCategory.php @@ -6,11 +6,8 @@ class DeletedCategory implements WriteableEntityInteface { - public $id; - - public function __construct(string $id) + public function __construct(public string $id) { - $this->id = $id; } public function write(XmlWriter $writer): void diff --git a/src/Writer/Entity/DeletedProduct.php b/src/Writer/Entity/DeletedProduct.php index 4cc94fb..dcf24f2 100644 --- a/src/Writer/Entity/DeletedProduct.php +++ b/src/Writer/Entity/DeletedProduct.php @@ -6,11 +6,8 @@ class DeletedProduct implements WriteableEntityInteface { - public $id; - - public function __construct(string $id) + public function __construct(public string $id) { - $this->id = $id; } public function write(XmlWriter $writer): void diff --git a/src/Writer/Entity/Product.php b/src/Writer/Entity/Product.php index 7c000da..1a109ad 100644 --- a/src/Writer/Entity/Product.php +++ b/src/Writer/Entity/Product.php @@ -8,39 +8,37 @@ class Product implements WriteableEntityInteface { - public $id; - public $upc; - public $minOrderQuantity; - public $stepQuantity; - public $displayName; - public $longDescription; - public $onlineFlag; - public $onlineFrom; - public $onlineTo; - public $availableFlag; - public $searchableFlag; - public $searchableIfUnavailableFlag; - public $tax; - public $images = []; - public $imageViewType; - public $brand; - public $searchRank; - public $sitemapIncludedFlag; - public $sitemapChangeFrequency; - public $sitemapPriority; - public $pageAttributes = []; - public $customAttributes = []; - public $sharedVariationAttributes = []; - public $variants = []; - public $bundleProducts; - public $setProducts; - public $classificationCategoryId; - public $classificationCatalogId; - public $variationGroups = []; - - public function __construct(string $id) - { - $this->id = $id; + public string|null $upc = null; + public int|null $minOrderQuantity = null; + public int|null $stepQuantity = null; + public string|null $displayName = null; + public string|null $longDescription = null; + public bool|null $onlineFlag = null; + public DateTimeInterface|null $onlineFrom = null; + public DateTimeInterface|null $onlineTo = null; + public bool|null $availableFlag = null; + public bool|null $searchableFlag = null; + public bool|null $searchableIfUnavailableFlag = null; + public string|null $tax = null; + public array|null $images = []; + public string|null $imageViewType = null; + public string|null $brand = null; + public int|null $searchRank = null; + public bool|null $sitemapIncludedFlag = null; + public string|null $sitemapChangeFrequency = null; + public string|null $sitemapPriority = null; + public array $pageAttributes = []; + public array $customAttributes = []; + public array $sharedVariationAttributes = []; + public array $variants = []; + public array|null $bundleProducts = null; + public array|null $setProducts = null; + public string|null $classificationCategoryId = null; + public string|null $classificationCatalogId = null; + public array $variationGroups = []; + + public function __construct(public string $id) + { } public function setUpc(string $upc): void @@ -69,7 +67,7 @@ public function setOnlineFlag(bool $onlineFlag): void $this->onlineFlag = $onlineFlag; } - public function setOnlineFromTo(?DateTimeInterface $from, ?DateTimeInterface $to): void + public function setOnlineFromTo(DateTimeInterface|null $from, DateTimeInterface|null $to): void { if ($from !== null) { $this->onlineFrom = $from; @@ -80,7 +78,7 @@ public function setOnlineFromTo(?DateTimeInterface $from, ?DateTimeInterface $to } } - public function setSearchableFlags(?bool $availableFlag, ?bool $searchableFlag, ?bool $searchableIfUnavailableFlag): void + public function setSearchableFlags(bool|null $availableFlag, bool|null $searchableFlag, bool|null $searchableIfUnavailableFlag): void { if ($availableFlag !== null) { $this->availableFlag = $availableFlag; @@ -95,7 +93,7 @@ public function setSearchableFlags(?bool $availableFlag, ?bool $searchableFlag, } } - public function setTax(?float $tax): void + public function setTax(float|null $tax): void { if ($tax === null) { return; @@ -133,7 +131,7 @@ public function setSearchRank(int $searchRank = 3): void $this->searchRank = $searchRank; } - public function setSitemap(?float $sitemapPriority = null, bool $sitemapIncludedFlag = true, string $sitemapChangeFrequency = 'weekly'): void + public function setSitemap(float|null $sitemapPriority = null, bool $sitemapIncludedFlag = true, string $sitemapChangeFrequency = 'weekly'): void { if ($sitemapPriority !== null && $sitemapPriority > 1) { throw new InvalidArgumentException('Sitemap priority must be 1.0 or less'); @@ -147,7 +145,7 @@ public function setSitemap(?float $sitemapPriority = null, bool $sitemapIncluded $this->sitemapChangeFrequency = $sitemapChangeFrequency; } - public function setPageAttributes(?string $pageTitle, ?string $pageDescription, ?string $pageKeywords, ?string $pageUrl): void + public function setPageAttributes(string|null $pageTitle, string|null $pageDescription, string|null $pageKeywords, string|null $pageUrl): void { $this->pageAttributes = [ 'page-title' => $pageTitle, diff --git a/src/Writer/Entity/Variant.php b/src/Writer/Entity/Variant.php index cbcc356..93a4ec7 100644 --- a/src/Writer/Entity/Variant.php +++ b/src/Writer/Entity/Variant.php @@ -6,12 +6,10 @@ class Variant implements WriteableEntityInteface { - public $id; - public $displayValues = []; + public array $displayValues = []; - public function __construct(string $id) + public function __construct(public string $id) { - $this->id = $id; } public function addDisplayValue(string $value, string $displayValue): void diff --git a/src/Writer/EntityWriter/AssignmentXmlWriter.php b/src/Writer/EntityWriter/AssignmentXmlWriter.php index b90ea6c..fe3fab1 100644 --- a/src/Writer/EntityWriter/AssignmentXmlWriter.php +++ b/src/Writer/EntityWriter/AssignmentXmlWriter.php @@ -6,13 +6,8 @@ class AssignmentXmlWriter { - private $writer; - private $assignment; - - public function __construct(XmlWriter $writer, Assignment $assignment) + public function __construct(private XmlWriter $writer, private Assignment $assignment) { - $this->writer = $writer; - $this->assignment = $assignment; } public function write(): void diff --git a/src/Writer/EntityWriter/CategoryXmlWriter.php b/src/Writer/EntityWriter/CategoryXmlWriter.php index 12a1ad6..2e2e52e 100644 --- a/src/Writer/EntityWriter/CategoryXmlWriter.php +++ b/src/Writer/EntityWriter/CategoryXmlWriter.php @@ -6,13 +6,8 @@ class CategoryXmlWriter { - private $writer; - private $category; - - public function __construct(XmlWriter $writer, Category $category) + public function __construct(private XmlWriter $writer, private Category $category) { - $this->writer = $writer; - $this->category = $category; } public function write(): void diff --git a/src/Writer/EntityWriter/CustomAttributeWriter.php b/src/Writer/EntityWriter/CustomAttributeWriter.php index 825083c..7cbf1cd 100644 --- a/src/Writer/EntityWriter/CustomAttributeWriter.php +++ b/src/Writer/EntityWriter/CustomAttributeWriter.php @@ -6,13 +6,8 @@ class CustomAttributeWriter { - private $writer; - private $customAttribute; - - public function __construct(XmlWriter $writer, CustomAttribute $customAttribute) + public function __construct(private XmlWriter $writer, private CustomAttribute $customAttribute) { - $this->writer = $writer; - $this->customAttribute = $customAttribute; } public function write(): void diff --git a/src/Writer/EntityWriter/DeletedAssignmentXmlWriter.php b/src/Writer/EntityWriter/DeletedAssignmentXmlWriter.php index 6be201b..f155992 100644 --- a/src/Writer/EntityWriter/DeletedAssignmentXmlWriter.php +++ b/src/Writer/EntityWriter/DeletedAssignmentXmlWriter.php @@ -6,13 +6,8 @@ class DeletedAssignmentXmlWriter { - private $writer; - private $assignment; - - public function __construct(XmlWriter $writer, DeletedAssignment $assignment) + public function __construct(private XmlWriter $writer, private DeletedAssignment $assignment) { - $this->writer = $writer; - $this->assignment = $assignment; } public function write(): void diff --git a/src/Writer/EntityWriter/DeletedCategoryXmlWriter.php b/src/Writer/EntityWriter/DeletedCategoryXmlWriter.php index ee4f22e..879c06c 100644 --- a/src/Writer/EntityWriter/DeletedCategoryXmlWriter.php +++ b/src/Writer/EntityWriter/DeletedCategoryXmlWriter.php @@ -6,13 +6,8 @@ class DeletedCategoryXmlWriter { - private $writer; - private $category; - - public function __construct(XmlWriter $writer, DeletedCategory $category) + public function __construct(private XmlWriter $writer, private DeletedCategory $category) { - $this->writer = $writer; - $this->category = $category; } public function write(): void diff --git a/src/Writer/EntityWriter/DeletedProductXmlWriter.php b/src/Writer/EntityWriter/DeletedProductXmlWriter.php index 0522648..373b5ad 100644 --- a/src/Writer/EntityWriter/DeletedProductXmlWriter.php +++ b/src/Writer/EntityWriter/DeletedProductXmlWriter.php @@ -6,13 +6,8 @@ class DeletedProductXmlWriter { - private $writer; - private $product; - - public function __construct(XmlWriter $writer, DeletedProduct $product) + public function __construct(private XmlWriter $writer, private DeletedProduct $product) { - $this->writer = $writer; - $this->product = $product; } public function write(): void diff --git a/src/Writer/EntityWriter/ProductXmlWriter.php b/src/Writer/EntityWriter/ProductXmlWriter.php index a08812e..60770c5 100644 --- a/src/Writer/EntityWriter/ProductXmlWriter.php +++ b/src/Writer/EntityWriter/ProductXmlWriter.php @@ -6,13 +6,8 @@ class ProductXmlWriter { - private $writer; - private $product; - - public function __construct(XmlWriter $writer, Product $product) + public function __construct(private XmlWriter $writer, private Product $product) { - $this->writer = $writer; - $this->product = $product; } public function write(): void diff --git a/src/Writer/EntityWriter/VariantXmlWriter.php b/src/Writer/EntityWriter/VariantXmlWriter.php index 47381ed..5abe5cd 100644 --- a/src/Writer/EntityWriter/VariantXmlWriter.php +++ b/src/Writer/EntityWriter/VariantXmlWriter.php @@ -6,13 +6,8 @@ class VariantXmlWriter { - private $writer; - private $variant; - - public function __construct(XmlWriter $writer, Variant $variant) + public function __construct(private XmlWriter $writer, private Variant $variant) { - $this->writer = $writer; - $this->variant = $variant; } public function write(): void diff --git a/src/Writer/Xml/NilEmptyWriter.php b/src/Writer/Xml/NilEmptyWriter.php index 59c8f95..95df0fb 100644 --- a/src/Writer/Xml/NilEmptyWriter.php +++ b/src/Writer/Xml/NilEmptyWriter.php @@ -3,11 +3,8 @@ class NilEmptyWriter { - private $writer; - - public function __construct(XmlWriter $writer) + public function __construct(private XmlWriter $writer) { - $this->writer = $writer; } public function writeElement($name, $content = null): bool diff --git a/src/Writer/Xml/NotEmptyWriter.php b/src/Writer/Xml/NotEmptyWriter.php index 9443235..a968180 100644 --- a/src/Writer/Xml/NotEmptyWriter.php +++ b/src/Writer/Xml/NotEmptyWriter.php @@ -3,11 +3,8 @@ class NotEmptyWriter { - private $writer; - - public function __construct(XmlWriter $writer) + public function __construct(private XmlWriter $writer) { - $this->writer = $writer; } public function writeElement($name, $content = null): bool diff --git a/src/Writer/Xml/XmlFormatter.php b/src/Writer/Xml/XmlFormatter.php index 7b0da55..4a86260 100644 --- a/src/Writer/Xml/XmlFormatter.php +++ b/src/Writer/Xml/XmlFormatter.php @@ -14,14 +14,14 @@ class XmlFormatter * @see http://www.phpwact.org/php/i18n/charsets#common_problem_areas_with_utf-8 * @see http://www.xiven.com/weblog/2013/08/30/PHPInvalidUTF8InXMLRevisited */ - public static function sanitise(?string $string): string + public static function sanitise(string|null $string): string { // Only allow Tab (9), LF (10), CR (13), Space (32) - 55295, 57344 - 65533, 65536 - 1114111. return preg_replace('/[^\x{0009}\x{000A}\x{000D}\x{0020}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]/u', ' ', $string); } // Convert a boolean into a string for use in XML output. - public static function fromBoolean(?bool $value): string + public static function fromBoolean(bool|null $value): string { if ($value === null) { return ''; @@ -31,7 +31,7 @@ public static function fromBoolean(?bool $value): string } // Convert a DateTime object into a string for use in XML output. - public static function fromDateTime(?DateTimeInterface $value): string + public static function fromDateTime(DateTimeInterface|null $value): string { if ($value === null) { return ''; diff --git a/src/Writer/Xml/XmlWriter.php b/src/Writer/Xml/XmlWriter.php index b211f6b..acc6167 100644 --- a/src/Writer/Xml/XmlWriter.php +++ b/src/Writer/Xml/XmlWriter.php @@ -11,10 +11,10 @@ class XmlWriter extends PhpXmlWriter public const NAMESPACE = 'http://www.demandware.com/xml/impex/catalog/2006-10-31'; public const INDENT_SPACE = ' '; - private $notEmptyWriter; - private $nilEmptyWriter; - private $bufferLimit = 100; - private $entityCount = 0; + private NotEmptyWriter|null $notEmptyWriter = null; + private NilEmptyWriter|null $nilEmptyWriter = null; + private int $bufferLimit = 100; + private int $entityCount = 0; public function openFile(string $filename): bool { diff --git a/tests/FixtureHelper.php b/tests/FixtureHelper.php index 6f958b7..92f6ed1 100644 --- a/tests/FixtureHelper.php +++ b/tests/FixtureHelper.php @@ -18,6 +18,6 @@ protected function loadFixture(string $filename): string protected function loadJsonFixture(string $filename): array { - return json_decode(file_get_contents(TEST_FIXTURE_DIR . '/' . ltrim($filename, '/')), true); + return json_decode(file_get_contents(TEST_FIXTURE_DIR . '/' . ltrim($filename, '/')), true, 512, JSON_THROW_ON_ERROR); } } diff --git a/tests/Writer/Xml/XmlFormatterTest.php b/tests/Writer/Xml/XmlFormatterTest.php index 1c31de1..539ea98 100644 --- a/tests/Writer/Xml/XmlFormatterTest.php +++ b/tests/Writer/Xml/XmlFormatterTest.php @@ -7,6 +7,7 @@ use DemandwareXml\Writer\Xml\XmlFormatterException; use PHPUnit\Framework\TestCase; use stdClass; +use Stringable; class XmlFormatterTest extends TestCase { @@ -72,8 +73,8 @@ public function test_from_type($value, $expectedResult): void public function from_type_data_provider(): iterable { - $toStringClass = new class { - public function __toString() + $toStringClass = new class implements Stringable { + public function __toString(): string { return 'TOSTRING'; } From 44b6782586c613e2d0bb2bc03a81c78aa08bb25a Mon Sep 17 00:00:00 2001 From: Jamie Date: Mon, 20 Dec 2021 14:39:43 +0000 Subject: [PATCH 09/13] FIx CS. --- composer.json | 2 +- composer.lock | 4 +-- src/Writer/Entity/Category.php | 20 ++++++------- src/Writer/Entity/Product.php | 54 +++++++++++++++++----------------- src/Writer/Xml/XmlWriter.php | 4 +-- 5 files changed, 42 insertions(+), 42 deletions(-) diff --git a/composer.json b/composer.json index 345c0a2..eb6260c 100644 --- a/composer.json +++ b/composer.json @@ -11,9 +11,9 @@ ], "require": { "php": "^8.0", + "ext-SimpleXML": "^8.0", "ext-json": "^8.0", "ext-libxml": "^8.0", - "ext-SimpleXML": "^8.0", "ext-xmlreader": "^8.0", "ext-xmlwriter": "^8.0" }, diff --git a/composer.lock b/composer.lock index 7677014..1f0e65d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "4f071a3af47f1015c5e1c46e3636541d", + "content-hash": "e59989019c386513f21e0f272949d991", "packages": [], "packages-dev": [ { @@ -4591,9 +4591,9 @@ "prefer-lowest": false, "platform": { "php": "^8.0", + "ext-simplexml": "^8.0", "ext-json": "^8.0", "ext-libxml": "^8.0", - "ext-simplexml": "^8.0", "ext-xmlreader": "^8.0", "ext-xmlwriter": "^8.0" }, diff --git a/src/Writer/Entity/Category.php b/src/Writer/Entity/Category.php index c4179d1..46d17d4 100644 --- a/src/Writer/Entity/Category.php +++ b/src/Writer/Entity/Category.php @@ -8,17 +8,17 @@ class Category implements WriteableEntityInteface { - public string|null $displayName = null; - public bool|null $onlineFlag = null; - public DateTimeInterface|null $onlineFrom = null; - public DateTimeInterface|null $onlineTo = null; - public string|null $parentId = null; - public string|null $template = null; - public bool|null $sitemapIncludedFlag = null; + public string|null $displayName = null; + public bool|null $onlineFlag = null; + public DateTimeInterface|null $onlineFrom = null; + public DateTimeInterface|null $onlineTo = null; + public string|null $parentId = null; + public string|null $template = null; + public bool|null $sitemapIncludedFlag = null; public string|null $sitemapChangeFrequency = null; - public string|null $sitemapPriority = null; - public array $pageAttributes = []; - public array $customAttributes = []; + public string|null $sitemapPriority = null; + public array $pageAttributes = []; + public array $customAttributes = []; public function __construct(public string $id) { diff --git a/src/Writer/Entity/Product.php b/src/Writer/Entity/Product.php index 1a109ad..a1cdc0b 100644 --- a/src/Writer/Entity/Product.php +++ b/src/Writer/Entity/Product.php @@ -8,34 +8,34 @@ class Product implements WriteableEntityInteface { - public string|null $upc = null; - public int|null $minOrderQuantity = null; - public int|null $stepQuantity = null; - public string|null $displayName = null; - public string|null $longDescription = null; - public bool|null $onlineFlag = null; - public DateTimeInterface|null $onlineFrom = null; - public DateTimeInterface|null $onlineTo = null; - public bool|null $availableFlag = null; - public bool|null $searchableFlag = null; + public string|null $upc = null; + public int|null $minOrderQuantity = null; + public int|null $stepQuantity = null; + public string|null $displayName = null; + public string|null $longDescription = null; + public bool|null $onlineFlag = null; + public DateTimeInterface|null $onlineFrom = null; + public DateTimeInterface|null $onlineTo = null; + public bool|null $availableFlag = null; + public bool|null $searchableFlag = null; public bool|null $searchableIfUnavailableFlag = null; - public string|null $tax = null; - public array|null $images = []; - public string|null $imageViewType = null; - public string|null $brand = null; - public int|null $searchRank = null; - public bool|null $sitemapIncludedFlag = null; - public string|null $sitemapChangeFrequency = null; - public string|null $sitemapPriority = null; - public array $pageAttributes = []; - public array $customAttributes = []; - public array $sharedVariationAttributes = []; - public array $variants = []; - public array|null $bundleProducts = null; - public array|null $setProducts = null; - public string|null $classificationCategoryId = null; - public string|null $classificationCatalogId = null; - public array $variationGroups = []; + public string|null $tax = null; + public array|null $images = []; + public string|null $imageViewType = null; + public string|null $brand = null; + public int|null $searchRank = null; + public bool|null $sitemapIncludedFlag = null; + public string|null $sitemapChangeFrequency = null; + public string|null $sitemapPriority = null; + public array $pageAttributes = []; + public array $customAttributes = []; + public array $sharedVariationAttributes = []; + public array $variants = []; + public array|null $bundleProducts = null; + public array|null $setProducts = null; + public string|null $classificationCategoryId = null; + public string|null $classificationCatalogId = null; + public array $variationGroups = []; public function __construct(public string $id) { diff --git a/src/Writer/Xml/XmlWriter.php b/src/Writer/Xml/XmlWriter.php index acc6167..bf96c3e 100644 --- a/src/Writer/Xml/XmlWriter.php +++ b/src/Writer/Xml/XmlWriter.php @@ -13,8 +13,8 @@ class XmlWriter extends PhpXmlWriter private NotEmptyWriter|null $notEmptyWriter = null; private NilEmptyWriter|null $nilEmptyWriter = null; - private int $bufferLimit = 100; - private int $entityCount = 0; + private int $bufferLimit = 100; + private int $entityCount = 0; public function openFile(string $filename): bool { From ed8ca6eade226d91430a7992148e40fd3e482f6d Mon Sep 17 00:00:00 2001 From: Jamie Date: Mon, 20 Dec 2021 14:40:51 +0000 Subject: [PATCH 10/13] Ignore Rector. --- .php-cs-fixer.dist.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 28734b5..e6fd2dc 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -1,5 +1,11 @@ false, // Needed for tests 'group_import' => false, // Currently broken for root classes ]); + +return $config->setFinder( + $config->getFinder() + ->notName('rector.php') +); + From 03483759eba1d378ac5bd2c9ee4836844dd264ae Mon Sep 17 00:00:00 2001 From: Jamie Date: Mon, 20 Dec 2021 14:44:05 +0000 Subject: [PATCH 11/13] Fix CS. --- .php-cs-fixer.dist.php | 1 - 1 file changed, 1 deletion(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index e6fd2dc..26be76c 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -8,4 +8,3 @@ $config->getFinder() ->notName('rector.php') ); - From cd8fc7642e404f1a2d11c554072cc72c29265443 Mon Sep 17 00:00:00 2001 From: Jamie Date: Mon, 20 Dec 2021 15:48:16 +0000 Subject: [PATCH 12/13] Restore composer.lock ignore. --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 810e21a..d223e08 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,6 +4,7 @@ /.gitattributes export-ignore /.gitignore export-ignore /.php-cs-fixer.dist.php export-ignore +/composer.lock export-ignore /LICENSE export-ignore /phpunit.xml.dist export-ignore /php-demandware-xml export-ignore From a6cb5c16adeb70b2e0d9182a1ac206834a64b826 Mon Sep 17 00:00:00 2001 From: Jamie Date: Mon, 20 Dec 2021 17:30:16 +0000 Subject: [PATCH 13/13] Refactor libxml error to exception code. --- src/Parser.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/Parser.php b/src/Parser.php index f586566..967c77a 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -59,15 +59,23 @@ public function validate(bool $useSchema = true): bool protected function libXmlErrorToException($error): XMLException { - $level = null; - $level = match ($error->level) { + return new XmlException(sprintf( + '%s: %s in %s on line %s column %s', + $this->libXmlErrorLevelToString($error->level), + trim($error->message), + basename($error->file), + $error->line, + $error->column, + ), $error->code); + } + + protected function libXmlErrorLevelToString(string $level): string + { + return match ($level) { LIBXML_ERR_WARNING => 'Warning', LIBXML_ERR_ERROR => 'Error', LIBXML_ERR_FATAL => 'Fatal', - default => new XmlException($level . ': ' . trim($error->message) . ' in ' . basename($error->file) . ' on line ' . $error->line . ' column ' . $error->column, $error->code), }; - - return new XmlException($level . ': ' . trim($error->message) . ' in ' . basename($error->file) . ' on line ' . $error->line . ' column ' . $error->column, $error->code); } protected function validateNodeParserClass(string $class): void