2
votes

I've installed [KhepinYamlFixturesBundle][1] Symfony 2.0.16 to load fixtures but when I run

php app/console khepin:yamlfixtures:load

I get this error:

Fatal error: Call to undefined method Symfony\Bundle\DoctrineBundle\Registry::getManager() in D:\public_html\s2\trunk\src\Khepin\YamlFixturesBundle\Loader\YamlLoader.php on line 138

Is there a workaround for this?

EDIT:

I also tried with Symfony 2.1. After successfully installing Symfony 2.1 and doctrine-fixtures-bundle, I run:

php composer.phar update khepin/yaml-fixtures-bundle

It says:

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

Problem 1

- Installation request for khepin/yaml-fixtures-bundle dev-master -> satisfiable by khepin/yaml-fixtures-bundle dev-master.

- Conclusion: don't install doctrine/doctrine-fixtures-bundle v2.1.0-ALPHA

- Conclusion: remove doctrine/doctrine-fixtures-bundle dev-master

- khepin/yaml-fixtures-bundle dev-master requires doctrine/doctrine-fixtures-bundle 2.* -> satisfiable by 
  doctrine/doctrine-fixtures-bundle v2.0.0, doctrine/doctrine-fixtures-bundle v2.0.1, 
  doctrine/doctrine-fixtures-bundle v2.1.0-ALPHA, doctrine/doctrine-fixtures-bundle 2.0.x-dev.

- Can only install one of: doctrine/doctrine-fixtures-bundle dev-master, doctrine/doctrine-fixtures-bundle v2.0.0.

- Can only install one of: doctrine/doctrine-fixtures-bundle dev-master, doctrine/doctrine-fixtures-bundle v2.0.1.

- Can only install one of: doctrine/doctrine-fixtures-bundle dev-master, doctrine/doctrine-fixtures-bundle 2.0.x-dev.

- Installation request for doctrine/doctrine-fixtures-bundle dev-master -> satisfiable by doctrine/doctrine-fixtures-bundle dev-master.

`

3

3 Answers

2
votes

For 2.1, the bundle requires the fixtures bundle with version "2.". Since composer switched the "minimum-stability" to "stable" recently, 2. and dev-master are no longer equivalent.

If you really need "dev-master", you can use:

require: {
    "khepin/yaml-fixtures-bundle": "dev-master as 2.1.0"
    ...
}

for example.

UPDATE:

I pushed the code and this should be fixed with older versions of Doctrine now.

1
votes

It's a known bug: https://github.com/khepin/KhepinYamlFixturesBundle/issues/14

You should try with Symfony 2.1 if you can.

1
votes

I was using "dev-master" for doctrine-fixtures-bundle with Symfony 2.1:

     `"doctrine/doctrine-fixtures-bundle": "dev-master"`

KhepinYamlFixturesBundle does not support it.

Once I changed it to "doctrine/doctrine-fixtures-bundle": "v2.1.0-ALPHA" in my composer.json file, it installed fine