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