doctrine / data-fixtures

Doctrine2 ORM Data Fixtures Extensions
http://www.doctrine-project.org
MIT License
2.78k stars 224 forks source link

Can't install with symfony 4.1 #330

Closed ehibes closed 4 years ago

ehibes commented 4 years ago

It seems to be a BC break installing this bundle with symfony 4.1. If I specify to install version 3.0.2, it works.

Ocramius commented 4 years ago

Can you provide more details, please?

ehibes commented 4 years ago

Of course yes. First I installed symfony on version 4.1.

composer create-project symfony/website-skeleton my_project_name 4.1.*

After, I tried to install orm-fixtures :

composer require --dev orm-fixtures

I get this error from composer

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for doctrine/doctrine-fixtures-bundle ^3.3 -> satisfiable by doctrine/doctrine-fixtures-bundle[3.3.0].
    - doctrine/doctrine-fixtures-bundle 3.3.0 requires symfony/config ^3.4|^4.3|^5.0 -> no matching package found.

If I specify orm fixtures version, no problem. Is it a normal behavior or composer have to find the right version ?

composer require --dev orm-fixtures 3.0.2
Ocramius commented 4 years ago

not sure what the orm-fixtures package is: seems like a flex issue on that end.

What's composer require --dev doctrine/data-fixtures?

ehibes commented 4 years ago

It’s ok with this command

Le 4 déc. 2019 à 12:32, Marco Pivetta notifications@github.com a écrit :

require --dev doctrine/data-fixtures

Ocramius commented 4 years ago

Closing here then: the problem is downstream, in the orm-fixture recipe (not sure where/who maintains that, sorry)

stof commented 4 years ago

Well, if you require doctrine/data-fixtures, you're not getting the same requirement than what the Flex alias orm-fixture gives you. The equivalent would be composer require --dev doctrine/data-fixtures-bundle.

And you can install the bundle with Symfony 4.1 if you specify a version constraint allowing older release. When you don't specify a constraint yourselves, composer automatically generates one as ^latest (replacing latest with the latest stable release). And the latest release version of the DataFixturesBundle is indeed not compatible with EOLed Symfony versions.

btinet commented 4 years ago

I've got the same problem now. Tested on two machines.

Some weeks ago, it worked perfectly.

btinet commented 4 years ago

Just paste under require-dev in composer.json and update:

"doctrine/doctrine-fixtures-bundle": "^3.3",