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

Annotation driver mapping pass isn't correctly instantiated #289

Closed
wants to merge 2 commits into from

Conversation

sarcher
Copy link
Contributor

@sarcher sarcher commented Mar 17, 2015

It looks like this was a busted copy/paste from one of the other drivers; all this PR does is correct the arguments so that an annotations-based mappings pass works as expected.

$arguments = array(new Reference('doctrine_mongodb.odm.metadata.annotation_reader'), $directories);
$locator = new Definition('Doctrine\Common\Persistence\Mapping\Driver\SymfonyFileLocator', $arguments);
$driver = new Definition('Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver', array($locator));
$driver = new Definition('Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver', array(new Reference('doctrine_mongodb.odm.metadata.annotation_reader'), $directories));
Copy link
Member

Choose a reason for hiding this comment

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

I suggest using annotation_driver rather than the old alias (which was kept only for BC reasons)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assume you mean annotation_reader, right? I made that change -- thanks!

@sarcher
Copy link
Contributor Author

sarcher commented Aug 19, 2015

Rebased to current master; let me know if anything else needs to be done in order to get this merged. Thanks!

@alcaeus alcaeus added the bug label Dec 12, 2015
@alcaeus alcaeus added this to the 3.1 milestone Dec 12, 2015
@alcaeus alcaeus modified the milestones: 3.0.2, 3.1 Dec 20, 2015
@alcaeus
Copy link
Member

alcaeus commented Dec 20, 2015

Merged manually into 3.0 branch in bab5072. Thank you!

@alcaeus alcaeus closed this Dec 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants