mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Move from deprecated Composer 1 to Composer 2 runtime api
This commit is contained in:
parent
10167a223a
commit
19c26f7263
@ -22,9 +22,9 @@
|
||||
"ext-libxml": "*",
|
||||
"ext-mbstring": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"composer-runtime-api": "^2.0.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",
|
||||
@ -49,7 +49,7 @@
|
||||
"phpmyadmin/sql-parser": "5.1.0||dev-master",
|
||||
"phpspec/prophecy": ">=1.9.0",
|
||||
"phpunit/phpunit": "^9.0",
|
||||
"psalm/plugin-phpunit": "^0.16",
|
||||
"psalm/plugin-phpunit": "^0.16.1",
|
||||
"slevomat/coding-standard": "^7.0",
|
||||
"squizlabs/php_codesniffer": "^3.5",
|
||||
"symfony/process": "^4.3 || ^5.0 || ^6.0",
|
||||
|
@ -58,7 +58,6 @@
|
||||
</DeprecatedMethod>
|
||||
<DeprecatedClass>
|
||||
<errorLevel type="suppress">
|
||||
<referencedClass name="PackageVersions\Versions"/>
|
||||
<referencedClass name="Psalm\Plugin\Hook\*" />
|
||||
</errorLevel>
|
||||
</DeprecatedClass>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Psalm\Internal\Cli;
|
||||
|
||||
use PackageVersions\Versions;
|
||||
use Composer\InstalledVersions;
|
||||
use Psalm\Internal\CliUtils;
|
||||
use Psalm\Internal\PluginManager\Command\DisableCommand;
|
||||
use Psalm\Internal\PluginManager\Command\EnableCommand;
|
||||
@ -29,7 +29,7 @@ final class Plugin
|
||||
$vendor_dir = CliUtils::getVendorDir($current_dir);
|
||||
CliUtils::requireAutoloaders($current_dir, false, $vendor_dir);
|
||||
|
||||
$app = new Application('psalm-plugin', Versions::getVersion('vimeo/psalm'));
|
||||
$app = new Application('psalm-plugin', InstalledVersions::getVersion('vimeo/psalm') ?? 'UNKNOWN');
|
||||
|
||||
$psalm_root = dirname(__DIR__, 4) . DIRECTORY_SEPARATOR;
|
||||
|
||||
|
@ -3,14 +3,13 @@
|
||||
namespace Psalm\Internal;
|
||||
|
||||
use Composer\Autoload\ClassLoader;
|
||||
use PackageVersions\Versions;
|
||||
use Composer\InstalledVersions;
|
||||
use Phar;
|
||||
use Psalm\Config;
|
||||
use Psalm\Config\Creator;
|
||||
use Psalm\Exception\ConfigException;
|
||||
use Psalm\Exception\ConfigNotFoundException;
|
||||
use Psalm\Internal\Analyzer\ProjectAnalyzer;
|
||||
use Psalm\Internal\Composer;
|
||||
use Psalm\Report;
|
||||
|
||||
use function array_slice;
|
||||
@ -147,8 +146,8 @@ final class CliUtils
|
||||
exit(1);
|
||||
}
|
||||
|
||||
define('PSALM_VERSION', Versions::getVersion('vimeo/psalm'));
|
||||
define('PHP_PARSER_VERSION', Versions::getVersion('nikic/php-parser'));
|
||||
define('PSALM_VERSION', InstalledVersions::getVersion('vimeo/psalm'));
|
||||
define('PHP_PARSER_VERSION', InstalledVersions::getVersion('nikic/php-parser'));
|
||||
|
||||
return $first_autoloader;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user