Skip to content
Permalink
Browse files

Fix #935 - allow Phar to run without composer files

  • Loading branch information...
muglug committed Apr 20, 2019
1 parent 764678d commit 79ae72d5535bce34f692a6f0e0c423f54c2d7aa5
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/Psalm/Config.php
  2. +2 −2 src/command_functions.php
@@ -841,7 +841,7 @@ public static function getInstance()
/**
* @return void
*/
public function setComposerClassLoader(ClassLoader $loader)
public function setComposerClassLoader(ClassLoader $loader = null)
{
$this->composer_class_loader = $loader;
}
@@ -7,7 +7,7 @@
*
* @psalm-suppress MixedInferred
*
* @return \Composer\Autoload\ClassLoader
* @return ?\Composer\Autoload\ClassLoader
*/
function requireAutoloaders($current_dir, $has_explicit_root, $vendor_dir)
{
@@ -86,7 +86,7 @@ function requireAutoloaders($current_dir, $has_explicit_root, $vendor_dir)
}
}
if ($first_autoloader === null) {
if ($first_autoloader === null && !$in_phar) {
if (!$autoload_files) {
echo 'Failed to find a valid Composer autoloader' . "\n";
} else {

0 comments on commit 79ae72d

Please sign in to comment.
You can’t perform that action at this time.