diff --git a/.github/workflows/infection.yaml b/.github/workflows/infection.yaml new file mode 100644 index 0000000..c5adb1e --- /dev/null +++ b/.github/workflows/infection.yaml @@ -0,0 +1,34 @@ +name: Mutations +on: push +jobs: + infection: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + tools: composer:v2 + coverage: pcov + - uses: actions/cache@v3 + with: + path: '**/vendor' + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-composer- + - uses: php-actions/composer@v6 + with: + args: --prefer-dist + php_version: '8.2' + + - name: Infection + run: | + wget -q https://github.com/infection/infection/releases/download/0.26.18/infection.phar + wget -q https://github.com/infection/infection/releases/download/0.26.18/infection.phar.asc + chmod +x infection.phar + ./infection.phar + + - name: Store infection log + uses: actions/upload-artifact@v3 + with: + path: infection.log diff --git a/.github/workflows/phpspec.yaml b/.github/workflows/phpspec.yaml index f0504ab..ad0e667 100644 --- a/.github/workflows/phpspec.yaml +++ b/.github/workflows/phpspec.yaml @@ -15,6 +15,10 @@ jobs: uses: "ergebnis/composer-root-version-action@main" with: branch: "main" + - uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + coverage: pcov - uses: php-actions/composer@v6 with: args: --prefer-dist diff --git a/.github/workflows/phpstan5.yaml b/.github/workflows/phpstan-5.yaml similarity index 98% rename from .github/workflows/phpstan5.yaml rename to .github/workflows/phpstan-5.yaml index ce21642..c3252d4 100644 --- a/.github/workflows/phpstan5.yaml +++ b/.github/workflows/phpstan-5.yaml @@ -1,7 +1,7 @@ name: PHPStan level 5 on: push jobs: - phpstan5: + phpstan: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/phpstan6.yaml b/.github/workflows/phpstan-6.yaml similarity index 98% rename from .github/workflows/phpstan6.yaml rename to .github/workflows/phpstan-6.yaml index d934587..6e4238d 100644 --- a/.github/workflows/phpstan6.yaml +++ b/.github/workflows/phpstan-6.yaml @@ -1,7 +1,7 @@ name: PHPStan level 6 on: push jobs: - phpstan5: + phpstan: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/phpstan7.yaml b/.github/workflows/phpstan-7.yaml similarity index 98% rename from .github/workflows/phpstan7.yaml rename to .github/workflows/phpstan-7.yaml index 4cd99dd..278bf3a 100644 --- a/.github/workflows/phpstan7.yaml +++ b/.github/workflows/phpstan-7.yaml @@ -1,7 +1,7 @@ name: PHPStan level 7 on: push jobs: - phpstan5: + phpstan: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/phpstan8.yaml b/.github/workflows/phpstan-8.yaml similarity index 98% rename from .github/workflows/phpstan8.yaml rename to .github/workflows/phpstan-8.yaml index d3763c5..3b74c3b 100644 --- a/.github/workflows/phpstan8.yaml +++ b/.github/workflows/phpstan-8.yaml @@ -1,7 +1,7 @@ name: PHPStan level 8 on: push jobs: - phpstan5: + phpstan: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/phpunit.yaml b/.github/workflows/phpunit.yaml new file mode 100644 index 0000000..8b8af0c --- /dev/null +++ b/.github/workflows/phpunit.yaml @@ -0,0 +1,30 @@ +name: PHPUnit +on: push +jobs: + phpunit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + tools: composer:v2 + coverage: pcov + - uses: actions/cache@v3 + with: + path: '**/vendor' + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-composer- + - uses: php-actions/composer@v6 + with: + args: --prefer-dist + php_version: '8.2' + + - name: Run tests & generate Coverage + run: bin/phpunit functional --coverage-html var/coverage + + - name: Store coverage files + uses: actions/upload-artifact@v3 + with: + path: var/coverage diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml index 2e2a411..fa9c0ef 100644 --- a/.github/workflows/quality.yaml +++ b/.github/workflows/quality.yaml @@ -1,12 +1,40 @@ -name: Quality +name: Quality (PHPStan level 4) on: push jobs: cs-fixer: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' - name: Cs-Fixer run: | wget -q https://cs.symfony.com/download/php-cs-fixer-v3.phar -O php-cs-fixer chmod a+x php-cs-fixer PHP_CS_FIXER_IGNORE_ENV=true ./php-cs-fixer fix src --dry-run + + phpstan: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/cache@v3 + with: + path: '**/vendor' + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-composer- + - name: "Set COMPOSER_ROOT_VERSION environment variable" + uses: "ergebnis/composer-root-version-action@main" + with: + branch: "main" + - uses: php-actions/composer@v6 + with: + args: '--prefer-dist' + php_version: '8.2' + - name: PHPStan + uses: php-actions/phpstan@v3 + with: + path: src/ + level: 4 + php_version: '8.2' diff --git a/.github/workflows/rector.yaml b/.github/workflows/rector.yaml index 1c2bc96..cdb4baf 100644 --- a/.github/workflows/rector.yaml +++ b/.github/workflows/rector.yaml @@ -23,17 +23,17 @@ jobs: if: github.event.pull_request.head.repo.full_name != github.repository uses: actions/checkout@v3 + - name: "Set COMPOSER_ROOT_VERSION environment variable" + uses: "ergebnis/composer-root-version-action@main" + with: + branch: "main" + - uses: shivammathur/setup-php@v2 with: php-version: '8.2' coverage: none - - name: "Set COMPOSER_ROOT_VERSION environment variable" - uses: "ergebnis/composer-root-version-action@main" - with: - branch: "main" - - uses: "ramsey/composer-install@v2" - run: bin/rector --ansi diff --git a/README.md b/README.md index e129014..9660108 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,15 @@ PHP Data Structures Meta === +[![Quality](https://github.com/php-etl/metadata/actions/workflows/quality.yaml/badge.svg)](https://github.com/php-etl/metadata/actions/workflows/quality.yaml) +[![PHPUnit](https://github.com/php-etl/metadata/actions/workflows/phpunit.yaml/badge.svg)](https://github.com/php-etl/metadata/actions/workflows/phpunit.yaml) +[![Mutations](https://github.com/php-etl/metadata/actions/workflows/infection.yaml/badge.svg)](https://github.com/php-etl/metadata/actions/workflows/infection.yaml) +[![PHPStan level 5](https://github.com/php-etl/metadata/actions/workflows/phpstan-5.yaml/badge.svg)](https://github.com/php-etl/metadata/actions/workflows/phpstan-5.yaml) +[![PHPStan level 6](https://github.com/php-etl/metadata/actions/workflows/phpstan-6.yaml/badge.svg)](https://github.com/php-etl/metadata/actions/workflows/phpstan-6.yaml) +[![PHPStan level 7](https://github.com/php-etl/metadata/actions/workflows/phpstan-7.yaml/badge.svg)](https://github.com/php-etl/metadata/actions/workflows/phpstan-7.yaml) +[![PHPStan level 8](https://github.com/php-etl/metadata/actions/workflows/phpstan-8.yaml/badge.svg)](https://github.com/php-etl/metadata/actions/workflows/phpstan8.yaml) +![PHP](https://img.shields.io/packagist/php-v/php-etl/metadata) + What is it about? --- diff --git a/composer.json b/composer.json index e9c265f..39e3cd3 100644 --- a/composer.json +++ b/composer.json @@ -22,12 +22,13 @@ "doctrine/inflector": "^2.0" }, "require-dev": { - "phpunit/phpunit": "^9.0", + "phpunit/phpunit": "^9.5 || ^10.0", "johnkary/phpunit-speedtrap": "*", "mybuilder/phpunit-accelerator": "*", "phpspec/phpspec": "^7.0", "friends-of-phpspec/phpspec-code-coverage": "^6.0", "php-etl/phpspec-extension": "^0.3@dev", + "friendsofphp/php-cs-fixer": "^3.0", "rector/rector": "^0.15" }, "autoload": { @@ -45,7 +46,8 @@ }, "extra": { "branch-alias": { - "dev-main": "0.3.x-dev" + "dev-main": "0.3.x-dev", + "dev-feature/qualityflow-improvments": "0.3.x-dev" } } } diff --git a/composer.lock b/composer.lock index bcbc6db..b076def 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": "1fb7f285d20b121b6459770f3bfcd058", + "content-hash": "689635d6046ff83a3158ee8b131610fd", "packages": [ { "name": "doctrine/inflector", @@ -103,12 +103,12 @@ "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290" + "reference": "0ffddce52d816f72d0efc4d9b02e276d3309ef01" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6bb5176bc4af8bcb7d926f88718db9b96a2d4290", - "reference": "6bb5176bc4af8bcb7d926f88718db9b96a2d4290", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ffddce52d816f72d0efc4d9b02e276d3309ef01", + "reference": "0ffddce52d816f72d0efc4d9b02e276d3309ef01", "shasum": "" }, "require": { @@ -150,9 +150,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.4" + "source": "https://github.com/nikic/PHP-Parser/tree/4.x" }, - "time": "2023-03-05T19:49:14+00:00" + "time": "2023-03-06T22:12:36+00:00" }, { "name": "php-etl/metadata-contracts", @@ -263,6 +263,346 @@ } ], "packages-dev": [ + { + "name": "composer/pcre", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.1.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-11-17T09:50:14+00:00" + }, + { + "name": "composer/semver", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "fa1ec24f0ab1efe642671ec15c51a3ab879f59bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/fa1ec24f0ab1efe642671ec15c51a3ab879f59bf", + "reference": "fa1ec24f0ab1efe642671ec15c51a3ab879f59bf", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/main" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2023-01-13T15:47:53+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "ced299686f41dce890debac69273b47ffe98a40c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/ced299686f41dce890debac69273b47ffe98a40c", + "reference": "ced299686f41dce890debac69273b47ffe98a40c", + "shasum": "" + }, + "require": { + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.3" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2022-02-25T21:32:43+00:00" + }, + { + "name": "doctrine/annotations", + "version": "2.0.x-dev", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", + "reference": "e157ef3f3124bbf6fe7ce0ffd109e8a8ef284e7f", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^2 || ^3", + "ext-tokenizer": "*", + "php": "^7.2 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^2.0", + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.8.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "symfony/cache": "^5.4 || ^6", + "vimeo/psalm": "^4.10" + }, + "suggest": { + "php": "PHP 8.0 or higher comes with attributes, a native replacement for annotations" + }, + "default-branch": true, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/2.0.1" + }, + "time": "2023-02-02T22:02:53+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "reference": "0e2a4f1f8cdfc7a92ec3b01c9334898c806b30de", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpunit/phpunit": "^7.5|^8.5|^9.5", + "psr/log": "^1|^2|^3" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/v1.0.0" + }, + "time": "2022-05-02T15:47:09+00:00" + }, { "name": "doctrine/instantiator", "version": "1.5.x-dev", @@ -334,6 +674,83 @@ ], "time": "2022-12-30T00:15:36+00:00" }, + { + "name": "doctrine/lexer", + "version": "3.0.x-dev", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "84a527db05647743d50373e0ec53a152f2cde568" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/84a527db05647743d50373e0ec53a152f2cde568", + "reference": "84a527db05647743d50373e0ec53a152f2cde568", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.9", + "phpunit/phpunit": "^9.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/3.0.x" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2022-12-15T16:57:16+00:00" + }, { "name": "friends-of-phpspec/phpspec-code-coverage", "version": "dev-master", @@ -403,27 +820,123 @@ "homepage": "https://not-a-number.io/" }, { - "name": "Jay Linski", - "homepage": "https://github.com/jaylinski" + "name": "Jay Linski", + "homepage": "https://github.com/jaylinski" + } + ], + "description": "Generate Code Coverage reports for PhpSpec tests", + "homepage": "https://github.com/friends-of-phpspec/phpspec-code-coverage", + "keywords": [ + "code-coverage", + "coverage", + "phpspec", + "report", + "spec", + "test", + "tests" + ], + "support": { + "docs": "https://github.com/friends-of-phpspec/phpspec-code-coverage#phpspec-code-coverage", + "issues": "https://github.com/friends-of-phpspec/phpspec-code-coverage/issues", + "source": "https://github.com/friends-of-phpspec/phpspec-code-coverage" + }, + "time": "2023-02-22T15:46:57+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v3.15.1", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", + "reference": "d48755372a113bddb99f749e34805d83f3acfe04" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/d48755372a113bddb99f749e34805d83f3acfe04", + "reference": "d48755372a113bddb99f749e34805d83f3acfe04", + "shasum": "" + }, + "require": { + "composer/semver": "^3.3", + "composer/xdebug-handler": "^3.0.3", + "doctrine/annotations": "^2", + "doctrine/lexer": "^2 || ^3", + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^7.4 || ^8.0", + "sebastian/diff": "^4.0 || ^5.0", + "symfony/console": "^5.4 || ^6.0", + "symfony/event-dispatcher": "^5.4 || ^6.0", + "symfony/filesystem": "^5.4 || ^6.0", + "symfony/finder": "^5.4 || ^6.0", + "symfony/options-resolver": "^5.4 || ^6.0", + "symfony/polyfill-mbstring": "^1.27", + "symfony/polyfill-php80": "^1.27", + "symfony/polyfill-php81": "^1.27", + "symfony/process": "^5.4 || ^6.0", + "symfony/stopwatch": "^5.4 || ^6.0" + }, + "require-dev": { + "justinrainbow/json-schema": "^5.2", + "keradus/cli-executor": "^2.0", + "mikey179/vfsstream": "^1.6.11", + "php-coveralls/php-coveralls": "^2.5.3", + "php-cs-fixer/accessible-object": "^1.1", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", + "phpspec/prophecy": "^1.16", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "phpunitgoodpractices/polyfill": "^1.6", + "phpunitgoodpractices/traits": "^1.9.2", + "symfony/phpunit-bridge": "^6.2.3", + "symfony/yaml": "^5.4 || ^6.0" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz RumiƄski", + "email": "dariusz.ruminski@gmail.com" } ], - "description": "Generate Code Coverage reports for PhpSpec tests", - "homepage": "https://github.com/friends-of-phpspec/phpspec-code-coverage", + "description": "A tool to automatically fix PHP code style", "keywords": [ - "code-coverage", - "coverage", - "phpspec", - "report", - "spec", - "test", - "tests" + "Static code analysis", + "fixer", + "standards", + "static analysis" ], "support": { - "docs": "https://github.com/friends-of-phpspec/phpspec-code-coverage#phpspec-code-coverage", - "issues": "https://github.com/friends-of-phpspec/phpspec-code-coverage/issues", - "source": "https://github.com/friends-of-phpspec/phpspec-code-coverage" + "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.15.1" }, - "time": "2023-02-22T15:46:57+00:00" + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2023-03-13T23:26:30+00:00" }, { "name": "johnkary/phpunit-speedtrap", @@ -536,12 +1049,12 @@ "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + "reference": "928a96f585b86224ebc78f8f09d0482cf15b04f5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/928a96f585b86224ebc78f8f09d0482cf15b04f5", + "reference": "928a96f585b86224ebc78f8f09d0482cf15b04f5", "shasum": "" }, "require": { @@ -549,11 +1062,12 @@ }, "conflict": { "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "doctrine/common": "<2.13.3 || >=3 <3.2.2" }, "require-dev": { "doctrine/collections": "^1.6.8", "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "default-branch": true, @@ -580,7 +1094,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.x" }, "funding": [ { @@ -588,7 +1102,7 @@ "type": "tidelift" } ], - "time": "2022-03-03T13:19:32+00:00" + "time": "2023-03-08T17:24:01+00:00" }, { "name": "phar-io/manifest", @@ -832,12 +1346,12 @@ "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "566af9fb94c556de91562fcfcbc392f66680111b" + "reference": "7b217217725dc991a0ae7b995041cee1d5019561" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/566af9fb94c556de91562fcfcbc392f66680111b", - "reference": "566af9fb94c556de91562fcfcbc392f66680111b", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/7b217217725dc991a0ae7b995041cee1d5019561", + "reference": "7b217217725dc991a0ae7b995041cee1d5019561", "shasum": "" }, "require": { @@ -888,7 +1402,7 @@ "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" }, - "time": "2022-11-19T20:28:46+00:00" + "time": "2023-03-12T10:50:44+00:00" }, { "name": "phpdocumentor/type-resolver", @@ -896,15 +1410,16 @@ "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "06f36c92b434ac686de06b6563e88046943bccbe" + "reference": "1534aea9bde19a5c85c5d1e1f834ab63f4c5dcf5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/06f36c92b434ac686de06b6563e88046943bccbe", - "reference": "06f36c92b434ac686de06b6563e88046943bccbe", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/1534aea9bde19a5c85c5d1e1f834ab63f4c5dcf5", + "reference": "1534aea9bde19a5c85c5d1e1f834ab63f4c5dcf5", "shasum": "" }, "require": { + "doctrine/deprecations": "^1.0", "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.0", "phpstan/phpdoc-parser": "^1.13" @@ -944,9 +1459,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.x" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.7.0" }, - "time": "2022-12-16T10:25:14+00:00" + "time": "2023-03-12T10:13:29+00:00" }, { "name": "phpspec/php-diff", @@ -1085,12 +1600,12 @@ "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "acb41a51b204a267ff77f81783ac112ceb5bb8ce" + "reference": "6458bc2e4aeb242506b2100dc94ab546347055f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/acb41a51b204a267ff77f81783ac112ceb5bb8ce", - "reference": "acb41a51b204a267ff77f81783ac112ceb5bb8ce", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6458bc2e4aeb242506b2100dc94ab546347055f1", + "reference": "6458bc2e4aeb242506b2100dc94ab546347055f1", "shasum": "" }, "require": { @@ -1146,7 +1661,7 @@ "issues": "https://github.com/phpspec/prophecy/issues", "source": "https://github.com/phpspec/prophecy/tree/master" }, - "time": "2023-02-10T10:07:26+00:00" + "time": "2023-02-20T08:21:35+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -1199,12 +1714,12 @@ "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "83b6014ed3af60ce3bedf3e6b8902086281d3130" + "reference": "bc609b65fd6ff939bbb7a5f96df97c8f16121fd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/83b6014ed3af60ce3bedf3e6b8902086281d3130", - "reference": "83b6014ed3af60ce3bedf3e6b8902086281d3130", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/bc609b65fd6ff939bbb7a5f96df97c8f16121fd9", + "reference": "bc609b65fd6ff939bbb7a5f96df97c8f16121fd9", "shasum": "" }, "require": { @@ -1234,8 +1749,11 @@ "static analysis" ], "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.10.x" + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" }, "funding": [ { @@ -1251,7 +1769,7 @@ "type": "tidelift" } ], - "time": "2023-03-06T08:40:05+00:00" + "time": "2023-03-21T14:20:51+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1259,12 +1777,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "9d7019dcb26dcf45aca95596b19bf52cef855844" + "reference": "fe7b8ad5d2dd99abb89b2c5a094a2aac10119997" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9d7019dcb26dcf45aca95596b19bf52cef855844", - "reference": "9d7019dcb26dcf45aca95596b19bf52cef855844", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/fe7b8ad5d2dd99abb89b2c5a094a2aac10119997", + "reference": "fe7b8ad5d2dd99abb89b2c5a094a2aac10119997", "shasum": "" }, "require": { @@ -1320,6 +1838,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2" }, "funding": [ @@ -1328,7 +1847,7 @@ "type": "github" } ], - "time": "2023-03-06T07:17:57+00:00" + "time": "2023-03-14T13:35:01+00:00" }, { "name": "phpunit/php-file-iterator", @@ -1577,12 +2096,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "31a21e7905dc09f6254eb69e8aa102f3ee799376" + "reference": "07289f06e1d23f7fa50d10942de18f9d0f2063c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/31a21e7905dc09f6254eb69e8aa102f3ee799376", - "reference": "31a21e7905dc09f6254eb69e8aa102f3ee799376", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/07289f06e1d23f7fa50d10942de18f9d0f2063c2", + "reference": "07289f06e1d23f7fa50d10942de18f9d0f2063c2", "shasum": "" }, "require": { @@ -1655,6 +2174,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6" }, "funding": [ @@ -1671,7 +2191,7 @@ "type": "tidelift" } ], - "time": "2023-03-05T06:06:16+00:00" + "time": "2023-03-19T14:12:15+00:00" }, { "name": "psr/cache", @@ -1886,12 +2406,12 @@ "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "7a5d9d8a623b9b3c60f88a1b5ef26dcd6a09cf67" + "reference": "76fd71553e51add0f6ca846545a6e657997c1430" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/7a5d9d8a623b9b3c60f88a1b5ef26dcd6a09cf67", - "reference": "7a5d9d8a623b9b3c60f88a1b5ef26dcd6a09cf67", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/76fd71553e51add0f6ca846545a6e657997c1430", + "reference": "76fd71553e51add0f6ca846545a6e657997c1430", "shasum": "" }, "require": { @@ -1940,7 +2460,7 @@ "type": "github" } ], - "time": "2023-03-05T23:49:34+00:00" + "time": "2023-03-21T13:15:15+00:00" }, { "name": "sebastian/cli-parser", @@ -2912,12 +3432,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "32cab695bf99c63aff7d27ac67919944c00530ed" + "reference": "5b211b15d510e3199639cadd50435940f6a2f177" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/32cab695bf99c63aff7d27ac67919944c00530ed", - "reference": "32cab695bf99c63aff7d27ac67919944c00530ed", + "url": "https://api.github.com/repos/symfony/cache/zipball/5b211b15d510e3199639cadd50435940f6a2f177", + "reference": "5b211b15d510e3199639cadd50435940f6a2f177", "shasum": "" }, "require": { @@ -3001,7 +3521,7 @@ "type": "tidelift" } ], - "time": "2023-02-21T12:11:13+00:00" + "time": "2023-03-10T10:02:45+00:00" }, { "name": "symfony/cache-contracts", @@ -3088,12 +3608,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "138fa49967e8196dc0a91d5f333d07ed76248ae3" + "reference": "2655810bcfe15c75b834721d3be40e8de08a4215" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/138fa49967e8196dc0a91d5f333d07ed76248ae3", - "reference": "138fa49967e8196dc0a91d5f333d07ed76248ae3", + "url": "https://api.github.com/repos/symfony/console/zipball/2655810bcfe15c75b834721d3be40e8de08a4215", + "reference": "2655810bcfe15c75b834721d3be40e8de08a4215", "shasum": "" }, "require": { @@ -3155,7 +3675,7 @@ "homepage": "https://symfony.com", "keywords": [ "cli", - "command line", + "command-line", "console", "terminal" ], @@ -3176,7 +3696,7 @@ "type": "tidelift" } ], - "time": "2023-03-03T15:47:02+00:00" + "time": "2023-03-14T15:00:13+00:00" }, { "name": "symfony/deprecation-contracts", @@ -3252,12 +3772,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "c58ec8623b8cbb3739fbaab5bf972df3f68ef312" + "reference": "3aa523704d095e4dffe7ec8d6a8b212f793ea2ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/c58ec8623b8cbb3739fbaab5bf972df3f68ef312", - "reference": "c58ec8623b8cbb3739fbaab5bf972df3f68ef312", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3aa523704d095e4dffe7ec8d6a8b212f793ea2ad", + "reference": "3aa523704d095e4dffe7ec8d6a8b212f793ea2ad", "shasum": "" }, "require": { @@ -3328,7 +3848,7 @@ "type": "tidelift" } ], - "time": "2023-02-16T09:01:12+00:00" + "time": "2023-03-20T16:06:12+00:00" }, { "name": "symfony/event-dispatcher-contracts", @@ -3473,6 +3993,69 @@ ], "time": "2023-02-14T08:03:56+00:00" }, + { + "name": "symfony/filesystem", + "version": "6.3.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "bf3226d895bb4cd6635ef42649ec4a5818e3bf01" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/bf3226d895bb4cd6635ef42649ec4a5818e3bf01", + "reference": "bf3226d895bb4cd6635ef42649ec4a5818e3bf01", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/6.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-14T09:04:20+00:00" + }, { "name": "symfony/finder", "version": "6.3.x-dev", @@ -3611,6 +4194,73 @@ "abandoned": "EnglishInflector from the String component", "time": "2023-02-14T08:03:56+00:00" }, + { + "name": "symfony/options-resolver", + "version": "6.3.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "2fdfd4259397b1300da21c04ba52a673763b73c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/2fdfd4259397b1300da21c04ba52a673763b73c9", + "reference": "2fdfd4259397b1300da21c04ba52a673763b73c9", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/6.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-14T09:04:20+00:00" + }, { "name": "symfony/polyfill-ctype", "version": "dev-main", @@ -4109,18 +4759,98 @@ ], "time": "2023-01-26T09:26:14+00:00" }, + { + "name": "symfony/polyfill-php81", + "version": "dev-main", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.28-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/main" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-01-26T09:26:14+00:00" + }, { "name": "symfony/process", "version": "6.3.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "e65ce5c9ccb249616aab1dbec53fc938c9017a4c" + "reference": "25e5f8662af68a432bef229d4f0939b393e8410e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/e65ce5c9ccb249616aab1dbec53fc938c9017a4c", - "reference": "e65ce5c9ccb249616aab1dbec53fc938c9017a4c", + "url": "https://api.github.com/repos/symfony/process/zipball/25e5f8662af68a432bef229d4f0939b393e8410e", + "reference": "25e5f8662af68a432bef229d4f0939b393e8410e", "shasum": "" }, "require": { @@ -4168,7 +4898,7 @@ "type": "tidelift" } ], - "time": "2023-02-24T10:44:40+00:00" + "time": "2023-03-09T16:20:38+00:00" }, { "name": "symfony/property-access", @@ -4176,12 +4906,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/property-access.git", - "reference": "bbd4442bfbdf3992550772539ba743d6d834534f" + "reference": "ffee082889586b5718347b291e04071f4d07b38f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-access/zipball/bbd4442bfbdf3992550772539ba743d6d834534f", - "reference": "bbd4442bfbdf3992550772539ba743d6d834534f", + "url": "https://api.github.com/repos/symfony/property-access/zipball/ffee082889586b5718347b291e04071f4d07b38f", + "reference": "ffee082889586b5718347b291e04071f4d07b38f", "shasum": "" }, "require": { @@ -4229,7 +4959,7 @@ "injection", "object", "property", - "property path", + "property-path", "reflection" ], "support": { @@ -4249,7 +4979,7 @@ "type": "tidelift" } ], - "time": "2023-02-16T09:33:00+00:00" + "time": "2023-03-14T14:59:20+00:00" }, { "name": "symfony/property-info", @@ -4257,12 +4987,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/property-info.git", - "reference": "26bafa33dc59668b46b9b546eff5c98cd00dc514" + "reference": "45badde17de11a04add84e34737a0f79a97c45ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-info/zipball/26bafa33dc59668b46b9b546eff5c98cd00dc514", - "reference": "26bafa33dc59668b46b9b546eff5c98cd00dc514", + "url": "https://api.github.com/repos/symfony/property-info/zipball/45badde17de11a04add84e34737a0f79a97c45ac", + "reference": "45badde17de11a04add84e34737a0f79a97c45ac", "shasum": "" }, "require": { @@ -4338,7 +5068,7 @@ "type": "tidelift" } ], - "time": "2023-02-21T18:48:11+00:00" + "time": "2023-03-14T15:00:13+00:00" }, { "name": "symfony/service-contracts", @@ -4426,18 +5156,80 @@ ], "time": "2023-03-01T10:32:47+00:00" }, + { + "name": "symfony/stopwatch", + "version": "6.3.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "f7fa451783b748e7b5942b9afe889b8df062e935" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f7fa451783b748e7b5942b9afe889b8df062e935", + "reference": "f7fa451783b748e7b5942b9afe889b8df062e935", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/service-contracts": "^2.5|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/6.3" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-02-14T09:04:20+00:00" + }, { "name": "symfony/string", "version": "6.3.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "599f0f073afa9866d1d3b16c1ffafa74a69fb3ce" + "reference": "01204629fd5c1db46e6c9181a5a2933c33bbfff8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/599f0f073afa9866d1d3b16c1ffafa74a69fb3ce", - "reference": "599f0f073afa9866d1d3b16c1ffafa74a69fb3ce", + "url": "https://api.github.com/repos/symfony/string/zipball/01204629fd5c1db46e6c9181a5a2933c33bbfff8", + "reference": "01204629fd5c1db46e6c9181a5a2933c33bbfff8", "shasum": "" }, "require": { @@ -4510,7 +5302,7 @@ "type": "tidelift" } ], - "time": "2023-02-24T10:44:40+00:00" + "time": "2023-03-20T16:06:12+00:00" }, { "name": "symfony/var-exporter", @@ -4518,12 +5310,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "b42762fed30626835a05f28110983ef0b4e8db51" + "reference": "226d0842fe410299932a58458ff1ddbb22af5c69" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/b42762fed30626835a05f28110983ef0b4e8db51", - "reference": "b42762fed30626835a05f28110983ef0b4e8db51", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/226d0842fe410299932a58458ff1ddbb22af5c69", + "reference": "226d0842fe410299932a58458ff1ddbb22af5c69", "shasum": "" }, "require": { @@ -4563,7 +5355,7 @@ "export", "hydrate", "instantiate", - "lazy loading", + "lazy-loading", "proxy", "serialize" ], @@ -4584,7 +5376,7 @@ "type": "tidelift" } ], - "time": "2023-02-24T10:44:40+00:00" + "time": "2023-03-14T15:56:29+00:00" }, { "name": "symfony/yaml", diff --git a/infection.json.dist b/infection.json.dist index 60a2a84..ac3c0d4 100644 --- a/infection.json.dist +++ b/infection.json.dist @@ -1,14 +1,23 @@ { - "timeout": 10, + "$schema": "https://raw.githubusercontent.com/infection/infection/0.26.18/resources/schema.json", "source": { "directories": [ "src" ] }, + "timeout": 10, "logs": { - "text": "infection.log" + "text": "infection.log", + "summary": "summary.log", + "json": "infection-log.json", + "perMutator": "per-mutator.md", + "github": true, + }, + "phpUnit": { + "configDir": "." }, "mutators": { "@default": true - } -} \ No newline at end of file + }, + "testFramework":"phpunit", +} diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 0000000..56eb0e1 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,35 @@ + + + + + tests/functional/ + + + tests/integration/ + + + + + src + + + + + + diff --git a/rector.php b/rector.php index 672403a..c48bd1f 100644 --- a/rector.php +++ b/rector.php @@ -13,6 +13,11 @@ __DIR__ . '/src', ]); + // We are skipping this file because there is a conflict between rector refacto and phpstan + $rectorConfig->skip([ + __DIR__ . '/src/TypeGuesser/Native/NativeTypeGuesser.php', + ]); + $rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class); $rectorConfig->sets([ diff --git a/src/Annotated/ClassReferenceMetadata.php b/src/Annotated/ClassReferenceMetadata.php index bed5737..2614d3b 100644 --- a/src/Annotated/ClassReferenceMetadata.php +++ b/src/Annotated/ClassReferenceMetadata.php @@ -9,6 +9,7 @@ /** * @template Subject of object + * * @implements ClassReferenceMetadataInterface */ final class ClassReferenceMetadata implements ClassReferenceMetadataInterface, AnnotatedInterface, \Stringable diff --git a/src/Annotated/ClassTypeMetadata.php b/src/Annotated/ClassTypeMetadata.php index 16e80cf..452ba0f 100644 --- a/src/Annotated/ClassTypeMetadata.php +++ b/src/Annotated/ClassTypeMetadata.php @@ -13,6 +13,7 @@ /** * @template Subject of object + * * @implements ClassTypeMetadataInterface */ final class ClassTypeMetadata implements ClassTypeMetadataInterface, AnnotatedInterface, \Stringable diff --git a/src/Annotated/CollectionTypeMetadata.php b/src/Annotated/CollectionTypeMetadata.php index 6231ae1..96eded2 100644 --- a/src/Annotated/CollectionTypeMetadata.php +++ b/src/Annotated/CollectionTypeMetadata.php @@ -16,6 +16,7 @@ /** * @template Subject of object + * * @implements CollectionTypeMetadataInterface */ final class CollectionTypeMetadata implements CollectionTypeMetadataInterface, AnnotatedInterface, \Stringable diff --git a/src/Annotated/ListTypeMetadata.php b/src/Annotated/ListTypeMetadata.php index cdf52cf..7e5b1b7 100644 --- a/src/Annotated/ListTypeMetadata.php +++ b/src/Annotated/ListTypeMetadata.php @@ -12,8 +12,10 @@ final class ListTypeMetadata implements ListTypeMetadataInterface, AnnotatedInte { use AnnotatedTrait; - public function __construct(private readonly ListTypeMetadataInterface $decorated, ?string $annotation = null) - { + public function __construct( + private readonly ListTypeMetadataInterface $decorated, + ?string $annotation = null + ) { $this->annotation = $annotation; } diff --git a/src/ClassFieldsTrait.php b/src/ClassFieldsTrait.php index 0fc216d..ac66f98 100644 --- a/src/ClassFieldsTrait.php +++ b/src/ClassFieldsTrait.php @@ -1,4 +1,6 @@ - ...$fields + * * @return ClassTypeMetadataInterface */ public function addFields(FieldMetadataInterface ...$fields): ClassTypeMetadataInterface diff --git a/src/ClassMetadataBuilder.php b/src/ClassMetadataBuilder.php index 0976476..3a8d212 100644 --- a/src/ClassMetadataBuilder.php +++ b/src/ClassMetadataBuilder.php @@ -24,8 +24,10 @@ public function __construct( /** * @template Subject of object + * * @param ClassReferenceMetadataInterface $class - * @return ClassTypeMetadataInterface + * + * @return ClassTypeMetadataInterface */ public function buildFromReference(ClassReferenceMetadataInterface $class): ClassTypeMetadataInterface { @@ -34,7 +36,9 @@ public function buildFromReference(ClassReferenceMetadataInterface $class): Clas /** * @template Subject of object + * * @param class-string $className + * * @return ClassTypeMetadataInterface */ public function buildFromFQCN(string $className): ClassTypeMetadataInterface @@ -48,8 +52,10 @@ public function buildFromFQCN(string $className): ClassTypeMetadataInterface /** * @template Subject of object + * * @param Subject $object - * @return ClassTypeMetadataInterface + * + * @return ClassTypeMetadataInterface */ public function buildFromObject(object $object): ClassTypeMetadataInterface { @@ -58,7 +64,9 @@ public function buildFromObject(object $object): ClassTypeMetadataInterface /** * @template Subject of object + * * @param \ReflectionClass $classOrObject + * * @return ClassTypeMetadataInterface */ public function build(\ReflectionClass $classOrObject): ClassTypeMetadataInterface diff --git a/src/ClassMethodsTrait.php b/src/ClassMethodsTrait.php index cc86e97..4c09b0e 100644 --- a/src/ClassMethodsTrait.php +++ b/src/ClassMethodsTrait.php @@ -1,4 +1,6 @@ - ...$methods + * * @return ClassTypeMetadataInterface */ public function addMethods(MethodMetadataInterface ...$methods): ClassTypeMetadataInterface diff --git a/src/ClassPropertiesTrait.php b/src/ClassPropertiesTrait.php index 17ec2d9..78e993e 100644 --- a/src/ClassPropertiesTrait.php +++ b/src/ClassPropertiesTrait.php @@ -1,4 +1,6 @@ - ...$properties + * * @return ClassTypeMetadataInterface */ public function addProperties(PropertyMetadataInterface ...$properties): ClassTypeMetadataInterface diff --git a/src/ClassReferenceMetadata.php b/src/ClassReferenceMetadata.php index e6a9841..2cff697 100644 --- a/src/ClassReferenceMetadata.php +++ b/src/ClassReferenceMetadata.php @@ -8,6 +8,7 @@ /** * @template Subject of object + * * @implements ClassReferenceMetadataInterface */ final readonly class ClassReferenceMetadata implements ClassReferenceMetadataInterface, \Stringable @@ -31,12 +32,12 @@ public static function fromClassName(string $fqcn): self { if (($index = strrpos($fqcn, '\\')) === false) { return new self($fqcn); - } else { - return new self( - substr($fqcn, $index + 1), - substr($fqcn, 0, $index) - ); } + + return new self( + substr($fqcn, $index + 1), + substr($fqcn, 0, $index) + ); } public function getNamespace(): ?string diff --git a/src/ClassRelationsTrait.php b/src/ClassRelationsTrait.php index e8e5483..7e380c7 100644 --- a/src/ClassRelationsTrait.php +++ b/src/ClassRelationsTrait.php @@ -1,4 +1,6 @@ - ...$relations + * * @return ClassTypeMetadataInterface */ public function addRelations(RelationMetadataInterface ...$relations): ClassTypeMetadataInterface diff --git a/src/ClassTypeMetadata.php b/src/ClassTypeMetadata.php index db22735..d3f5642 100644 --- a/src/ClassTypeMetadata.php +++ b/src/ClassTypeMetadata.php @@ -5,14 +5,12 @@ namespace Kiboko\Component\Metadata; use Kiboko\Contract\Metadata\ClassTypeMetadataInterface; -use Kiboko\Contract\Metadata\FieldMetadataInterface; -use Kiboko\Contract\Metadata\MethodMetadataInterface; -use Kiboko\Contract\Metadata\PropertyMetadataInterface; -use Kiboko\Contract\Metadata\RelationMetadataInterface; /** * @template Subject of object + * * @implements ClassTypeMetadataInterface + * * @use ClassPropertiesTrait * @use ClassMethodsTrait * @use ClassFieldsTrait @@ -25,8 +23,10 @@ final class ClassTypeMetadata implements ClassTypeMetadataInterface, \Stringable use ClassFieldsTrait; use ClassRelationsTrait; - public function __construct(private readonly ?string $name, private readonly ?string $namespace = null) - { + public function __construct( + private readonly ?string $name, + private readonly ?string $namespace = null + ) { if (null !== $this->name && str_contains($this->name, '\\')) { throw new \RuntimeException('Class names should not contain root namespace anchoring backslash or namespace.'); } @@ -45,12 +45,12 @@ public static function fromClassName(string $fqcn): self { if (($index = strrpos($fqcn, '\\')) === false) { return new self($fqcn); - } else { - return new self( - substr($fqcn, $index + 1), - substr($fqcn, 0, $index) - ); } + + return new self( + substr($fqcn, $index + 1), + substr($fqcn, 0, $index) + ); } public function getNamespace(): ?string diff --git a/src/CollectionTypeMetadata.php b/src/CollectionTypeMetadata.php index cb430f5..6f97487 100644 --- a/src/CollectionTypeMetadata.php +++ b/src/CollectionTypeMetadata.php @@ -5,17 +5,14 @@ namespace Kiboko\Component\Metadata; use Kiboko\Contract\Metadata\ClassMetadataInterface; -use Kiboko\Contract\Metadata\ClassTypeMetadataInterface; use Kiboko\Contract\Metadata\CollectionTypeMetadataInterface; -use Kiboko\Contract\Metadata\FieldMetadataInterface; -use Kiboko\Contract\Metadata\MethodMetadataInterface; -use Kiboko\Contract\Metadata\PropertyMetadataInterface; -use Kiboko\Contract\Metadata\RelationMetadataInterface; use Kiboko\Contract\Metadata\TypeMetadataInterface; /** * @template Subject of object + * * @implements CollectionTypeMetadataInterface + * * @use ClassPropertiesTrait * @use ClassMethodsTrait * @use ClassFieldsTrait diff --git a/src/FieldGuesser/PublicPropertyFieldGuesser.php b/src/FieldGuesser/PublicPropertyFieldGuesser.php index 50a4acf..6034f79 100644 --- a/src/FieldGuesser/PublicPropertyFieldGuesser.php +++ b/src/FieldGuesser/PublicPropertyFieldGuesser.php @@ -12,7 +12,6 @@ use Kiboko\Component\Metadata\UnionTypeMetadata; use Kiboko\Contract\Metadata\ClassTypeMetadataInterface; use Kiboko\Contract\Metadata\FieldGuesserInterface; -use Kiboko\Contract\Metadata\PropertyMetadataInterface; use Kiboko\Contract\Metadata\TypeMetadataInterface; use Kiboko\Contract\Metadata\UnionTypeMetadataInterface; @@ -60,9 +59,10 @@ private function filterTypes(TypeMetadataInterface $type): TypeMetadataInterface } $type = reset($filtered); - if ($type !== false) { + if (false !== $type) { return $type; } + return new MixedTypeMetadata(); } } diff --git a/src/FieldGuesser/VirtualFieldGuesser.php b/src/FieldGuesser/VirtualFieldGuesser.php index 4301a49..7fbcf3f 100644 --- a/src/FieldGuesser/VirtualFieldGuesser.php +++ b/src/FieldGuesser/VirtualFieldGuesser.php @@ -12,7 +12,6 @@ use Kiboko\Contract\Metadata\ArgumentListMetadataInterface; use Kiboko\Contract\Metadata\ClassTypeMetadataInterface; use Kiboko\Contract\Metadata\FieldGuesserInterface; -use Kiboko\Contract\Metadata\MethodMetadataInterface; use Kiboko\Contract\Metadata\TypeMetadataInterface; final class VirtualFieldGuesser implements FieldGuesserInterface @@ -113,9 +112,10 @@ private function extractArgumentTypes(ArgumentListMetadataInterface $arguments): private function guessType(TypeMetadataInterface ...$types): TypeMetadataInterface { $type = reset($types); - if ($type !== false) { + if (false !== $type) { return $type; } + return new MixedTypeMetadata(); } } diff --git a/src/FieldMetadata.php b/src/FieldMetadata.php index a49fb70..9dde523 100644 --- a/src/FieldMetadata.php +++ b/src/FieldMetadata.php @@ -9,6 +9,7 @@ /** * @template Subject of object + * * @implements FieldMetadataInterface */ class FieldMetadata implements FieldMetadataInterface diff --git a/src/MethodGuesser/ReflectionMethodGuesser.php b/src/MethodGuesser/ReflectionMethodGuesser.php index 0a11f03..00bd03a 100644 --- a/src/MethodGuesser/ReflectionMethodGuesser.php +++ b/src/MethodGuesser/ReflectionMethodGuesser.php @@ -18,8 +18,10 @@ public function __construct(private TypeGuesserInterface $typeGuesser) { } - public function __invoke(\ReflectionClass $classOrObject, ClassTypeMetadataInterface $class): \Iterator - { + public function __invoke( + \ReflectionClass $classOrObject, + ClassTypeMetadataInterface $class + ): \Iterator { yield from array_map( fn (\ReflectionMethod $method) => new MethodMetadata( $method->getName(), diff --git a/src/MethodMetadata.php b/src/MethodMetadata.php index 548de95..f3ba778 100644 --- a/src/MethodMetadata.php +++ b/src/MethodMetadata.php @@ -10,6 +10,7 @@ /** * @template Subject of object + * * @implements MethodMetadataInterface */ final class MethodMetadata implements MethodMetadataInterface diff --git a/src/MultipleRelationMetadata.php b/src/MultipleRelationMetadata.php index aae5d7a..ba75db4 100644 --- a/src/MultipleRelationMetadata.php +++ b/src/MultipleRelationMetadata.php @@ -9,6 +9,7 @@ /** * @template Subject of object + * * @implements MultipleRelationMetadataInterface */ class MultipleRelationMetadata implements MultipleRelationMetadataInterface diff --git a/src/PropertyMetadata.php b/src/PropertyMetadata.php index 8832e15..0248b4c 100644 --- a/src/PropertyMetadata.php +++ b/src/PropertyMetadata.php @@ -9,6 +9,7 @@ /** * @template Subject of object + * * @implements PropertyMetadataInterface */ final class PropertyMetadata implements PropertyMetadataInterface diff --git a/src/RelationGuesser/VirtualRelationGuesser.php b/src/RelationGuesser/VirtualRelationGuesser.php index 24dc4d5..25ed487 100644 --- a/src/RelationGuesser/VirtualRelationGuesser.php +++ b/src/RelationGuesser/VirtualRelationGuesser.php @@ -38,7 +38,9 @@ private function isSingular(string $field): bool /** * @template Subject of object + * * @param ClassTypeMetadataInterface $class + * * @return \Iterator */ public function __invoke(ClassTypeMetadataInterface $class): \Iterator diff --git a/src/Type.php b/src/Type.php index ee7c07a..2212b0b 100644 --- a/src/Type.php +++ b/src/Type.php @@ -13,86 +13,103 @@ final class Type { /** * @internal + * * @var list */ public static $boolean = ['bool', 'boolean']; /** * @internal + * * @var list */ public static $integer = ['int', 'integer']; /** * @internal + * * @var list */ public static $float = ['float', 'decimal', 'double']; /** * @internal + * * @var list */ public static $numberMeta = ['numeric', 'number']; /** * @internal + * * @var list */ public static $numberCompatible = ['int', 'integer', 'float', 'decimal', 'double', 'numeric', 'number']; /** * @internal + * * @var list */ public static $string = ['string']; /** * @internal + * * @var list */ public static $binary = ['binary']; /** * @internal + * * @var list */ public static $array = ['array']; /** * @internal + * * @var list */ public static $iterable = ['iterable']; /** * @internal + * * @var list */ public static $callable = ['callable']; /** * @internal + * * @var list */ public static $resource = ['resource']; /** * @internal + * * @var list */ public static $object = ['object']; /** * @internal + * * @var list */ public static $null = ['null']; /** * @internal + * * @var list */ public static $void = ['void']; /** * @internal + * * @var list */ public static $static = ['static']; /** * @internal + * * @var list */ public static $self = ['self']; /** * @internal + * * @var list */ public static $builtInTypes = [ diff --git a/src/UnaryRelationMetadata.php b/src/UnaryRelationMetadata.php index c85ae80..18d91e2 100644 --- a/src/UnaryRelationMetadata.php +++ b/src/UnaryRelationMetadata.php @@ -9,6 +9,7 @@ /** * @template Subject of object + * * @implements UnaryRelationMetadataInterface */ class UnaryRelationMetadata implements UnaryRelationMetadataInterface diff --git a/src/VariadicArgumentMetadata.php b/src/VariadicArgumentMetadata.php index 19dca82..610d462 100644 --- a/src/VariadicArgumentMetadata.php +++ b/src/VariadicArgumentMetadata.php @@ -5,7 +5,6 @@ namespace Kiboko\Component\Metadata; use Kiboko\Contract\Metadata\ArgumentMetadataInterface; -use Kiboko\Contract\Metadata\TypedInterface; use Kiboko\Contract\Metadata\TypeMetadataInterface; final class VariadicArgumentMetadata implements ArgumentMetadataInterface diff --git a/src/VirtualFieldMetadata.php b/src/VirtualFieldMetadata.php index 4f3a6e6..4ec5ba5 100644 --- a/src/VirtualFieldMetadata.php +++ b/src/VirtualFieldMetadata.php @@ -9,7 +9,9 @@ /** * @template Subject of object + * * @use VirtualUnaryTrait + * * @extends FieldMetadata */ final class VirtualFieldMetadata extends FieldMetadata diff --git a/src/VirtualMultipleRelationMetadata.php b/src/VirtualMultipleRelationMetadata.php index c332955..3910a6e 100644 --- a/src/VirtualMultipleRelationMetadata.php +++ b/src/VirtualMultipleRelationMetadata.php @@ -9,7 +9,9 @@ /** * @template Subject of object + * * @use VirtualMultipleTrait + * * @extends MultipleRelationMetadata */ final class VirtualMultipleRelationMetadata extends MultipleRelationMetadata diff --git a/src/VirtualUnaryRelationMetadata.php b/src/VirtualUnaryRelationMetadata.php index 6ed462e..7ff4e3f 100644 --- a/src/VirtualUnaryRelationMetadata.php +++ b/src/VirtualUnaryRelationMetadata.php @@ -9,7 +9,9 @@ /** * @template Subject of object + * * @use VirtualUnaryTrait + * * @extends UnaryRelationMetadata */ final class VirtualUnaryRelationMetadata extends UnaryRelationMetadata