platform_check.php 1.0 KB

1234567891011121314151617181920212223242526272829
  1. <?php
  2. // platform_check.php @generated by Composer
  3. $issues = array();
  4. if (!(PHP_VERSION_ID >= 80100)) {
  5. // $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.';
  6. }
  7. if (PHP_INT_SIZE !== 8) {
  8. $issues[] = 'Your Composer dependencies require a 64-bit build of PHP.';
  9. }
  10. if ($issues) {
  11. if (!headers_sent()) {
  12. header('HTTP/1.1 500 Internal Server Error');
  13. }
  14. if (!ini_get('display_errors')) {
  15. if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
  16. fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL);
  17. } elseif (!headers_sent()) {
  18. echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
  19. }
  20. }
  21. throw new \RuntimeException(
  22. 'Composer detected issues in your platform: ' . implode(' ', $issues)
  23. );
  24. }