diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 69f9274e..984ad2bf 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,12 +1,12 @@ version: 2 updates: -- package-ecosystem: composer - directory: "/" - schedule: - interval: daily - open-pull-requests-limit: 10 + - package-ecosystem: "composer" + directory: "/" + schedule: + interval: "daily" + open-pull-requests-limit: 10 -- package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "weekly" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 00000000..79d43f4f --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,24 @@ +name: "Dependabot auto-merge" + +on: # yamllint disable-line rule:truthy + pull_request_target: null + +permissions: + contents: "write" + +jobs: + dependabot: + runs-on: "ubuntu-latest" + if: "${{ github.actor == 'dependabot[bot]' }}" + steps: + - name: "Dependabot metadata" + id: "metadata" + uses: "dependabot/fetch-metadata@v1.3.4" + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: "Enable auto-merge for Dependabot PRs" + if: "${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}" + run: "gh pr merge --auto --merge \"$PR_URL\"" + env: + PR_URL: "${{github.event.pull_request.html_url}}" + GITHUB_TOKEN: "${{secrets.GITHUB_TOKEN}}" diff --git a/.github/workflows/integrate.yaml b/.github/workflows/integrate.yaml new file mode 100644 index 00000000..fe060a78 --- /dev/null +++ b/.github/workflows/integrate.yaml @@ -0,0 +1,49 @@ +# https://docs.github.com/en/actions + +name: "Integrate" + +on: # yamllint disable-line rule:truthy + push: + branches: + - "5.x" + pull_request: null + # Allow manually triggering the workflow. + workflow_dispatch: null + +jobs: + code-coverage: + name: "Code Coverage" + uses: "phpDocumentor/.github/.github/workflows/code-coverage.yml@v0.1.0" + + coding-standards: + name: "Coding Standards" + uses: "phpDocumentor/.github/.github/workflows/coding-standards.yml@v0.1.0" + + dependency-analysis: + name: "Dependency analysis" + uses: "phpDocumentor/.github/.github/workflows/dependency-analysis.yml@v0.1.0" + + lint-root: + name: "Lint root" + uses: "phpDocumentor/.github/.github/workflows/lint.yml@main" + with: + composer-options: "--no-check-publish --ansi" + + static-analysis: + name: "Static analysis" + uses: "phpDocumentor/.github/.github/workflows/static-analysis.yml@v0.1.0" + with: + php-extensions: "none, ctype, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, fileinfo, pcntl, posix" + + unit-tests: + name: "Unit test" + uses: "phpDocumentor/.github/.github/workflows/continues-integration.yml@v0.1.0" + with: + php-versions: "['7.4', '8.0', '8.1', '8.2']" + + integration-tests: + name: "Integration test" + uses: "phpDocumentor/.github/.github/workflows/continues-integration.yml@v0.1.0" + needs: "unit-tests" + with: + test-suite: "integration" diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml deleted file mode 100644 index d399c38c..00000000 --- a/.github/workflows/push.yml +++ /dev/null @@ -1,218 +0,0 @@ -on: - push: - branches: - - 5.x - pull_request: - # Allow manually triggering the workflow. - workflow_dispatch: -name: Qa workflow -env: - phiveGPGKeys: 4AA394086372C20A,D2CCAC42F6295E7D,E82B2FB314E9906E,8A03EA3B385DBAA1,D0254321FB74703A -jobs: - setup: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: composer - uses: docker://composer - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - args: install --no-interaction --prefer-dist --optimize-autoloader - - - name: composer-require-checker - uses: docker://phpga/composer-require-checker-ga - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - args: check --config-file ./composer-require-config.json composer.json - - phpunit-with-coverage: - runs-on: ubuntu-latest - name: Unit tests - needs: setup - steps: - - uses: actions/checkout@v3 - - - name: composer - uses: docker://composer - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - args: install --no-interaction --prefer-dist --optimize-autoloader - - - name: PHPUnit - uses: docker://phpdoc/phpunit-ga:latest - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Quick check code coverage level - run: php tests/coverage-checker.php 94 - - phpunit: - name: Unit tests for PHP version ${{ matrix.php-versions }} on ${{ matrix.operating-system }} - runs-on: ${{ matrix.operating-system }} - strategy: - fail-fast: false - matrix: - dependencies: - - highest - - locked - - lowest - operating-system: - - ubuntu-latest - - windows-latest - - macOS-latest - php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1'] - - env: - extensions: mbstring - key: cache-v1 # can be any string, change to clear the extension cache. - - needs: - - setup - - phpunit-with-coverage - - steps: - - uses: actions/checkout@v3 - - - name: Setup cache environment - id: cache-env - uses: shivammathur/cache-extensions@v1 - with: - php-version: ${{ matrix.php-versions }} - extensions: ${{ env.extensions }} - key: ${{ env.key }} - - - name: Cache extensions - uses: actions/cache@v3 - with: - path: ${{ steps.cache-env.outputs.dir }} - key: ${{ steps.cache-env.outputs.key }} - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - extensions: ${{ env.extensions }} - ini-values: memory_limit=2G, display_errors=On, error_reporting=-1 - tools: phive - - - name: Install PHAR dependencies - env: - GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: phive --no-progress install --copy --trust-gpg-keys ${{ env.phiveGPGKeys }} --force-accept-unsigned - - - name: Install phpunit 8 for php 7.2 - if: matrix.php-versions == '7.2' - env: - GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: phive --no-progress install --copy --trust-gpg-keys ${{ env.phiveGPGKeys }} phpunit:^8.5 - - - name: Install Composer ${{ matrix.dependencies }} dependencies & cache dependencies - uses: "ramsey/composer-install@v2" - with: - composer-options: --optimize-autoloader - dependency-versions: ${{ matrix.dependencies }} - - - name: Run PHPUnit - run: php tools/phpunit - - codestyle: - runs-on: ubuntu-latest - needs: [setup, phpunit] - steps: - - uses: actions/checkout@v3 - - name: Restore/cache vendor folder - uses: actions/cache@v3 - with: - path: vendor - key: all-build-${{ hashFiles('**/composer.lock') }} - restore-keys: | - all-build-${{ hashFiles('**/composer.lock') }} - all-build- - - name: Code style check - uses: phpDocumentor/coding-standard@latest - with: - args: -s - - phpstan: - runs-on: ubuntu-latest - needs: [setup, phpunit] - steps: - - uses: actions/checkout@v3 - - name: composer - uses: docker://composer - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - args: install --no-interaction --prefer-dist --optimize-autoloader - - - name: PHPStan - uses: phpDocumentor/phpstan-ga@0.12.9 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - args: analyse src --configuration phpstan.neon - -# psalm: -# name: Psalm -# runs-on: ${{ matrix.operating-system }} -# strategy: -# matrix: -# operating-system: -# - ubuntu-latest -# php-versions: ['7.2'] -# env: -# extensions: mbstring -# key: cache-v1 # can be any string, change to clear the extension cache. -# -# needs: -# - setup -# - phpunit -# -# steps: -# - uses: actions/checkout@v3 -# -# - name: Setup cache environment -# id: cache-env -# uses: shivammathur/cache-extensions@v1 -# with: -# php-version: ${{ matrix.php-versions }} -# extensions: ${{ env.extensions }} -# key: ${{ env.key }} -# -# - name: Cache extensions -# uses: actions/cache@v3 -# with: -# path: ${{ steps.cache-env.outputs.dir }} -# key: ${{ steps.cache-env.outputs.key }} -# -# - name: Setup PHP -# uses: shivammathur/setup-php@v2 -# with: -# php-version: ${{ matrix.php-versions }} -# extensions: ${{ env.extensions }} -# tools: psalm -# ini-values: memory_limit=2G, display_errors=On, error_reporting=-1 -# -# - name: Install Composer dependencies & cache dependencies -# uses: "ramsey/composer-install@v2" -# with: -# composer-options: --optimize-autoloader -# -# - name: Run psalm -# run: psalm --output-format=github -# -# -# bc_check: -# name: BC Check -# runs-on: ubuntu-latest -# needs: [setup, phpunit] -# steps: -# - uses: actions/checkout@v3 -# - name: fetch tags -# run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* -# - name: BC Check -# uses: docker://nyholm/roave-bc-check-ga diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index cf3949dd..00000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,48 +0,0 @@ -before_commands: - - "composer install --no-dev --prefer-source" - -checks: - php: - excluded_dependencies: - - phpstan/phpstan - -tools: - external_code_coverage: - enabled: true - timeout: 300 - filter: - excluded_paths: ["docs", "tests", "vendor"] - php_code_sniffer: - enabled: true - config: - standard: PSR2 - filter: - paths: ["src/*", "tests/*"] - excluded_paths: [] - php_cpd: - enabled: true - excluded_dirs: ["docs", "tests", "vendor"] - php_cs_fixer: - enabled: true - config: - level: all - filter: - paths: ["src/*", "tests/*"] - php_loc: - enabled: true - excluded_dirs: ["docs", "tests", "vendor"] - php_mess_detector: - enabled: true - config: - ruleset: phpmd.xml.dist - design_rules: { eval_expression: false } - filter: - paths: ["src/*"] - php_pdepend: - enabled: true - excluded_dirs: ["docs", "tests", "vendor"] - php_analyzer: - enabled: true - filter: - paths: ["src/*", "tests/*"] - sensiolabs_security_checker: true diff --git a/.yamllint.yaml b/.yamllint.yaml new file mode 100644 index 00000000..55695cd5 --- /dev/null +++ b/.yamllint.yaml @@ -0,0 +1,65 @@ +extends: "default" + +ignore: | + .build/ + .notes/ + vendor/ +rules: + braces: + max-spaces-inside-empty: 0 + max-spaces-inside: 1 + min-spaces-inside-empty: 0 + min-spaces-inside: 1 + brackets: + max-spaces-inside-empty: 0 + max-spaces-inside: 0 + min-spaces-inside-empty: 0 + min-spaces-inside: 0 + colons: + max-spaces-after: 1 + max-spaces-before: 0 + commas: + max-spaces-after: 1 + max-spaces-before: 0 + min-spaces-after: 1 + comments: + ignore-shebangs: true + min-spaces-from-content: 1 + require-starting-space: true + comments-indentation: "enable" + document-end: + present: false + document-start: + present: false + indentation: + check-multi-line-strings: false + indent-sequences: true + spaces: 2 + empty-lines: + max-end: 0 + max-start: 0 + max: 1 + empty-values: + forbid-in-block-mappings: true + forbid-in-flow-mappings: true + hyphens: + max-spaces-after: 2 + key-duplicates: "enable" + key-ordering: "disable" + line-length: "disable" + new-line-at-end-of-file: "enable" + new-lines: + type: "unix" + octal-values: + forbid-implicit-octal: true + quoted-strings: + quote-type: "double" + trailing-spaces: "enable" + truthy: + allowed-values: + - "false" + - "true" + +yaml-files: + - "*.yaml" + - "*.yml" diff --git a/Makefile b/Makefile index 37d2da2f..1aab96f2 100644 --- a/Makefile +++ b/Makefile @@ -1,41 +1,47 @@ -.PHONY: install-phive -install-phive: - mkdir tools; \ - wget -O tools/phive.phar https://phar.io/releases/phive.phar; \ - wget -O tools/phive.phar.asc https://phar.io/releases/phive.phar.asc; \ - gpg --keyserver pool.sks-keyservers.net --recv-keys 0x9D8A98B29B2D5D79; \ - gpg --verify tools/phive.phar.asc tools/phive.phar; \ - chmod +x tools/phive.phar - -.PHONY: setup -setup: install-phive - docker run -it --rm -v${CURDIR}:/opt/project -w /opt/project phpdoc/phar-ga:latest php tools/phive.phar install --copy --trust-gpg-keys 4AA394086372C20A,D2CCAC42F6295E7D,E82B2FB314E9906E,8E730BA25823D8B5,D0254321FB74703A --force-accept-unsigned - -.PHONY: phpcs -phpcs: - docker run -it --rm -v${CURDIR}:/opt/project -w /opt/project phpdoc/phpcs-ga:latest -s - -.PHONY: phpcbf -phpcbf: - docker run -it --rm -v${CURDIR}:/opt/project -w /opt/project phpdoc/phpcs-ga:latest phpcbf - -.PHONY: phpstan -phpstan: - docker run -it --rm -v${CURDIR}:/opt/project -w /opt/project phpdoc/phpstan-ga:latest analyse src --no-progress --level max --configuration phpstan.neon - -.PHONY: psalm -psalm: - docker run -it --rm -v${CURDIR}:/opt/project -w /opt/project mickaelandrieu/psalm-ga +.PHONY: help +help: ## Displays this list of targets with descriptions + @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' + +.PHONY: code-style +code-style: + docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpcs-ga:latest -d memory_limit=1024M -s + +.PHONY: fix-code-style +fix-code-style: + docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpcs-ga:latest phpcbf + +.PHONY: static-code-analysis +static-code-analysis: vendor ## Runs a static code analysis with phpstan/phpstan and vimeo/psalm + docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/phpstan --configuration=phpstan.neon + docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/psalm .PHONY: test -test: - docker run -it --rm -v${CURDIR}:/github/workspace phpdoc/phpunit-ga - docker run -it --rm -v${CURDIR}:/data -w /data php:7.2 -f ./tests/coverage-checker.php 94 +test: test-unit test-functional ## Runs all test suites with phpunit/phpunit + docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/phpunit + +.PHONY: test-unit +test-unit: ## Runs unit tests with phpunit/phpunit + docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/phpunit --testsuite=unit + +.PHONY: test-functional +test-functional: ## Runs unit tests with phpunit/phpunit + docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/phpunit --testsuite=functional + +.PHONY: dependency-analysis +dependency-analysis: vendor ## Runs a dependency analysis with maglnet/composer-require-checker + docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 .phive/composer-require-checker check --config-file=/opt/project/composer-require-checker.json + +vendor: composer.json composer.lock + composer validate --no-check-publish + composer install --no-interaction --no-progress .PHONY: benchmark benchmark: docker run -it --rm -v${CURDIR}:/opt/project -w /opt/project php:7.4-cli tools/phpbench run -.PHONY: pre-commit-test -pre-commit-test: test phpcs phpstan +.PHONY: rector +rector: ## Refactor code using rector + docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4 vendor/bin/rector process +.PHONY: pre-commit-test +pre-commit-test: fix-code-style test code-style static-code-analysis diff --git a/README.md b/README.md index ddcadfb5..2405f0de 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ are however several advantages to using this library: In order to inspect a codebase you need to tell composer to include the `phpdocumentor/reflection` package. This can easily be done using the following command in your command line terminal: - composer require "phpdocumentor/reflection: ~4.0" + composer require phpdocumentor/reflection:~5.0 After the installation is complete no further configuration is necessary and you can immediately start using it. diff --git a/composer-require-config.json b/composer-require-checker.json similarity index 100% rename from composer-require-config.json rename to composer-require-checker.json diff --git a/composer.json b/composer.json index 8db0adfc..b8610e3c 100644 --- a/composer.json +++ b/composer.json @@ -19,17 +19,24 @@ } }, "require": { - "php": ">=7.2", + "php": "^7.4|8.0.*|8.1.*", "nikic/php-parser": "^4.13", "phpdocumentor/reflection-common": "^2.1", "phpdocumentor/reflection-docblock": "^5", "phpdocumentor/type-resolver": "^1.2", - "psr/log": "~1.0", "webmozart/assert": "^1.7" }, "require-dev": { "mikey179/vfsstream": "~1.2", - "mockery/mockery": "~1.3.2" + "mockery/mockery": "~1.5.0", + "phpspec/prophecy-phpunit": "^2.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-php-parser": "^1.1", + "phpstan/phpstan-webmozart-assert": "^1.2", + "phpunit/phpunit": "^9.5", + "rector/rector": "^0.14.5", + "vimeo/psalm": "^4.25" }, "config": { "preferred-install": { @@ -37,12 +44,15 @@ }, "sort-packages": true, "platform": { - "php": "7.2.5" + "php": "7.4.0" + }, + "allow-plugins": { + "phpstan/extension-installer": true } }, "extra": { "branch-alias": { - "dev-4.x": "5.0.x-dev" + "dev-5.x": "5.3.x-dev" } } } diff --git a/composer.lock b/composer.lock index a482ed24..e95fc54a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5dd90ceb216e93cddf9533702fd1e1b1", + "content-hash": "d1ab86646df11d1e3e0ebda33f9c3783", "packages": [ { "name": "nikic/php-parser", - "version": "v4.13.2", + "version": "v4.15.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077" + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/210577fe3cf7badcc5814d99455df46564f3c077", - "reference": "210577fe3cf7badcc5814d99455df46564f3c077", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", + "reference": "0ef6c55a3f47f89d7a374e6f835197a0b5fcf900", "shasum": "" }, "require": { @@ -58,9 +58,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.2" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.1" }, - "time": "2021-11-30T19:35:32+00:00" + "time": "2022-09-04T07:30:47+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -222,33 +222,3576 @@ }, "time": "2022-03-15T21:29:03+00:00" }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" + } + ], + "packages-dev": [ + { + "name": "amphp/amp", + "version": "v2.6.2", + "source": { + "type": "git", + "url": "https://github.com/amphp/amp.git", + "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/amp/zipball/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", + "reference": "9d5100cebffa729aaffecd3ad25dc5aeea4f13bb", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1", + "ext-json": "*", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^7 | ^8 | ^9", + "psalm/phar": "^3.11@dev", + "react/promise": "^2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "files": [ + "lib/functions.php", + "lib/Internal/functions.php" + ], + "psr-4": { + "Amp\\": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniel Lowrey", + "email": "rdlowrey@php.net" + }, + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Bob Weinand", + "email": "bobwei9@hotmail.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A non-blocking concurrency framework for PHP applications.", + "homepage": "https://amphp.org/amp", + "keywords": [ + "async", + "asynchronous", + "awaitable", + "concurrency", + "event", + "event-loop", + "future", + "non-blocking", + "promise" + ], + "support": { + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/amp/issues", + "source": "https://github.com/amphp/amp/tree/v2.6.2" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2022-02-20T17:52:18+00:00" + }, + { + "name": "amphp/byte-stream", + "version": "v1.8.1", + "source": { + "type": "git", + "url": "https://github.com/amphp/byte-stream.git", + "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/amphp/byte-stream/zipball/acbd8002b3536485c997c4e019206b3f10ca15bd", + "reference": "acbd8002b3536485c997c4e019206b3f10ca15bd", + "shasum": "" + }, + "require": { + "amphp/amp": "^2", + "php": ">=7.1" + }, + "require-dev": { + "amphp/php-cs-fixer-config": "dev-master", + "amphp/phpunit-util": "^1.4", + "friendsofphp/php-cs-fixer": "^2.3", + "jetbrains/phpstorm-stubs": "^2019.3", + "phpunit/phpunit": "^6 || ^7 || ^8", + "psalm/phar": "^3.11.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "files": [ + "lib/functions.php" + ], + "psr-4": { + "Amp\\ByteStream\\": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Aaron Piotrowski", + "email": "aaron@trowski.com" + }, + { + "name": "Niklas Keller", + "email": "me@kelunik.com" + } + ], + "description": "A stream abstraction to make working with non-blocking I/O simple.", + "homepage": "http://amphp.org/byte-stream", + "keywords": [ + "amp", + "amphp", + "async", + "io", + "non-blocking", + "stream" + ], + "support": { + "irc": "irc://irc.freenode.org/amphp", + "issues": "https://github.com/amphp/byte-stream/issues", + "source": "https://github.com/amphp/byte-stream/tree/v1.8.1" + }, + "funding": [ + { + "url": "https://github.com/amphp", + "type": "github" + } + ], + "time": "2021-03-30T17:13:30+00:00" + }, + { + "name": "composer/package-versions-deprecated", + "version": "1.11.99.5", + "source": { + "type": "git", + "url": "https://github.com/composer/package-versions-deprecated.git", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b4f54f74ef3453349c24a845d22392cd31e65f1d", + "reference": "b4f54f74ef3453349c24a845d22392cd31e65f1d", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0 || ^2.0", + "php": "^7 || ^8" + }, + "replace": { + "ocramius/package-versions": "1.11.99" + }, + "require-dev": { + "composer/composer": "^1.9.3 || ^2.0@dev", + "ext-zip": "^1.13", + "phpunit/phpunit": "^6.5 || ^7" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "PackageVersions\\": "src/PackageVersions" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", + "support": { + "issues": "https://github.com/composer/package-versions-deprecated/issues", + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.5" + }, + "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-01-17T14:14:24+00:00" + }, + { + "name": "composer/pcre", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/composer/pcre.git", + "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/pcre/zipball/e300eb6c535192decd27a85bc72a9290f0d6b3bd", + "reference": "e300eb6c535192decd27a85bc72a9290f0d6b3bd", + "shasum": "" + }, + "require": { + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.3", + "phpstan/phpstan-strict-rules": "^1.1", + "symfony/phpunit-bridge": "^5" + }, + "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.0.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-02-25T20:21:48+00:00" + }, + { + "name": "composer/semver", + "version": "3.3.2", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", + "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.4", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "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": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.3.2" + }, + "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-04-01T19:23:25+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": "dnoegel/php-xdg-base-dir", + "version": "v0.1.1", + "source": { + "type": "git", + "url": "https://github.com/dnoegel/php-xdg-base-dir.git", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "reference": "8f8a6e48c5ecb0f991c2fdcf5f154a47d85f9ffd", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~7.0|~6.0|~5.0|~4.8.35" + }, + "type": "library", + "autoload": { + "psr-4": { + "XdgBaseDir\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "implementation of xdg base directory specification for php", + "support": { + "issues": "https://github.com/dnoegel/php-xdg-base-dir/issues", + "source": "https://github.com/dnoegel/php-xdg-base-dir/tree/v0.1.1" + }, + "time": "2019-12-04T15:06:13+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", + "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.16 || ^1", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "vimeo/psalm": "^4.22" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.1" + }, + "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%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-03-03T08:28:38+00:00" + }, + { + "name": "felixfbecker/advanced-json-rpc", + "version": "v3.2.1", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "reference": "b5f37dbff9a8ad360ca341f3240dc1c168b45447", + "shasum": "" + }, + "require": { + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "php": "^7.1 || ^8.0", + "phpdocumentor/reflection-docblock": "^4.3.4 || ^5.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.0 || ^8.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "AdvancedJsonRpc\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + } + ], + "description": "A more advanced JSONRPC implementation", + "support": { + "issues": "https://github.com/felixfbecker/php-advanced-json-rpc/issues", + "source": "https://github.com/felixfbecker/php-advanced-json-rpc/tree/v3.2.1" + }, + "time": "2021-06-11T22:34:44+00:00" + }, + { + "name": "felixfbecker/language-server-protocol", + "version": "v1.5.2", + "source": { + "type": "git", + "url": "https://github.com/felixfbecker/php-language-server-protocol.git", + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/6e82196ffd7c62f7794d778ca52b69feec9f2842", + "reference": "6e82196ffd7c62f7794d778ca52b69feec9f2842", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpstan/phpstan": "*", + "squizlabs/php_codesniffer": "^3.1", + "vimeo/psalm": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "LanguageServerProtocol\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "ISC" + ], + "authors": [ + { + "name": "Felix Becker", + "email": "felix.b@outlook.com" + } + ], + "description": "PHP classes for the Language Server Protocol", + "keywords": [ + "language", + "microsoft", + "php", + "server" + ], + "support": { + "issues": "https://github.com/felixfbecker/php-language-server-protocol/issues", + "source": "https://github.com/felixfbecker/php-language-server-protocol/tree/v1.5.2" + }, + "time": "2022-03-02T22:36:06+00:00" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "shasum": "" + }, + "require": { + "php": "^5.3|^7.0|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "^1.4 || ^2.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "support": { + "issues": "https://github.com/hamcrest/hamcrest-php/issues", + "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" + }, + "time": "2020-07-09T08:09:16+00:00" + }, + { + "name": "mikey179/vfsstream", + "version": "v1.6.11", + "source": { + "type": "git", + "url": "https://github.com/bovigo/vfsStream.git", + "reference": "17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f", + "reference": "17d16a85e6c26ce1f3e2fa9ceeacdc2855db1e9f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "org\\bovigo\\vfs\\": "src/main/php" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Frank Kleine", + "homepage": "http://frankkleine.de/", + "role": "Developer" + } + ], + "description": "Virtual file system to mock the real file system in unit tests.", + "homepage": "http://vfs.bovigo.org/", + "support": { + "issues": "https://github.com/bovigo/vfsStream/issues", + "source": "https://github.com/bovigo/vfsStream/tree/master", + "wiki": "https://github.com/bovigo/vfsStream/wiki" + }, + "time": "2022-02-23T02:02:42+00:00" + }, + { + "name": "mockery/mockery", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/e92dcc83d5a51851baf5f5591d32cb2b16e3684e", + "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "^2.0.1", + "lib-pcre": ">=7.0", + "php": "^7.3 || ^8.0" + }, + "conflict": { + "phpunit/phpunit": "<8.0" + }, + "require-dev": { + "phpunit/phpunit": "^8.5 || ^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "support": { + "issues": "https://github.com/mockery/mockery/issues", + "source": "https://github.com/mockery/mockery/tree/1.5.1" + }, + "time": "2022-09-07T15:32:08+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", + "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2022-03-03T13:19:32+00:00" + }, + { + "name": "netresearch/jsonmapper", + "version": "v4.0.0", + "source": { + "type": "git", + "url": "https://github.com/cweiske/jsonmapper.git", + "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", + "reference": "8bbc021a8edb2e4a7ea2f8ad4fa9ec9dce2fcb8d", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "~7.5 || ~8.0 || ~9.0", + "squizlabs/php_codesniffer": "~3.5" + }, + "type": "library", + "autoload": { + "psr-0": { + "JsonMapper": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "OSL-3.0" + ], + "authors": [ + { + "name": "Christian Weiske", + "email": "cweiske@cweiske.de", + "homepage": "http://github.com/cweiske/jsonmapper/", + "role": "Developer" + } + ], + "description": "Map nested JSON structures onto PHP classes", + "support": { + "email": "cweiske@cweiske.de", + "issues": "https://github.com/cweiske/jsonmapper/issues", + "source": "https://github.com/cweiske/jsonmapper/tree/v4.0.0" + }, + "time": "2020-12-01T19:48:11+00:00" + }, + { + "name": "openlss/lib-array2xml", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/nullivex/lib-array2xml.git", + "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nullivex/lib-array2xml/zipball/a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", + "reference": "a91f18a8dfc69ffabe5f9b068bc39bb202c81d90", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "autoload": { + "psr-0": { + "LSS": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Bryan Tong", + "email": "bryan@nullivex.com", + "homepage": "https://www.nullivex.com" + }, + { + "name": "Tony Butler", + "email": "spudz76@gmail.com", + "homepage": "https://www.nullivex.com" + } + ], + "description": "Array2XML conversion library credit to lalit.org", + "homepage": "https://www.nullivex.com", + "keywords": [ + "array", + "array conversion", + "xml", + "xml conversion" + ], + "support": { + "issues": "https://github.com/nullivex/lib-array2xml/issues", + "source": "https://github.com/nullivex/lib-array2xml/tree/master" + }, + "time": "2019-03-29T20:06:56+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" + }, + "time": "2021-07-20T11:28:43+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.15.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "reference": "bbcd7380b0ebf3961ee21409db7b38bc31d69a13", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.2", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0 || ^7.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/v1.15.0" + }, + "time": "2021-12-08T12:19:24+00:00" + }, + { + "name": "phpspec/prophecy-phpunit", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy-phpunit.git", + "reference": "2d7a9df55f257d2cba9b1d0c0963a54960657177" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy-phpunit/zipball/2d7a9df55f257d2cba9b1d0c0963a54960657177", + "reference": "2d7a9df55f257d2cba9b1d0c0963a54960657177", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8", + "phpspec/prophecy": "^1.3", + "phpunit/phpunit": "^9.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\PhpUnit\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christophe Coevoet", + "email": "stof@notk.org" + } + ], + "description": "Integrating the Prophecy mocking library in PHPUnit test cases", + "homepage": "http://phpspec.net", + "keywords": [ + "phpunit", + "prophecy" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy-phpunit/issues", + "source": "https://github.com/phpspec/prophecy-phpunit/tree/v2.0.1" + }, + "time": "2020-07-09T08:33:42+00:00" + }, + { + "name": "phpstan/extension-installer", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/phpstan/extension-installer.git", + "reference": "66c7adc9dfa38b6b5838a9fb728b68a7d8348051" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/66c7adc9dfa38b6b5838a9fb728b68a7d8348051", + "reference": "66c7adc9dfa38b6b5838a9fb728b68a7d8348051", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1 || ^2.0", + "php": "^7.1 || ^8.0", + "phpstan/phpstan": ">=0.11.6" + }, + "require-dev": { + "composer/composer": "^1.8", + "phing/phing": "^2.16.3", + "php-parallel-lint/php-parallel-lint": "^1.2.0", + "phpstan/phpstan-strict-rules": "^0.11 || ^0.12" + }, + "type": "composer-plugin", + "extra": { + "class": "PHPStan\\ExtensionInstaller\\Plugin" + }, + "autoload": { + "psr-4": { + "PHPStan\\ExtensionInstaller\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Composer plugin for automatic installation of PHPStan extensions", + "support": { + "issues": "https://github.com/phpstan/extension-installer/issues", + "source": "https://github.com/phpstan/extension-installer/tree/1.1.0" + }, + "time": "2020-12-13T13:06:13+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "1.8.9", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "3a72d9d9f2528fbd50c2d8fcf155fd9f74ade3f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/3a72d9d9f2528fbd50c2d8fcf155fd9f74ade3f2", + "reference": "3a72d9d9f2528fbd50c2d8fcf155fd9f74ade3f2", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpstan/phpstan/issues", + "source": "https://github.com/phpstan/phpstan/tree/1.8.9" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2022-10-13T13:40:18+00:00" + }, + { + "name": "phpstan/phpstan-php-parser", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-php-parser.git", + "reference": "1c7670dd92da864b5d019f22d9f512a6ae18b78e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-php-parser/zipball/1c7670dd92da864b5d019f22d9f512a6ae18b78e", + "reference": "1c7670dd92da864b5d019f22d9f512a6ae18b78e", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "phpstan/phpstan": "^1.3" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5" + }, + "type": "phpstan-extension", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHP-Parser extensions for PHPStan", + "support": { + "issues": "https://github.com/phpstan/phpstan-php-parser/issues", + "source": "https://github.com/phpstan/phpstan-php-parser/tree/1.1.0" + }, + "time": "2021-12-16T19:43:32+00:00" + }, + { + "name": "phpstan/phpstan-webmozart-assert", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-webmozart-assert.git", + "reference": "c8cd4045592525b3f330950a0c7aaaeb08c60dc5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-webmozart-assert/zipball/c8cd4045592525b3f330950a0c7aaaeb08c60dc5", + "reference": "c8cd4045592525b3f330950a0c7aaaeb08c60dc5", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.8.0" + }, + "require-dev": { + "nikic/php-parser": "^4.13.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "webmozart/assert": "^1.11.0" + }, + "type": "phpstan-extension", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan webmozart/assert extension", + "support": { + "issues": "https://github.com/phpstan/phpstan-webmozart-assert/issues", + "source": "https://github.com/phpstan/phpstan-webmozart-assert/tree/1.2.1" + }, + "time": "2022-09-21T13:17:14+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.17", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/aa94dc41e8661fe90c7316849907cba3007b10d8", + "reference": "aa94dc41e8661fe90c7316849907cba3007b10d8", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.14", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcov": "*", + "ext-xdebug": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.17" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-08-30T12:24:04+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "3.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-12-02T12:48:52+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T05:33:50+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "5.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:16:10+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "9.5.25", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d", + "reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.8", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.5", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^3.2", + "sebastian/version": "^3.0.2" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "9.5-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.25" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2022-09-25T03:44:45+00:00" + }, + { + "name": "psr/container", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", + "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.2" + }, + "time": "2021-11-05T16:50:12+00:00" + }, { "name": "psr/log", "version": "1.1.4", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" + }, + { + "name": "rector/rector", + "version": "0.14.5", + "source": { + "type": "git", + "url": "https://github.com/rectorphp/rector.git", + "reference": "f7fd87b2435835f481e6a94ee28e09af412bd3cc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/f7fd87b2435835f481e6a94ee28e09af412bd3cc", + "reference": "f7fd87b2435835f481e6a94ee28e09af412bd3cc", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0", + "phpstan/phpstan": "^1.8.6" + }, + "conflict": { + "rector/rector-cakephp": "*", + "rector/rector-doctrine": "*", + "rector/rector-laravel": "*", + "rector/rector-php-parser": "*", + "rector/rector-phpoffice": "*", + "rector/rector-phpunit": "*", + "rector/rector-symfony": "*" + }, + "bin": [ + "bin/rector" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "0.14-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Instant Upgrade and Automated Refactoring of any PHP code", + "support": { + "issues": "https://github.com/rectorphp/rector/issues", + "source": "https://github.com/rectorphp/rector/tree/0.14.5" + }, + "funding": [ + { + "url": "https://github.com/tomasvotruba", + "type": "github" + } + ], + "time": "2022-09-29T11:05:42+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:30:19+00:00" + }, + { + "name": "sebastian/comparator", + "version": "4.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:41:17+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T15:52:27+00:00" + }, + { + "name": "sebastian/diff", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "reference": "3461e3fccc7cfdfc2720be910d3bd73c69be590d", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "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": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:10:38+00:00" + }, + { + "name": "sebastian/environment", + "version": "5.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "reference": "1b5dff7bb151a4db11d49d90e5408e4e938270f7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-04-03T09:37:03+00:00" + }, + { + "name": "sebastian/exporter", + "version": "4.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T06:03:37+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-02-14T08:28:10+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.6", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:12:34+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:14:26+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "4.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/cd9d8cf3c5804de4341c283ed787f099f5506172", + "reference": "cd9d8cf3c5804de4341c283ed787f099f5506172", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:17:30+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-12T14:47:03+00:00" + }, + { + "name": "sebastian/version", + "version": "3.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c6c1022351a901512170118436c764e473f6de8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" + }, + { + "name": "symfony/console", + "version": "v5.4.13", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be", + "reference": "3f97f6c7b7e26848a90c0c0cfb91eeb2bb8618be", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php73": "^1.9", + "symfony/polyfill-php80": "^1.16", + "symfony/service-contracts": "^1.1|^2|^3", + "symfony/string": "^5.1|^6.0" + }, + "conflict": { + "psr/log": ">=3", + "symfony/dependency-injection": "<4.4", + "symfony/dotenv": "<5.1", + "symfony/event-dispatcher": "<4.4", + "symfony/lock": "<4.4", + "symfony/process": "<4.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0" + }, + "require-dev": { + "psr/log": "^1|^2", + "symfony/config": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0", + "symfony/event-dispatcher": "^4.4|^5.0|^6.0", + "symfony/lock": "^4.4|^5.0|^6.0", + "symfony/process": "^4.4|^5.0|^6.0", + "symfony/var-dumper": "^4.4|^5.0|^6.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/lock": "", + "symfony/process": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "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": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v5.4.13" + }, + "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": "2022-08-26T13:50:20+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "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": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + }, + "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": "2022-01-02T09:53:40+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" + }, + "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": "2022-05-24T11:49:31+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "433d05519ce6990bf3530fba6957499d327395c2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/433d05519ce6990bf3530fba6957499d327395c2", + "reference": "433d05519ce6990bf3530fba6957499d327395c2", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "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 for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.26.0" + }, + "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": "2022-05-24T11:49:31+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/219aa369ceff116e673852dce47c3a41794c14bd", + "reference": "219aa369ceff116e673852dce47c3a41794c14bd", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "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 for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.26.0" + }, + "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": "2022-05-24T11:49:31+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "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 for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + }, + "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": "2022-05-24T11:49:31+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.26.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", + "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-main": "1.26-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { + "files": [ + "bootstrap.php" + ], "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } + "Symfony\\Polyfill\\Php73\\": "" + }, + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -256,49 +3799,62 @@ ], "authors": [ { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", "keywords": [ - "log", - "psr", - "psr-3" + "compatibility", + "polyfill", + "portable", + "shim" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" }, - "time": "2021-05-03T11:20:27+00:00" + "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": "2022-05-24T11:49:31+00:00" }, { - "name": "symfony/polyfill-ctype", - "version": "v1.25.0", + "name": "symfony/polyfill-php80", + "version": "v1.26.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "30885182c981ab175d4d034db0f6f469898070ab" + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab", - "reference": "30885182c981ab175d4d034db0f6f469898070ab", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", "shasum": "" }, "require": { "php": ">=7.1" }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.23-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -310,8 +3866,11 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -319,24 +3878,28 @@ ], "authors": [ { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for ctype functions", + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "ctype", "polyfill", - "portable" + "portable", + "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.25.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" }, "funding": [ { @@ -352,42 +3915,46 @@ "type": "tidelift" } ], - "time": "2021-10-20T20:35:02+00:00" + "time": "2022-05-10T07:21:04+00:00" }, { - "name": "webmozart/assert", - "version": "1.10.0", + "name": "symfony/service-contracts", + "version": "v2.5.2", "source": { "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + "url": "https://github.com/symfony/service-contracts.git", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" + "php": ">=7.2.5", + "psr/container": "^1.1", + "symfony/deprecation-contracts": "^2.1|^3" }, "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" + "ext-psr": "<1.1|>=2" }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" + "suggest": { + "symfony/service-implementation": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.10-dev" + "dev-main": "2.5-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { "psr-4": { - "Webmozart\\Assert\\": "src/" + "Symfony\\Contracts\\Service\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -396,194 +3963,337 @@ ], "authors": [ { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Assertions to validate method input/output with nice error messages.", + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", "keywords": [ - "assert", - "check", - "validate" + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" ], "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" + "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" }, - "time": "2021-03-09T10:59:23+00:00" - } - ], - "packages-dev": [ + "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": "2022-05-30T19:17:29+00:00" + }, { - "name": "hamcrest/hamcrest-php", - "version": "v2.0.1", + "name": "symfony/string", + "version": "v5.4.13", "source": { "type": "git", - "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" + "url": "https://github.com/symfony/string.git", + "reference": "2900c668a32138a34118740de3e4d5a701801f53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", - "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "url": "https://api.github.com/repos/symfony/string/zipball/2900c668a32138a34118740de3e4d5a701801f53", + "reference": "2900c668a32138a34118740de3e4d5a701801f53", "shasum": "" }, "require": { - "php": "^5.3|^7.0|^8.0" + "php": ">=7.2.5", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php80": "~1.15" }, - "replace": { - "cordoval/hamcrest-php": "*", - "davedevelopment/hamcrest-php": "*", - "kodova/hamcrest-php": "*" + "conflict": { + "symfony/translation-contracts": ">=3.0" }, "require-dev": { - "phpunit/php-file-iterator": "^1.4 || ^2.0", - "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" + "symfony/error-handler": "^4.4|^5.0|^6.0", + "symfony/http-client": "^4.4|^5.0|^6.0", + "symfony/translation-contracts": "^1.1|^2", + "symfony/var-exporter": "^4.4|^5.0|^6.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v5.4.13" + }, + "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": "2022-09-01T01:52:16+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" }, + "type": "library", "autoload": { "classmap": [ - "hamcrest" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], - "description": "This is the PHP port of Hamcrest Matchers", - "keywords": [ - "test" + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { - "issues": "https://github.com/hamcrest/hamcrest-php/issues", - "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.0.1" + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" }, - "time": "2020-07-09T08:09:16+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" }, { - "name": "mikey179/vfsstream", - "version": "v1.6.10", + "name": "vimeo/psalm", + "version": "4.29.0", "source": { "type": "git", - "url": "https://github.com/bovigo/vfsStream.git", - "reference": "250c0825537d501e327df879fb3d4cd751933b85" + "url": "https://github.com/vimeo/psalm.git", + "reference": "7ec5ffbd5f68ae03782d7fd33fff0c45a69f95b3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/250c0825537d501e327df879fb3d4cd751933b85", - "reference": "250c0825537d501e327df879fb3d4cd751933b85", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/7ec5ffbd5f68ae03782d7fd33fff0c45a69f95b3", + "reference": "7ec5ffbd5f68ae03782d7fd33fff0c45a69f95b3", "shasum": "" }, "require": { - "php": ">=5.3.0" + "amphp/amp": "^2.4.2", + "amphp/byte-stream": "^1.5", + "composer/package-versions-deprecated": "^1.8.0", + "composer/semver": "^1.4 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^1.1 || ^2.0 || ^3.0", + "dnoegel/php-xdg-base-dir": "^0.1.1", + "ext-ctype": "*", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-tokenizer": "*", + "felixfbecker/advanced-json-rpc": "^3.0.3", + "felixfbecker/language-server-protocol": "^1.5", + "netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0 || ^4.0", + "nikic/php-parser": "^4.13", + "openlss/lib-array2xml": "^1.0", + "php": "^7.1|^8", + "sebastian/diff": "^3.0 || ^4.0", + "symfony/console": "^3.4.17 || ^4.1.6 || ^5.0 || ^6.0", + "symfony/polyfill-php80": "^1.25", + "webmozart/path-util": "^2.3" + }, + "provide": { + "psalm/psalm": "self.version" }, "require-dev": { - "phpunit/phpunit": "^4.5|^5.0" + "bamarni/composer-bin-plugin": "^1.2", + "brianium/paratest": "^4.0||^6.0", + "ext-curl": "*", + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpdocumentor/reflection-docblock": "^5", + "phpmyadmin/sql-parser": "5.1.0||dev-master", + "phpspec/prophecy": ">=1.9.0", + "phpstan/phpdoc-parser": "1.2.* || 1.6.4", + "phpunit/phpunit": "^9.0", + "psalm/plugin-phpunit": "^0.16", + "slevomat/coding-standard": "^7.0", + "squizlabs/php_codesniffer": "^3.5", + "symfony/process": "^4.3 || ^5.0 || ^6.0", + "weirdan/prophecy-shim": "^1.0 || ^2.0" + }, + "suggest": { + "ext-curl": "In order to send data to shepherd", + "ext-igbinary": "^2.0.5 is required, used to serialize caching data" }, + "bin": [ + "psalm", + "psalm-language-server", + "psalm-plugin", + "psalm-refactor", + "psalter" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "4.x-dev", + "dev-3.x": "3.x-dev", + "dev-2.x": "2.x-dev", + "dev-1.x": "1.x-dev" } }, "autoload": { - "psr-0": { - "org\\bovigo\\vfs\\": "src/main/php" + "files": [ + "src/functions.php", + "src/spl_object_id.php" + ], + "psr-4": { + "Psalm\\": "src/Psalm/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Frank Kleine", - "homepage": "http://frankkleine.de/", - "role": "Developer" + "name": "Matthew Brown" } ], - "description": "Virtual file system to mock the real file system in unit tests.", - "homepage": "http://vfs.bovigo.org/", + "description": "A static analysis tool for finding errors in PHP applications", + "keywords": [ + "code", + "inspection", + "php" + ], "support": { - "issues": "https://github.com/bovigo/vfsStream/issues", - "source": "https://github.com/bovigo/vfsStream/tree/master", - "wiki": "https://github.com/bovigo/vfsStream/wiki" + "issues": "https://github.com/vimeo/psalm/issues", + "source": "https://github.com/vimeo/psalm/tree/4.29.0" }, - "time": "2021-09-25T08:05:01+00:00" + "time": "2022-10-11T17:09:17+00:00" }, { - "name": "mockery/mockery", - "version": "1.3.5", + "name": "webmozart/path-util", + "version": "2.3.0", "source": { "type": "git", - "url": "https://github.com/mockery/mockery.git", - "reference": "472fa8ca4e55483d55ee1e73c963718c4393791d" + "url": "https://github.com/webmozart/path-util.git", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/472fa8ca4e55483d55ee1e73c963718c4393791d", - "reference": "472fa8ca4e55483d55ee1e73c963718c4393791d", + "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", + "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", "shasum": "" }, "require": { - "hamcrest/hamcrest-php": "^2.0.1", - "lib-pcre": ">=7.0", - "php": ">=5.6.0" + "php": ">=5.3.3", + "webmozart/assert": "~1.0" }, "require-dev": { - "phpunit/phpunit": "^5.7.10|^6.5|^7.5|^8.5|^9.3" + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "2.3-dev" } }, "autoload": { - "psr-0": { - "Mockery": "library/" + "psr-4": { + "Webmozart\\PathUtil\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" - }, - { - "name": "Dave Marshall", - "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], - "description": "Mockery is a simple yet flexible PHP mock object framework", - "homepage": "https://github.com/mockery/mockery", - "keywords": [ - "BDD", - "TDD", - "library", - "mock", - "mock objects", - "mockery", - "stub", - "test", - "test double", - "testing" - ], + "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", "support": { - "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.3.5" + "issues": "https://github.com/webmozart/path-util/issues", + "source": "https://github.com/webmozart/path-util/tree/2.3.0" }, - "time": "2021-09-13T15:33:03+00:00" + "abandoned": "symfony/filesystem", + "time": "2015-12-17T08:42:14+00:00" } ], "aliases": [], @@ -592,11 +4302,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=7.2" + "php": "^7.4|8.0.*|8.1.*" }, "platform-dev": [], "platform-overrides": { - "php": "7.2.5" + "php": "7.4.0" }, - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.3.0" } diff --git a/phpcs.xml.dist b/phpcs.xml.dist index f73d648b..ca43be0f 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -9,14 +9,11 @@ - + - - - diff --git a/phpmd.xml.dist b/phpmd.xml.dist deleted file mode 100644 index 9abf85cf..00000000 --- a/phpmd.xml.dist +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - 40 - - - diff --git a/phpstan.neon b/phpstan.neon index 5ee4700d..d49d462e 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,38 +1,21 @@ -includes: - - /composer/vendor/phpstan/phpstan-webmozart-assert/extension.neon - - /composer/vendor/phpstan/phpstan-php-parser/extension.neon - parameters: + paths: + - src + checkGenericClassInNonGenericObjectType: false level: max ignoreErrors: - - '#Method phpDocumentor\\Reflection\\File\\LocalFile::\md5\(\) should return string but returns string\|false\.#' + - '#Method phpDocumentor\\Reflection\\File\\LocalFile::md5\(\) should return string but returns string\|false\.#' - '#Else branch is unreachable because ternary operator condition is always true\.#' # # all these $fqsen errors indicate the need for a decorator class around PhpParser\Node to hold the public $fqsen that Reflection is giving it) # # src/phpDocumentor/Reflection/NodeVisitor/ElementNameResolver.php - - '#Access to an undefined property PhpParser\\Node\\Stmt\\Class_\|PhpParser\\Node\\Stmt\\Enum_\|PhpParser\\Node\\Stmt\\Interface_\|PhpParser\\Node\\Stmt\\Trait_::\$fqsen#' - - '#Access to an undefined property PhpParser\\Node\\Stmt\\Namespace_::\$fqsen\.#' - - '#Access to an undefined property PhpParser\\Node\\Stmt\\Enum_::\$fqsen\.#' - - '#Access to an undefined property PhpParser\\Node\\Stmt\\EnumCase::\$fqsen\.#' - - '#Access to an undefined property PhpParser\\Node\\Stmt\\Interface_::\$fqsen\.#' - - '#Access to an undefined property PhpParser\\Node\\Stmt\\Function_::\$fqsen\.#' - - '#Access to an undefined property PhpParser\\Node\\Stmt\\ClassMethod::\$fqsen\.#' - - '#Access to an undefined property PhpParser\\Node\\Const_::\$fqsen\.#' - - '#Access to an undefined property PhpParser\\Node\\Stmt\\PropertyProperty::\$fqsen\.#' - # - # src/phpDocumentor/Reflection/Php/Factory/Class_.php - - '#Access to an undefined property PhpParser\\Node\\Stmt\\Class_::\$fqsen\.#' - # - # src/phpDocumentor/Reflection/Php/Factory/Trait_.php - - '#Access to an undefined property PhpParser\\Node\\Stmt\\Trait_::\$fqsen\.#' - # - # - # this is a mismatch inside php-parser, not reflection - - '#Parameter \#1 \$nodes of method PhpParser\\NodeTraverser::traverse\(\) expects array\, array\\|null given\.#' - # + - '#Access to an undefined property PhpParser\\Node::\$fqsen\.#' + - '#Method phpDocumentor\\Reflection\\Php\\Factory\\(.*)::getFqsen\(\) should return phpDocumentor\\Reflection\\Fqsen but returns mixed\.#' + - '#Parameter \#1 \$fqsen of class phpDocumentor\\Reflection\\Php\\(.*) constructor expects phpDocumentor\\Reflection\\Fqsen, mixed given\.#' + - '#Parameter \#1 \$fqsen of method phpDocumentor\\Reflection\\Php\\File::addNamespace\(\) expects phpDocumentor\\Reflection\\Fqsen, mixed given\.#' # # there is one test case that prevents changing PropertyIterator::getDefault() to just return Expr (this is set in PhpParser) # src/phpDocumentor/Reflection/Php/Factory/Property.php @@ -41,4 +24,5 @@ parameters: # Type hint in php-parser is incorrect. - '#Cannot cast PhpParser\\Node\\Expr\|string to string.#' - - '#Call to an undefined method phpDocumentor\\Reflection\\Element\|phpDocumentor\\Reflection\\Php\\File::add.*\(\)#' + - '#Parameter \#2 \$object of method phpDocumentor\\Reflection\\Php\\ProjectFactoryStrategy::matches\(\) expects object, mixed given.#' + - '#Method phpDocumentor\\Reflection\\Php\\ValueEvaluator\\ConstantEvaluator::evaluate\(\) should return string but returns mixed.#' diff --git a/psalm-baseline.xml b/psalm-baseline.xml new file mode 100644 index 00000000..0f5ee145 --- /dev/null +++ b/psalm-baseline.xml @@ -0,0 +1,163 @@ + + + + + gettype($middleware) + + + $command + + + $command + + + $lastCallable + + + is_object($middleware) + + + + + $node->fqsen + + + $part + + + $part + + + + + is_object($object) + + + gettype($object) + + + + + $object->var->name + + + isInstanceOf + + + addArgument + + + + + addConstant + + + $const->getValue() !== null + + + + + Fqsen + + + + + + + + + $param->var->name + + + + + + + + + + + $command + + + $command + $file + + + $file + + + + + is_array($object->stmts) + + + + + + $const->getValue() !== null + + + + + Fqsen + + + + + + + + + + addMethod + + + + + gettype($object) + + + + is_object($object) + + + + + $iterator->getDefault() + + + addProperty + + + + + Fqsen + + + + + + + + + $object + + + new SplPriorityQueue() + + + + + string + + + $evaluator->evaluateSilently($expr) + + + + + $this->aliasesToFullyQualifiedNames($namespace) + + + diff --git a/psalm.xml b/psalm.xml index 9fedb8ab..8b73b240 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,9 +1,10 @@ @@ -14,5 +15,6 @@ + diff --git a/rector.php b/rector.php new file mode 100644 index 00000000..b285d6cf --- /dev/null +++ b/rector.php @@ -0,0 +1,26 @@ +paths([ + __DIR__ . '/src', + __DIR__ . '/tests/unit' + ]); + + // register a single rule + $rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class); + $rectorConfig->rule(Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector::class); + $rectorConfig->rule(Rector\TypeDeclaration\Rector\Closure\AddClosureReturnTypeRector::class); + $rectorConfig->rule(Rector\PHPUnit\Rector\Class_\AddProphecyTraitRector::class); + $rectorConfig->importNames(); + + // define sets of rules + $rectorConfig->sets([ + LevelSetList::UP_TO_PHP_74 + ]); +}; diff --git a/rector.yaml b/rector.yaml deleted file mode 100644 index d360c8c2..00000000 --- a/rector.yaml +++ /dev/null @@ -1,5 +0,0 @@ -parameters: - autoload_paths: - - 'vendor/autoload.php' - - 'stubs/' - php_version_features: '7.2' # your version is 7.3 diff --git a/src/phpDocumentor/Reflection/File/LocalFile.php b/src/phpDocumentor/Reflection/File/LocalFile.php index 174ba96a..a7ddf2bb 100644 --- a/src/phpDocumentor/Reflection/File/LocalFile.php +++ b/src/phpDocumentor/Reflection/File/LocalFile.php @@ -28,10 +28,8 @@ final class LocalFile implements File { /** * Path to the file. - * - * @var string */ - private $path; + private string $path; public function __construct(string $path) { @@ -59,7 +57,7 @@ public function md5(): string } /** - * Returns an relative path to the file. + * Returns a relative path to the file. */ public function path(): string { diff --git a/src/phpDocumentor/Reflection/Middleware/ChainFactory.php b/src/phpDocumentor/Reflection/Middleware/ChainFactory.php index ef027728..447edb63 100644 --- a/src/phpDocumentor/Reflection/Middleware/ChainFactory.php +++ b/src/phpDocumentor/Reflection/Middleware/ChainFactory.php @@ -39,9 +39,7 @@ public static function createExecutionChain(array $middlewareList, callable $las ); } - $lastCallable = static function ($command) use ($middleware, $lastCallable) { - return $middleware->execute($command, $lastCallable); - }; + $lastCallable = static fn ($command): object => $middleware->execute($command, $lastCallable); } return $lastCallable; diff --git a/src/phpDocumentor/Reflection/NodeVisitor/ElementNameResolver.php b/src/phpDocumentor/Reflection/NodeVisitor/ElementNameResolver.php index c353743e..c168d8aa 100644 --- a/src/phpDocumentor/Reflection/NodeVisitor/ElementNameResolver.php +++ b/src/phpDocumentor/Reflection/NodeVisitor/ElementNameResolver.php @@ -35,8 +35,12 @@ final class ElementNameResolver extends NodeVisitorAbstract { - /** @var SplDoublyLinkedList */ - private $parts = null; + private SplDoublyLinkedList $parts; + + public function __construct() + { + $this->resetState('\\'); + } /** * Resets the object to a known state before start processing. @@ -97,7 +101,7 @@ public function enterNode(Node $node): ?int } $this->resetState('\\' . $node->name . '\\'); - $node->fqsen = new Fqsen($this->buildName()); + $this->setFqsen($node); break; case Class_::class: case Trait_::class: @@ -108,17 +112,17 @@ public function enterNode(Node $node): ?int } $this->parts->push((string) $node->name); - $node->fqsen = new Fqsen($this->buildName()); + $this->setFqsen($node); break; case Function_::class: $this->parts->push($node->name . '()'); - $node->fqsen = new Fqsen($this->buildName()); + $this->setFqsen($node); return NodeTraverser::DONT_TRAVERSE_CHILDREN; case ClassMethod::class: $this->parts->push('::' . $node->name . '()'); - $node->fqsen = new Fqsen($this->buildName()); + $this->setFqsen($node); return NodeTraverser::DONT_TRAVERSE_CHILDREN; @@ -127,15 +131,15 @@ public function enterNode(Node $node): ?int break; case Const_::class: $this->parts->push($node->name); - $node->fqsen = new Fqsen($this->buildName()); + $this->setFqsen($node); break; case PropertyProperty::class: $this->parts->push('::$' . $node->name); - $node->fqsen = new Fqsen($this->buildName()); + $this->setFqsen($node); break; case EnumCase::class: $this->parts->push('::' . $node->name); - $node->fqsen = new Fqsen($this->buildName()); + $this->setFqsen($node); break; } @@ -163,4 +167,11 @@ private function buildName(): string return rtrim((string) $name, '\\'); } + + private function setFqsen(Node $node): void + { + $fqsen = new Fqsen($this->buildName()); + $node->fqsen = $fqsen; + $node->setAttribute('fqsen', $fqsen); + } } diff --git a/src/phpDocumentor/Reflection/Php/Argument.php b/src/phpDocumentor/Reflection/Php/Argument.php index 44da41f4..8a0669cd 100644 --- a/src/phpDocumentor/Reflection/Php/Argument.php +++ b/src/phpDocumentor/Reflection/Php/Argument.php @@ -22,19 +22,19 @@ final class Argument { /** @var string name of the Argument */ - private $name; + private string $name; /** @var Type a normalized type that should be in this Argument */ - private $type; + private Type $type; /** @var string|null the default value for an argument or null if none is provided */ - private $default; + private ?string $default; /** @var bool whether the argument passes the parameter by reference instead of by value */ - private $byReference; + private bool $byReference; /** @var bool Determines if this Argument represents a variadic argument */ - private $isVariadic; + private bool $isVariadic; /** * Initializes the object. diff --git a/src/phpDocumentor/Reflection/Php/Class_.php b/src/phpDocumentor/Reflection/Php/Class_.php index a6dc4c6d..1b8362f7 100644 --- a/src/phpDocumentor/Reflection/Php/Class_.php +++ b/src/phpDocumentor/Reflection/Php/Class_.php @@ -29,40 +29,39 @@ final class Class_ implements Element, MetaDataContainerInterface use MetadataContainer; /** @var Fqsen Full Qualified Structural Element Name */ - private $fqsen; + private Fqsen $fqsen; - /** @var DocBlock|null */ - private $docBlock = null; + private ?DocBlock $docBlock = null; + + private bool $readOnly = false; /** @var bool Whether this is an abstract class. */ - private $abstract = false; + private bool $abstract = false; /** @var bool Whether this class is marked as final and can't be subclassed. */ - private $final = false; + private bool $final = false; /** @var Fqsen|null The class this class is extending. */ - private $parent = null; + private ?Fqsen $parent = null; /** @var Fqsen[] References to interfaces that are implemented by this class. */ - private $implements = []; + private array $implements = []; /** @var Constant[] References to constants defined in this class. */ - private $constants = []; + private array $constants = []; /** @var Property[] References to properties defined in this class. */ - private $properties = []; + private array $properties = []; /** @var Method[] References to methods defined in this class. */ - private $methods = []; + private array $methods = []; /** @var Fqsen[] References to traits consumed by this class */ - private $usedTraits = []; + private array $usedTraits = []; - /** @var Location */ - private $location; + private Location $location; - /** @var Location */ - private $endLocation; + private Location $endLocation; /** * Initializes a number of properties with the given values. Others are initialized by definition. @@ -74,7 +73,8 @@ public function __construct( bool $abstract = false, bool $final = false, ?Location $location = null, - ?Location $endLocation = null + ?Location $endLocation = null, + bool $readOnly = false ) { if ($location === null) { $location = new Location(-1); @@ -91,6 +91,7 @@ public function __construct( $this->final = $final; $this->location = $location; $this->endLocation = $endLocation; + $this->readOnly = $readOnly; } /** @@ -109,6 +110,14 @@ public function isAbstract(): bool return $this->abstract; } + /** + * Returns true when this class is read-only. Otherwise returns false. + */ + public function isReadOnly(): bool + { + return $this->readOnly; + } + /** * Returns the superclass this class is extending if available. */ diff --git a/src/phpDocumentor/Reflection/Php/Constant.php b/src/phpDocumentor/Reflection/Php/Constant.php index 8ada2ccd..8b95e652 100644 --- a/src/phpDocumentor/Reflection/Php/Constant.php +++ b/src/phpDocumentor/Reflection/Php/Constant.php @@ -26,26 +26,19 @@ final class Constant implements Element, MetaDataContainerInterface { use MetadataContainer; - /** @var Fqsen */ - private $fqsen; + private Fqsen $fqsen; - /** @var DocBlock|null */ - private $docBlock; + private ?DocBlock $docBlock; - /** @var string|null $value */ - private $value; + private ?string $value; - /** @var Location */ - private $location; + private Location $location; - /** @var Location */ - private $endLocation; + private Location $endLocation; - /** @var Visibility */ - private $visibility; + private Visibility $visibility; - /** @var bool */ - private $final; + private bool $final; /** * Initializes the object. diff --git a/src/phpDocumentor/Reflection/Php/EnumCase.php b/src/phpDocumentor/Reflection/Php/EnumCase.php index 2214af38..0d32e369 100644 --- a/src/phpDocumentor/Reflection/Php/EnumCase.php +++ b/src/phpDocumentor/Reflection/Php/EnumCase.php @@ -14,20 +14,15 @@ final class EnumCase implements Element, MetaDataContainerInterface { use MetadataContainer; - /** @var Fqsen */ - private $fqsen; + private Fqsen $fqsen; - /** @var DocBlock|null */ - private $docBlock; + private ?DocBlock $docBlock; - /** @var Location */ - private $location; + private Location $location; - /** @var Location */ - private $endLocation; + private Location $endLocation; - /** @var string|null */ - private $value; + private ?string $value; public function __construct( Fqsen $fqsen, diff --git a/src/phpDocumentor/Reflection/Php/Enum_.php b/src/phpDocumentor/Reflection/Php/Enum_.php index 95cc0c0e..1ef43772 100644 --- a/src/phpDocumentor/Reflection/Php/Enum_.php +++ b/src/phpDocumentor/Reflection/Php/Enum_.php @@ -25,31 +25,30 @@ final class Enum_ implements Element, MetaDataContainerInterface use MetadataContainer; /** @var Fqsen Full Qualified Structural Element Name */ - private $fqsen; + private Fqsen $fqsen; - /** @var DocBlock|null */ - private $docBlock; + private ?DocBlock $docBlock; - /** @var Location */ - private $location; + private Location $location; - /** @var Location */ - private $endLocation; + private Location $endLocation; /** @var EnumCase[] */ - private $cases = []; + private array $cases = []; /** @var array */ - private $implements = []; + private array $implements = []; + + /** @var Constant[] References to constants defined in this enum. */ + private array $constants = []; /** @var array */ - private $methods = []; + private array $methods = []; /** @var array */ - private $usedTraits = []; + private array $usedTraits = []; - /** @var Type|null */ - private $backedType; + private ?Type $backedType; public function __construct( Fqsen $fqsen, @@ -127,6 +126,24 @@ public function addInterface(Fqsen $interface): void $this->implements[(string) $interface] = $interface; } + /** + * Returns the constants of this enum. + * + * @return Constant[] + */ + public function getConstants(): array + { + return $this->constants; + } + + /** + * Add Constant to this enum. + */ + public function addConstant(Constant $constant): void + { + $this->constants[(string) $constant->getFqsen()] = $constant; + } + /** * Returns the methods of this enum. * diff --git a/src/phpDocumentor/Reflection/Php/Factory/AbstractFactory.php b/src/phpDocumentor/Reflection/Php/Factory/AbstractFactory.php index 9a0d9dc1..b7e9e5fb 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/AbstractFactory.php +++ b/src/phpDocumentor/Reflection/Php/Factory/AbstractFactory.php @@ -29,8 +29,7 @@ abstract class AbstractFactory implements ProjectFactoryStrategy { - /** @var DocBlockFactoryInterface */ - private $docBlockFactory; + private DocBlockFactoryInterface $docBlockFactory; public function __construct(DocBlockFactoryInterface $docBlockFactory) { diff --git a/src/phpDocumentor/Reflection/Php/Factory/Argument.php b/src/phpDocumentor/Reflection/Php/Factory/Argument.php index 1450e341..e04daa3a 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/Argument.php +++ b/src/phpDocumentor/Reflection/Php/Factory/Argument.php @@ -31,8 +31,7 @@ */ final class Argument extends AbstractFactory implements ProjectFactoryStrategy { - /** @var PrettyPrinter */ - private $valueConverter; + private PrettyPrinter $valueConverter; /** * Initializes the object. diff --git a/src/phpDocumentor/Reflection/Php/Factory/ClassConstant.php b/src/phpDocumentor/Reflection/Php/Factory/ClassConstant.php index fd2832c3..53b0ff56 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/ClassConstant.php +++ b/src/phpDocumentor/Reflection/Php/Factory/ClassConstant.php @@ -17,6 +17,7 @@ use phpDocumentor\Reflection\Location; use phpDocumentor\Reflection\Php\Class_; use phpDocumentor\Reflection\Php\Constant as ConstantElement; +use phpDocumentor\Reflection\Php\Enum_; use phpDocumentor\Reflection\Php\Interface_; use phpDocumentor\Reflection\Php\StrategyContainer; use phpDocumentor\Reflection\Php\Visibility; @@ -32,8 +33,7 @@ */ final class ClassConstant extends AbstractFactory { - /** @var PrettyPrinter */ - private $valueConverter; + private PrettyPrinter $valueConverter; public function __construct(DocBlockFactoryInterface $blockFactory, PrettyPrinter $prettyPrinter) { @@ -66,7 +66,9 @@ protected function doCreate( $constantContainer, [ Class_::class, + Enum_::class, Interface_::class, + Trait_::class, ] ); diff --git a/src/phpDocumentor/Reflection/Php/Factory/ClassConstantIterator.php b/src/phpDocumentor/Reflection/Php/Factory/ClassConstantIterator.php index 1b5f9850..4273a838 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/ClassConstantIterator.php +++ b/src/phpDocumentor/Reflection/Php/Factory/ClassConstantIterator.php @@ -25,11 +25,10 @@ */ final class ClassConstantIterator implements Iterator { - /** @var ClassConst */ - private $classConstants; + private ClassConst $classConstants; /** @var int index of the current ClassConst to use */ - private $index = 0; + private int $index = 0; /** * Initializes the class with source data. @@ -72,7 +71,7 @@ public function getName(): string */ public function getFqsen(): Fqsen { - return $this->classConstants->consts[$this->index]->fqsen; + return $this->classConstants->consts[$this->index]->getAttribute('fqsen'); } /** diff --git a/src/phpDocumentor/Reflection/Php/Factory/Class_.php b/src/phpDocumentor/Reflection/Php/Factory/Class_.php index 43a97ff0..0ed3ca60 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/Class_.php +++ b/src/phpDocumentor/Reflection/Php/Factory/Class_.php @@ -47,31 +47,26 @@ protected function doCreate(ContextStack $context, object $object, StrategyConta $docBlock = $this->createDocBlock($object->getDocComment(), $context->getTypeContext()); $classElement = new ClassElement( - $object->fqsen, + $object->getAttribute('fqsen'), $docBlock, $object->extends ? new Fqsen('\\' . $object->extends) : null, $object->isAbstract(), $object->isFinal(), new Location($object->getLine()), - new Location($object->getEndLine()) + new Location($object->getEndLine()), + $object->isReadonly() ); - if (isset($object->implements)) { - foreach ($object->implements as $interfaceClassName) { - $classElement->addInterface( - new Fqsen('\\' . $interfaceClassName->toString()) - ); - } + foreach ($object->implements as $interfaceClassName) { + $classElement->addInterface( + new Fqsen('\\' . $interfaceClassName->toString()) + ); } $file = $context->peek(); assert($file instanceof FileElement); $file->addClass($classElement); - if (!isset($object->stmts)) { - return; - } - foreach ($object->stmts as $stmt) { $thisContext = $context->push($classElement); $strategy = $strategies->findMatching($thisContext, $stmt); diff --git a/src/phpDocumentor/Reflection/Php/Factory/ConstructorPromotion.php b/src/phpDocumentor/Reflection/Php/Factory/ConstructorPromotion.php index e9b14b37..00e77718 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/ConstructorPromotion.php +++ b/src/phpDocumentor/Reflection/Php/Factory/ConstructorPromotion.php @@ -22,10 +22,8 @@ final class ConstructorPromotion extends AbstractFactory { - /** @var PrettyPrinter */ - private $valueConverter; - /** @var ProjectFactoryStrategy */ - private $methodStrategy; + private PrettyPrinter $valueConverter; + private ProjectFactoryStrategy $methodStrategy; public function __construct( ProjectFactoryStrategy $methodStrategy, diff --git a/src/phpDocumentor/Reflection/Php/Factory/ContextStack.php b/src/phpDocumentor/Reflection/Php/Factory/ContextStack.php index f2161714..28aefa0c 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/ContextStack.php +++ b/src/phpDocumentor/Reflection/Php/Factory/ContextStack.php @@ -16,12 +16,10 @@ final class ContextStack { /** @var (Element|FileElement)[] */ - private $elements = []; + private array $elements = []; - /** @var TypeContext|null */ - private $typeContext; - /** @var Project */ - private $project; + private ?TypeContext $typeContext; + private Project $project; public function __construct(Project $project, ?TypeContext $typeContext = null) { diff --git a/src/phpDocumentor/Reflection/Php/Factory/Define.php b/src/phpDocumentor/Reflection/Php/Factory/Define.php index c42bbdf6..dca55fbd 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/Define.php +++ b/src/phpDocumentor/Reflection/Php/Factory/Define.php @@ -41,11 +41,9 @@ */ final class Define extends AbstractFactory { - /** @var PrettyPrinter */ - private $valueConverter; + private PrettyPrinter $valueConverter; - /** @var ConstantEvaluator */ - private $constantEvaluator; + private ConstantEvaluator $constantEvaluator; /** * Initializes the object. diff --git a/src/phpDocumentor/Reflection/Php/Factory/EnumCase.php b/src/phpDocumentor/Reflection/Php/Factory/EnumCase.php index 7e43e295..de419b42 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/EnumCase.php +++ b/src/phpDocumentor/Reflection/Php/Factory/EnumCase.php @@ -16,8 +16,7 @@ final class EnumCase extends AbstractFactory { - /** @var PrettyPrinter */ - private $prettyPrinter; + private PrettyPrinter $prettyPrinter; public function __construct(DocBlockFactoryInterface $docBlockFactory, PrettyPrinter $prettyPrinter) { @@ -39,7 +38,7 @@ protected function doCreate(ContextStack $context, object $object, StrategyConta $enum = $context->peek(); assert($enum instanceof EnumElement); $enum->addCase(new EnumCaseElement( - $object->fqsen, + $object->getAttribute('fqsen'), $docBlock, new Location($object->getLine()), new Location($object->getEndLine()), diff --git a/src/phpDocumentor/Reflection/Php/Factory/Enum_.php b/src/phpDocumentor/Reflection/Php/Factory/Enum_.php index e74d920f..8cb24b67 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/Enum_.php +++ b/src/phpDocumentor/Reflection/Php/Factory/Enum_.php @@ -34,29 +34,23 @@ protected function doCreate(ContextStack $context, object $object, StrategyConta $docBlock = $this->createDocBlock($object->getDocComment(), $context->getTypeContext()); $enum = new \phpDocumentor\Reflection\Php\Enum_( - $object->fqsen, + $object->getAttribute('fqsen'), (new Type())->fromPhpParser($object->scalarType), $docBlock, new Location($object->getLine()), new Location($object->getEndLine()) ); - if (isset($object->implements)) { - foreach ($object->implements as $interfaceClassName) { - $enum->addInterface( - new Fqsen('\\' . $interfaceClassName->toString()) - ); - } + foreach ($object->implements as $interfaceClassName) { + $enum->addInterface( + new Fqsen('\\' . $interfaceClassName->toString()) + ); } $file = $context->peek(); assert($file instanceof FileElement); $file->addEnum($enum); - if (!isset($object->stmts)) { - return; - } - foreach ($object->stmts as $stmt) { $thisContext = $context->push($enum); $strategy = $strategies->findMatching($thisContext, $stmt); diff --git a/src/phpDocumentor/Reflection/Php/Factory/File.php b/src/phpDocumentor/Reflection/Php/Factory/File.php index fbb0c0a7..60c6ebfe 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/File.php +++ b/src/phpDocumentor/Reflection/Php/Factory/File.php @@ -48,8 +48,7 @@ final class File extends AbstractFactory InlineHTML::class, ]; - /** @var NodesFactory */ - private $nodesFactory; + private NodesFactory $nodesFactory; /** @var callable */ private $middlewareChain; @@ -67,9 +66,7 @@ public function __construct( $this->nodesFactory = $nodesFactory; parent::__construct($docBlockFactory); - $lastCallable = function ($command) { - return $this->createFile($command); - }; + $lastCallable = fn ($command): FileElement => $this->createFile($command); $this->middlewareChain = ChainFactory::createExecutionChain($middleware, $lastCallable); } @@ -151,14 +148,14 @@ protected function createFileDocBlock( break; } - $comments = array_merge($comments, $n->getAttribute('comments', [])); + $comments = array_merge($comments, $n->getComments()); } if (!$node instanceof Node) { return null; } - $comments = array_merge($comments, $node->getAttribute('comments', [])); + $comments = array_merge($comments, $node->getComments()); if (empty($comments)) { return null; } diff --git a/src/phpDocumentor/Reflection/Php/Factory/File/CreateCommand.php b/src/phpDocumentor/Reflection/Php/Factory/File/CreateCommand.php index 6f4ae000..dc63a7a3 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/File/CreateCommand.php +++ b/src/phpDocumentor/Reflection/Php/Factory/File/CreateCommand.php @@ -24,14 +24,11 @@ */ final class CreateCommand implements Command { - /** @var File */ - private $file; + private File $file; - /** @var StrategyContainer */ - private $strategies; + private StrategyContainer $strategies; - /** @var ContextStack */ - private $context; + private ContextStack $context; /** * Initializes this command. diff --git a/src/phpDocumentor/Reflection/Php/Factory/Function_.php b/src/phpDocumentor/Reflection/Php/Factory/Function_.php index aec20925..2b7e481e 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/Function_.php +++ b/src/phpDocumentor/Reflection/Php/Factory/Function_.php @@ -51,7 +51,7 @@ protected function doCreate( Assert::isInstanceOf($file, FileElement::class); $function = new FunctionDescriptor( - $object->fqsen, + $object->getAttribute('fqsen'), $this->createDocBlock($object->getDocComment(), $context->getTypeContext()), new Location($object->getLine()), new Location($object->getEndLine()), diff --git a/src/phpDocumentor/Reflection/Php/Factory/GlobalConstant.php b/src/phpDocumentor/Reflection/Php/Factory/GlobalConstant.php index c6044513..e2e0abd3 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/GlobalConstant.php +++ b/src/phpDocumentor/Reflection/Php/Factory/GlobalConstant.php @@ -30,8 +30,7 @@ */ final class GlobalConstant extends AbstractFactory { - /** @var PrettyPrinter */ - private $valueConverter; + private PrettyPrinter $valueConverter; /** * Initializes the object. diff --git a/src/phpDocumentor/Reflection/Php/Factory/GlobalConstantIterator.php b/src/phpDocumentor/Reflection/Php/Factory/GlobalConstantIterator.php index 8935f143..33910729 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/GlobalConstantIterator.php +++ b/src/phpDocumentor/Reflection/Php/Factory/GlobalConstantIterator.php @@ -21,11 +21,10 @@ final class GlobalConstantIterator implements Iterator { - /** @var Const_ */ - private $constant; + private Const_ $constant; /** @var int index of the current constant to use */ - private $index = 0; + private int $index = 0; /** * Initializes the class with source data. @@ -68,7 +67,7 @@ public function getName(): string */ public function getFqsen(): Fqsen { - return $this->constant->consts[$this->index]->fqsen; + return $this->constant->consts[$this->index]->getAttribute('fqsen'); } /** diff --git a/src/phpDocumentor/Reflection/Php/Factory/Interface_.php b/src/phpDocumentor/Reflection/Php/Factory/Interface_.php index 8c1bd480..b77bdefa 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/Interface_.php +++ b/src/phpDocumentor/Reflection/Php/Factory/Interface_.php @@ -54,7 +54,7 @@ protected function doCreate( } $interface = new InterfaceElement( - $object->fqsen, + $object->getAttribute('fqsen'), $parents, $docBlock, new Location($object->getLine()), @@ -64,10 +64,6 @@ protected function doCreate( Assert::isInstanceOf($file, FileElement::class); $file->addInterface($interface); - if (!isset($object->stmts)) { - return; - } - foreach ($object->stmts as $stmt) { $thisContext = $context->push($interface); $strategy = $strategies->findMatching($thisContext, $stmt); diff --git a/src/phpDocumentor/Reflection/Php/Factory/Method.php b/src/phpDocumentor/Reflection/Php/Factory/Method.php index 264027fe..22471b55 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/Method.php +++ b/src/phpDocumentor/Reflection/Php/Factory/Method.php @@ -60,7 +60,7 @@ protected function doCreate( ); $method = new MethodDescriptor( - $object->fqsen, + $object->getAttribute('fqsen'), $this->buildVisibility($object), $this->createDocBlock($object->getDocComment(), $context->getTypeContext()), $object->isAbstract(), diff --git a/src/phpDocumentor/Reflection/Php/Factory/Namespace_.php b/src/phpDocumentor/Reflection/Php/Factory/Namespace_.php index 2beff078..593a1ca4 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/Namespace_.php +++ b/src/phpDocumentor/Reflection/Php/Factory/Namespace_.php @@ -42,7 +42,7 @@ public function create(ContextStack $context, object $object, StrategyContainer $file = $context->peek(); Assert::isInstanceOf($file, FileElement::class); - $file->addNamespace($object->fqsen ?? new Fqsen('\\')); + $file->addNamespace($object->getAttribute('fqsen') ?? new Fqsen('\\')); $typeContext = (new NamespaceNodeToContext())($object); foreach ($object->stmts as $stmt) { $strategy = $strategies->findMatching($context, $stmt); diff --git a/src/phpDocumentor/Reflection/Php/Factory/Property.php b/src/phpDocumentor/Reflection/Php/Factory/Property.php index e50978ae..0e51b82b 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/Property.php +++ b/src/phpDocumentor/Reflection/Php/Factory/Property.php @@ -33,8 +33,7 @@ */ final class Property extends AbstractFactory implements ProjectFactoryStrategy { - /** @var PrettyPrinter */ - private $valueConverter; + private PrettyPrinter $valueConverter; /** * Initializes the object. diff --git a/src/phpDocumentor/Reflection/Php/Factory/PropertyIterator.php b/src/phpDocumentor/Reflection/Php/Factory/PropertyIterator.php index c0f315ef..83721c3f 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/PropertyIterator.php +++ b/src/phpDocumentor/Reflection/Php/Factory/PropertyIterator.php @@ -28,11 +28,10 @@ */ final class PropertyIterator implements Iterator { - /** @var PropertyNode */ - private $property; + private PropertyNode $property; /** @var int index of the current propertyProperty to use */ - private $index = 0; + private int $index = 0; /** * Instantiates this iterator with the propertyNode to iterate. @@ -146,7 +145,7 @@ public function getDefault() */ public function getFqsen(): Fqsen { - return $this->property->props[$this->index]->fqsen; + return $this->property->props[$this->index]->getAttribute('fqsen'); } /** diff --git a/src/phpDocumentor/Reflection/Php/Factory/Trait_.php b/src/phpDocumentor/Reflection/Php/Factory/Trait_.php index c636d592..2b85384f 100644 --- a/src/phpDocumentor/Reflection/Php/Factory/Trait_.php +++ b/src/phpDocumentor/Reflection/Php/Factory/Trait_.php @@ -40,7 +40,7 @@ public function matches(ContextStack $context, object $object): bool protected function doCreate(ContextStack $context, object $object, StrategyContainer $strategies): void { $trait = new TraitElement( - $object->fqsen, + $object->getAttribute('fqsen'), $this->createDocBlock($object->getDocComment(), $context->getTypeContext()), new Location($object->getLine()), new Location($object->getEndLine()) @@ -50,10 +50,6 @@ protected function doCreate(ContextStack $context, object $object, StrategyConta Assert::isInstanceOf($file, FileElement::class); $file->addTrait($trait); - if (!isset($object->stmts)) { - return; - } - foreach ($object->stmts as $stmt) { $thisContext = $context->push($trait); $strategy = $strategies->findMatching($thisContext, $stmt); diff --git a/src/phpDocumentor/Reflection/Php/File.php b/src/phpDocumentor/Reflection/Php/File.php index 82a04115..0cac87db 100644 --- a/src/phpDocumentor/Reflection/Php/File.php +++ b/src/phpDocumentor/Reflection/Php/File.php @@ -26,44 +26,39 @@ final class File implements MetaDataContainerInterface { use MetadataContainer; - /** @var DocBlock|null */ - private $docBlock = null; + private ?DocBlock $docBlock = null; - /** @var string */ - private $hash; + private string $hash; - /** @var string */ - private $name = null; + private string $name; - /** @var string */ - private $path = null; + private string $path; - /** @var string */ - private $source = null; + private string $source; /** @var Fqsen[] */ - private $namespaces = []; + private array $namespaces = []; /** @var string[] */ - private $includes = []; + private array $includes = []; /** @var Function_[] */ - private $functions = []; + private array $functions = []; /** @var Constant[] */ - private $constants = []; + private array $constants = []; /** @var Class_[] */ - private $classes = []; + private array $classes = []; /** @var Interface_[] */ - private $interfaces = []; + private array $interfaces = []; /** @var Trait_[] */ - private $traits = []; + private array $traits = []; /** @var Enum_[] */ - private $enums = []; + private array $enums = []; /** * Initializes a new file descriptor with the given hash of its contents. diff --git a/src/phpDocumentor/Reflection/Php/Function_.php b/src/phpDocumentor/Reflection/Php/Function_.php index 5d605546..6a478ffd 100644 --- a/src/phpDocumentor/Reflection/Php/Function_.php +++ b/src/phpDocumentor/Reflection/Php/Function_.php @@ -31,25 +31,20 @@ final class Function_ implements Element, MetaDataContainerInterface use MetadataContainer; /** @var Fqsen Full Qualified Structural Element Name */ - private $fqsen; + private Fqsen $fqsen; /** @var Argument[] */ - private $arguments = []; + private array $arguments = []; - /** @var DocBlock|null */ - private $docBlock; + private ?DocBlock $docBlock; - /** @var Location */ - private $location; + private Location $location; - /** @var Location */ - private $endLocation; + private Location $endLocation; - /** @var Type */ - private $returnType; + private Type $returnType; - /** @var bool */ - private $hasReturnByReference; + private bool $hasReturnByReference; /** * Initializes the object. diff --git a/src/phpDocumentor/Reflection/Php/Interface_.php b/src/phpDocumentor/Reflection/Php/Interface_.php index db1eb65b..5b32d008 100644 --- a/src/phpDocumentor/Reflection/Php/Interface_.php +++ b/src/phpDocumentor/Reflection/Php/Interface_.php @@ -28,25 +28,22 @@ final class Interface_ implements Element, MetaDataContainerInterface use MetadataContainer; /** @var Fqsen Full Qualified Structural Element Name */ - private $fqsen; + private Fqsen $fqsen; - /** @var DocBlock|null */ - private $docBlock; + private ?DocBlock $docBlock; /** @var Constant[] */ - private $constants = []; + private array $constants = []; /** @var Method[] */ - private $methods = []; + private array $methods = []; /** @var Fqsen[] */ - private $parents = []; + private array $parents = []; - /** @var Location */ - private $location; + private Location $location; - /** @var Location */ - private $endLocation; + private Location $endLocation; /** * Initializes the object. diff --git a/src/phpDocumentor/Reflection/Php/Method.php b/src/phpDocumentor/Reflection/Php/Method.php index f1aeeead..fd4a022f 100644 --- a/src/phpDocumentor/Reflection/Php/Method.php +++ b/src/phpDocumentor/Reflection/Php/Method.php @@ -29,37 +29,30 @@ final class Method implements Element, MetaDataContainerInterface use MetadataContainer; /** @var DocBlock|null documentation of this method. */ - private $docBlock = null; + private ?DocBlock $docBlock = null; /** @var Fqsen Full Qualified Structural Element Name */ - private $fqsen; + private Fqsen $fqsen; - /** @var bool */ - private $abstract = false; + private bool $abstract = false; - /** @var bool */ - private $final = false; + private bool $final = false; - /** @var bool */ - private $static = false; + private bool $static = false; /** @var Visibility|null visibility of this method */ - private $visibility = null; + private ?Visibility $visibility = null; /** @var Argument[] */ - private $arguments = []; + private array $arguments = []; - /** @var Location */ - private $location; + private Location $location; - /** @var Location */ - private $endLocation; + private Location $endLocation; - /** @var Type */ - private $returnType; + private Type $returnType; - /** @var bool */ - private $hasReturnByReference; + private bool $hasReturnByReference; /** * Initializes the all properties. diff --git a/src/phpDocumentor/Reflection/Php/Namespace_.php b/src/phpDocumentor/Reflection/Php/Namespace_.php index e3d35eed..04cbc400 100644 --- a/src/phpDocumentor/Reflection/Php/Namespace_.php +++ b/src/phpDocumentor/Reflection/Php/Namespace_.php @@ -29,32 +29,32 @@ final class Namespace_ implements Element, MetaDataContainerInterface /** * @var Fqsen Full Qualified Structural Element Name */ - private $fqsen; + private Fqsen $fqsen; /** * @var Fqsen[] fqsen of all functions in this namespace */ - private $functions = []; + private array $functions = []; /** * @var Fqsen[] fqsen of all constants in this namespace */ - private $constants = []; + private array $constants = []; /** * @var Fqsen[] fqsen of all classes in this namespace */ - private $classes = []; + private array $classes = []; /** * @var Fqsen[] fqsen of all interfaces in this namespace */ - private $interfaces = []; + private array $interfaces = []; /** * @var Fqsen[] fqsen of all traits in this namespace */ - private $traits = []; + private array $traits = []; /** * Initializes the namespace. diff --git a/src/phpDocumentor/Reflection/Php/NodesFactory.php b/src/phpDocumentor/Reflection/Php/NodesFactory.php index b9934b4d..3e270cd2 100644 --- a/src/phpDocumentor/Reflection/Php/NodesFactory.php +++ b/src/phpDocumentor/Reflection/Php/NodesFactory.php @@ -21,6 +21,7 @@ use PhpParser\NodeVisitor\NameResolver; use PhpParser\Parser; use PhpParser\ParserFactory; +use Webmozart\Assert\Assert; /** * Factory to create a array of nodes from a provided file. @@ -31,21 +32,17 @@ class NodesFactory { /** * Parser used to parse the code to nodes. - * - * @var Parser */ - private $parser; + private Parser $parser; /** * Containing a number of visitors to do some post processing steps on nodes. - * - * @var NodeTraverser */ - private $traverser; + private NodeTraverserInterface $traverser; /** * @param Parser $parser used to parse the code - * @param NodeTraverser $traverser used to do some post processing on the nodes + * @param NodeTraverserInterface $traverser used to do some post processing on the nodes */ final public function __construct(Parser $parser, NodeTraverserInterface $traverser) { @@ -89,6 +86,9 @@ public static function createInstance(int $kind = ParserFactory::PREFER_PHP7): s */ public function create(string $code): array { - return $this->traverser->traverse($this->parser->parse($code)); + $nodes = $this->parser->parse($code); + Assert::isArray($nodes); + + return $this->traverser->traverse($nodes); } } diff --git a/src/phpDocumentor/Reflection/Php/Project.php b/src/phpDocumentor/Reflection/Php/Project.php index 9e7e9f81..73b330c9 100644 --- a/src/phpDocumentor/Reflection/Php/Project.php +++ b/src/phpDocumentor/Reflection/Php/Project.php @@ -21,17 +21,15 @@ */ final class Project implements ProjectInterface { - /** @var string */ - private $name = ''; + private string $name = ''; - /** @var Namespace_|null */ - private $rootNamespace; + private ?Namespace_ $rootNamespace; /** @var File[] */ - private $files = []; + private array $files = []; /** @var Namespace_[] */ - private $namespaces = []; + private array $namespaces = []; /** * Initializes this descriptor. diff --git a/src/phpDocumentor/Reflection/Php/ProjectFactory.php b/src/phpDocumentor/Reflection/Php/ProjectFactory.php index 61eaf054..fea139d0 100644 --- a/src/phpDocumentor/Reflection/Php/ProjectFactory.php +++ b/src/phpDocumentor/Reflection/Php/ProjectFactory.php @@ -17,8 +17,22 @@ use phpDocumentor\Reflection\Exception; use phpDocumentor\Reflection\File as SourceFile; use phpDocumentor\Reflection\Fqsen; +use phpDocumentor\Reflection\Php\Factory\Argument; +use phpDocumentor\Reflection\Php\Factory\Class_; +use phpDocumentor\Reflection\Php\Factory\ClassConstant; +use phpDocumentor\Reflection\Php\Factory\ConstructorPromotion; use phpDocumentor\Reflection\Php\Factory\ContextStack; +use phpDocumentor\Reflection\Php\Factory\Define; +use phpDocumentor\Reflection\Php\Factory\Enum_; +use phpDocumentor\Reflection\Php\Factory\EnumCase; +use phpDocumentor\Reflection\Php\Factory\Function_; +use phpDocumentor\Reflection\Php\Factory\GlobalConstant; +use phpDocumentor\Reflection\Php\Factory\IfStatement; +use phpDocumentor\Reflection\Php\Factory\Interface_; +use phpDocumentor\Reflection\Php\Factory\Method; use phpDocumentor\Reflection\Php\Factory\Noop; +use phpDocumentor\Reflection\Php\Factory\Property; +use phpDocumentor\Reflection\Php\Factory\Trait_; use phpDocumentor\Reflection\Php\Factory\TraitUse; use phpDocumentor\Reflection\Project as ProjectInterface; use phpDocumentor\Reflection\ProjectFactory as ProjectFactoryInterface; @@ -33,8 +47,7 @@ */ final class ProjectFactory implements ProjectFactoryInterface { - /** @var ProjectFactoryStrategies */ - private $strategies; + private ProjectFactoryStrategies $strategies; /** * Initializes the factory with a number of strategies. @@ -53,31 +66,31 @@ public static function createInstance(): self { $docblockFactory = DocBlockFactory::createInstance(); - $methodStrategy = new Factory\Method($docblockFactory); + $methodStrategy = new Method($docblockFactory); $strategies = new ProjectFactoryStrategies( [ new \phpDocumentor\Reflection\Php\Factory\Namespace_(), - new Factory\Argument(new PrettyPrinter()), - new Factory\Class_($docblockFactory), - new Factory\Enum_($docblockFactory), - new Factory\EnumCase($docblockFactory, new PrettyPrinter()), - new Factory\Define($docblockFactory, new PrettyPrinter()), - new Factory\GlobalConstant($docblockFactory, new PrettyPrinter()), - new Factory\ClassConstant($docblockFactory, new PrettyPrinter()), + new Argument(new PrettyPrinter()), + new Class_($docblockFactory), + new Enum_($docblockFactory), + new EnumCase($docblockFactory, new PrettyPrinter()), + new Define($docblockFactory, new PrettyPrinter()), + new GlobalConstant($docblockFactory, new PrettyPrinter()), + new ClassConstant($docblockFactory, new PrettyPrinter()), new Factory\File($docblockFactory, NodesFactory::createInstance()), - new Factory\Function_($docblockFactory), - new Factory\Interface_($docblockFactory), + new Function_($docblockFactory), + new Interface_($docblockFactory), $methodStrategy, - new Factory\Property($docblockFactory, new PrettyPrinter()), - new Factory\Trait_($docblockFactory), - new Factory\IfStatement(), + new Property($docblockFactory, new PrettyPrinter()), + new Trait_($docblockFactory), + new IfStatement(), new TraitUse(), ] ); $strategies->addStrategy( - new Factory\ConstructorPromotion($methodStrategy, $docblockFactory, new PrettyPrinter()), + new ConstructorPromotion($methodStrategy, $docblockFactory, new PrettyPrinter()), 1100 ); $strategies->addStrategy(new Noop(), -PHP_INT_MAX); @@ -91,7 +104,7 @@ public function addStrategy( ProjectFactoryStrategy $strategy, int $priority = ProjectFactoryStrategies::DEFAULT_PRIORITY ): void { - $this->strategies->addStrategy($strategy); + $this->strategies->addStrategy($strategy, $priority); } /** diff --git a/src/phpDocumentor/Reflection/Php/ProjectFactoryStrategies.php b/src/phpDocumentor/Reflection/Php/ProjectFactoryStrategies.php index 6ea552b2..64b5d6ae 100644 --- a/src/phpDocumentor/Reflection/Php/ProjectFactoryStrategies.php +++ b/src/phpDocumentor/Reflection/Php/ProjectFactoryStrategies.php @@ -26,7 +26,7 @@ final class ProjectFactoryStrategies implements StrategyContainer { public const DEFAULT_PRIORITY = 1000; - /** @var SplPriorityQueue */ + /** @var SplPriorityQueue */ private $strategies; /** diff --git a/src/phpDocumentor/Reflection/Php/Property.php b/src/phpDocumentor/Reflection/Php/Property.php index a18df77d..326ab221 100644 --- a/src/phpDocumentor/Reflection/Php/Property.php +++ b/src/phpDocumentor/Reflection/Php/Property.php @@ -27,35 +27,26 @@ final class Property implements Element, MetaDataContainerInterface { use MetadataContainer; - /** @var Fqsen */ - private $fqsen; + private Fqsen $fqsen; - /** @var DocBlock|null */ - private $docBlock; + private ?DocBlock $docBlock; /** @var string[] $types */ - private $types = []; + private array $types = []; - /** @var string|null $default */ - private $default = null; + private ?string $default = null; - /** @var bool $static */ - private $static = false; + private bool $static = false; - /** @var Visibility|null $visibility */ - private $visibility = null; + private ?Visibility $visibility = null; - /** @var Location */ - private $location; + private Location $location; - /** @var Location */ - private $endLocation; + private Location $endLocation; - /** @var Type|null */ - private $type; + private ?Type $type; - /** @var bool */ - private $readOnly; + private bool $readOnly; /** * @param Visibility|null $visibility when null is provided a default 'public' is set. diff --git a/src/phpDocumentor/Reflection/Php/Trait_.php b/src/phpDocumentor/Reflection/Php/Trait_.php index ad174b13..851c1cbc 100644 --- a/src/phpDocumentor/Reflection/Php/Trait_.php +++ b/src/phpDocumentor/Reflection/Php/Trait_.php @@ -27,25 +27,25 @@ final class Trait_ implements Element, MetaDataContainerInterface use MetadataContainer; /** @var Fqsen Full Qualified Structural Element Name */ - private $fqsen; + private Fqsen $fqsen; - /** @var DocBlock|null */ - private $docBlock; + private ?DocBlock $docBlock; /** @var Property[] $properties */ - private $properties = []; + private array $properties = []; /** @var Method[] $methods */ - private $methods = []; + private array $methods = []; /** @var Fqsen[] $usedTraits References to traits consumed by this trait */ - private $usedTraits = []; + private array $usedTraits = []; - /** @var Location */ - private $location; + private Location $location; - /** @var Location */ - private $endLocation; + private Location $endLocation; + + /** @var Constant[] */ + private array $constants = []; /** * Initializes the all properties @@ -154,4 +154,22 @@ public function getEndLocation(): Location { return $this->endLocation; } + + /** + * Returns the constants of this class. + * + * @return Constant[] + */ + public function getConstants(): array + { + return $this->constants; + } + + /** + * Add Constant to this class. + */ + public function addConstant(Constant $constant): void + { + $this->constants[(string) $constant->getFqsen()] = $constant; + } } diff --git a/src/phpDocumentor/Reflection/Php/ValueEvaluator/ConstantEvaluator.php b/src/phpDocumentor/Reflection/Php/ValueEvaluator/ConstantEvaluator.php index fa03902a..d10747e0 100644 --- a/src/phpDocumentor/Reflection/Php/ValueEvaluator/ConstantEvaluator.php +++ b/src/phpDocumentor/Reflection/Php/ValueEvaluator/ConstantEvaluator.php @@ -7,8 +7,8 @@ use phpDocumentor\Reflection\Php\Factory\ContextStack; use PhpParser\ConstExprEvaluationException; use PhpParser\ConstExprEvaluator; -use PhpParser\Node; use PhpParser\Node\Expr; +use PhpParser\Node\Scalar\MagicConst\Namespace_; use function sprintf; @@ -21,9 +21,7 @@ final class ConstantEvaluator public function evaluate(Expr $expr, ContextStack $contextStack): string { // @codeCoverageIgnoreStart - $evaluator = new ConstExprEvaluator(function (Expr $expr) use ($contextStack) { - return $this->evaluateFallback($expr, $contextStack); - }); + $evaluator = new ConstExprEvaluator(fn (Expr $expr): string => $this->evaluateFallback($expr, $contextStack)); return $evaluator->evaluateSilently($expr); // @codeCoverageIgnoreEnd @@ -39,7 +37,7 @@ private function evaluateFallback(Expr $expr, ContextStack $contextStack): strin ); } - if ($expr instanceof Node\Scalar\MagicConst\Namespace_) { + if ($expr instanceof Namespace_) { return $typeContext->getNamespace(); } diff --git a/src/phpDocumentor/Reflection/Php/Visibility.php b/src/phpDocumentor/Reflection/Php/Visibility.php index 0255ad19..db793c15 100644 --- a/src/phpDocumentor/Reflection/Php/Visibility.php +++ b/src/phpDocumentor/Reflection/Php/Visibility.php @@ -39,7 +39,7 @@ final class Visibility public const PRIVATE_ = 'private'; /** @var string value can be public, protected or private */ - private $visibility; + private string $visibility; /** * Initializes the object. diff --git a/src/phpDocumentor/Reflection/Types/NamespaceNodeToContext.php b/src/phpDocumentor/Reflection/Types/NamespaceNodeToContext.php index 86194ef0..b6d3b316 100644 --- a/src/phpDocumentor/Reflection/Types/NamespaceNodeToContext.php +++ b/src/phpDocumentor/Reflection/Types/NamespaceNodeToContext.php @@ -54,13 +54,11 @@ private function aliasesToFullyQualifiedNames(Namespace_ $namespace): array private function classAlikeUses(Namespace_ $namespace): array { return array_filter( - $namespace->stmts ?? [], - static function (Node $node): bool { - return ( - $node instanceof Use_ - || $node instanceof GroupUse - ) && in_array($node->type, [Use_::TYPE_UNKNOWN, Use_::TYPE_NORMAL], true); - } + $namespace->stmts, + static fn (Node $node): bool => ( + $node instanceof Use_ + || $node instanceof GroupUse + ) && in_array($node->type, [Use_::TYPE_UNKNOWN, Use_::TYPE_NORMAL], true) ); } } diff --git a/tests/integration/EnumTest.php b/tests/integration/EnumTest.php index 84fb295b..8d42d1e4 100644 --- a/tests/integration/EnumTest.php +++ b/tests/integration/EnumTest.php @@ -20,6 +20,7 @@ final class EnumTest extends TestCase { const FILE = __DIR__ . '/data/Enums/base.php'; const BACKED_ENUM = __DIR__ . '/data/Enums/backedEnum.php'; + const ENUM_WITH_CONSTANT = __DIR__ . '/data/Enums/enumWithConstant.php'; const ENUM_CONSUMER = __DIR__ . '/data/Enums/EnumConsumer.php'; /** @var ProjectFactory */ @@ -36,6 +37,7 @@ protected function setUp() : void [ new LocalFile(self::FILE), new LocalFile(self::BACKED_ENUM), + new LocalFile(self::ENUM_WITH_CONSTANT), new LocalFile(self::ENUM_CONSUMER), ] ); @@ -53,6 +55,17 @@ public function testFileHasEnum(): void self::assertArrayHasKey('\MyNamespace\MyEnum::VALUE2', $enum->getCases()); } + public function testEnumWithConstant(): void + { + $file = $this->project->getFiles()[self::ENUM_WITH_CONSTANT]; + + $enum = $file->getEnums()['\MyNamespace\MyEnumWithConstant']; + self::assertInstanceOf(Enum_::class, $enum); + self::assertCount(1, $enum->getConstants()); + self::assertArrayHasKey('\MyNamespace\MyEnumWithConstant::MYCONST', $enum->getConstants()); + self::assertSame("'MyConstValue'", $enum->getConstants()['\MyNamespace\MyEnumWithConstant::MYCONST']->getValue()); + } + public function testBackedEnum(): void { $file = $this->project->getFiles()[self::BACKED_ENUM]; diff --git a/tests/integration/data/Enums/enumWithConstant.php b/tests/integration/data/Enums/enumWithConstant.php new file mode 100644 index 00000000..9df17bb8 --- /dev/null +++ b/tests/integration/data/Enums/enumWithConstant.php @@ -0,0 +1,10 @@ +expectException('InvalidArgumentException'); + $this->expectException(InvalidArgumentException::class); new LocalFile('aa'); } diff --git a/tests/unit/phpDocumentor/Reflection/Middleware/ChainFactoryTest.php b/tests/unit/phpDocumentor/Reflection/Middleware/ChainFactoryTest.php index 6855f856..ff90cfb2 100644 --- a/tests/unit/phpDocumentor/Reflection/Middleware/ChainFactoryTest.php +++ b/tests/unit/phpDocumentor/Reflection/Middleware/ChainFactoryTest.php @@ -36,7 +36,7 @@ public function testItCreatesAChainOfCallablesThatWillInvokeAllMiddlewares(): vo $chain = ChainFactory::createExecutionChain( [$middleware1, $middleware2], - static function () { + static function (): stdClass { $result = new stdClass(); $result->counter = 'a'; @@ -61,17 +61,14 @@ public function testItThrowsAnExceptionIfAnythingOtherThanAMiddlewareIsPassed(): ChainFactory::createExecutionChain( [$middleware], - static function () { - return new stdClass(); - } + static fn (): stdClass => new stdClass() ); } private function givenAMiddleware(string $exampleValue): Middleware { return new class ($exampleValue) implements Middleware { - /** @var string */ - private $exampleAddedValue; + private string $exampleAddedValue; public function __construct(string $exampleAddedValue) { diff --git a/tests/unit/phpDocumentor/Reflection/NodeVisitor/ElementNameResolverTest.php b/tests/unit/phpDocumentor/Reflection/NodeVisitor/ElementNameResolverTest.php index d49105a4..295ff4bd 100644 --- a/tests/unit/phpDocumentor/Reflection/NodeVisitor/ElementNameResolverTest.php +++ b/tests/unit/phpDocumentor/Reflection/NodeVisitor/ElementNameResolverTest.php @@ -36,8 +36,7 @@ */ class ElementNameResolverTest extends TestCase { - /** @var ElementNameResolver */ - private $fixture; + private ElementNameResolver $fixture; protected function setUp(): void { diff --git a/tests/unit/phpDocumentor/Reflection/Php/Class_Test.php b/tests/unit/phpDocumentor/Reflection/Php/Class_Test.php index 8c94db8f..29513963 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Class_Test.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Class_Test.php @@ -35,14 +35,11 @@ final class Class_Test extends TestCase { use MetadataContainerTest; - /** @var Fqsen */ - private $parent; + private Fqsen $parent; - /** @var Fqsen */ - private $fqsen; + private Fqsen $fqsen; - /** @var DocBlock */ - private $docBlock; + private DocBlock $docBlock; /** * Creates a new (emoty) fixture object. @@ -196,6 +193,27 @@ public function testGettingWhetherClassIsFinal(): void $this->assertTrue($class->isFinal()); } + /** + * @covers ::isFinal + */ + public function testGettingWhetherClassIsReadOnly(): void + { + $class = new Class_($this->fqsen, $this->docBlock); + $this->assertFalse($class->isReadOnly()); + + $class = new Class_( + $this->fqsen, + $this->docBlock, + null, + false, + false, + null, + null, + true + ); + $this->assertTrue($class->isReadOnly()); + } + public function testLineAndColumnNumberIsReturnedWhenALocationIsProvided(): void { $fixture = new Class_( diff --git a/tests/unit/phpDocumentor/Reflection/Php/ConstantTest.php b/tests/unit/phpDocumentor/Reflection/Php/ConstantTest.php index b334da07..40cf4144 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/ConstantTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/ConstantTest.php @@ -33,14 +33,11 @@ final class ConstantTest extends TestCase { use MetadataContainerTest; - /** @var Fqsen */ - private $fqsen; + private Fqsen $fqsen; - /** @var DocBlock */ - private $docBlock; + private DocBlock $docBlock; - /** @var string */ - private $value = 'Value'; + private string $value = 'Value'; /** * Creates a new (empty) fixture object. diff --git a/tests/unit/phpDocumentor/Reflection/Php/EnumCaseTest.php b/tests/unit/phpDocumentor/Reflection/Php/EnumCaseTest.php index 8911042d..d2f4dabe 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/EnumCaseTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/EnumCaseTest.php @@ -29,14 +29,11 @@ final class EnumCaseTest extends TestCase { use MetadataContainerTest; - /** @var EnumCase */ - private $fixture; + private EnumCase $fixture; - /** @var Fqsen */ - private $fqsen; + private Fqsen $fqsen; - /** @var DocBlock */ - private $docBlock; + private DocBlock $docBlock; /** * Creates a new (emoty) fixture object. diff --git a/tests/unit/phpDocumentor/Reflection/Php/Enum_Test.php b/tests/unit/phpDocumentor/Reflection/Php/Enum_Test.php index 90136f7d..727cfbd0 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Enum_Test.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Enum_Test.php @@ -33,14 +33,11 @@ final class Enum_Test extends TestCase { use MetadataContainerTest; - /** @var Fqsen */ - private $parent; + private Fqsen $parent; - /** @var Fqsen */ - private $fqsen; + private Fqsen $fqsen; - /** @var DocBlock */ - private $docBlock; + private DocBlock $docBlock; /** * Creates a new (emoty) fixture object. @@ -106,6 +103,21 @@ public function testAddAndGettingInterfaces(): void $this->assertSame(['\MyInterface' => $interface], $this->fixture->getInterfaces()); } + /** + * @covers ::addConstant + * @covers ::getConstants + */ + public function testAddAndGettingConstants(): void + { + $this->assertEmpty($this->fixture->getConstants()); + + $constant = new Constant(new Fqsen('\MyClass::MYCONST')); + + $this->fixture->addConstant($constant); + + $this->assertSame(['\MyClass::MYCONST' => $constant], $this->fixture->getConstants()); + } + /** * @covers ::addMethod * @covers ::getMethods diff --git a/tests/unit/phpDocumentor/Reflection/Php/Factory/ClassConstantIteratorTest.php b/tests/unit/phpDocumentor/Reflection/Php/Factory/ClassConstantIteratorTest.php index 522e9661..1597d257 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Factory/ClassConstantIteratorTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Factory/ClassConstantIteratorTest.php @@ -40,9 +40,9 @@ final class ClassConstantIteratorTest extends MockeryTestCase public function testIterateProps(): void { $const1 = new Const_('\Space\MyClass::MY_CONST1', new Variable('1')); - $const1->fqsen = new Fqsen((string) $const1->name); + $const1->setAttribute('fqsen', new Fqsen((string) $const1->name)); $const2 = new Const_('\Space\MyClass::MY_CONST2', new Variable('2')); - $const2->fqsen = new Fqsen((string) $const2->name); + $const2->setAttribute('fqsen', new Fqsen((string) $const2->name)); $classConstantNode = new ClassConst([$const1, $const2]); diff --git a/tests/unit/phpDocumentor/Reflection/Php/Factory/ClassConstantTest.php b/tests/unit/phpDocumentor/Reflection/Php/Factory/ClassConstantTest.php index 8d5dbb81..e0675cd1 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Factory/ClassConstantTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Factory/ClassConstantTest.php @@ -25,6 +25,7 @@ use PhpParser\Node\Stmt\Class_ as ClassNode; use PhpParser\Node\Stmt\ClassConst; use PhpParser\PrettyPrinter\Standard as PrettyPrinter; +use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; use stdClass; @@ -41,8 +42,9 @@ */ final class ClassConstantTest extends TestCase { - /** @var ObjectProphecy */ - private $docBlockFactory; + use ProphecyTrait; + + private ObjectProphecy $docBlockFactory; protected function setUp(): void { @@ -102,7 +104,7 @@ public function testCreateWithDocBlock(): void $this->docBlockFactory->create('text', null)->willReturn($docBlock); $const = new Const_('\Space\MyClass::MY_CONST1', new String_('a'), ['comments' => [$doc]]); - $const->fqsen = new Fqsen((string) $const->name); + $const->setAttribute('fqsen', new Fqsen((string) $const->name)); $constantStub = new ClassConst([$const], ClassNode::MODIFIER_PUBLIC); $class = $this->performCreate($constantStub); @@ -115,7 +117,7 @@ public function testCreateWithDocBlock(): void private function buildConstantIteratorStub(int $modifier = ClassNode::MODIFIER_PUBLIC): ClassConst { $const = new Const_('\Space\MyClass::MY_CONST1', new String_('a')); - $const->fqsen = new Fqsen((string) $const->name); + $const->setAttribute('fqsen', new Fqsen((string) $const->name)); return new ClassConst([$const], $modifier); } diff --git a/tests/unit/phpDocumentor/Reflection/Php/Factory/Class_Test.php b/tests/unit/phpDocumentor/Reflection/Php/Factory/Class_Test.php index 4916c430..10dd0592 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Factory/Class_Test.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Factory/Class_Test.php @@ -27,6 +27,7 @@ use PhpParser\Node\Stmt\Class_ as ClassNode; use PhpParser\Node\Stmt\ClassMethod; use Prophecy\Argument; +use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; use stdClass; @@ -49,8 +50,9 @@ */ final class Class_Test extends TestCase { - /** @var ObjectProphecy */ - private $docblockFactory; + use ProphecyTrait; + + private ObjectProphecy $docblockFactory; protected function setUp(): void { @@ -187,10 +189,13 @@ public function testCreateWithDocBlock(): void */ private function buildClassMock() { - $classMock = m::mock(ClassNode::class); - $classMock->fqsen = new Fqsen('\Space\MyClass'); + $classMock = m::mock(ClassNode::class); + $classMock->shouldReceive('getAttribute')->andReturn(new Fqsen('\Space\MyClass')); + $classMock->implements = []; + $classMock->stmts = []; $classMock->shouldReceive('isFinal')->andReturn(true); $classMock->shouldReceive('isAbstract')->andReturn(true); + $classMock->shouldReceive('isReadonly')->andReturn(true); $classMock->shouldReceive('getLine')->andReturn(1); $classMock->shouldReceive('getEndLine')->andReturn(2); diff --git a/tests/unit/phpDocumentor/Reflection/Php/Factory/ConstructorPromotionTest.php b/tests/unit/phpDocumentor/Reflection/Php/Factory/ConstructorPromotionTest.php index a5c7d93d..cdc16bd6 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Factory/ConstructorPromotionTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Factory/ConstructorPromotionTest.php @@ -23,6 +23,7 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\PrettyPrinter\Standard; use Prophecy\Argument; +use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; use stdClass; @@ -33,10 +34,10 @@ */ final class ConstructorPromotionTest extends TestCase { - /** @var ObjectProphecy */ - private $strategy; - /** @var ObjectProphecy */ - private $docblockFactory; + use ProphecyTrait; + + private ObjectProphecy $strategy; + private ObjectProphecy $docblockFactory; protected function setUp(): void { diff --git a/tests/unit/phpDocumentor/Reflection/Php/Factory/DefineTest.php b/tests/unit/phpDocumentor/Reflection/Php/Factory/DefineTest.php index 4201d113..271a7b9f 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Factory/DefineTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Factory/DefineTest.php @@ -27,6 +27,7 @@ use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\Expression; use PhpParser\PrettyPrinter\Standard as PrettyPrinter; +use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; use stdClass; @@ -42,8 +43,9 @@ */ final class DefineTest extends TestCase { - /** @var ObjectProphecy */ - private $docBlockFactory; + use ProphecyTrait; + + private ObjectProphecy $docBlockFactory; protected function setUp(): void { diff --git a/tests/unit/phpDocumentor/Reflection/Php/Factory/EnumCaseTest.php b/tests/unit/phpDocumentor/Reflection/Php/Factory/EnumCaseTest.php index fdeb5389..0920c8ce 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Factory/EnumCaseTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Factory/EnumCaseTest.php @@ -22,6 +22,7 @@ use phpDocumentor\Reflection\Php\StrategyContainer; use PhpParser\Node\Stmt\EnumCase as EnumCaseNode; use PhpParser\PrettyPrinter\Standard; +use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; use stdClass; @@ -34,8 +35,9 @@ */ final class EnumCaseTest extends TestCase { - /** @var ObjectProphecy */ - private $docblockFactory; + use ProphecyTrait; + + private ObjectProphecy $docblockFactory; protected function setUp(): void { @@ -66,7 +68,7 @@ public function testSimpleCreate(): void $enumMock = $this->buildEnumCaseMock(); $enumMock->getDocComment()->willReturn(null); - $result = $this->performCreate($enumMock->reveal(), $containerMock); + $result = $this->performCreate($enumMock->reveal()); self::assertInstanceOf(EnumElement::class, $result); self::assertEquals( @@ -93,8 +95,8 @@ private function performCreate(EnumCaseNode $enumCase): EnumElement private function buildEnumCaseMock(): ObjectProphecy { - $enumMock = $this->prophesize(EnumCaseNode::class); - $enumMock->fqsen = new Fqsen('\Space\MyEnum::VALUE'); + $enumMock = $this->prophesize(EnumCaseNode::class); + $enumMock->getAttribute('fqsen')->willReturn(new Fqsen('\Space\MyEnum::VALUE')); $enumMock->getLine()->willReturn(1); $enumMock->getEndLine()->willReturn(2); diff --git a/tests/unit/phpDocumentor/Reflection/Php/Factory/Enum_Test.php b/tests/unit/phpDocumentor/Reflection/Php/Factory/Enum_Test.php index 33be9149..b2527a1b 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Factory/Enum_Test.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Factory/Enum_Test.php @@ -30,6 +30,7 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Enum_ as EnumNode; use Prophecy\Argument; +use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; use stdClass; @@ -48,8 +49,9 @@ */ final class Enum_Test extends TestCase { - /** @var ObjectProphecy */ - private $docblockFactory; + use ProphecyTrait; + + private ObjectProphecy $docblockFactory; protected function setUp(): void { @@ -183,8 +185,10 @@ public function testCreateWithDocBlock(): void */ private function buildEnumMock() { - $enumMock = m::mock(EnumNode::class); - $enumMock->fqsen = new Fqsen('\Space\MyEnum'); + $enumMock = m::mock(EnumNode::class); + $enumMock->shouldReceive('getAttribute')->andReturn(new Fqsen('\Space\MyEnum')); + $enumMock->implements = []; + $enumMock->stmts = []; $enumMock->shouldReceive('getLine')->andReturn(1); $enumMock->shouldReceive('getEndLine')->andReturn(2); diff --git a/tests/unit/phpDocumentor/Reflection/Php/Factory/File/CreateCommandTest.php b/tests/unit/phpDocumentor/Reflection/Php/Factory/File/CreateCommandTest.php index ee9bce47..de40743f 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Factory/File/CreateCommandTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Factory/File/CreateCommandTest.php @@ -28,14 +28,11 @@ */ class CreateCommandTest extends TestCase { - /** @var CreateCommand */ - private $fixture; + private CreateCommand $fixture; - /** @var LocalFile */ - private $file; + private LocalFile $file; - /** @var ProjectFactoryStrategies */ - private $strategies; + private ProjectFactoryStrategies $strategies; protected function setUp(): void { diff --git a/tests/unit/phpDocumentor/Reflection/Php/Factory/FileTest.php b/tests/unit/phpDocumentor/Reflection/Php/Factory/FileTest.php index 5441fa60..0144af23 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Factory/FileTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Factory/FileTest.php @@ -13,6 +13,7 @@ namespace phpDocumentor\Reflection\Php\Factory; +use InvalidArgumentException; use Mockery as m; use phpDocumentor\Reflection\DocBlock as DocBlockDescriptor; use phpDocumentor\Reflection\DocBlockFactoryInterface; @@ -30,6 +31,7 @@ use PhpParser\Node\Stmt\Class_ as ClassNode; use PhpParser\Node\Stmt\Namespace_ as NamespaceNode; use Prophecy\Argument; +use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; use stdClass; @@ -59,11 +61,11 @@ */ final class FileTest extends TestCase { - /** @var ObjectProphecy */ - private $nodesFactoryMock; + use ProphecyTrait; - /** @var ObjectProphecy */ - private $docBlockFactory; + private ObjectProphecy $nodesFactoryMock; + + private ObjectProphecy $docBlockFactory; protected function setUp(): void { @@ -106,7 +108,7 @@ public function testMiddlewareIsExecuted(): void public function testMiddlewareIsChecked(): void { - $this->expectException('InvalidArgumentException'); + $this->expectException(InvalidArgumentException::class); new File($this->docBlockFactory->reveal(), $this->nodesFactoryMock->reveal(), [new stdClass()]); } @@ -138,14 +140,14 @@ public function nodeProvider(): array { $docBlockNode = new DocBlockNode('Text'); $namespaceNode = new NamespaceNode(new Name('mySpace')); - $namespaceNode->fqsen = new Fqsen('\mySpace'); + $namespaceNode->getAttribute('fsqen', new Fqsen('\mySpace')); $namespaceNode->setAttribute('comments', [$docBlockNode]); $classNode = new ClassNode('myClass'); $classNode->setAttribute('comments', [$docBlockNode, new DocBlockNode('')]); $namespaceNode2 = new NamespaceNode(new Name('mySpace')); - $namespaceNode2->fqsen = new Fqsen('\mySpace'); + $namespaceNode2->getAttribute('fsqen', new Fqsen('\mySpace')); $namespaceNode2->setAttribute('comments', [new CommentNode('@codingStandardsIgnoreStart'), $docBlockNode]); return [ diff --git a/tests/unit/phpDocumentor/Reflection/Php/Factory/Function_Test.php b/tests/unit/phpDocumentor/Reflection/Php/Factory/Function_Test.php index fb1af334..7952b853 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Factory/Function_Test.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Factory/Function_Test.php @@ -27,6 +27,7 @@ use PhpParser\Node\Param; use PhpParser\Node\Stmt\Expression; use Prophecy\Argument; +use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; use stdClass; @@ -45,8 +46,9 @@ */ final class Function_Test extends TestCase { - /** @var ObjectProphecy */ - private $docBlockFactory; + use ProphecyTrait; + + private ObjectProphecy $docBlockFactory; protected function setUp(): void { @@ -72,7 +74,7 @@ public function testMatches(): void public function testCreateWithoutParameters(): void { $functionMock = $this->prophesize(\PhpParser\Node\Stmt\Function_::class); - $functionMock->fqsen = new Fqsen('\SomeSpace::function()'); + $functionMock->getAttribute('fqsen')->willReturn(new Fqsen('\SomeSpace::function()')); $functionMock->params = []; $functionMock->getDocComment()->willReturn(null); $functionMock->getLine()->willReturn(1); @@ -96,7 +98,7 @@ public function testCreateWithParameters(): void { $param1 = new Param(new Variable('param1')); $functionMock = $this->prophesize(\PhpParser\Node\Stmt\Function_::class); - $functionMock->fqsen = new Fqsen('\SomeSpace::function()'); + $functionMock->getAttribute('fqsen')->willReturn(new Fqsen('\SomeSpace::function()')); $functionMock->params = [$param1]; $functionMock->getDocComment()->willReturn(null); $functionMock->getLine()->willReturn(1); @@ -107,9 +109,7 @@ public function testCreateWithParameters(): void $containerMock = $this->prophesize(StrategyContainer::class); $containerMock->findMatching(Argument::type(ContextStack::class), $param1)->willReturn($argumentStrategy); $argumentStrategy->create( - Argument::that(function ($agument) { - return $agument->peek() instanceof FunctionDescriptor; - }), + Argument::that(fn ($agument): bool => $agument->peek() instanceof FunctionDescriptor), $param1, $containerMock->reveal() )->shouldBeCalled(); @@ -135,7 +135,7 @@ public function testCreateWithDocBlock(): void { $doc = new Doc('Text'); $functionMock = $this->prophesize(\PhpParser\Node\Stmt\Function_::class); - $functionMock->fqsen = new Fqsen('\SomeSpace::function()'); + $functionMock->getAttribute('fqsen')->willReturn(new Fqsen('\SomeSpace::function()')); $functionMock->params = []; $functionMock->getDocComment()->willReturn($doc); $functionMock->getLine()->willReturn(1); @@ -162,7 +162,7 @@ public function testIteratesStatements(): void { $doc = new Doc('Text'); $functionMock = $this->prophesize(\PhpParser\Node\Stmt\Function_::class); - $functionMock->fqsen = new Fqsen('\SomeSpace::function()'); + $functionMock->getAttribute('fqsen')->willReturn(new Fqsen('\SomeSpace::function()')); $functionMock->params = []; $functionMock->getDocComment()->willReturn(null); $functionMock->getLine()->willReturn(1); diff --git a/tests/unit/phpDocumentor/Reflection/Php/Factory/GlobalConstantIteratorTest.php b/tests/unit/phpDocumentor/Reflection/Php/Factory/GlobalConstantIteratorTest.php index 750372bd..49a67365 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Factory/GlobalConstantIteratorTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Factory/GlobalConstantIteratorTest.php @@ -38,9 +38,9 @@ final class GlobalConstantIteratorTest extends m\Adapter\Phpunit\MockeryTestCase public function testIterateProps(): void { $const1 = new Const_('\Space\MY_CONST1', new Variable('a')); - $const1->fqsen = new Fqsen((string) $const1->name); + $const1->setAttribute('fqsen', new Fqsen((string) $const1->name)); $const2 = new Const_('\Space\MY_CONST2', new Variable('b')); - $const2->fqsen = new Fqsen((string) $const2->name); + $const2->setAttribute('fqsen', new Fqsen((string) $const2->name)); $globalConstantNode = new ConstStatement([$const1, $const2]); diff --git a/tests/unit/phpDocumentor/Reflection/Php/Factory/GlobalConstantTest.php b/tests/unit/phpDocumentor/Reflection/Php/Factory/GlobalConstantTest.php index 76f0a161..4c2d26a4 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Factory/GlobalConstantTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Factory/GlobalConstantTest.php @@ -26,6 +26,7 @@ use PhpParser\Node\Scalar\String_; use PhpParser\Node\Stmt\Const_ as ConstStatement; use PhpParser\PrettyPrinter\Standard as PrettyPrinter; +use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; use stdClass; @@ -42,8 +43,9 @@ */ final class GlobalConstantTest extends TestCase { - /** @var ObjectProphecy */ - private $docBlockFactory; + use ProphecyTrait; + + private ObjectProphecy $docBlockFactory; protected function setUp(): void { @@ -76,7 +78,7 @@ public function testCreateWithDocBlock(): void $docBlock = new DocBlockDescriptor(''); $const = new Const_('\Space\MyClass\MY_CONST1', new String_('a'), ['comments' => [$doc]]); - $const->fqsen = new Fqsen((string) $const->name); + $const->setAttribute('fqsen', new Fqsen((string) $const->name)); $constantStub = new ConstStatement([$const]); $containerMock = m::mock(StrategyContainer::class); @@ -93,7 +95,7 @@ public function testCreateWithDocBlock(): void private function buildConstantIteratorStub(): ConstStatement { $const = new Const_('\Space\MyClass\MY_CONST1', new String_('a')); - $const->fqsen = new Fqsen((string) $const->name); + $const->setAttribute('fqsen', new Fqsen((string) $const->name)); return new ConstStatement([$const]); } diff --git a/tests/unit/phpDocumentor/Reflection/Php/Factory/Interface_Test.php b/tests/unit/phpDocumentor/Reflection/Php/Factory/Interface_Test.php index deebdd63..dea74ded 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Factory/Interface_Test.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Factory/Interface_Test.php @@ -26,6 +26,7 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Interface_ as InterfaceNode; use Prophecy\Argument; +use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; use stdClass; @@ -46,8 +47,9 @@ */ class Interface_Test extends TestCase { - /** @var ObjectProphecy */ - private $docBlockFactory; + use ProphecyTrait; + + private ObjectProphecy $docBlockFactory; protected function setUp(): void { @@ -137,8 +139,9 @@ public function testIteratesStatements(): void private function buildClassMock() { $interfaceMock = m::mock(InterfaceNode::class); - $interfaceMock->fqsen = new Fqsen('\Space\MyInterface'); $interfaceMock->extends = []; + $interfaceMock->stmts = []; + $interfaceMock->shouldReceive('getAttribute')->andReturn(new Fqsen('\Space\MyInterface')); $interfaceMock->shouldReceive('getLine')->andReturn(1); $interfaceMock->shouldReceive('getEndLine')->andReturn(2); diff --git a/tests/unit/phpDocumentor/Reflection/Php/Factory/MethodTest.php b/tests/unit/phpDocumentor/Reflection/Php/Factory/MethodTest.php index 96089d4c..f2a278ff 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Factory/MethodTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Factory/MethodTest.php @@ -30,6 +30,7 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Expression; use Prophecy\Argument; +use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; use stdClass; @@ -49,8 +50,9 @@ */ class MethodTest extends TestCase { - /** @var ObjectProphecy */ - private $docBlockFactory; + use ProphecyTrait; + + private ObjectProphecy $docBlockFactory; protected function setUp(): void { @@ -135,9 +137,7 @@ public function testCreateWithParameters(): void )->willReturn($argumentStrategy); $argumentStrategy->create( - Argument::that(static function ($agument) { - return $agument->peek() instanceof MethodDescriptor; - }), + Argument::that(static fn ($agument): bool => $agument->peek() instanceof MethodDescriptor), $param1, $containerMock->reveal() )->shouldBeCalled(); @@ -186,7 +186,7 @@ private function buildClassMethodMock(): MockInterface { $methodMock = m::mock(ClassMethod::class); $methodMock->name = 'function'; - $methodMock->fqsen = new Fqsen('\SomeSpace\Class::function()'); + $methodMock->shouldReceive('getAttribute')->andReturn(new Fqsen('\SomeSpace\Class::function()')); $methodMock->params = []; $methodMock->shouldReceive('isStatic')->once()->andReturn(true); diff --git a/tests/unit/phpDocumentor/Reflection/Php/Factory/Namespace_Test.php b/tests/unit/phpDocumentor/Reflection/Php/Factory/Namespace_Test.php index 5c8f4048..a88e19a5 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Factory/Namespace_Test.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Factory/Namespace_Test.php @@ -4,6 +4,7 @@ namespace phpDocumentor\Reflection\Php\Factory; +use InvalidArgumentException; use phpDocumentor\Reflection\Fqsen; use phpDocumentor\Reflection\Php\Class_ as ClassElement; use phpDocumentor\Reflection\Php\File; @@ -13,6 +14,7 @@ use PhpParser\Node\Stmt\Class_ as ClassNode; use PhpParser\Node\Stmt\Namespace_ as NamespaceNode; use Prophecy\Argument; +use Prophecy\PhpUnit\ProphecyTrait; use stdClass; use function current; @@ -22,6 +24,8 @@ */ final class Namespace_Test extends TestCase { + use ProphecyTrait; + protected function setUp(): void { $this->fixture = new Namespace_(); @@ -44,7 +48,7 @@ public function testMatches(): void */ public function testCreateThrowsException(): void { - $this->expectException('InvalidArgumentException'); + $this->expectException(InvalidArgumentException::class); $this->fixture->create( self::createContext(null), new stdClass(), @@ -62,7 +66,7 @@ public function testIteratesStatements(): void $strategyMock = $this->prophesize(ProjectFactoryStrategy::class); $containerMock = $this->prophesize(StrategyContainer::class); $namespace = new NamespaceNode(new Name('MyNamespace')); - $namespace->fqsen = new Fqsen('\MyNamespace'); + $namespace->setAttribute('fqsen', new Fqsen('\MyNamespace')); $namespace->stmts = [$class]; $strategyMock->create(Argument::type(ContextStack::class), $class, $containerMock) @@ -83,6 +87,6 @@ public function testIteratesStatements(): void $this->assertInstanceOf(ClassElement::class, $class); $this->assertEquals('\MyClass', (string) $class->getFqsen()); - $this->assertSame($namespace->fqsen, $fqsen); + $this->assertEquals(new Fqsen('\MyNamespace'), $fqsen); } } diff --git a/tests/unit/phpDocumentor/Reflection/Php/Factory/PropertyTest.php b/tests/unit/phpDocumentor/Reflection/Php/Factory/PropertyTest.php index a675c22c..e4d83571 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Factory/PropertyTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Factory/PropertyTest.php @@ -25,6 +25,7 @@ use PhpParser\Node\Stmt\Property as PropertyNode; use PhpParser\Node\Stmt\PropertyProperty; use PhpParser\PrettyPrinter\Standard as PrettyPrinter; +use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; use stdClass; @@ -42,8 +43,9 @@ */ final class PropertyTest extends TestCase { - /** @var ObjectProphecy */ - private $docBlockFactory; + use ProphecyTrait; + + private ObjectProphecy $docBlockFactory; protected function setUp(): void { @@ -94,7 +96,7 @@ public function testCreateWithDocBlock(): void $this->docBlockFactory->create('text', null)->willReturn($docBlock); $property = new PropertyProperty('property', new String_('MyDefault'), ['comments' => [$doc]]); - $property->fqsen = new Fqsen('\myClass::$property'); + $property->setAttribute('fqsen', new Fqsen('\myClass::$property')); $node = new PropertyNode(ClassNode::MODIFIER_PRIVATE | ClassNode::MODIFIER_STATIC, [$property]); $class = $this->performCreate($node); $property = current($class->getProperties()); @@ -105,8 +107,8 @@ public function testCreateWithDocBlock(): void private function buildPropertyMock(int $modifier): PropertyNode { - $property = new PropertyProperty('property', new String_('MyDefault')); - $property->fqsen = new Fqsen('\myClass::$property'); + $property = new PropertyProperty('property', new String_('MyDefault')); + $property->setAttribute('fqsen', new Fqsen('\myClass::$property')); return new PropertyNode($modifier | ClassNode::MODIFIER_STATIC, [$property]); } diff --git a/tests/unit/phpDocumentor/Reflection/Php/Factory/TestCase.php b/tests/unit/phpDocumentor/Reflection/Php/Factory/TestCase.php index 25a6735c..6ca49fbd 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Factory/TestCase.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Factory/TestCase.php @@ -13,6 +13,7 @@ namespace phpDocumentor\Reflection\Php\Factory; +use InvalidArgumentException; use Mockery as m; use Mockery\Adapter\Phpunit\MockeryTestCase; use phpDocumentor\Reflection\Php\Project; @@ -42,7 +43,7 @@ public static function createContext(?Context $typeContext = null): ContextStack */ public function testCreateThrowsException(): void { - $this->expectException('InvalidArgumentException'); + $this->expectException(InvalidArgumentException::class); $this->fixture->create(self::createContext(null), new stdClass(), m::mock(StrategyContainer::class)); } } diff --git a/tests/unit/phpDocumentor/Reflection/Php/Factory/Trait_Test.php b/tests/unit/phpDocumentor/Reflection/Php/Factory/Trait_Test.php index 19bdbbe2..9f3227cf 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Factory/Trait_Test.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Factory/Trait_Test.php @@ -26,6 +26,7 @@ use PhpParser\Node\Stmt\ClassMethod; use PhpParser\Node\Stmt\Trait_ as TraitNode; use Prophecy\Argument; +use Prophecy\PhpUnit\ProphecyTrait; use Prophecy\Prophecy\ObjectProphecy; use stdClass; @@ -44,8 +45,9 @@ */ final class Trait_Test extends TestCase { - /** @var ObjectProphecy */ - private $docBlockFactory; + use ProphecyTrait; + + private ObjectProphecy $docBlockFactory; protected function setUp(): void { @@ -132,7 +134,8 @@ public function testCreateWithDocBlock(): void private function buildTraitMock() { $mock = m::mock(TraitNode::class); - $mock->fqsen = new Fqsen('\Space\MyTrait'); + $mock->shouldReceive('getAttribute')->andReturn(new Fqsen('\Space\MyTrait')); + $mock->stmts = []; $mock->shouldReceive('getLine')->andReturn(1); $mock->shouldReceive('getEndLine')->andReturn(2); diff --git a/tests/unit/phpDocumentor/Reflection/Php/FileTest.php b/tests/unit/phpDocumentor/Reflection/Php/FileTest.php index 14d1d3a5..7fb07916 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/FileTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/FileTest.php @@ -42,11 +42,9 @@ final class FileTest extends TestCase public const EXAMPLE_SOURCE = 'a-source-string'; - /** @var File $fixture */ - protected $fixture; + protected File $fixture; - /** @var DocBlock */ - private $docBlock; + private DocBlock $docBlock; /** * Creates a new (emoty) fixture object. diff --git a/tests/unit/phpDocumentor/Reflection/Php/Function_Test.php b/tests/unit/phpDocumentor/Reflection/Php/Function_Test.php index 71bbefb7..056b2e4c 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Function_Test.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Function_Test.php @@ -35,11 +35,9 @@ final class Function_Test extends TestCase { use MetadataContainerTest; - /** @var Fqsen */ - private $fqsen; + private Fqsen $fqsen; - /** @var DocBlock */ - private $docBlock; + private DocBlock $docBlock; /** * Creates a new (empty) fixture object. diff --git a/tests/unit/phpDocumentor/Reflection/Php/Interface_Test.php b/tests/unit/phpDocumentor/Reflection/Php/Interface_Test.php index 6dc14cea..029945b7 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Interface_Test.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Interface_Test.php @@ -36,14 +36,12 @@ final class Interface_Test extends TestCase { use MetadataContainerTest; - /** @var Fqsen */ - private $fqsen; + private Fqsen $fqsen; - /** @var DocBlock */ - private $docBlock; + private DocBlock $docBlock; /** @var Fqsen[] */ - private $exampleParents; + private array $exampleParents; /** * Creates a new (empty) fixture object. diff --git a/tests/unit/phpDocumentor/Reflection/Php/MetadataStub.php b/tests/unit/phpDocumentor/Reflection/Php/MetadataStub.php index b46f3efc..31b8619e 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/MetadataStub.php +++ b/tests/unit/phpDocumentor/Reflection/Php/MetadataStub.php @@ -8,8 +8,7 @@ final class MetadataStub implements Metadata { - /** @var string */ - private $key; + private string $key; public function __construct(string $key) { diff --git a/tests/unit/phpDocumentor/Reflection/Php/MethodTest.php b/tests/unit/phpDocumentor/Reflection/Php/MethodTest.php index ba70cd5c..e51a5cff 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/MethodTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/MethodTest.php @@ -33,14 +33,11 @@ final class MethodTest extends TestCase { use MetadataContainerTest; - /** @var Fqsen */ - private $fqsen; + private Fqsen $fqsen; - /** @var Visibility */ - private $visibility; + private Visibility $visibility; - /** @var DocBlock */ - private $docblock; + private DocBlock $docblock; protected function setUp(): void { diff --git a/tests/unit/phpDocumentor/Reflection/Php/Namespace_Test.php b/tests/unit/phpDocumentor/Reflection/Php/Namespace_Test.php index 5df1ce0c..5173d63b 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Namespace_Test.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Namespace_Test.php @@ -32,11 +32,9 @@ class Namespace_Test extends TestCase /** @var Namespace_ $fixture */ protected $fixture; - /** @var Fqsen */ - private $fqsen; + private Fqsen $fqsen; - /** @var DocBlock */ - private $docBlock; + private DocBlock $docBlock; /** * Creates a new (emoty) fixture object. diff --git a/tests/unit/phpDocumentor/Reflection/Php/NodesFactoryTest.php b/tests/unit/phpDocumentor/Reflection/Php/NodesFactoryTest.php index 47c75a1c..0c266647 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/NodesFactoryTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/NodesFactoryTest.php @@ -21,6 +21,7 @@ use PhpParser\Parser; use PhpParser\ParserFactory; use PHPUnit\Framework\TestCase; +use Prophecy\PhpUnit\ProphecyTrait; /** * @coversDefaultClass \phpDocumentor\Reflection\Php\NodesFactory @@ -29,6 +30,8 @@ */ final class NodesFactoryTest extends TestCase { + use ProphecyTrait; + /** * Tests that an instance of the NodesFactory can be made using its static factory method. * diff --git a/tests/unit/phpDocumentor/Reflection/Php/ProjectFactoryStrategiesTest.php b/tests/unit/phpDocumentor/Reflection/Php/ProjectFactoryStrategiesTest.php index 26d6ef6e..52dc93d4 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/ProjectFactoryStrategiesTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/ProjectFactoryStrategiesTest.php @@ -13,6 +13,7 @@ namespace phpDocumentor\Reflection\Php; +use OutOfBoundsException; use phpDocumentor\Reflection\Php\Factory\ContextStack; use phpDocumentor\Reflection\Php\Factory\DummyFactoryStrategy; use phpDocumentor\Reflection\Types\Context; @@ -58,7 +59,7 @@ public function testFindMatching(): void */ public function testCreateThrowsExceptionWhenStrategyNotFound(): void { - $this->expectException('OutOfBoundsException'); + $this->expectException(OutOfBoundsException::class); $container = new ProjectFactoryStrategies([]); $container->findMatching( new ContextStack(new Project('name'), new Context('global')), diff --git a/tests/unit/phpDocumentor/Reflection/Php/ProjectFactoryTest.php b/tests/unit/phpDocumentor/Reflection/Php/ProjectFactoryTest.php index 2cc8bb9c..b0044885 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/ProjectFactoryTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/ProjectFactoryTest.php @@ -14,11 +14,13 @@ namespace phpDocumentor\Reflection\Php; use Mockery\Adapter\Phpunit\MockeryTestCase; +use OutOfBoundsException; use phpDocumentor\Reflection\Exception; use phpDocumentor\Reflection\File\LocalFile; use phpDocumentor\Reflection\Fqsen; use phpDocumentor\Reflection\Php\Factory\ContextStack; use Prophecy\Argument as ProphesizeArgument; +use Prophecy\PhpUnit\ProphecyTrait; use function array_keys; use function assert; @@ -44,6 +46,8 @@ */ final class ProjectFactoryTest extends MockeryTestCase { + use ProphecyTrait; + /** * Tests whether a factory can be instantiated using recommended factories. * @@ -128,7 +132,7 @@ public function testCreate(): void */ public function testCreateThrowsExceptionWhenStrategyNotFound(): void { - $this->expectException('OutOfBoundsException'); + $this->expectException(OutOfBoundsException::class); $projectFactory = new ProjectFactory([]); $projectFactory->create('MyProject', ['aa']); } diff --git a/tests/unit/phpDocumentor/Reflection/Php/ProjectTest.php b/tests/unit/phpDocumentor/Reflection/Php/ProjectTest.php index b2f4a4b8..34cc37da 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/ProjectTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/ProjectTest.php @@ -27,8 +27,7 @@ class ProjectTest extends TestCase { public const EXAMPLE_NAME = 'Initial name'; - /** @var Project */ - private $fixture; + private Project $fixture; /** * Initializes the fixture object. diff --git a/tests/unit/phpDocumentor/Reflection/Php/PropertyTest.php b/tests/unit/phpDocumentor/Reflection/Php/PropertyTest.php index 0f14ea04..ba05b9d9 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/PropertyTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/PropertyTest.php @@ -31,14 +31,11 @@ final class PropertyTest extends TestCase { use MetadataContainerTest; - /** @var Fqsen */ - private $fqsen; + private Fqsen $fqsen; - /** @var Visibility */ - private $visibility; + private Visibility $visibility; - /** @var DocBlock */ - private $docBlock; + private DocBlock $docBlock; protected function setUp(): void { diff --git a/tests/unit/phpDocumentor/Reflection/Php/Trait_Test.php b/tests/unit/phpDocumentor/Reflection/Php/Trait_Test.php index 49ea91e8..edad4a34 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/Trait_Test.php +++ b/tests/unit/phpDocumentor/Reflection/Php/Trait_Test.php @@ -28,11 +28,9 @@ final class Trait_Test extends TestCase { use MetadataContainerTest; - /** @var Fqsen */ - private $fqsen; + private Fqsen $fqsen; - /** @var DocBlock */ - private $docBlock; + private DocBlock $docBlock; /** * Creates a new (empty) fixture object. @@ -110,6 +108,21 @@ public function testAddAndGettingUsedTrait(): void $this->assertSame(['\MyTrait' => $trait], $this->fixture->getUsedTraits()); } + /** + * @covers ::getConstants + * @covers ::addConstant + */ + public function testAddAndGettingConstants(): void + { + $this->assertEmpty($this->fixture->getConstants()); + + $constant = new Constant(new Fqsen('\MyClass::MY_CONSTANT')); + + $this->fixture->addConstant($constant); + + $this->assertSame(['\MyClass::MY_CONSTANT' => $constant], $this->fixture->getConstants()); + } + /** * @covers ::getDocBlock */ diff --git a/tests/unit/phpDocumentor/Reflection/Php/VisibilityTest.php b/tests/unit/phpDocumentor/Reflection/Php/VisibilityTest.php index 4f587067..c15b4071 100644 --- a/tests/unit/phpDocumentor/Reflection/Php/VisibilityTest.php +++ b/tests/unit/phpDocumentor/Reflection/Php/VisibilityTest.php @@ -13,6 +13,7 @@ namespace phpDocumentor\Reflection\Php; +use InvalidArgumentException; use PHPUnit\Framework\TestCase; /** @@ -52,7 +53,7 @@ public function visibilityProvider(): array */ public function testVisibilityChecksInput(): void { - $this->expectException('InvalidArgumentException'); + $this->expectException(InvalidArgumentException::class); new Visibility('fooBar'); } }