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

Skip to content

[Form] [DoctrineBridge] Possible regression in ManagerRegistry::getManagerForClass() #4966

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
hhamon opened this issue Jul 18, 2012 · 14 comments · Fixed by #5127
Closed

[Form] [DoctrineBridge] Possible regression in ManagerRegistry::getManagerForClass() #4966

hhamon opened this issue Jul 18, 2012 · 14 comments · Fixed by #5127

Comments

@hhamon
Copy link
Contributor

hhamon commented Jul 18, 2012

I'm not sure but I think there is a regression introduced yesterday at commit 17ca9b6.

All my forms were working before I ran composer.phar update command.

After having updated my codebase, I had to update my entity type fields in all my forms to use a FQCN everywhere instead of the Doctrine entity shortcut name. In other words, before the update I had:

$builder
        ->add('foo', 'entity', array(
            'class' => 'FooBarBundle:Foo',
            'property' => 'name',
        ))
;

Then I updated Symfony and the ManagerRegistry::getManagerForClass() method modified yesterday in commit 17ca9b6 don't translate my shortcut class name to its FQCN anymore. So I'm forced to use a FQCN instead in all my forms to make it form again:

$builder
        ->add('foo', 'entity', array(
            'class' => 'Foo\Bundle\BarBundle\Entity\Foo',
            'property' => 'name',
        ))
;

So I suspect a regression with yesterday's commit.

@sstok
Copy link
Contributor

sstok commented Jul 20, 2012

doctrine/common#166 This pull request should fix it.

@hhamon
Copy link
Contributor Author

hhamon commented Jul 20, 2012

Great!

@webmozart
Copy link
Contributor

I'll close this since this seems to be a Doctrine issue.

@stof
Copy link
Member

stof commented Jul 22, 2012

Well, it is a regression in Symfony because getManagerForClass does not support the aliased notation currently. I hope @beberlei will merge my PR in Common and backport it in the older branches, otherwise we will have to overwrite the method in the bridge.

@hhamon
Copy link
Contributor Author

hhamon commented Jul 22, 2012

So we can reopen this issue?

@webmozart webmozart reopened this Jul 22, 2012
@webmozart
Copy link
Contributor

Done

@stof
Copy link
Member

stof commented Jul 23, 2012

This is fixed when using doctrine 2.3 (the 2.3 branch, not the 2.3-beta1 release which was older)

@webmozart
Copy link
Contributor

Should we bump the requirements of DoctrineBridge?

@stloyd
Copy link
Contributor

stloyd commented Jul 24, 2012

Probably yes, we already require an 2.3 of doctrine/common but others (dbal & orm) still are marked as: 2.2 or 2.3.

@stof
Copy link
Member

stof commented Jul 24, 2012

@bschussek it is fine for me. The goal is to release doctrine 2.3 approximately at the same time than Sf 2.1, and the upgrade path is less painful for doctrine (there is only BC breaks for people dealing with the doctrine internals, so most users will not be affected).

@webmozart
Copy link
Contributor

@stof Could you do this please? I'm unsure as to which exact version to include.

@stof
Copy link
Member

stof commented Jul 25, 2012

@bschussek done

@webmozart
Copy link
Contributor

@stof Thanks!

@stof
Copy link
Member

stof commented Jul 27, 2012

For people reading it, the discussion has been continued on symfony/symfony-standard#373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants