1

I'm completely lost here. I set my wampserver to use php 8.0.0, create a new folder and use the first command of symfony in their documentation :

composer create-project symfony/website-skeleton:"5.2.x@dev" my_project_name

And i have this error :

Creating a "symfony/website-skeleton:5.2.x@dev" project at "./micropro"
Installing symfony/website-skeleton (5.2.x-dev 0abf2e7cfde8907a25fe4160d9baa05a17de1d9f)
  - Syncing symfony/website-skeleton (5.2.x-dev 0abf2e7) into cache
  - Installing symfony/website-skeleton (5.2.x-dev 0abf2e7): Cloning 0abf2e7cfd from cache
Created project in C:\wamp\www\Projects\micropro
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
  - Locking symfony/flex (v1.11.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing symfony/flex (v1.11.0): Extracting archive

Symfony operations: 1 recipe (cf6f7118abf71a8693a38eef117dc927)
  - Configuring symfony/flex (>=1.0): From github.com/symfony/recipes:master
Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "5.2.*"
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - symfony/orm-pack[dev-main, v1.0.8, v2.0.0] require doctrine/doctrine-migrations-bundle * -> satisfiable by doctrine/doctrine-migrations-bundle[dev-manager-loader, dev-container-aware-migration-factory, dev-2.2.x-merge-up-into-
3.0.x_5f12ade8acaa06.99463690, v1.0.0-beta1, ..., 1.3.x-dev, v2.0.0-alpha1, ..., 2.2.x-dev, 3.0.0-alpha.1, ..., 3.1.x-dev].
    - doctrine/doctrine-migrations-bundle v1.0.0-beta1 requires symfony/symfony >=2.0 -> satisfiable by symfony/symfony[v5.2.0-BETA1, ..., 5.2.x-dev].
    - symfony/orm-pack[v1.1.0, ..., v1.2.0] require doctrine/doctrine-migrations-bundle ^2 -> satisfiable by doctrine/doctrine-migrations-bundle[v2.0.0-alpha1, ..., 2.2.x-dev].
    - symfony/website-skeleton 5.2.x-dev conflicts with symfony/symfony v5.2.0.
    - symfony/website-skeleton 5.2.x-dev conflicts with symfony/symfony v5.2.0-RC2.
    - symfony/website-skeleton 5.2.x-dev conflicts with symfony/symfony v5.2.0-RC1.
    - symfony/website-skeleton 5.2.x-dev conflicts with symfony/symfony v5.2.0-BETA3.
    - symfony/website-skeleton 5.2.x-dev conflicts with symfony/symfony v5.2.0-BETA2.
    - symfony/website-skeleton 5.2.x-dev conflicts with symfony/symfony v5.2.0-BETA1.
    - symfony/website-skeleton 5.2.x-dev conflicts with symfony/symfony 5.2.x-dev.
    - symfony/orm-pack[v1.0.0, ..., v1.0.7] require php ^7.0 -> your php version (8.0.0) does not satisfy that requirement.
    - doctrine/doctrine-migrations-bundle[dev-2.2.x-merge-up-into-3.0.x_5f12ade8acaa06.99463690, v2.0.0-alpha1, ..., 2.2.x-dev] require php ^7.1 -> your php version (8.0.0) does not satisfy that requirement.
    - doctrine/doctrine-migrations-bundle[dev-manager-loader, dev-container-aware-migration-factory, 3.0.0-alpha.1, ..., 3.1.x-dev] require php ^7.2 -> your php version (8.0.0) does not satisfy that requirement.
    - doctrine/doctrine-migrations-bundle[1.0.x-dev, ..., 1.3.x-dev] require symfony/framework-bundle ~2.7|~3.3|~4.0 -> found symfony/framework-bundle[v2.7.0-BETA1, ..., 2.8.x-dev, v3.3.0-BETA1, ..., 3.4.x-dev, v4.0.0-BETA1, ..., 4.
4.x-dev] but it conflicts with another require.
    - doctrine/doctrine-migrations-bundle[1.0.1, ..., 1.2.x-dev] require symfony/framework-bundle ~2.3|~3.0 -> found symfony/framework-bundle[v2.3.0, ..., 2.8.x-dev, v3.0.0-BETA1, ..., 3.4.x-dev] but it conflicts with another requir
e.
    - doctrine/doctrine-migrations-bundle[1.0.0-BETA2, ..., 1.0.0] require symfony/framework-bundle ~2.1 -> found symfony/framework-bundle[v2.1.0, ..., 2.8.x-dev] but it conflicts with another require.
    - symfony/website-skeleton is present at version 5.2.x-dev and cannot be modified by Composer
    - Root composer.json requires symfony/orm-pack * -> satisfiable by symfony/orm-pack[dev-main, v1.0.0, ..., v1.2.0, v2.0.0].

How can he tells me that he require php ^7.0 when i'm giving him php8.0.0 ?? For all the other error i'm lost i'm new to it, please any help would be greatly appreciated.

IMSoP
  • 89,526
  • 13
  • 117
  • 169
Haamome
  • 83
  • 7
  • Try creating a new project with a release version instead of dev ```composer create-project symfony/website-skeleton my_project ^5.2.0``` – Thakkie Dec 04 '20 at 06:12
  • Already tried that and i get this error Could not find package symfony/website-skeleton with version 5.2.0 – Haamome Dec 04 '20 at 08:25
  • Any reason why you are specifying a specific version in the first place? It should install the newest stable version if you just do ```composer create-project symfony/website-skeleton my_project``` otherwise try version ^5.2 istead of ^5.2.0 – Thakkie Dec 04 '20 at 08:36
  • 4
    There have been several other questions on this. Doctrine's ORM pack is not yet officially certified to run on PHP 8 and thus will not install. Add the --ignore-platform-reqs option to your composer command (and drop the Symfony version completely) and it should work. – Cerad Dec 04 '20 at 12:57
  • @Thakkie Even without version the command give me the same error since he picks the v5.2.99. Anyway thanks for your help guys. – Haamome Dec 04 '20 at 15:04
  • Not sure if it will help, but you could try removing any composer packages installed in your ~/.composer or ~/.cache folders – Thakkie Dec 04 '20 at 16:04
  • If composer keeps failing just use the symfony installer https://symfony.com/doc/current/setup.html – Thakkie Dec 04 '20 at 16:18
  • @Thakkie Just for info, the Symfony installer uses composer create-project so that will not help. Again the basic issue is that Doctrine does not allow installing the ORM under PHP 8 yet even though it seems to work fine. – Cerad Dec 04 '20 at 16:30
  • Ok sorry for insisting my hint should work, php versions got mixed up a bit on my testing server giving me the impression that normal installation was possible. Composer fails to install as you mentioned, but it will work with the ```--ignore-platform-reqs``` command line option – Thakkie Dec 04 '20 at 18:10
  • @Cerad please post your comment as answer, it seems to be the only working solution. – Paolo Stefan Dec 09 '20 at 15:19
  • 1
    Does this answer your question? [Override PHP base dependency in composer](https://stackoverflow.com/questions/32838881/override-php-base-dependency-in-composer) – miken32 Jan 06 '21 at 02:18
  • 1
    In case anyone's not clear, the constraint `^7.0` basically means "7.x" (strictly: ">=7.0 && <8.0"), so Composer is quite right to say that 8.0 does not meet that constraint. – IMSoP Jan 28 '21 at 21:06

0 Answers0