Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot install MakerBundle

I'm trying to install the MakerBundle for Symfony (3.4) as stated in the documentation.

The command I run is:

composer require symfony/maker-bundle --dev

But I got this:

[InvalidArgumentException]
Package symfony/maker-bundle at version has a PHP requirement incompatible with your PHP version (5.6)

Checking my php version ( php -v ) gives :

PHP 7.0.27-0+deb9u1 (cli) (built: Jan 5 2018 13:51:52) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies with Zend OPcache v7.0.27-0+deb9u1, Copyright (c) 1999-2017, by Zend Technologies with Xdebug v2.5.0, Copyright (c) 2002-2016, by Derick Rethans

Am I missing something?

like image 494
user1077915 Avatar asked Mar 09 '26 15:03

user1077915


1 Answers

You need to change the php version inside composer.json file. "config": { "platform": { "php": "7.2" }, "sort-packages": true },

Find the above code in composer.json file in you symfony project root directory.

There will be 5.6 in your case just change it to 7.2

Then again run your command it'll work perfectly.

like image 90
Vikram Chhipa Avatar answered Mar 12 '26 05:03

Vikram Chhipa