Skip to content
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

support bundle alias notation #1566

Closed
wants to merge 1 commit into from
Closed

support bundle alias notation #1566

wants to merge 1 commit into from

Conversation

dbu
Copy link

@dbu dbu commented Aug 8, 2014

Implement symfony/symfony#10853 so that FOSUserBundle:User works again.

I guess this is a rare case, as people will extend the user class and then have doctrine do the alias for their extending class. But for consistency, it makes sense to do this.

// the base class is only available since symfony 2.3
$symfonyVersion = class_exists('Symfony\Bridge\Doctrine\DependencyInjection\CompilerPass\RegisterMappingsPass');
// alias support was added later
$symfonyVersion = version_compare(Kernel::VERSION, '2.6.0', '>=');
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we have symfony 2.6 but DoctrineBundle < 1.3 the alias support will still not work. but i don't think its worth starting to introspect the orm compiler pass and whatnot.

or we could simply never use the compiler pass from symfony but always our local compiler pass...

@stof
Copy link
Member

stof commented Aug 8, 2014

given that there is no entity in FOSUserBundle but only mapped superclasses, is it really worth it ? there is no reason to reference a mapped superclass anywhere in Doctrine, except for extending it (and this does not use Doctrine aliases...)

@dbu
Copy link
Author

dbu commented Aug 8, 2014

ah, i thought its theoretically possible to use the models directly. indeed they are abstract classes - that also explains why nobody had a problem with us not providing the alias.

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

Successfully merging this pull request may close these issues.

2 participants