diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml index 656e25f..8c365eb 100644 --- a/.github/workflows/integrate.yaml +++ b/.github/workflows/integrate.yaml @@ -19,6 +19,9 @@ jobs: php-version: - "7.1" + dependencies: + - "locked" + steps: - name: "Checkout" uses: "actions/checkout@v2" @@ -32,10 +35,23 @@ jobs: - name: "Validate composer.json and composer.lock" run: "composer validate --strict" - - name: "Run ergebnis/composer-normalize" - uses: "docker://ergebnis/composer-normalize-action:0.8.0" + - name: "Determine composer cache directory" + id: "determine-composer-cache-directory" + run: "echo \"::set-output name=directory::$(composer config cache-dir)\"" + + - name: "Cache dependencies installed with composer" + uses: "actions/cache@v2" with: - args: "--dry-run" + path: "${{ steps.determine-composer-cache-directory.outputs.directory }}" + key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}" + restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" + + - name: "Install locked dependencies from composer.lock" + if: "matrix.dependencies == 'locked'" + run: "composer install --no-interaction --no-progress --no-suggest" + + - name: "Run ergebnis/composer-normalize" + run: "composer normalize --dry-run" tests: name: "Tests" diff --git a/Makefile b/Makefile index a41c99e..00bcc3d 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ it: coding-standards tests ## Runs the coding-standards and tests target .PHONY: coding-standards coding-standards: vendor ## Normalizes composer.json with ergebnis/composer-normalize - docker run --interactive --rm --tty --workdir=/app --volume ${PWD}:/app ergebnis/composer-normalize-action:0.8.0 + composer normalize .PHONY: help help: ## Displays this list of targets with descriptions diff --git a/composer.json b/composer.json index 7d6a24b..a670a4f 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,7 @@ "php": "^7.1" }, "require-dev": { + "ergebnis/composer-normalize": "^2.5.1", "phpunit/phpunit": "^4.8" }, "config": { diff --git a/composer.lock b/composer.lock index d38b7df..e1f7fa4 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": "cfdbe6c807dc80c3283620b99c7cefbe", + "content-hash": "8062ec7f33dfc48ff8fe95b6f8ad8796", "packages": [], "packages-dev": [ { @@ -61,6 +61,339 @@ ], "time": "2015-06-14T21:17:01+00:00" }, + { + "name": "ergebnis/composer-normalize", + "version": "2.5.1", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/composer-normalize.git", + "reference": "d0faf549e565757a7ffbf1f306a4293080e43bdd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/d0faf549e565757a7ffbf1f306a4293080e43bdd", + "reference": "d0faf549e565757a7ffbf1f306a4293080e43bdd", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0 || ^2.0.0", + "ergebnis/json-normalizer": "~0.12.0", + "ergebnis/json-printer": "^3.0.2", + "localheinz/diff": "^1.0.1", + "php": "^7.1" + }, + "require-dev": { + "composer/composer": "^1.10.5 || ^2.0.0", + "composer/package-versions-deprecated": "^1.8.0", + "ergebnis/phpstan-rules": "~0.14.4", + "ergebnis/test-util": "~1.0.0", + "jangregor/phpstan-prophecy": "~0.6.2", + "phpstan/extension-installer": "^1.0.4", + "phpstan/phpstan": "~0.12.19", + "phpstan/phpstan-deprecation-rules": "~0.12.2", + "phpstan/phpstan-phpunit": "~0.12.8", + "phpstan/phpstan-strict-rules": "~0.12.2", + "phpunit/phpunit": "^7.5.20", + "symfony/filesystem": "^4.4.8" + }, + "type": "composer-plugin", + "extra": { + "class": "Ergebnis\\Composer\\Normalize\\NormalizePlugin" + }, + "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" + ], + "funding": [ + { + "url": "https://paypal.me/localheinz", + "type": "custom" + }, + { + "url": "https://www.amazon.de/hz/wishlist/ls/2NCHMSJ4BC1OW", + "type": "custom" + }, + { + "url": "https://www.buymeacoffee.com/localheinz", + "type": "custom" + }, + { + "url": "https://github.com/localheinz", + "type": "github" + } + ], + "time": "2020-05-01T12:02:09+00:00" + }, + { + "name": "ergebnis/json-normalizer", + "version": "0.12.0", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-normalizer.git", + "reference": "0197447cd5d8f7e82116e904196a3e9f470655db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/0197447cd5d8f7e82116e904196a3e9f470655db", + "reference": "0197447cd5d8f7e82116e904196a3e9f470655db", + "shasum": "" + }, + "require": { + "ergebnis/json-printer": "^3.0.2", + "ext-json": "*", + "justinrainbow/json-schema": "^4.0.0 || ^5.0.0", + "php": "^7.1" + }, + "require-dev": { + "ergebnis/license": "~0.1.0", + "ergebnis/php-cs-fixer-config": "^2.1.2", + "ergebnis/phpstan-rules": "~0.14.4", + "ergebnis/test-util": "~1.0.0", + "infection/infection": "~0.13.6", + "jangregor/phpstan-prophecy": "~0.6.2", + "phpstan/extension-installer": "^1.0.4", + "phpstan/phpstan": "~0.12.18", + "phpstan/phpstan-deprecation-rules": "~0.12.2", + "phpstan/phpstan-phpunit": "~0.12.8", + "phpstan/phpstan-strict-rules": "~0.12.2", + "phpunit/phpunit": "^7.5.20", + "psalm/plugin-phpunit": "~0.10.0", + "vimeo/psalm": "^3.11.2" + }, + "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" + ], + "funding": [ + { + "url": "https://paypal.me/localheinz", + "type": "custom" + }, + { + "url": "https://www.amazon.de/hz/wishlist/ls/2NCHMSJ4BC1OW", + "type": "custom" + }, + { + "url": "https://www.buymeacoffee.com/localheinz", + "type": "custom" + }, + { + "url": "https://github.com/localheinz", + "type": "github" + } + ], + "time": "2020-04-19T12:30:41+00:00" + }, + { + "name": "ergebnis/json-printer", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-printer.git", + "reference": "c7985dc4879777f2e4ab689da25bdd49f59dd2cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/c7985dc4879777f2e4ab689da25bdd49f59dd2cb", + "reference": "c7985dc4879777f2e4ab689da25bdd49f59dd2cb", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "php": "^7.1" + }, + "require-dev": { + "ergebnis/php-cs-fixer-config": "~1.1.1", + "ergebnis/phpstan-rules": "~0.14.1", + "ergebnis/test-util": "~0.9.0", + "infection/infection": "~0.13.6", + "phpbench/phpbench": "~0.16.10", + "phpstan/extension-installer": "^1.0.3", + "phpstan/phpstan": "~0.11.19", + "phpstan/phpstan-deprecation-rules": "~0.11.2", + "phpstan/phpstan-strict-rules": "~0.11.1", + "phpunit/phpunit": "^7.5.18" + }, + "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" + ], + "time": "2019-12-19T14:42:54+00:00" + }, + { + "name": "justinrainbow/json-schema", + "version": "5.2.10", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b", + "reference": "2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b", + "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" + ], + "time": "2020-05-27T16:41:55+00:00" + }, + { + "name": "localheinz/diff", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/localheinz/diff.git", + "reference": "bd5661db4bbed26c6f25df8851fd9f4b424a356e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/localheinz/diff/zipball/bd5661db4bbed26c6f25df8851fd9f4b424a356e", + "reference": "bd5661db4bbed26c6f25df8851fd9f4b424a356e", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" + }, + "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/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "time": "2019-12-17T07:42:37+00:00" + }, { "name": "phpdocumentor/reflection-docblock", "version": "2.0.5",