Skip to content

Commit

Permalink
Revert "Fix composer autoloader project path"
Browse files Browse the repository at this point in the history
This reverts commit 8fad6d5.
  • Loading branch information
ondrejmirtes committed Jul 14, 2024
1 parent 062d8a0 commit f16d85a
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions bin/phpstan
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,7 @@ use Symfony\Component\Console\Helper\ProgressBar;
}

$autoloadProjectAutoloaderFile = function (string $file) use (&$composerAutoloaderProjectPaths): void {
$path = realpath(dirname(__DIR__) . $file);
if ($path === false) {
return;
}

$path = dirname(__DIR__) . $file;
if (!extension_loaded('phar')) {
if (@is_file($path)) {
$composerAutoloaderProjectPaths[] = dirname($path, 2);
Expand All @@ -113,8 +109,8 @@ use Symfony\Component\Console\Helper\ProgressBar;
require_once $path;
}
} else {
$path = realpath(dirname($pharPath) . $file);
if ($path !== false && @is_file($path)) {
$path = dirname($pharPath) . $file;
if (@is_file($path)) {
$composerAutoloaderProjectPaths[] = dirname($path, 2);

require_once $path;
Expand Down

0 comments on commit f16d85a

Please sign in to comment.