diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml index acf42765..b9f3a0f2 100644 --- a/.github/workflows/integrate.yaml +++ b/.github/workflows/integrate.yaml @@ -59,6 +59,9 @@ jobs: key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}" restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" + - name: "Set COMPOSER_ROOT_VERSION environment variable" + uses: "docker://ergebnis/composer-root-version-action:0.1.3" + - name: "Install lowest dependencies from composer.json" if: "matrix.dependencies == 'lowest'" run: "composer update --no-interaction --no-progress --no-suggest --prefer-lowest" @@ -122,6 +125,9 @@ jobs: key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}" restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" + - name: "Set COMPOSER_ROOT_VERSION environment variable" + uses: "docker://ergebnis/composer-root-version-action:0.1.3" + - name: "Install lowest dependencies from composer.json" if: "matrix.dependencies == 'lowest'" run: "composer update --no-interaction --no-progress --no-suggest --prefer-lowest" @@ -172,6 +178,9 @@ jobs: key: "${{ matrix.php-version }}-composer-locked-${{ hashFiles('**/composer.lock') }}" restore-keys: "${{ matrix.php-version }}-composer-locked-" + - name: "Set COMPOSER_ROOT_VERSION environment variable" + uses: "docker://ergebnis/composer-root-version-action:0.1.3" + - name: "Install lowest dependencies from composer.json" if: "matrix.dependencies == 'lowest'" run: "composer update --no-interaction --no-progress --no-suggest --prefer-lowest" @@ -236,6 +245,9 @@ jobs: key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}" restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" + - name: "Set COMPOSER_ROOT_VERSION environment variable" + uses: "docker://ergebnis/composer-root-version-action:0.1.3" + - name: "Install lowest dependencies from composer.json" if: "matrix.dependencies == 'lowest'" run: "composer update --no-interaction --no-progress --no-suggest --prefer-lowest" @@ -292,6 +304,9 @@ jobs: key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}" restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" + - name: "Set COMPOSER_ROOT_VERSION environment variable" + uses: "docker://ergebnis/composer-root-version-action:0.1.3" + - name: "Install lowest dependencies from composer.json" if: "matrix.dependencies == 'lowest'" run: "composer update --no-interaction --no-progress --no-suggest --prefer-lowest" @@ -350,6 +365,9 @@ jobs: key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}" restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" + - name: "Set COMPOSER_ROOT_VERSION environment variable" + uses: "docker://ergebnis/composer-root-version-action:0.1.3" + - name: "Install lowest dependencies from composer.json" if: "matrix.dependencies == 'lowest'" run: "composer update --no-interaction --no-progress --no-suggest --prefer-lowest" diff --git a/.github/workflows/renew.yaml b/.github/workflows/renew.yaml index 0d6241a5..e2120eeb 100644 --- a/.github/workflows/renew.yaml +++ b/.github/workflows/renew.yaml @@ -48,6 +48,9 @@ jobs: key: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.lock') }}" restore-keys: "php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" + - name: "Set COMPOSER_ROOT_VERSION environment variable" + uses: "docker://ergebnis/composer-root-version-action:0.1.3" + - name: "Install lowest dependencies from composer.json" if: "matrix.dependencies == 'lowest'" run: "composer update --no-interaction --no-progress --no-suggest --prefer-lowest" diff --git a/composer.json b/composer.json index d14ed0de..5925116f 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "ergebnis/license": "~0.1.0", "ergebnis/php-cs-fixer-config": "^2.1.0", "ergebnis/phpstan-rules": "~0.14.4", - "ergebnis/test-util": "~0.7.0", + "ergebnis/test-util": "~1.0.0", "infection/infection": "~0.13.6", "phpbench/phpbench": "~0.16.10", "phpstan/extension-installer": "^1.0.3", @@ -46,6 +46,11 @@ "preferred-install": "dist", "sort-packages": true }, + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, "autoload": { "psr-4": { "Ergebnis\\Classy\\": "src/" diff --git a/composer.lock b/composer.lock index fc749a18..fb7b7b58 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": "9da924d210b7d10cd3ed7b5e452e25bb", + "content-hash": "4eb29b0532973ed5283a8365332290b6", "packages": [], "packages-dev": [ { @@ -615,6 +615,24 @@ "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-03-13T20:09:01+00:00" }, { @@ -912,39 +930,64 @@ "phpstan-extreme-rules", "phpstan-rules" ], + "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-03-13T20:00:07+00:00" }, { "name": "ergebnis/test-util", - "version": "0.7.0", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/ergebnis/test-util.git", - "reference": "340d168a637f33e9f0d41e8c950c7e1e8bb6b19f" + "reference": "44bdb78d14fbaf6411002c16022fd1bb7327ad37" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/test-util/zipball/340d168a637f33e9f0d41e8c950c7e1e8bb6b19f", - "reference": "340d168a637f33e9f0d41e8c950c7e1e8bb6b19f", + "url": "https://api.github.com/repos/ergebnis/test-util/zipball/44bdb78d14fbaf6411002c16022fd1bb7327ad37", + "reference": "44bdb78d14fbaf6411002c16022fd1bb7327ad37", "shasum": "" }, "require": { - "fzaninotto/faker": "^1.7.1", - "localheinz/classy": "0.3.0", + "ergebnis/classy": "^1.0.0", + "fzaninotto/faker": "^1.9.0", "php": "^7.1" }, "require-dev": { - "infection/infection": "~0.8.2", - "localheinz/php-cs-fixer-config": "~1.14.0", - "phpstan/phpstan": "~0.9.2", - "phpstan/phpstan-phpunit": "~0.9.4", - "phpstan/phpstan-strict-rules": "~0.9.0", - "phpunit/phpunit": "^6.0.0 || ^7.0.0" + "ergebnis/composer-normalize": "^2.2.4", + "ergebnis/license": "~0.1.0", + "ergebnis/php-cs-fixer-config": "^2.1.0", + "ergebnis/phpstan-rules": "~0.14.3", + "infection/infection": "~0.13.6", + "phpstan/extension-installer": "^1.0.3", + "phpstan/phpstan": "~0.12.14", + "phpstan/phpstan-deprecation-rules": "~0.12.2", + "phpstan/phpstan-phpunit": "~0.12.6", + "phpstan/phpstan-strict-rules": "~0.12.2", + "phpunit/phpunit": "^7.5.20", + "psalm/plugin-phpunit": "~0.9.0", + "vimeo/psalm": "^3.9.5" }, "type": "library", "autoload": { "psr-4": { - "Localheinz\\Test\\Util\\": "src/" + "Ergebnis\\Test\\Util\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -958,14 +1001,28 @@ } ], "description": "Provides utilities for tests.", - "homepage": "https://github.com/localheinz/test-util", + "homepage": "https://github.com/ergebnis/test-util", "keywords": [ "assertion", "faker", "phpunit", "test" ], - "time": "2018-06-25T06:22:47+00:00" + "funding": [ + { + "url": "http://paypal.me/localheinz", + "type": "custom" + }, + { + "url": "https://www.buymeacoffee.com/localheinz", + "type": "custom" + }, + { + "url": "https://github.com/localheinz", + "type": "github" + } + ], + "time": "2020-03-11T11:08:49+00:00" }, { "name": "felixfbecker/advanced-json-rpc", @@ -1350,49 +1407,6 @@ ], "time": "2019-09-25T14:49:45+00:00" }, - { - "name": "localheinz/classy", - "version": "0.3.0", - "source": { - "type": "git", - "url": "https://github.com/localheinz/classy.git", - "reference": "8f1413f01a464f88521eac735f0e62b02da9ac67" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/localheinz/classy/zipball/8f1413f01a464f88521eac735f0e62b02da9ac67", - "reference": "8f1413f01a464f88521eac735f0e62b02da9ac67", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "localheinz/php-cs-fixer-config": "~1.6.2", - "localheinz/test-util": "0.2.2", - "phpbench/phpbench": "0.13.0", - "phpunit/phpunit": "^6.4.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Localheinz\\Classy\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Möller", - "email": "am@localheinz.com" - } - ], - "description": "Provides a way to collect classy constructs from source or a directory.", - "abandoned": "ergebnis/classy", - "time": "2017-10-24T14:31:40+00:00" - }, { "name": "localheinz/composer-json-normalizer", "version": "1.0.2", @@ -2765,6 +2779,20 @@ "MIT" ], "description": "PHPStan - PHP Static Analysis Tool", + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpstan", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], "time": "2020-03-17T14:31:10+00:00" }, { @@ -5336,5 +5364,6 @@ "platform-dev": [], "platform-overrides": { "php": "7.1.33" - } + }, + "plugin-api-version": "1.1.0" } diff --git a/test/AutoReview/SrcCodeTest.php b/test/AutoReview/SrcCodeTest.php index 2c72df7c..2b5806a1 100644 --- a/test/AutoReview/SrcCodeTest.php +++ b/test/AutoReview/SrcCodeTest.php @@ -13,7 +13,7 @@ namespace Ergebnis\Classy\Test\AutoReview; -use Localheinz\Test\Util\Helper; +use Ergebnis\Test\Util\Helper; use PHPUnit\Framework; /** @@ -27,7 +27,7 @@ final class SrcCodeTest extends Framework\TestCase public function testSrcClassesHaveTests(): void { - $this->assertClassesHaveTests( + self::assertClassesHaveTests( __DIR__ . '/../../src', 'Ergebnis\\Classy\\', 'Ergebnis\\Classy\\Test\\Unit\\' diff --git a/test/Unit/ConstructTest.php b/test/Unit/ConstructTest.php index 60f0e068..3db954b4 100644 --- a/test/Unit/ConstructTest.php +++ b/test/Unit/ConstructTest.php @@ -14,7 +14,7 @@ namespace Ergebnis\Classy\Test\Unit; use Ergebnis\Classy\Construct; -use Localheinz\Test\Util\Helper; +use Ergebnis\Test\Util\Helper; use PHPUnit\Framework; /** @@ -28,7 +28,7 @@ final class ConstructTest extends Framework\TestCase public function testFromNameReturnsConstruct(): void { - $name = $this->faker()->word; + $name = self::faker()->word; $construct = Construct::fromName($name); @@ -38,7 +38,7 @@ public function testFromNameReturnsConstruct(): void public function testDefaults(): void { - $construct = Construct::fromName($this->faker()->word); + $construct = Construct::fromName(self::faker()->word); self::assertIsArray($construct->fileNames()); self::assertCount(0, $construct->fileNames()); @@ -46,7 +46,7 @@ public function testDefaults(): void public function testToStringReturnsName(): void { - $name = $this->faker()->word; + $name = self::faker()->word; $construct = Construct::fromName($name); @@ -55,7 +55,7 @@ public function testToStringReturnsName(): void public function testDefinedInClonesInstanceAndAddsFileNames(): void { - $faker = $this->faker(); + $faker = self::faker(); $name = $faker->word; diff --git a/test/Unit/Exception/DirectoryDoesNotExistTest.php b/test/Unit/Exception/DirectoryDoesNotExistTest.php index 5cd2a017..757cce1c 100644 --- a/test/Unit/Exception/DirectoryDoesNotExistTest.php +++ b/test/Unit/Exception/DirectoryDoesNotExistTest.php @@ -15,7 +15,7 @@ use Ergebnis\Classy\Exception\DirectoryDoesNotExist; use Ergebnis\Classy\Exception\ExceptionInterface; -use Localheinz\Test\Util\Helper; +use Ergebnis\Test\Util\Helper; use PHPUnit\Framework; /** @@ -29,7 +29,7 @@ final class DirectoryDoesNotExistTest extends Framework\TestCase public function testFromDirectoryReturnsException(): void { - $directory = $this->faker()->sentence; + $directory = self::faker()->sentence; $exception = DirectoryDoesNotExist::fromDirectory($directory); diff --git a/test/Unit/Exception/MultipleDefinitionsFoundTest.php b/test/Unit/Exception/MultipleDefinitionsFoundTest.php index 61568f38..2139f297 100644 --- a/test/Unit/Exception/MultipleDefinitionsFoundTest.php +++ b/test/Unit/Exception/MultipleDefinitionsFoundTest.php @@ -16,7 +16,7 @@ use Ergebnis\Classy\Construct; use Ergebnis\Classy\Exception\ExceptionInterface; use Ergebnis\Classy\Exception\MultipleDefinitionsFound; -use Localheinz\Test\Util\Helper; +use Ergebnis\Test\Util\Helper; use PHPUnit\Framework; /** diff --git a/test/Unit/Exception/ParseErrorTest.php b/test/Unit/Exception/ParseErrorTest.php index cb2ff529..02dca607 100644 --- a/test/Unit/Exception/ParseErrorTest.php +++ b/test/Unit/Exception/ParseErrorTest.php @@ -15,7 +15,7 @@ use Ergebnis\Classy\Exception\ExceptionInterface; use Ergebnis\Classy\Exception\ParseError; -use Localheinz\Test\Util\Helper; +use Ergebnis\Test\Util\Helper; use PHPUnit\Framework; /** @@ -29,7 +29,7 @@ final class ParseErrorTest extends Framework\TestCase public function testFromParseErrorReturnsException(): void { - $parseError = new \ParseError($this->faker()->sentence()); + $parseError = new \ParseError(self::faker()->sentence()); $exception = ParseError::fromParseError($parseError); @@ -44,7 +44,7 @@ public function testFromParseErrorReturnsException(): void public function testFromFileNameAndParseErrorReturnsException(): void { $fileName = __FILE__; - $parseError = new \ParseError($this->faker()->sentence()); + $parseError = new \ParseError(self::faker()->sentence()); $exception = ParseError::fromFileNameAndParseError( $fileName,