mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Merge branch '4.18.x' into 4.x
This commit is contained in:
commit
3502f0460a
@ -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.1",
|
||||
"psalm/plugin-phpunit": "^0.16",
|
||||
"slevomat/coding-standard": "^7.0",
|
||||
"squizlabs/php_codesniffer": "^3.5",
|
||||
"symfony/process": "^4.3 || ^5.0 || ^6.0",
|
||||
|
@ -58,6 +58,7 @@
|
||||
</DeprecatedMethod>
|
||||
<DeprecatedClass>
|
||||
<errorLevel type="suppress">
|
||||
<referencedClass name="PackageVersions\Versions"/>
|
||||
<referencedClass name="Psalm\Plugin\Hook\*" />
|
||||
</errorLevel>
|
||||
</DeprecatedClass>
|
||||
|
@ -27,13 +27,6 @@ return [
|
||||
$contents
|
||||
);
|
||||
},
|
||||
function ($filePath, $prefix, $contents) {
|
||||
return str_replace(
|
||||
'\\'.$prefix.'\Composer\InstalledVersions',
|
||||
'\Composer\InstalledVersions',
|
||||
$contents
|
||||
);
|
||||
},
|
||||
function ($filePath, $prefix, $contents) {
|
||||
if (strpos($filePath, 'src/Psalm') === 0) {
|
||||
return str_replace(
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace Psalm\Internal\Cli;
|
||||
|
||||
use OutOfBoundsException;
|
||||
use PackageVersions\Versions;
|
||||
use Psalm\Internal\CliUtils;
|
||||
use Psalm\Internal\PluginManager\Command\DisableCommand;
|
||||
use Psalm\Internal\PluginManager\Command\EnableCommand;
|
||||
@ -29,15 +29,7 @@ final class Plugin
|
||||
$vendor_dir = CliUtils::getVendorDir($current_dir);
|
||||
CliUtils::requireAutoloaders($current_dir, false, $vendor_dir);
|
||||
|
||||
$version = null;
|
||||
try {
|
||||
// we ignore the FQN because of a hack in scoper.inc that needs full path
|
||||
// phpcs:ignore SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName
|
||||
$version = \Composer\InstalledVersions::getVersion('vimeo/psalm') ;
|
||||
} catch (OutOfBoundsException $e) {
|
||||
}
|
||||
|
||||
$app = new Application('psalm-plugin', $version ?? 'UNKNOWN');
|
||||
$app = new Application('psalm-plugin', Versions::getVersion('vimeo/psalm'));
|
||||
|
||||
$psalm_root = dirname(__DIR__, 4) . DIRECTORY_SEPARATOR;
|
||||
|
||||
|
@ -3,13 +3,14 @@
|
||||
namespace Psalm\Internal;
|
||||
|
||||
use Composer\Autoload\ClassLoader;
|
||||
use OutOfBoundsException;
|
||||
use PackageVersions\Versions;
|
||||
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;
|
||||
@ -146,18 +147,8 @@ final class CliUtils
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$version = null;
|
||||
try {
|
||||
// we ignore the FQN because of a hack in scoper.inc that needs full path
|
||||
// phpcs:ignore SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName
|
||||
$version = \Composer\InstalledVersions::getVersion('vimeo/psalm') ;
|
||||
} catch (OutOfBoundsException $e) {
|
||||
}
|
||||
|
||||
define('PSALM_VERSION', $version ?? 'UNKNOWN');
|
||||
// we ignore the FQN because of a hack in scoper.inc that needs full path
|
||||
// phpcs:ignore SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly.ReferenceViaFullyQualifiedName
|
||||
define('PHP_PARSER_VERSION', \Composer\InstalledVersions::getVersion('nikic/php-parser'));
|
||||
define('PSALM_VERSION', Versions::getVersion('vimeo/psalm'));
|
||||
define('PHP_PARSER_VERSION', Versions::getVersion('nikic/php-parser'));
|
||||
|
||||
return $first_autoloader;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user