嘗試初始化 PHP/Laravel 項目(通過運(yùn)行composer install),我試圖通過嘗試升級有問題的包來升級與較新的 PHP 版本交互不佳的包composer require,但它并不順利:$ composer require sentry/sentry-laravel:1.8.0./composer.json has been updatedLoading composer repositories with package informationUpdating dependencies (including require-dev)PHP Fatal error:? Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/Cellar/composer/1.10.7/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/Cellar/composer/1.10.7/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.我在文檔中閱讀了如何增加內(nèi)存限制(是的 - 最簡單的方法是COMPOSER_MEMORY_LIMIT在運(yùn)行之前設(shè)置環(huán)境變量,composer就像很多人提到的那樣),但在我這樣做之前,我想了解項目耗盡 1536Mb 是否有問題內(nèi)存限制,如果是這樣,如何理解和解決問題?更具體地說,除了替換文件中的版本要求之外,這個命令還能做什么composer.json?如果我只是手動編輯composer.json文件并compose install從干凈的表運(yùn)行(在擦除vendor/目錄和寫入項目目錄的任何其他內(nèi)容之后),可能會出現(xiàn)什么問題 - 版本是否會與檢測到的其他依賴項沖突?
PHP 作曲家耗盡內(nèi)存......為什么?怎么了?
慕蓋茨4494581
2023-06-18 18:03:15