diff --git a/Makefile b/Makefile index 272b3d6c..e698bd6c 100644 --- a/Makefile +++ b/Makefile @@ -4,11 +4,11 @@ help: ## Displays this list of targets with descriptions .PHONY: code-style code-style: - docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.1-cli vendor/bin/phpcs + docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.2-cli vendor/bin/phpcs .PHONY: fix-code-style fix-code-style: - docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.1-cli vendor/bin/phpcbf + docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.2-cli vendor/bin/phpcbf .PHONY: static-code-analysis static-code-analysis: #vendor ## Runs a static code analysis with phpstan/phpstan and vimeo/psalm @@ -17,19 +17,19 @@ static-code-analysis: #vendor ## Runs a static code analysis with phpstan/phpsta .PHONY: test test: test-unit test-functional ## Runs all test suites with phpunit/phpunit - docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.1-cli vendor/bin/phpunit + docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.2-cli 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:8.1-cli vendor/bin/phpunit --testsuite=unit + docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.2-cli 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:8.1-cli vendor/bin/phpunit --testsuite=integration + docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.2-cli vendor/bin/phpunit --testsuite=integration .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:8.1-cli .phive/composer-require-checker check --config-file=/opt/project/composer-require-checker.json + docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.2-cli .phive/composer-require-checker check --config-file=/opt/project/composer-require-checker.json vendor: composer.json composer.lock composer validate --no-check-publish @@ -37,11 +37,11 @@ vendor: composer.json composer.lock .PHONY: benchmark benchmark: - docker run -it --rm -v${CURDIR}:/opt/project -w /opt/project php:8.1-cli tools/phpbench run + docker run -it --rm -v${CURDIR}:/opt/project -w /opt/project php:8.2-cli tools/phpbench run .PHONY: rector rector: ## Refactor code using rector - docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.1-cli vendor/bin/rector process + docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:8.2-cli vendor/bin/rector process .PHONY: pre-commit-test pre-commit-test: fix-code-style test code-style static-code-analysis diff --git a/composer.json b/composer.json index 2d2251ff..b80aa213 100644 --- a/composer.json +++ b/composer.json @@ -24,12 +24,12 @@ } }, "require": { - "php": "8.1.*|8.2.*|8.3.*|8.4.*|8.5.*", + "php": "8.2.*|8.3.*|8.4.*|8.5.*", "composer-runtime-api": "^2", "nikic/php-parser": "~4.18 || ^5.0", "phpdocumentor/reflection-common": "^2.1", - "phpdocumentor/reflection-docblock": "^5", - "phpdocumentor/type-resolver": "^1.4", + "phpdocumentor/reflection-docblock": "^6.0", + "phpdocumentor/type-resolver": "^2.0", "symfony/polyfill-php80": "^1.28", "webmozart/assert": "^1.7" }, @@ -54,7 +54,7 @@ }, "sort-packages": true, "platform": { - "php": "8.1.0" + "php": "8.2.0" }, "allow-plugins": { "phpstan/extension-installer": true, diff --git a/composer.lock b/composer.lock index eff0f0d0..40581765 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0010ed34ce9f76cf33b741087103f1c6", + "content-hash": "19526189d3e4c4735734fabf8e0efca0", "packages": [ { "name": "doctrine/deprecations", @@ -167,16 +167,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.6.6", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "5cee1d3dfc2d2aa6599834520911d246f656bcb8" + "reference": "2f5cbed597cb261d1ea458f3da3a9ad32e670b1e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/5cee1d3dfc2d2aa6599834520911d246f656bcb8", - "reference": "5cee1d3dfc2d2aa6599834520911d246f656bcb8", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/2f5cbed597cb261d1ea458f3da3a9ad32e670b1e", + "reference": "2f5cbed597cb261d1ea458f3da3a9ad32e670b1e", "shasum": "" }, "require": { @@ -184,8 +184,8 @@ "ext-filter": "*", "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.7", - "phpstan/phpdoc-parser": "^1.7|^2.0", + "phpdocumentor/type-resolver": "^2.0", + "phpstan/phpdoc-parser": "^2.0", "webmozart/assert": "^1.9.1 || ^2" }, "require-dev": { @@ -195,7 +195,8 @@ "phpstan/phpstan-mockery": "^1.1", "phpstan/phpstan-webmozart-assert": "^1.2", "phpunit/phpunit": "^9.5", - "psalm/phar": "^5.26" + "psalm/phar": "^5.26", + "shipmonk/dead-code-detector": "^0.5.1" }, "type": "library", "extra": { @@ -225,44 +226,44 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.6" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/6.0.1" }, - "time": "2025-12-22T21:13:58+00:00" + "time": "2026-01-20T15:30:42+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.12.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "92a98ada2b93d9b201a613cb5a33584dde25f195" + "reference": "327a05bbee54120d4786a0dc67aad30226ad4cf9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/92a98ada2b93d9b201a613cb5a33584dde25f195", - "reference": "92a98ada2b93d9b201a613cb5a33584dde25f195", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/327a05bbee54120d4786a0dc67aad30226ad4cf9", + "reference": "327a05bbee54120d4786a0dc67aad30226ad4cf9", "shasum": "" }, "require": { "doctrine/deprecations": "^1.0", - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.0", - "phpstan/phpdoc-parser": "^1.18|^2.0" + "phpstan/phpdoc-parser": "^2.0" }, "require-dev": { "ext-tokenizer": "*", "phpbench/phpbench": "^1.2", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-phpunit": "^1.1", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-phpunit": "^2.0", "phpunit/phpunit": "^9.5", - "rector/rector": "^0.13.9", - "vimeo/psalm": "^4.25" + "psalm/phar": "^4" }, "type": "library", "extra": { "branch-alias": { - "dev-1.x": "1.x-dev" + "dev-1.x": "1.x-dev", + "dev-2.x": "2.x-dev" } }, "autoload": { @@ -283,9 +284,9 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.12.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/2.0.0" }, - "time": "2025-11-21T15:09:14+00:00" + "time": "2026-01-06T21:53:42+00:00" }, { "name": "phpstan/phpdoc-parser", @@ -1120,30 +1121,31 @@ }, { "name": "phpspec/prophecy", - "version": "v1.22.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "35f1adb388946d92e6edab2aa2cb2b60e132ebd5" + "reference": "0da07c10d5fe64cd0c748f0523b47599400f2ed1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/35f1adb388946d92e6edab2aa2cb2b60e132ebd5", - "reference": "35f1adb388946d92e6edab2aa2cb2b60e132ebd5", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/0da07c10d5fe64cd0c748f0523b47599400f2ed1", + "reference": "0da07c10d5fe64cd0c748f0523b47599400f2ed1", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2 || ^2.0", - "php": "^7.4 || 8.0.* || 8.1.* || 8.2.* || 8.3.* || 8.4.*", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0", - "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0" + "php": "8.2.* || 8.3.* || 8.4.* || 8.5.*", + "phpdocumentor/reflection-docblock": "^5.2 || ^6.0", + "sebastian/comparator": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0", + "sebastian/recursion-context": "^3.0 || ^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0", + "symfony/deprecation-contracts": "^2.5 || ^3.1" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.40", - "phpspec/phpspec": "^6.0 || ^7.0", - "phpstan/phpstan": "^2.1.13", - "phpunit/phpunit": "^8.0 || ^9.0 || ^10.0" + "php-cs-fixer/shim": "^3.93.1", + "phpspec/phpspec": "^6.0 || ^7.0 || ^8.0", + "phpstan/phpstan": "^2.1.13, <2.1.34 || ^2.1.39", + "phpunit/phpunit": "^11.0 || ^12.0 || ^13.0" }, "type": "library", "extra": { @@ -1184,9 +1186,9 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.22.0" + "source": "https://github.com/phpspec/prophecy/tree/v1.26.0" }, - "time": "2025-04-29T14:58:06+00:00" + "time": "2026-02-24T15:40:48+00:00" }, { "name": "phpspec/prophecy-phpunit", @@ -3021,6 +3023,73 @@ ], "time": "2025-11-04T16:30:35+00:00" }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "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/v3.6.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": "2024-09-25T14:21:43+00:00" + }, { "name": "theseer/tokenizer", "version": "1.3.1", @@ -3078,12 +3147,12 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "8.1.*|8.2.*|8.3.*|8.4.*|8.5.*", + "php": "8.2.*|8.3.*|8.4.*|8.5.*", "composer-runtime-api": "^2" }, "platform-dev": {}, "platform-overrides": { - "php": "8.1.0" + "php": "8.2.0" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.9.0" } diff --git a/phpcs.xml.dist b/phpcs.xml.dist index 99089501..0430ba0b 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -9,7 +9,7 @@ - + diff --git a/tests/integration/PHP8/UnionTypesTest.php b/tests/integration/PHP8/UnionTypesTest.php index bebfae04..c76fd2ce 100644 --- a/tests/integration/PHP8/UnionTypesTest.php +++ b/tests/integration/PHP8/UnionTypesTest.php @@ -8,13 +8,11 @@ use phpDocumentor\Reflection\Fqsen; use phpDocumentor\Reflection\Php\Project; use phpDocumentor\Reflection\Php\ProjectFactory; -use phpDocumentor\Reflection\Types\False_; +use phpDocumentor\Reflection\PseudoTypes\False_; use phpDocumentor\Reflection\Types\Compound; use phpDocumentor\Reflection\Types\Integer; -use phpDocumentor\Reflection\Types\Mixed_; use phpDocumentor\Reflection\Types\Null_; use phpDocumentor\Reflection\Types\Object_; -use phpDocumentor\Reflection\Types\Static_; use phpDocumentor\Reflection\Types\String_; use PHPUnit\Framework\TestCase;