diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51f12e8..445e16e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,9 +12,9 @@ jobs: fail-fast: false matrix: php-versions: - - "7.4" - - "8.0" - - "8.1" + - '7.4' + - '8.0' + - '8.1' steps: - name: Checkout @@ -42,6 +42,10 @@ jobs: - name: Install dependencies run: composer install + - name: Normalize composer.json + if: matrix.php-versions == '8.1' + run: composer normalize --dry-run + - name: PHP-CS-Fixer if: matrix.php-versions == '8.1' run: vendor/bin/php-cs-fixer fix --dry-run --format=checkstyle | cs2pr diff --git a/composer.json b/composer.json index 15ddad8..5c85a3d 100644 --- a/composer.json +++ b/composer.json @@ -1,8 +1,12 @@ { "name": "ely/php-code-style", "description": "Set of PHP-CS-Fixer rules used in the development of Ely.by PHP projects", - "keywords": ["php-cs-fixer", "code style"], - "homepage": "https://github.com/elyby/php-code-style", + "license": "Apache-2.0", + "type": "library", + "keywords": [ + "php-cs-fixer", + "code style" + ], "authors": [ { "name": "Ely.by team", @@ -13,25 +17,20 @@ "email": "erickskrauch@ely.by" } ], - "license": "Apache-2.0", - "type": "library", + "homepage": "https://github.com/elyby/php-code-style", "require": { - "php": "^7.4|^8.0", + "php": "^7.4 || ^8.0", "friendsofphp/php-cs-fixer": "^3" }, "require-dev": { - "phpunit/phpunit": "^9.5", + "ergebnis/composer-normalize": "^2.28", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", "phpspec/prophecy": "^1.15", "phpspec/prophecy-phpunit": "^2.0", - "phpunitgoodpractices/traits": "^1.9.1", - "symfony/phpunit-bridge": "^6.0", + "phpunit/phpunit": "^9.5", "phpunitgoodpractices/polyfill": "^1.5", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2" - }, - "config": { - "preferred-install": { - "friendsofphp/php-cs-fixer": "source" - } + "phpunitgoodpractices/traits": "^1.9.1", + "symfony/phpunit-bridge": "^6.0" }, "autoload": { "psr-4": { @@ -43,5 +42,13 @@ "Ely\\CS\\Test\\": "tests/", "PhpCsFixer\\Tests\\": "vendor/friendsofphp/php-cs-fixer/tests/" } + }, + "config": { + "allow-plugins": { + "ergebnis/composer-normalize": true + }, + "preferred-install": { + "friendsofphp/php-cs-fixer": "source" + } } } diff --git a/composer.lock b/composer.lock index 71c0c94..d758094 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": "ef27d5f95925d2c8c29ac8ad4a83145e", + "content-hash": "caea1288c4837f2f630053b24b54d2a9", "packages": [ { "name": "composer/pcre", @@ -2187,6 +2187,404 @@ ], "time": "2022-03-03T08:28:38+00:00" }, + { + "name": "ergebnis/composer-normalize", + "version": "2.28.3", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/composer-normalize.git", + "reference": "ec75a2bf751f6fec165e9ea0262655b8ca397e5c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/ec75a2bf751f6fec165e9ea0262655b8ca397e5c", + "reference": "ec75a2bf751f6fec165e9ea0262655b8ca397e5c", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.0.0", + "ergebnis/json-normalizer": "~2.1.0", + "ergebnis/json-printer": "^3.2.0", + "justinrainbow/json-schema": "^5.2.12", + "localheinz/diff": "^1.1.1", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "composer/composer": "^2.3.9", + "ergebnis/license": "^1.2.0", + "ergebnis/php-cs-fixer-config": "^4.4.0", + "fakerphp/faker": "^1.19.0", + "phpunit/phpunit": "^9.5.21", + "psalm/plugin-phpunit": "~0.17.0", + "symfony/filesystem": "^5.4.9", + "vimeo/psalm": "^4.24.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Ergebnis\\Composer\\Normalize\\NormalizePlugin", + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Composer\\Normalize\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides a composer plugin for normalizing composer.json.", + "homepage": "https://github.com/ergebnis/composer-normalize", + "keywords": [ + "composer", + "normalize", + "normalizer", + "plugin" + ], + "support": { + "issues": "https://github.com/ergebnis/composer-normalize/issues", + "source": "https://github.com/ergebnis/composer-normalize" + }, + "time": "2022-07-05T16:09:10+00:00" + }, + { + "name": "ergebnis/json-normalizer", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-normalizer.git", + "reference": "2039eb11131a243b9204bf51219baa08935e6b1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/2039eb11131a243b9204bf51219baa08935e6b1d", + "reference": "2039eb11131a243b9204bf51219baa08935e6b1d", + "shasum": "" + }, + "require": { + "ergebnis/json-printer": "^3.2.0", + "ergebnis/json-schema-validator": "^2.0.0", + "ext-json": "*", + "justinrainbow/json-schema": "^5.2.11", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "ergebnis/data-provider": "^1.0.0", + "ergebnis/license": "^1.2.0", + "ergebnis/php-cs-fixer-config": "^3.4.0", + "fakerphp/faker": "^1.17.0", + "infection/infection": "~0.25.5", + "phpunit/phpunit": "^9.5.11", + "psalm/plugin-phpunit": "~0.16.1", + "vimeo/psalm": "^4.17.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ergebnis\\Json\\Normalizer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides generic and vendor-specific normalizers for normalizing JSON documents.", + "homepage": "https://github.com/ergebnis/json-normalizer", + "keywords": [ + "json", + "normalizer" + ], + "support": { + "issues": "https://github.com/ergebnis/json-normalizer/issues", + "source": "https://github.com/ergebnis/json-normalizer" + }, + "funding": [ + { + "url": "https://github.com/localheinz", + "type": "github" + } + ], + "time": "2022-01-04T11:19:55+00:00" + }, + { + "name": "ergebnis/json-printer", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-printer.git", + "reference": "651cab2b7604a6b338d0d16749f5ea0851a68005" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/651cab2b7604a6b338d0d16749f5ea0851a68005", + "reference": "651cab2b7604a6b338d0d16749f5ea0851a68005", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "ergebnis/license": "^1.1.0", + "ergebnis/php-cs-fixer-config": "^3.4.0", + "fakerphp/faker": "^1.17.0", + "infection/infection": "~0.25.5", + "phpunit/phpunit": "^9.5.11", + "psalm/plugin-phpunit": "~0.16.1", + "vimeo/psalm": "^4.16.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ergebnis\\Json\\Printer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides a JSON printer, allowing for flexible indentation.", + "homepage": "https://github.com/ergebnis/json-printer", + "keywords": [ + "formatter", + "json", + "printer" + ], + "support": { + "issues": "https://github.com/ergebnis/json-printer/issues", + "source": "https://github.com/ergebnis/json-printer" + }, + "funding": [ + { + "url": "https://github.com/localheinz", + "type": "github" + } + ], + "time": "2021-12-27T12:39:13+00:00" + }, + { + "name": "ergebnis/json-schema-validator", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-schema-validator.git", + "reference": "dacd8a47c1cc2c426ec71e952da3609ebe901fac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/dacd8a47c1cc2c426ec71e952da3609ebe901fac", + "reference": "dacd8a47c1cc2c426ec71e952da3609ebe901fac", + "shasum": "" + }, + "require": { + "ext-json": "*", + "justinrainbow/json-schema": "^5.2.10", + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.18.0", + "ergebnis/data-provider": "^1.0.0", + "ergebnis/license": "^1.1.0", + "ergebnis/php-cs-fixer-config": "~3.4.0", + "fakerphp/faker": "^1.17.0", + "infection/infection": "~0.25.3", + "phpunit/phpunit": "~9.5.10", + "psalm/plugin-phpunit": "~0.16.1", + "vimeo/psalm": "^4.15.0" + }, + "type": "library", + "extra": { + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Json\\SchemaValidator\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides a JSON schema validator, building on top of justinrainbow/json-schema.", + "homepage": "https://github.com/ergebnis/json-schema-validator", + "keywords": [ + "json", + "schema", + "validator" + ], + "support": { + "issues": "https://github.com/ergebnis/json-schema-validator/issues", + "source": "https://github.com/ergebnis/json-schema-validator" + }, + "funding": [ + { + "url": "https://github.com/localheinz", + "type": "github" + } + ], + "time": "2021-12-13T16:54:56+00:00" + }, + { + "name": "justinrainbow/json-schema", + "version": "5.2.12", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", + "reference": "ad87d5a5ca981228e0e205c2bc7dfb8e24559b60", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", + "json-schema/json-schema-test-suite": "1.2.0", + "phpunit/phpunit": "^4.8.35" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "support": { + "issues": "https://github.com/justinrainbow/json-schema/issues", + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.12" + }, + "time": "2022-04-13T08:02:27+00:00" + }, + { + "name": "localheinz/diff", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/localheinz/diff.git", + "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/localheinz/diff/zipball/851bb20ea8358c86f677f5f111c4ab031b1c764c", + "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Fork of sebastian/diff for use with ergebnis/composer-normalize", + "homepage": "https://github.com/localheinz/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "source": "https://github.com/localheinz/diff/tree/main" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-07-06T04:49:32+00:00" + }, { "name": "myclabs/deep-copy", "version": "1.11.0", @@ -4347,7 +4745,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.4|^8.0" + "php": "^7.4 || ^8.0" }, "platform-dev": [], "plugin-api-version": "2.3.0"