AutoloadGenerator: Send error HTTP status on error - update tests
parent
b83b186ac0
commit
6f1761fe18
|
@ -8,7 +8,8 @@ if (!(PHP_VERSION_ID >= 70200)) {
|
||||||
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.0". You are running ' . PHP_VERSION . '.';
|
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.0". You are running ' . PHP_VERSION . '.';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($issues) {
|
if ($issues && !headers_sent()) {
|
||||||
|
header('HTTP/1.1 500 Internal Server Error');
|
||||||
echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues) . "\n\n";
|
echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues) . "\n\n";
|
||||||
exit(104);
|
exit(104);
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,8 @@ if ($missingExtensions) {
|
||||||
$issues[] = 'Your Composer dependencies require the following PHP extensions to be installed: ' . implode(', ', $missingExtensions);
|
$issues[] = 'Your Composer dependencies require the following PHP extensions to be installed: ' . implode(', ', $missingExtensions);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($issues) {
|
if ($issues && !headers_sent()) {
|
||||||
|
header('HTTP/1.1 500 Internal Server Error');
|
||||||
echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues) . "\n\n";
|
echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues) . "\n\n";
|
||||||
exit(104);
|
exit(104);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,8 @@ if (!(PHP_VERSION_ID >= 70200)) {
|
||||||
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.0". You are running ' . PHP_VERSION . '.';
|
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.0". You are running ' . PHP_VERSION . '.';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($issues) {
|
if ($issues && !headers_sent()) {
|
||||||
|
header('HTTP/1.1 500 Internal Server Error');
|
||||||
echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues) . "\n\n";
|
echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues) . "\n\n";
|
||||||
exit(104);
|
exit(104);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,8 @@ if ($missingExtensions) {
|
||||||
$issues[] = 'Your Composer dependencies require the following PHP extensions to be installed: ' . implode(', ', $missingExtensions);
|
$issues[] = 'Your Composer dependencies require the following PHP extensions to be installed: ' . implode(', ', $missingExtensions);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($issues) {
|
if ($issues && !headers_sent()) {
|
||||||
|
header('HTTP/1.1 500 Internal Server Error');
|
||||||
echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues) . "\n\n";
|
echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues) . "\n\n";
|
||||||
exit(104);
|
exit(104);
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,8 @@ if (!(PHP_VERSION_ID >= 70208)) {
|
||||||
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.8". You are running ' . PHP_VERSION . '.';
|
$issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.8". You are running ' . PHP_VERSION . '.';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($issues) {
|
if ($issues && !headers_sent()) {
|
||||||
|
header('HTTP/1.1 500 Internal Server Error');
|
||||||
echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues) . "\n\n";
|
echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues) . "\n\n";
|
||||||
exit(104);
|
exit(104);
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,8 @@ if ($missingExtensions) {
|
||||||
$issues[] = 'Your Composer dependencies require the following PHP extensions to be installed: ' . implode(', ', $missingExtensions);
|
$issues[] = 'Your Composer dependencies require the following PHP extensions to be installed: ' . implode(', ', $missingExtensions);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($issues) {
|
if ($issues && !headers_sent()) {
|
||||||
|
header('HTTP/1.1 500 Internal Server Error');
|
||||||
echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues) . "\n\n";
|
echo 'Composer detected issues in your platform:' . "\n\n" . implode("\n", $issues) . "\n\n";
|
||||||
exit(104);
|
exit(104);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue