作曲家更新 => 致命错误:内存不足



我在本地机器上使用XAMPP。我无法通过删除 PHP 内存限制来解决此问题。

我已经尝试过:

  • 修改了我的 php.ini 以删除内存限制 =>memory_limit=-1

  • 检查我正在运行PHP 5.6

  • 并将作曲家自我更新到最新版本

但它似乎根本没有任何效果。有人有建议吗?

我的composer.json

{
"name": "erwin/symff",
"license": "proprietary",
"type": "project",
"autoload": {
"psr-4": {
"AppBundle\": "src/AppBundle"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"autoload-dev": {
"psr-4": {
"Tests\": "tests/"
},
"files": [
"vendor/symfony/symfony/src/Symfony/Component/VarDumper/Resources/functions/dump.php"
]
},
"require": {
"php": ">=5.5.9",
"bmatzner/fontawesome-bundle": "~4.4",
"bmatzner/jquery-bundle": "~1.9",
"bmatzner/jquery-mobile-bundle": "~1.4.5",
"bmatzner/jquery-ui-bundle": "~1.10.3",
"boekkooi/jquery-validation-bundle": "~1.2.1",
"divi/ajax-login-bundle": "dev-master",
"doctrine/doctrine-bundle": "^1.6",
"doctrine/doctrine-fixtures-bundle": "^3.0.2",
"doctrine/orm": "^2.5",
"egeloen/google-map-bundle": "^3.0.1",
"egeloen/serializer-bundle": "^1.0.0",
"friendsofsymfony/comment-bundle": "^2.2.0",
"friendsofsymfony/jsrouting-bundle": "^2.2.1",
"friendsofsymfony/user-bundle": "^2.1.2",
"incenteev/composer-parameter-handler": "^2.0",
"ivkos/pushbullet": "^3.3.0",
"javiereguiluz/easyadmin-bundle": "^1.17",
"jmose/command-scheduler-bundle": "^2.0.0",
"jms/security-extra-bundle": "^1.6.1",
"php-http/guzzle6-adapter": "^1.1.1",
"php-http/httplug-bundle": "^1.11.0",
"rapidwebltd/php-google-contacts-v3-api": "^2.0.0",
"sensio/distribution-bundle": "^5.0.19",
"sensio/framework-extra-bundle": "^3.0.2",
"symfony/assetic-bundle": "dev-master",
"symfony/monolog-bundle": "^3.1.0",
"symfony/polyfill-apcu": "^1.0",
"symfony/swiftmailer-bundle": "^2.3.10",
"symfony/symfony": "3.4.*",
"twig/extensions": "1.0.*",
"twig/twig": "^1.0||^2.0",
"vich/uploader-bundle": "^1.0.1"
},
"require-dev": {
"sensio/generator-bundle": "^3.0",
"symfony/phpunit-bridge": "^3.0"
},
"scripts": {
"symfony-scripts": [
"Incenteev\ParameterHandler\ScriptHandler::buildParameters",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installAssets",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::installRequirementsFile",
"Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::prepareDeploymentTarget"
],
"post-install-cmd": [
"@symfony-scripts"
],
"post-update-cmd": [
"@symfony-scripts"
]
},
"config": {
"sort-packages": true
},
"extra": {
"symfony-app-dir": "app",
"symfony-bin-dir": "bin",
"symfony-var-dir": "var",
"symfony-web-dir": "web",
"symfony-tests-dir": "tests",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": null
}
}

当我运行此命令时:

composer update

我得到以下输出:

"C:DEVxamppphpphp.exe" "C:DEVxampphtdocssymfonycomposer.phar" "--ansi" "--no-interaction" "update"
Loading composer repositories with package information
Updating dependencies (including require-dev)
Fatal error: Out of memory (allocated 1584922624) (tried to allocate 268435456 bytes) in phar://C:/DEV/xampp/htdocs/symfony/composer.phar/src/Composer/DependencyResolver/Solver.php on line 220
PHP Fatal error:  Out of memory (allocated 1584922624) (tried to allocate 268435456 bytes) in phar://C:/DEV/xampp/htdocs/symfony/composer.phar/src/Composer/DependencyResolver/Solver.php on line 220

我预计会发生这种情况:

以前发生的简单更新。

编辑:

据我了解,"内存不足"错误似乎表示物理内存限制而不是配置的限制。

Windows上的PHP是32位(我认为至少是这样......(,32位进程不能使用超过2GB的RAM。

所以我想我遇到了一个真正的身体限制。

我现在的问题是:我如何仍然在 32 位 PHP 上更新我的软件包?

我尝试按包方法更新

C:DEVxampphtdocssymfony>php -d memory_limit=-1 composer.phar update bmatzner/fontawesome-bundle
Loading composer repositories with package information
Updating dependencies (including require-dev)
PHP Fatal error:  Out of memory (allocated 1592000512) (tried to allocate 268435456 bytes) in phar://C:/DEV/xampp/htdocs/symfony/composer.phar/src/Composer/DependencyResolver/Solver.php on line 220

但如您所见,我遇到了同样的问题。

升级到 PHP7 就成功了。

在RAM消耗方面,它似乎更有效。

感谢所有试图在这里帮助我的人。

更新具有更大内存限制的作曲家

php -dmemory_limit=3G /usr/local/bin/composer update

最新更新