mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 12:24:49 +01:00
Fix #748 - correct paths that stopped working
This commit is contained in:
parent
185877276c
commit
fabe60ab68
@ -12,5 +12,5 @@
|
||||
"KevinGH\\Box\\Compactor\\PhpScoper"
|
||||
],
|
||||
"chmod" : "0755",
|
||||
"compression": "GZ"
|
||||
"compression": "NONE"
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ return [
|
||||
//
|
||||
// PHP-Parser patch
|
||||
//
|
||||
if ($filePath === realpath(__DIR__ . '/vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php')) {
|
||||
if ($filePath === 'vendor/nikic/php-parser/lib/PhpParser/NodeAbstract.php') {
|
||||
$length = 15 + strlen($prefix) + 1;
|
||||
|
||||
return preg_replace(
|
||||
@ -26,7 +26,7 @@ return [
|
||||
);
|
||||
},
|
||||
function ($filePath, $prefix, $contents) {
|
||||
if ($filePath === realpath(__DIR__ . '/src/Psalm/Config.php')) {
|
||||
if ($filePath === 'src/Psalm/Config.php') {
|
||||
return str_replace(
|
||||
$prefix . '\Composer\Autoload\ClassLoader',
|
||||
'Composer\Autoload\ClassLoader',
|
||||
@ -37,7 +37,7 @@ return [
|
||||
return $contents;
|
||||
},
|
||||
function ($filePath, $prefix, $contents) {
|
||||
if (strpos($filePath, realpath(__DIR__ . '/src/Psalm')) === 0) {
|
||||
if (strpos($filePath, 'src/Psalm') === 0) {
|
||||
return str_replace(
|
||||
[' \\Psalm\\', ' \\PhpParser\\'],
|
||||
[' \\' . $prefix . '\\Psalm\\', ' \\' . $prefix . '\\PhpParser\\'],
|
||||
@ -48,7 +48,7 @@ return [
|
||||
return $contents;
|
||||
},
|
||||
function ($filePath, $prefix, $contents) {
|
||||
if (strpos($filePath, realpath(__DIR__ . '/vendor/openlss')) === 0) {
|
||||
if (strpos($filePath, 'vendor/openlss') === 0) {
|
||||
return str_replace(
|
||||
$prefix . '\\DomDocument',
|
||||
'DomDocument',
|
||||
@ -59,10 +59,10 @@ return [
|
||||
return $contents;
|
||||
},
|
||||
function ($filePath, $prefix, $contents) {
|
||||
if ($filePath === realpath(__DIR__ . '/src/Psalm/PropertyMap.php')
|
||||
|| $filePath === realpath(__DIR__ . '/src/Psalm/CallMap.php')
|
||||
|| $filePath === realpath(__DIR__ . '/src/Psalm/Stubs/CoreGenericFunctions.php')
|
||||
|| $filePath === realpath(__DIR__ . '/src/Psalm/Stubs/CoreGenericClasses.php')
|
||||
if ($filePath === 'src/Psalm/PropertyMap.php'
|
||||
|| $filePath === 'src/Psalm/CallMap.php'
|
||||
|| $filePath === 'src/Psalm/Stubs/CoreGenericFunctions.php'
|
||||
|| $filePath === 'src/Psalm/Stubs/CoreGenericClasses.php'
|
||||
) {
|
||||
$contents = str_replace(
|
||||
['namespace ' . $prefix . ';', $prefix . '\\\\', $prefix . '\\'],
|
||||
@ -82,7 +82,7 @@ return [
|
||||
return $contents;
|
||||
},
|
||||
function ($filePath, $prefix, $contents) {
|
||||
if ($filePath === realpath(__DIR__ . '/src/Psalm/Checker/Statements/Expression/Call/MethodCallChecker.php')) {
|
||||
if ($filePath === 'src/Psalm/Checker/Statements/Expression/Call/MethodCallChecker.php') {
|
||||
return str_replace(
|
||||
'case \'Psalm\\\\',
|
||||
'case \'' . $prefix . '\\\\Psalm\\\\',
|
||||
@ -93,7 +93,7 @@ return [
|
||||
return $contents;
|
||||
},
|
||||
function ($filePath, $prefix, $contents) {
|
||||
if ($filePath === realpath(__DIR__ . '/src/Psalm/Type.php')) {
|
||||
if ($filePath === 'src/Psalm/Type.php') {
|
||||
return str_replace(
|
||||
'get_class($type) === \'Psalm\\\\',
|
||||
'get_class($type) === \'' . $prefix . '\\\\Psalm\\\\',
|
||||
@ -104,7 +104,7 @@ return [
|
||||
return $contents;
|
||||
},
|
||||
function ($filePath, $prefix, $contents) {
|
||||
if ($filePath === realpath(__DIR__ . '/src/psalm.php')) {
|
||||
if ($filePath === 'src/psalm.php') {
|
||||
return str_replace(
|
||||
'\\' . $prefix . '\\PSALM_VERSION',
|
||||
'PSALM_VERSION',
|
||||
|
Loading…
Reference in New Issue
Block a user