diff --git a/bin/roave-infection-static-analysis-plugin b/bin/roave-infection-static-analysis-plugin index c989a6a..5fda677 100755 --- a/bin/roave-infection-static-analysis-plugin +++ b/bin/roave-infection-static-analysis-plugin @@ -5,9 +5,9 @@ declare(strict_types=1); namespace Roave\InfectionStaticAnalysis\Application; +use Composer\InstalledVersions; use Infection\Console\Application; use Infection\Container; -use PackageVersions\Versions; use Psalm\Config; use Psalm\Internal\Analyzer\ProjectAnalyzer; use Psalm\Internal\IncludeCollector; @@ -52,11 +52,11 @@ use function var_export; require_once $projectPath . '/vendor/autoload.php'; if (! defined('PSALM_VERSION')) { - define('PSALM_VERSION', Versions::getVersion('vimeo/psalm')); + define('PSALM_VERSION', InstalledVersions::getVersion('vimeo/psalm')); } if (! defined('PHP_PARSER_VERSION')) { - define('PHP_PARSER_VERSION', Versions::getVersion('nikic/php-parser')); + define('PHP_PARSER_VERSION', InstalledVersions::getVersion('nikic/php-parser')); } /** @var list */ diff --git a/composer.json b/composer.json index 4904519..5b8a0e8 100644 --- a/composer.json +++ b/composer.json @@ -13,11 +13,11 @@ "bin/roave-infection-static-analysis-plugin" ], "require": { - "php": "~8.1.0 || ~8.2.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "composer-runtime-api": "^2.2", "infection/infection": "0.27.0", - "ocramius/package-versions": "^2.7.0", "sanmai/later": "^0.1.2", - "vimeo/psalm": "^4.30.0 || ^5.0.0" + "vimeo/psalm": "^4.30.0 || ^5.15" }, "require-dev": { "doctrine/coding-standard": "^12.0.0", diff --git a/composer.lock b/composer.lock index 26a3118..4c30603 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": "a1050ba22bbaa6a2de2946120b721d47", + "content-hash": "3bddba2046d78032a81f2c21aae4f6a1", "packages": [ { "name": "amphp/amp", @@ -1213,68 +1213,6 @@ }, "time": "2023-08-13T19:53:39+00:00" }, - { - "name": "ocramius/package-versions", - "version": "2.7.0", - "source": { - "type": "git", - "url": "https://github.com/Ocramius/PackageVersions.git", - "reference": "065921ed7cb2a6861443d91138d0a4378316af8d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/065921ed7cb2a6861443d91138d0a4378316af8d", - "reference": "065921ed7cb2a6861443d91138d0a4378316af8d", - "shasum": "" - }, - "require": { - "composer-runtime-api": "^2.2.0", - "php": "~8.1.0 || ~8.2.0" - }, - "replace": { - "composer/package-versions-deprecated": "*" - }, - "require-dev": { - "composer/composer": "^2.4.4", - "doctrine/coding-standard": "^10.0.0", - "ext-zip": "^1.15.0", - "phpunit/phpunit": "^9.5.26", - "roave/infection-static-analysis-plugin": "^1.25.0", - "vimeo/psalm": "^4.29.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "Provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/Ocramius/PackageVersions/issues", - "source": "https://github.com/Ocramius/PackageVersions/tree/2.7.0" - }, - "funding": [ - { - "url": "https://github.com/Ocramius", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/ocramius/package-versions", - "type": "tidelift" - } - ], - "time": "2022-10-31T12:51:46+00:00" - }, { "name": "ondram/ci-detector", "version": "4.1.0", @@ -4828,11 +4766,12 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "~8.1.0 || ~8.2.0" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "composer-runtime-api": "^2.2" }, "platform-dev": [], "platform-overrides": { "php": "8.1.99" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } diff --git a/test/unit/Roave/InfectionStaticAnalysisTest/Psalm/RunStaticAnalysisAgainstMutantTest.php b/test/unit/Roave/InfectionStaticAnalysisTest/Psalm/RunStaticAnalysisAgainstMutantTest.php index 528a0c5..6dd6dc1 100644 --- a/test/unit/Roave/InfectionStaticAnalysisTest/Psalm/RunStaticAnalysisAgainstMutantTest.php +++ b/test/unit/Roave/InfectionStaticAnalysisTest/Psalm/RunStaticAnalysisAgainstMutantTest.php @@ -4,11 +4,11 @@ namespace Roave\InfectionStaticAnalysisTest\Psalm; +use Composer\InstalledVersions; use Infection\Mutant\Mutant; use Infection\Mutation\Mutation; use Infection\Mutation\MutationAttributeKeys; use Infection\PhpParser\MutatedNode; -use PackageVersions\Versions; use PHPUnit\Framework\TestCase; use Psalm\Config; use Psalm\Internal\Analyzer\ProjectAnalyzer; @@ -110,11 +110,11 @@ function hasMethod(object $input, string $method): bool { file_put_contents($repeatedDeclaredClassSymbolPath, $declaredClassSymbol); if (! defined('PSALM_VERSION')) { - define('PSALM_VERSION', Versions::getVersion('vimeo/psalm')); + define('PSALM_VERSION', InstalledVersions::getVersion('vimeo/psalm')); } if (! defined('PHP_PARSER_VERSION')) { - define('PHP_PARSER_VERSION', Versions::getVersion('nikic/php-parser')); + define('PHP_PARSER_VERSION', InstalledVersions::getVersion('nikic/php-parser')); } RuntimeCaches::clearAll();