(strpos($lastError['message'], 'Allowed memory') !== false /*Zend PHP out of memory error*/ ||
(strpos($lastError['message'], 'Allowed memory') !== false /*Zend PHP out of memory error*/ ||
strpos($lastError['message'], 'exceeded memory') !== false /*HHVM out of memory errors*/)) {
strpos($lastError['message'], 'exceeded memory') !== false /*HHVM out of memory errors*/)) {
@ -110,10 +110,10 @@ class Application extends BaseApplication
if (PHP_VERSION_ID <50302){
if (PHP_VERSION_ID <50302){
$io->writeError('<warning>Composer only officially supports PHP 5.3.2 and above, you will most likely encounter problems with your PHP '.PHP_VERSION.', upgrading is strongly recommended.</warning>');
$io->writeError('<warning>Composer only officially supports PHP 5.3.2 and above, you will most likely encounter problems with your PHP '.PHP_VERSION.', upgrading is strongly recommended.</warning>');
}
}
if (extension_loaded('xdebug')) {
if (extension_loaded('xdebug')) {
$io->write('<warning>You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug</warning>');
$io->writeError('<warning>You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug</warning>');
@ -28,7 +28,14 @@ class ApplicationTest extends TestCase
->method('getFirstArgument')
->method('getFirstArgument')
->will($this->returnValue('list'));
->will($this->returnValue('list'));
$outputMock->expects($this->once())
$index = 0;
if (extension_loaded('xdebug')) {
$outputMock->expects($this->at($index++))
->method("write")
->with($this->equalTo('<warning>You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug</warning>'));
}
$outputMock->expects($this->at($index++))
->method("write")
->method("write")
->with($this->equalTo(sprintf('<warning>Warning: This development build of composer is over 60 days old. It is recommended to update it by running "%s self-update" to get the latest version.</warning>', $_SERVER['PHP_SELF'])));
->with($this->equalTo(sprintf('<warning>Warning: This development build of composer is over 60 days old. It is recommended to update it by running "%s self-update" to get the latest version.</warning>', $_SERVER['PHP_SELF'])));