diff --git a/tests/PackageUpdater.php b/tests/PackageUpdater.php index 9d73d81ee0..aa3ed0c6d7 100644 --- a/tests/PackageUpdater.php +++ b/tests/PackageUpdater.php @@ -68,7 +68,7 @@ private function processFile(string $file): void $this->updatePackageVersion($library, $composer); } catch (Throwable $e) { - $this->errors[] = "Error processing $file: " . $e->getMessage(); + $this->errors[] = "Error processing $file: " . $e->getMessage() . PHP_EOL . $e->getTraceAsString(); } } @@ -91,7 +91,9 @@ private function findComposerFile(string $className, string $file): ?string { foreach (['getAppIndexScript', 'getConsoleScript'] as $method) { if (method_exists($className, $method)) { - $dir = dirname(call_user_func([$className, $method])); + $scriptPath = call_user_func([$className, $method]); + if (!$scriptPath) continue; + $dir = dirname($scriptPath); while (basename($dir) !== 'Frameworks') { $possible = "$dir/composer.json"; if (file_exists($possible)) { @@ -178,6 +180,7 @@ private function displaySummary(): void foreach ($this->errors as $error) { echo "- $error\n"; } + exit(1); } } }