1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Update Box

This commit is contained in:
Théo FIDRY 2018-05-05 01:43:43 +01:00 committed by Matthew Brown
parent 59d32566d2
commit 1ecf1c4113
4 changed files with 19 additions and 18 deletions

2
.gitignore vendored
View File

@ -1,4 +1,4 @@
/bin/psalm.phar
/build/
/vendor/
/.DS_Store
/.php_cs.cache

View File

@ -1,11 +1,6 @@
#!/usr/bin/env bash
if ! php -r 'extension_loaded("bz2") or exit(1);' ; then
echo "You need to install (or enable) bz2 php extension"
exit 1
fi
composer bin box install
vendor/bin/box compile
bin/psalm.phar --config=bin/phar.psalm.xml --root=src
build/psalm.phar --config=bin/phar.psalm.xml

View File

@ -1,16 +1,12 @@
{
"main" : "psalm",
"output" : "bin/psalm.phar",
"directories" : [
"assets",
"src",
"vendor"
],
"files" : [
"composer.json",
"composer.lock",
"config.xsd"
"output" : "build/psalm.phar",
"files": [
"src/command_functions.php",
"src/psalm.php",
"src/psalter.php"
],
"files-bin": ["config.xsd"],
"directories-bin" : ["assets"],
"intercept" : false,
"compactors" : [
"KevinGH\\Box\\Compactor\\PhpScoper"

View File

@ -18,6 +18,13 @@ return [
return $contents;
},
function ($filePath, $prefix, $contents) {
return str_replace(
'\\'.$prefix.'\Composer\Autoload\ClassLoader',
'\Composer\Autoload\ClassLoader',
$contents
);
},
function ($filePath, $prefix, $contents) {
if ($filePath === realpath(__DIR__ . '/src/Psalm/Config.php')) {
return str_replace(
@ -108,4 +115,7 @@ return [
return $contents;
},
],
'whitelist' => [
\Composer\Autoload\ClassLoader::class,
]
];