0

I am getting the following error when trying to install a 3rd Party bundle:

From my Symfony project, I run: composer require knplabs/knp-menu-bundle dev-master

which returns:

[InvalidArgumentException]
Package knplabs/knp-menu-bundle at version dev-master has a PHP requirement incompatible with your PHP versio
n (5.6)

Using symfony 3.4

I check my php version

php -v: returns ->PHP 7.0.33 (cli) which php: returns -> /Applications/MAMP/bin/php/php7.0.33/bin/php

After updating my bash provile with vim ~/.bash_profile to use /Applications/MAMP/bin/php/php7.0.33/bin/php, I expected that would solve the problem.

I also tried composer require knplabs/knp-menu-bundle ^2.0. which returns:

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223

I bumped up the memory several times up 1100M but still the same problem. I saw other posts suggesting to set the memory to unlimited which i do not want to do.

Any suggestions? Thanks in Advance,

Conor

Conor123
  • 1
  • 1
  • Checkout [this answer](https://stackoverflow.com/questions/33299302/composer-update-failed-out-of-memory) ps.: please try to format your question properly. As a new contributor I would suggest you to read [this guide](https://stackoverflow.com/help/asking). Thanks and welcome on StackOverflow. – DonCallisto Jul 25 '19 at 10:47
  • Did you try to add flag --ignore-platform-reqs? `composer require --ignore-platform-reqs` local php version may differ from sever version so local composer might have issue with server and vice versa. – Chrzanek Jul 25 '19 at 10:53

0 Answers0