From 7d294cf2abb26795537f728df964dfa241690b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Thu, 31 Dec 2020 11:42:38 +0100 Subject: [PATCH] Fix: Update examples --- README.md | 374 +++++++++--------------------------------------------- 1 file changed, 62 insertions(+), 312 deletions(-) diff --git a/README.md b/README.md index 42125c4f..2fda0492 100644 --- a/README.md +++ b/README.md @@ -222,103 +222,6 @@ sections, the `VersionConstraintNormalizer` will ensure that ## Examples -### `laravel/laravel` - -Running - -``` -$ composer normalize -``` - -against https://github.com/laravel/laravel/blob/v5.6.12/composer.json yields the following diff: - -```diff -diff --git a/composer.json b/composer.json -index 65bf8b4f..507ab39c 100644 ---- a/composer.json -+++ b/composer.json -@@ -1,9 +1,12 @@ - { - "name": "laravel/laravel", -+ "type": "project", - "description": "The Laravel Framework.", -- "keywords": ["framework", "laravel"], -+ "keywords": [ -+ "framework", -+ "laravel" -+ ], - "license": "MIT", -- "type": "project", - "require": { - "php": "^7.1.3", - "fideloper/proxy": "^4.0", -@@ -17,43 +20,42 @@ - "nunomaduro/collision": "^2.0", - "phpunit/phpunit": "^7.0" - }, -+ "config": { -+ "optimize-autoloader": true, -+ "preferred-install": "dist", -+ "sort-packages": true -+ }, -+ "extra": { -+ "laravel": { -+ "dont-discover": [] -+ } -+ }, - "autoload": { -+ "psr-4": { -+ "App\\": "app/" -+ }, - "classmap": [ - "database/seeds", - "database/factories" -- ], -- "psr-4": { -- "App\\": "app/" -- } -+ ] - }, - "autoload-dev": { - "psr-4": { - "Tests\\": "tests/" - } - }, -- "extra": { -- "laravel": { -- "dont-discover": [ -- ] -- } -- }, -+ "minimum-stability": "dev", -+ "prefer-stable": true, - "scripts": { -+ "post-autoload-dump": [ -+ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", -+ "@php artisan package:discover" -+ ], - "post-root-package-install": [ - "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" - ], - "post-create-project-cmd": [ - "@php artisan key:generate" -- ], -- "post-autoload-dump": [ -- "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", -- "@php artisan package:discover" - ] -- }, -- "config": { -- "preferred-install": "dist", -- "sort-packages": true, -- "optimize-autoloader": true -- }, -- "minimum-stability": "dev", -- "prefer-stable": true -+ } - } -``` - ### `symfony/symfony` Running @@ -327,11 +230,11 @@ Running $ composer normalize ``` -against https://github.com/symfony/symfony/blob/v4.1.7/composer.json yields the following diff: +against https://github.com/symfony/symfony/blob/v5.2.1/composer.json yields the following diff: ```diff diff --git a/composer.json b/composer.json -index f861cbca31..b36000853a 100644 +index 765c2d6577..e725aa5dd8 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,9 @@ @@ -347,260 +250,107 @@ index f861cbca31..b36000853a 100644 "authors": [ @@ -20,7 +22,6 @@ "ext-xml": "*", - "doctrine/common": "~2.4", - "fig/link-util": "^1.0", -- "twig/twig": "^1.35|^2.4.4", + "doctrine/event-manager": "~1.0", + "doctrine/persistence": "^2", +- "twig/twig": "^2.10|^3.0", "psr/cache": "~1.0", "psr/container": "^1.0", - "psr/link": "^1.0", -@@ -29,7 +30,8 @@ - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-icu": "~1.0", + "psr/event-dispatcher": "^1.0", +@@ -35,18 +36,19 @@ "symfony/polyfill-mbstring": "~1.0", -- "symfony/polyfill-php72": "~1.5" -+ "symfony/polyfill-php72": "~1.5", -+ "twig/twig": "^1.35 || ^2.4.4" + "symfony/polyfill-php73": "^1.11", + "symfony/polyfill-php80": "^1.15", +- "symfony/polyfill-uuid": "^1.15" ++ "symfony/polyfill-uuid": "^1.15", ++ "twig/twig": "^2.10 || ^3.0" }, "replace": { - "symfony/asset": "self.version", -@@ -38,9 +40,9 @@ +- "symfony/asset": "self.version", + "symfony/amazon-mailer": "self.version", ++ "symfony/asset": "self.version", + "symfony/browser-kit": "self.version", + "symfony/cache": "self.version", "symfony/config": "self.version", "symfony/console": "self.version", "symfony/css-selector": "self.version", - "symfony/dependency-injection": "self.version", - "symfony/debug": "self.version", "symfony/debug-bundle": "self.version", + "symfony/dependency-injection": "self.version", "symfony/doctrine-bridge": "self.version", "symfony/dom-crawler": "self.version", "symfony/dotenv": "self.version", -@@ -65,11 +67,11 @@ - "symfony/proxy-manager-bridge": "self.version", - "symfony/routing": "self.version", - "symfony/security": "self.version", -+ "symfony/security-bundle": "self.version", - "symfony/security-core": "self.version", - "symfony/security-csrf": "self.version", - "symfony/security-guard": "self.version", - "symfony/security-http": "self.version", -- "symfony/security-bundle": "self.version", - "symfony/serializer": "self.version", - "symfony/stopwatch": "self.version", - "symfony/templating": "self.version", -@@ -84,32 +86,37 @@ +@@ -103,6 +105,14 @@ "symfony/workflow": "self.version", "symfony/yaml": "self.version" }, + "conflict": { -+ "phpdocumentor/reflection-docblock": "<3.0 || >=3.2.0,<3.2.2", ++ "doctrine/dbal": "<2.10", ++ "masterminds/html5": "<2.6", ++ "ocramius/proxy-manager": "<2.1", ++ "phpdocumentor/reflection-docblock": "<3.2.2", + "phpdocumentor/type-resolver": "<0.3.0", + "phpunit/phpunit": "<5.4.3" -+ }, -+ "provide": { -+ "psr/cache-implementation": "1.0", -+ "psr/container-implementation": "1.0", -+ "psr/log-implementation": "1.0", -+ "psr/simple-cache-implementation": "1.0" + }, "require-dev": { - "cache/integration-tests": "dev-master", - "doctrine/annotations": "~1.0", + "amphp/amp": "^2.5", + "amphp/http-client": "^4.2.1", +@@ -115,35 +125,30 @@ "doctrine/cache": "~1.6", - "doctrine/data-fixtures": "1.0.*", - "doctrine/dbal": "~2.4", -- "doctrine/orm": "~2.4,>=2.4.5", - "doctrine/doctrine-bundle": "~1.4", -+ "doctrine/orm": "~2.4,>=2.4.5", + "doctrine/collections": "~1.0", + "doctrine/data-fixtures": "^1.1", +- "doctrine/dbal": "^2.10|^3.0", +- "doctrine/orm": "^2.7.3", ++ "doctrine/dbal": "^2.10 || ^3.0", + "doctrine/doctrine-bundle": "^2.0", ++ "doctrine/orm": "^2.7.3", + "egulias/email-validator": "~1.2,>=1.2.8 || ~2.0", - "monolog/monolog": "~1.11", -- "ocramius/proxy-manager": "~0.4|~1.0|~2.0", -+ "ocramius/proxy-manager": "~0.4 || ~1.0 || ~2.0", -+ "phpdocumentor/reflection-docblock": "^3.0 || ^4.0", - "predis/predis": "~1.0", + "guzzlehttp/promises": "^1.3.1", + "masterminds/html5": "^2.6", +- "monolog/monolog": "^1.25.1|^2", ++ "monolog/monolog": "^1.25.1 || ^2", + "nyholm/psr7": "^1.0", + "ocramius/proxy-manager": "^2.1", + "paragonie/sodium_compat": "^1.8", + "pda/pheanstalk": "^4.0", +- "php-http/httplug": "^1.0|^2.0", ++ "php-http/httplug": "^1.0 || ^2.0", ++ "phpdocumentor/reflection-docblock": "^3.0 || ^4.0 || ^5.0", + "predis/predis": "~1.1", + "psr/http-client": "^1.0", + "psr/simple-cache": "^1.0", - "egulias/email-validator": "~1.2,>=1.2.8|~2.0", -- "symfony/phpunit-bridge": "~3.4|~4.0", + "symfony/phpunit-bridge": "^5.2", - "symfony/security-acl": "~2.8|~3.0", -- "phpdocumentor/reflection-docblock": "^3.0|^4.0" -+ "symfony/phpunit-bridge": "~3.4 || ~4.0", -+ "symfony/security-acl": "~2.8 || ~3.0" +- "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", ++ "symfony/security-acl": "~2.8 || ~3.0", + "twig/cssinliner-extra": "^2.12", + "twig/inky-extra": "^2.12", + "twig/markdown-extra": "^2.12" }, - "conflict": { -- "phpdocumentor/reflection-docblock": "<3.0||>=3.2.0,<3.2.2", +- "doctrine/dbal": "<2.10", +- "masterminds/html5": "<2.6", +- "phpdocumentor/reflection-docblock": "<3.2.2", - "phpdocumentor/type-resolver": "<0.3.0", +- "ocramius/proxy-manager": "<2.1", - "phpunit/phpunit": "<5.4.3" -- }, -- "provide": { -- "psr/cache-implementation": "1.0", -- "psr/container-implementation": "1.0", -- "psr/log-implementation": "1.0", -- "psr/simple-cache-implementation": "1.0" + "extra": { -+ "branch-alias": { -+ "dev-master": "4.1-dev" -+ } ++ "branch-version": "5.2" }, "autoload": { "psr-4": { -@@ -128,12 +135,9 @@ - ] - }, - "autoload-dev": { -- "files": [ "src/Symfony/Component/VarDumper/Resources/functions/dump.php" ] -+ "files": [ -+ "src/Symfony/Component/VarDumper/Resources/functions/dump.php" -+ ] - }, +@@ -173,8 +178,5 @@ + "url": "src/Symfony/Contracts" + } + ], - "minimum-stability": "dev", - "extra": { -- "branch-alias": { -- "dev-master": "4.1-dev" -- } +- "branch-version": "5.2" - } + "minimum-stability": "dev" } ``` -### `zendframework/zend-expressive` - -Running - -``` -$ composer normalize -``` - -against https://github.com/zendframework/zend-expressive/blob/3.2.1/composer.json yields the following diff: - -```diff -diff --git a/composer.json b/composer.json -index 478ab18a..773be7fa 100644 ---- a/composer.json -+++ b/composer.json -@@ -1,7 +1,6 @@ - { - "name": "zendframework/zend-expressive", - "description": "PSR-15 Middleware Microframework", -- "license": "BSD-3-Clause", - "keywords": [ - "http", - "middleware", -@@ -14,14 +13,7 @@ - "zendframework", - "zend-expressive" - ], -- "support": { -- "docs": "https://docs.zendframework.com/zend-expressive/", -- "issues": "https://github.com/zendframework/zend-expressive/issues", -- "source": "https://github.com/zendframework/zend-expressive", -- "rss": "https://github.com/zendframework/zend-expressive/releases.atom", -- "slack": "https://zendframework-slack.herokuapp.com", -- "forum": "https://discourse.zendframework.com/c/questions/expressive" -- }, -+ "license": "BSD-3-Clause", - "require": { - "php": "^7.1", - "fig/http-message-util": "^1.1.2", - "http", - "middleware", -@@ -14,14 +13,7 @@ - "zendframework", - "zend-expressive" - ], -- "support": { -- "docs": "https://docs.zendframework.com/zend-expressive/", -- "issues": "https://github.com/zendframework/zend-expressive/issues", -- "source": "https://github.com/zendframework/zend-expressive", -- "rss": "https://github.com/zendframework/zend-expressive/releases.atom", -- "slack": "https://zendframework-slack.herokuapp.com", -- "forum": "https://discourse.zendframework.com/c/questions/expressive" -- }, -+ "license": "BSD-3-Clause", - "require": { - "php": "^7.1", - "fig/http-message-util": "^1.1.2", -@@ -33,6 +25,10 @@ - "zendframework/zend-httphandlerrunner": "^1.0.1", - "zendframework/zend-stratigility": "^3.0" - }, -+ "conflict": { -+ "container-interop/container-interop": "<1.2.0", -+ "zendframework/zend-diactoros": "<1.7.1" -+ }, - "require-dev": { - "filp/whoops": "^1.1.10 || ^2.1.13", - "malukenho/docheader": "^0.1.6", -@@ -47,10 +43,6 @@ - "zendframework/zend-expressive-zendrouter": "^3.0", - "zendframework/zend-servicemanager": "^2.7.8 || ^3.3" - }, -- "conflict": { -- "container-interop/container-interop": "<1.2.0", -- "zendframework/zend-diactoros": "<1.7.1" -- }, - "suggest": { - "filp/whoops": "^2.1 to use the Whoops error handler", - "psr/http-message-implementation": "Please install a psr/http-message-implementation to consume Expressive; e.g., zendframework/zend-diactoros", -@@ -60,19 +52,6 @@ - "zendframework/zend-pimple-config": "^1.0 to use Pimple for dependency injection container", - "zendframework/zend-servicemanager": "^3.3 to use zend-servicemanager for dependency injection" - }, -- "autoload": { -- "files": [ -- "src/constants.php" -- ], -- "psr-4": { -- "Zend\\Expressive\\": "src/" -- } -- }, -- "autoload-dev": { -- "psr-4": { -- "ZendTest\\Expressive\\": "test/" -- } -- }, - "config": { - "sort-packages": true - }, -@@ -85,6 +64,19 @@ - "config-provider": "Zend\\Expressive\\ConfigProvider" - } - }, -+ "autoload": { -+ "psr-4": { -+ "Zend\\Expressive\\": "src/" -+ }, -+ "files": [ -+ "src/constants.php" -+ ] -+ }, -+ "autoload-dev": { -+ "psr-4": { -+ "ZendTest\\Expressive\\": "test/" -+ } -+ }, - "bin": [ - "bin/expressive-tooling" - ], -@@ -96,9 +88,17 @@ - ], - "cs-check": "phpcs", - "cs-fix": "phpcbf", -+ "license-check": "docheader check src/ test/", - "phpstan": "phpstan analyze -l max -c phpstan.neon ./src", - "test": "phpunit --colors=always", -- "test-coverage": "phpunit --colors=always --coverage-clover clover.xml", -- "license-check": "docheader check src/ test/" -+ "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" -+ }, -+ "support": { -+ "issues": "https://github.com/zendframework/zend-expressive/issues", -+ "forum": "https://discourse.zendframework.com/c/questions/expressive", -+ "source": "https://github.com/zendframework/zend-expressive", -+ "docs": "https://docs.zendframework.com/zend-expressive/", -+ "rss": "https://github.com/zendframework/zend-expressive/releases.atom", -+ "slack": "https://zendframework-slack.herokuapp.com" - } - } -``` - ## Changelog Please have a look at [`CHANGELOG.md`](CHANGELOG.md).