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

Update Resources/doc/index.rst #158

Merged
merged 1 commit into from Sep 20, 2012
Merged

Update Resources/doc/index.rst #158

merged 1 commit into from Sep 20, 2012

Conversation

meonkeys
Copy link
Contributor

I don't see a AnnotationRegistry::registerFile in the app/autoload.php that
ships with the Symfony 2.1 standard distribution (as of
67cbb5771f38ca1ab71c83916d2fedb3c0311b16).

I don't see a `AnnotationRegistry::registerFile` in the `app/autoload.php` that
ships with the Symfony 2.1 standard distribution (as of
67cbb5771f38ca1ab71c83916d2fedb3c0311b16).
@jmikola
Copy link
Member

jmikola commented Sep 20, 2012

Thanks. I'm a bit behind on this, but do you suppose it makes sense to advise:

use Doctrine\ODM\MongoDB\Mapping\Driver\AnnotationDriver;

AnnotationDriver::registerAnnotationClasses();

...over the more verbose AnnotationRegistry::registerFile(...) method we currently suggest (for ODM annotations). This is what we've been using in the test suite's bootstrap for some time.

Edit: It's also used in this bundle's 2.0 branch as well.

jmikola added a commit that referenced this pull request Sep 20, 2012
Update Resources/doc/index.rst
@jmikola jmikola merged commit 1f4270a into doctrine:master Sep 20, 2012
@meonkeys
Copy link
Contributor Author

@jmikola sure, that looks cleaner. I like that it allows you to not have to specify a file path.

I've not used it before, but I just tried it locally and it seems to work fine.

#159

cordoval pushed a commit to cordoval/DoctrineMongoDBBundle that referenced this pull request May 19, 2014
Use improved way of registering annotations library suggested by
@jmikola in doctrine#158.
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.

None yet

2 participants