1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00

Merge pull request #7337 from orklah/broken-phar

replace class name by full FQN for scoper
This commit is contained in:
orklah 2022-01-07 21:58:14 +01:00 committed by GitHub
commit abd499c9c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 5 deletions

View File

@ -2,7 +2,6 @@
namespace Psalm\Internal\Cli;
use Composer\InstalledVersions;
use OutOfBoundsException;
use Psalm\Internal\CliUtils;
use Psalm\Internal\PluginManager\Command\DisableCommand;
@ -32,7 +31,9 @@ final class Plugin
$version = null;
try {
$version = InstalledVersions::getVersion('vimeo/psalm') ;
// 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) {
}

View File

@ -3,7 +3,6 @@
namespace Psalm\Internal;
use Composer\Autoload\ClassLoader;
use Composer\InstalledVersions;
use OutOfBoundsException;
use Phar;
use Psalm\Config;
@ -149,12 +148,16 @@ final class CliUtils
$version = null;
try {
$version = InstalledVersions::getVersion('vimeo/psalm') ;
// 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');
define('PHP_PARSER_VERSION', InstalledVersions::getVersion('nikic/php-parser'));
// 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'));
return $first_autoloader;
}