From d3ee45b440a641dcd090ef497dc627ceece1fa50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Sun, 12 Aug 2018 00:37:23 +0200 Subject: [PATCH 1/2] Enhancement: Update infection/infection and phpstan/phpstan --- composer.json | 4 +- composer.lock | 213 ++++++++++++++++++++++++++++++-------------------- 2 files changed, 130 insertions(+), 87 deletions(-) diff --git a/composer.json b/composer.json index 25ba02a9..798e741b 100644 --- a/composer.json +++ b/composer.json @@ -20,11 +20,11 @@ "localheinz/json-printer": "^2.0.1" }, "require-dev": { - "infection/infection": "~0.8.1", + "infection/infection": "~0.10.0", "localheinz/php-cs-fixer-config": "~1.14.1", "localheinz/test-util": "~0.7.0", "phpbench/phpbench": "~0.14.0", - "phpstan/phpstan": "~0.9.2", + "phpstan/phpstan": "~0.10.3", "phpunit/phpunit": "^7.3.1" }, "config": { diff --git a/composer.lock b/composer.lock index 412fa3c3..916df6fc 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": "679605bb676fafe6f19d45039cf6a6fd", + "content-hash": "1d4fec83e9d9a76a0f21f85d01c8d883", "packages": [ { "name": "justinrainbow/json-schema", @@ -180,16 +180,16 @@ }, { "name": "composer/ca-bundle", - "version": "1.1.1", + "version": "1.1.2", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "d2c0a83b7533d6912e8d516756ebd34f893e9169" + "reference": "46afded9720f40b9dc63542af4e3e43a1177acb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/d2c0a83b7533d6912e8d516756ebd34f893e9169", - "reference": "d2c0a83b7533d6912e8d516756ebd34f893e9169", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/46afded9720f40b9dc63542af4e3e43a1177acb0", + "reference": "46afded9720f40b9dc63542af4e3e43a1177acb0", "shasum": "" }, "require": { @@ -232,7 +232,7 @@ "ssl", "tls" ], - "time": "2018-03-29T19:57:20+00:00" + "time": "2018-08-08T08:57:40+00:00" }, { "name": "composer/semver", @@ -690,36 +690,40 @@ }, { "name": "infection/infection", - "version": "0.8.1", + "version": "0.10.0", "source": { "type": "git", "url": "https://github.com/infection/infection.git", - "reference": "0f8109caa95552c3661c6847b8ea2a8a362e3103" + "reference": "befd28b1adfb2468f2318010211d7ca5232c2e56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/infection/infection/zipball/0f8109caa95552c3661c6847b8ea2a8a362e3103", - "reference": "0f8109caa95552c3661c6847b8ea2a8a362e3103", + "url": "https://api.github.com/repos/infection/infection/zipball/befd28b1adfb2468f2318010211d7ca5232c2e56", + "reference": "befd28b1adfb2468f2318010211d7ca5232c2e56", "shasum": "" }, "require": { - "nikic/php-parser": "^3.0", + "composer/xdebug-handler": "^1.1", + "ext-dom": "*", + "nikic/php-parser": "^4.0", + "ocramius/package-versions": "^1.2", "padraic/phar-updater": "^1.0.4", - "php": "^7.0", + "php": "^7.1", "pimple/pimple": "^3.2", "sebastian/diff": "^1.4 || ^2.0 || ^3.0", "symfony/console": "^3.2 || ^4.0", "symfony/filesystem": "^3.2 || ^4.0", "symfony/finder": "^3.2 || ^4.0", "symfony/process": "^3.2 || ^4.0", - "symfony/yaml": "^3.2 || ^4.0" + "symfony/yaml": "^3.2 || ^4.0", + "webmozart/assert": "^1.3" }, "conflict": { "symfony/process": "3.4.2" }, "require-dev": { - "mockery/mockery": "^1.0", - "phpunit/phpunit": "^6.1" + "mockery/mockery": "^1.1", + "phpunit/phpunit": "^6" }, "bin": [ "bin/infection" @@ -739,6 +743,24 @@ "name": "Maks Rafalko", "email": "maks.rafalko@gmail.com", "homepage": "https://twitter.com/maks_rafalko" + }, + { + "name": "Gert de Pagter", + "homepage": "https://github.com/BackEndTea" + }, + { + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com", + "homepage": "https://twitter.com/tfidry" + }, + { + "name": "Oleg Zhulnev", + "homepage": "https://github.com/sidz" + }, + { + "name": "Alexey Kopytko", + "email": "alexey@kopytko.com", + "homepage": "https://www.alexeykopytko.com" } ], "description": "Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.", @@ -750,7 +772,7 @@ "testing", "unit testing" ], - "time": "2018-03-01T06:23:00+00:00" + "time": "2018-08-11T07:36:24+00:00" }, { "name": "jean85/pretty-package-versions", @@ -1203,16 +1225,16 @@ }, { "name": "nette/di", - "version": "v2.4.12", + "version": "v2.4.13", "source": { "type": "git", "url": "https://github.com/nette/di.git", - "reference": "8e717aed2d182a26763be58c220eebaaa32917df" + "reference": "3f8f212b02d5c17feb97a7e0a39ab306f40c06ca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/di/zipball/8e717aed2d182a26763be58c220eebaaa32917df", - "reference": "8e717aed2d182a26763be58c220eebaaa32917df", + "url": "https://api.github.com/repos/nette/di/zipball/3f8f212b02d5c17feb97a7e0a39ab306f40c06ca", + "reference": "3f8f212b02d5c17feb97a7e0a39ab306f40c06ca", "shasum": "" }, "require": { @@ -1268,31 +1290,31 @@ "nette", "static" ], - "time": "2018-04-26T09:18:42+00:00" + "time": "2018-06-11T08:46:01+00:00" }, { "name": "nette/finder", - "version": "v2.4.1", + "version": "v2.4.2", "source": { "type": "git", "url": "https://github.com/nette/finder.git", - "reference": "4d43a66d072c57d585bf08a3ef68d3587f7e9547" + "reference": "ee951a656cb8ac622e5dd33474a01fd2470505a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/finder/zipball/4d43a66d072c57d585bf08a3ef68d3587f7e9547", - "reference": "4d43a66d072c57d585bf08a3ef68d3587f7e9547", + "url": "https://api.github.com/repos/nette/finder/zipball/ee951a656cb8ac622e5dd33474a01fd2470505a0", + "reference": "ee951a656cb8ac622e5dd33474a01fd2470505a0", "shasum": "" }, "require": { - "nette/utils": "^2.4 || ~3.0.0", + "nette/utils": "~2.4", "php": ">=5.6.0" }, "conflict": { "nette/nette": "<2.2" }, "require-dev": { - "nette/tester": "^2.0", + "nette/tester": "~2.0", "tracy/tracy": "^2.3" }, "type": "library", @@ -1322,22 +1344,28 @@ "homepage": "https://nette.org/contributors" } ], - "description": "Nette Finder: Files Searching", + "description": "🔍 Nette Finder: find files and directories with an intuitive API.", "homepage": "https://nette.org", - "time": "2017-07-10T23:47:08+00:00" + "keywords": [ + "filesystem", + "glob", + "iterator", + "nette" + ], + "time": "2018-06-28T11:49:23+00:00" }, { "name": "nette/neon", - "version": "v2.4.2", + "version": "v2.4.3", "source": { "type": "git", "url": "https://github.com/nette/neon.git", - "reference": "9eacd50553b26b53a3977bfb2fea2166d4331622" + "reference": "5e72b1dd3e2d34f0863c5561139a19df6a1ef398" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/neon/zipball/9eacd50553b26b53a3977bfb2fea2166d4331622", - "reference": "9eacd50553b26b53a3977bfb2fea2166d4331622", + "url": "https://api.github.com/repos/nette/neon/zipball/5e72b1dd3e2d34f0863c5561139a19df6a1ef398", + "reference": "5e72b1dd3e2d34f0863c5561139a19df6a1ef398", "shasum": "" }, "require": { @@ -1376,22 +1404,29 @@ "homepage": "https://nette.org/contributors" } ], - "description": "Nette NEON: parser & generator for Nette Object Notation", + "description": "🍸 Nette NEON: encodes and decodes NEON file format.", "homepage": "http://ne-on.org", - "time": "2017-07-11T18:29:08+00:00" + "keywords": [ + "export", + "import", + "neon", + "nette", + "yaml" + ], + "time": "2018-03-21T12:12:21+00:00" }, { "name": "nette/php-generator", - "version": "v3.0.4", + "version": "v3.0.5", "source": { "type": "git", "url": "https://github.com/nette/php-generator.git", - "reference": "b381ecacbf5a0b5f99cc0b303d5b0578d409f446" + "reference": "ea90209c2e8a7cd087b2742ca553c047a8df5eff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/php-generator/zipball/b381ecacbf5a0b5f99cc0b303d5b0578d409f446", - "reference": "b381ecacbf5a0b5f99cc0b303d5b0578d409f446", + "url": "https://api.github.com/repos/nette/php-generator/zipball/ea90209c2e8a7cd087b2742ca553c047a8df5eff", + "reference": "ea90209c2e8a7cd087b2742ca553c047a8df5eff", "shasum": "" }, "require": { @@ -1440,20 +1475,20 @@ "php", "scaffolding" ], - "time": "2018-04-26T16:48:20+00:00" + "time": "2018-08-09T14:32:27+00:00" }, { "name": "nette/robot-loader", - "version": "v3.0.3", + "version": "v3.0.4", "source": { "type": "git", "url": "https://github.com/nette/robot-loader.git", - "reference": "92d4b40b49d5e2d9e37fc736bbcebe6da55fa44a" + "reference": "3cf88781a05e0bf4618ae605361afcbaa4d5b392" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/robot-loader/zipball/92d4b40b49d5e2d9e37fc736bbcebe6da55fa44a", - "reference": "92d4b40b49d5e2d9e37fc736bbcebe6da55fa44a", + "url": "https://api.github.com/repos/nette/robot-loader/zipball/3cf88781a05e0bf4618ae605361afcbaa4d5b392", + "reference": "3cf88781a05e0bf4618ae605361afcbaa4d5b392", "shasum": "" }, "require": { @@ -1505,7 +1540,7 @@ "nette", "trait" ], - "time": "2017-09-26T13:42:21+00:00" + "time": "2018-06-22T09:34:04+00:00" }, { "name": "nette/utils", @@ -1591,24 +1626,24 @@ }, { "name": "nikic/php-parser", - "version": "v3.1.5", + "version": "v4.0.3", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "bb87e28e7d7b8d9a7fda231d37457c9210faf6ce" + "reference": "bd088dc940a418f09cda079a9b5c7c478890fb8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bb87e28e7d7b8d9a7fda231d37457c9210faf6ce", - "reference": "bb87e28e7d7b8d9a7fda231d37457c9210faf6ce", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bd088dc940a418f09cda079a9b5c7c478890fb8d", + "reference": "bd088dc940a418f09cda079a9b5c7c478890fb8d", "shasum": "" }, "require": { "ext-tokenizer": "*", - "php": ">=5.5" + "php": ">=7.0" }, "require-dev": { - "phpunit/phpunit": "~4.0|~5.0" + "phpunit/phpunit": "^6.5 || ^7.0" }, "bin": [ "bin/php-parse" @@ -1616,7 +1651,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1638,7 +1673,7 @@ "parser", "php" ], - "time": "2018-02-28T20:30:58+00:00" + "time": "2018-07-15T17:25:16+00:00" }, { "name": "ocramius/package-versions", @@ -2384,33 +2419,34 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "0.2", + "version": "0.3", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "02f909f134fe06f0cd4790d8627ee24efbe84d6a" + "reference": "ed3223362174b8067729930439e139794e9e514a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/02f909f134fe06f0cd4790d8627ee24efbe84d6a", - "reference": "02f909f134fe06f0cd4790d8627ee24efbe84d6a", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/ed3223362174b8067729930439e139794e9e514a", + "reference": "ed3223362174b8067729930439e139794e9e514a", "shasum": "" }, "require": { - "php": "~7.0" + "php": "~7.1" }, "require-dev": { "consistence/coding-standard": "^2.0.0", "jakub-onderka/php-parallel-lint": "^0.9.2", "phing/phing": "^2.16.0", - "phpstan/phpstan": "^0.9", + "phpstan/phpstan": "^0.10@dev", "phpunit/phpunit": "^6.3", - "slevomat/coding-standard": "^3.3.0" + "slevomat/coding-standard": "^3.3.0", + "symfony/process": "^3.4 || ^4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "0.1-dev" + "dev-master": "0.3-dev" } }, "autoload": { @@ -2425,46 +2461,52 @@ "MIT" ], "description": "PHPDoc parser with support for nullable, intersection and generic types", - "time": "2018-01-13T18:19:41+00:00" + "time": "2018-06-20T17:48:01+00:00" }, { "name": "phpstan/phpstan", - "version": "0.9.2", + "version": "0.10.3", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "e59541bcc7cac9b35ca54db6365bf377baf4a488" + "reference": "dc62f78c9aa6e9f7c44e8d6518f1123cd1e1b1c0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e59541bcc7cac9b35ca54db6365bf377baf4a488", - "reference": "e59541bcc7cac9b35ca54db6365bf377baf4a488", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/dc62f78c9aa6e9f7c44e8d6518f1123cd1e1b1c0", + "reference": "dc62f78c9aa6e9f7c44e8d6518f1123cd1e1b1c0", "shasum": "" }, "require": { + "composer/xdebug-handler": "^1.0", "jean85/pretty-package-versions": "^1.0.3", "nette/bootstrap": "^2.4 || ^3.0", "nette/di": "^2.4.7 || ^3.0", "nette/robot-loader": "^3.0.1", "nette/utils": "^2.4.5 || ^3.0", - "nikic/php-parser": "^3.1", - "php": "~7.0", - "phpstan/phpdoc-parser": "^0.2", + "nikic/php-parser": "^4.0.2", + "php": "~7.1", + "phpstan/phpdoc-parser": "^0.3", "symfony/console": "~3.2 || ~4.0", "symfony/finder": "~3.2 || ~4.0" }, "require-dev": { - "consistence/coding-standard": "2.2.1", + "brianium/paratest": "^2.0", + "consistence/coding-standard": "^3.3", + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4", "ext-gd": "*", "ext-intl": "*", "ext-mysqli": "*", - "jakub-onderka/php-parallel-lint": "^0.9.2", + "ext-zip": "*", + "jakub-onderka/php-parallel-lint": "^1.0", + "localheinz/composer-normalize": "~0.8.0", "phing/phing": "^2.16.0", - "phpstan/phpstan-php-parser": "^0.9", - "phpstan/phpstan-phpunit": "^0.9.3", - "phpstan/phpstan-strict-rules": "^0.9", - "phpunit/phpunit": "^6.5.4", - "slevomat/coding-standard": "4.0.0" + "phpstan/phpstan-deprecation-rules": "^0.10.2", + "phpstan/phpstan-php-parser": "^0.10", + "phpstan/phpstan-phpunit": "^0.10", + "phpstan/phpstan-strict-rules": "^0.10", + "phpunit/phpunit": "^7.0", + "slevomat/coding-standard": "^4.6.2" }, "bin": [ "bin/phpstan" @@ -2472,7 +2514,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "0.9-dev" + "dev-master": "0.10-dev" } }, "autoload": { @@ -2488,7 +2530,7 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", - "time": "2018-01-28T13:22:19+00:00" + "time": "2018-08-12T15:14:21+00:00" }, { "name": "phpunit/php-code-coverage", @@ -4252,20 +4294,21 @@ }, { "name": "symfony/yaml", - "version": "v4.0.8", + "version": "v4.1.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "8b34ebb5989df61cbd77eff29a02c4db9ac1069c" + "reference": "46bc69aa91fc4ab78a96ce67873a6b0c148fd48c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/8b34ebb5989df61cbd77eff29a02c4db9ac1069c", - "reference": "8b34ebb5989df61cbd77eff29a02c4db9ac1069c", + "url": "https://api.github.com/repos/symfony/yaml/zipball/46bc69aa91fc4ab78a96ce67873a6b0c148fd48c", + "reference": "46bc69aa91fc4ab78a96ce67873a6b0c148fd48c", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" }, "conflict": { "symfony/console": "<3.4" @@ -4279,7 +4322,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -4306,7 +4349,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2018-04-03T05:24:00+00:00" + "time": "2018-07-26T11:24:31+00:00" }, { "name": "theseer/tokenizer", From cc39a6e62d0c80b62e0a40d4b30dc54996496948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Sun, 19 Aug 2018 11:45:17 +0200 Subject: [PATCH 2/2] Fix: Add inline DocBlock --- src/Format/Formatter.php | 1 + src/JsonEncodeNormalizer.php | 1 + src/SchemaNormalizer.php | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Format/Formatter.php b/src/Format/Formatter.php index fd4e5404..48c77d97 100644 --- a/src/Format/Formatter.php +++ b/src/Format/Formatter.php @@ -31,6 +31,7 @@ public function __construct(Printer\PrinterInterface $printer = null) public function format(JsonInterface $json, FormatInterface $format): JsonInterface { + /** @var string $encoded */ $encoded = \json_encode( $json->decoded(), $format->jsonEncodeOptions() diff --git a/src/JsonEncodeNormalizer.php b/src/JsonEncodeNormalizer.php index cc88893f..df629f4f 100644 --- a/src/JsonEncodeNormalizer.php +++ b/src/JsonEncodeNormalizer.php @@ -39,6 +39,7 @@ public function __construct(int $jsonEncodeOptions) public function normalize(JsonInterface $json): JsonInterface { + /** @var string $encodedWithJsonEncodeOptions */ $encodedWithJsonEncodeOptions = \json_encode( $json->decoded(), $this->jsonEncodeOptions diff --git a/src/SchemaNormalizer.php b/src/SchemaNormalizer.php index fd2c31c0..567a6d13 100644 --- a/src/SchemaNormalizer.php +++ b/src/SchemaNormalizer.php @@ -103,7 +103,10 @@ public function normalize(JsonInterface $json): JsonInterface )); } - return Json::fromEncoded(\json_encode($normalized)); + /** @var string $encoded */ + $encoded = \json_encode($normalized); + + return Json::fromEncoded($encoded); } /**