Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Version 2.7 does not work with mongo #14568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
plozmun opened this issue May 6, 2015 · 2 comments
Closed

Version 2.7 does not work with mongo #14568

plozmun opened this issue May 6, 2015 · 2 comments

Comments

@plozmun
Copy link
Contributor

plozmun commented May 6, 2015

When i update to dev version i got the following error:

Expected argument of type "Doctrine\ORM\QueryBuilder", "Doctrine\ODM\MongoDB\Query\Builder" given

And this is the stack trace

Stack Trace
in vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php at line 245   -
                $queryBuilder = call_user_func($queryBuilder, $options['em']->getRepository($options['class']));
                if (!$queryBuilder instanceof QueryBuilder) {
                    throw new UnexpectedTypeException($queryBuilder, 'Doctrine\ORM\QueryBuilder');
                }
            }
at DoctrineType ->Symfony\Bridge\Doctrine\Form\Type\{closure} (object(OptionsResolver), object(Closure)) 
in vendor/symfony/symfony/src/Symfony/Component/OptionsResolver/OptionsResolver.php at line 957   ......

Seems that only works with Doctrine ORM and not with Doctrine Mongo ODM

@malarzm
Copy link
Contributor

malarzm commented May 6, 2015

I think this could be fixed in bundle itself by overriding this normalizer. @arkadis would you mind sending PR over there?

@Tobion
Copy link
Contributor

Tobion commented May 6, 2015

See #14050 (comment)

fabpot added a commit that referenced this issue May 20, 2015
This PR was squashed before being merged into the 2.7 branch (closes #14576).

Discussion
----------

[DoctrineBridge][Form] Fix BC break in DoctrineType

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #14568
| License       | MIT
| Doc PR        | n/a

Commits
-------

3172d73 [DoctrineBridge][Form] Fix BC break in DoctrineType
@fabpot fabpot closed this as completed May 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants