Problem when creating Symfony project

Asked

Viewed 103 times

0

I have a problem to start a project, always appears the error:

henrique@henrique-Lenovo-ideapad-330-15IKB:~/Documents$ composer create-project symfony/skeleton symfony

Installing symfony/Skeleton (v3.4.99) - Installing symfony/Skeleton (v3.4.99) Loading from cache

Created project in symfony Loading Composer repositories with package information Updating dependencies (including require-dev) - Installing symfony/flex (v1.4.5) Loading from cache

Some Symfony Flex Features may not work as expected: your version of Composer is Too old Please upgrade using https://getcomposer.org/ Symfony Operations: 1 Recipe (60cdb79275d49529df6e9eeba183f7da) - Configuring symfony/flex (>=1.0): From github.com/symfony/Recipes:master PHP Fatal error: Uncaught Error: Call to Undefined method Composer Json Jsonmanipulator::removeMainKey() in /home/Henrique/Documents/symfony/vendor/symfony/flex/src/Flex.php:362 Stack trace:

0 /home/Henrique/Documents/symfony/vendor/symfony/flex/src/Flex.php(320): Symfony Flex Flex->update()

1 [Internal Function]: Symfony Flex Flex->checkForUpdate(Object(Composer Script Packageevent))

2 /usr/share/php/Composer/Eventdispatcher/Eventdispatcher.php(171): call_user_func(Array, Object(Composer Script Packageevent))

3 /usr/share/php/Composer/Eventdispatcher/Eventdispatcher.php(114): Composer Eventdispatcher Eventdispatcher->doDispatch(Object(Composer Script Packageevent))

4 /usr/share/php/Composer/Installer.php(590): Composer\EventDispatcher\EventDispatcher->dispatchPackageEvent('post-package-in...', true, Object(Composer\DependencyResolver\DefaultPolicy), Object(Composer\DependencyResolver\Pool), Object(Composer\Repository\CompositeRepository), Object(Composer Dependencyresolver Request), Array, Object(Composer Dependencyreso in /home/Henrique/Documents/symfony/vendor/symfony/flex/src/Flex.php on line 362

Fatal error: Uncaught Error: Call to Undefined method Composer Json Jsonmanipulator::removeMainKey() in /home/Henrique/Documents/symfony/vendor/symfony/flex/src/Flex.php:362 Stack trace:

0 /home/Henrique/Documents/symfony/vendor/symfony/flex/src/Flex.php(320): Symfony Flex Flex->update()

1 [Internal Function]: Symfony Flex Flex->checkForUpdate(Object(Composer Script Packageevent))

2 /usr/share/php/Composer/Eventdispatcher/Eventdispatcher.php(171): call_user_func(Array, Object(Composer Script Packageevent))

3 /usr/share/php/Composer/Eventdispatcher/Eventdispatcher.php(114): Composer Eventdispatcher Eventdispatcher->doDispatch(Object(Composer Script Packageevent))

4 /usr/share/php/Composer/Installer.php(590): Composer\EventDispatcher\EventDispatcher->dispatchPackageEvent('post-package-in...', true, Object(Composer\DependencyResolver\DefaultPolicy), Object(Composer\DependencyResolver\Pool), Object(Composer\Repository\CompositeRepository), Object(Composer Dependencyresolver Request), Array, Object(Composer Dependencyreso in /home/Henrique/Documents/symfony/vendor/symfony/flex/src/Flex.php on line 362

  • updates your Composer

1 answer

0

As message on command output:

your version of Composer is Too old Please upgrade

the version of Composer is very outdated, it is necessary to update to create a symfony project.

Command to update the Composer version:

php composer.phar self-update

Documentation of the Commission:

https://getcomposer.org/doc/03-cli.md#self-update-selfupdate-

Browser other questions tagged

You are not signed in. Login or sign up in order to post.