1*8817535bSAndreas Gohr<?php 2*8817535bSAndreas Gohr 3*8817535bSAndreas Gohr// platform_check.php @generated by Composer 4*8817535bSAndreas Gohr 5*8817535bSAndreas Gohr$issues = array(); 6*8817535bSAndreas Gohr 7*8817535bSAndreas Gohrif (!(PHP_VERSION_ID >= 80100)) { 8*8817535bSAndreas Gohr $issues[] = 'Your Composer dependencies require a PHP version ">= 8.1.0". You are running ' . PHP_VERSION . '.'; 9*8817535bSAndreas Gohr} 10*8817535bSAndreas Gohr 11*8817535bSAndreas Gohrif ($issues) { 12*8817535bSAndreas Gohr if (!headers_sent()) { 13*8817535bSAndreas Gohr header('HTTP/1.1 500 Internal Server Error'); 14*8817535bSAndreas Gohr } 15*8817535bSAndreas Gohr if (!ini_get('display_errors')) { 16*8817535bSAndreas Gohr if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { 17*8817535bSAndreas Gohr fwrite(STDERR, 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . implode(PHP_EOL, $issues) . PHP_EOL.PHP_EOL); 18*8817535bSAndreas Gohr } elseif (!headers_sent()) { 19*8817535bSAndreas Gohr 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; 20*8817535bSAndreas Gohr } 21*8817535bSAndreas Gohr } 22*8817535bSAndreas Gohr trigger_error( 23*8817535bSAndreas Gohr 'Composer detected issues in your platform: ' . implode(' ', $issues), 24*8817535bSAndreas Gohr E_USER_ERROR 25*8817535bSAndreas Gohr ); 26*8817535bSAndreas Gohr} 27