-
Notifications
You must be signed in to change notification settings - Fork 59
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
Question: No Metadata Classes to process. #46
Comments
Does this help at all? It seems like it would not matter if things are working for the schema part but maybe it loads up slightly differently? |
@simensen was also my first thought ;-), Cause everything else seems to be ok |
Thanks for the quick support, I've tried adding the AnnotationRegistry to both my console.php and index.php (where orm.em.options is) and still no luck. |
@mikebell Where is the orm:validate-schema command coming from? And which command are you running to try and create your schema? Maybe posting your console.php to a gist/pastebin would be useful? |
Here is my console.php - https://gist.github.com/mikebell/b7f7e94887cd00723830 It resides inside src/ |
@mikebell Nothing is jumping out at me as being wrong. :-/ I haven't used those commands like that in awhile so I'm not sure what they are looking for or are expecting. You can look at the command that works ( If you end up finding a solution here it would be great if you could report that here so we can track this down in the future or look to adding it into some documentation somewhere. |
@mikebell it seems you register the Annotation Registry after calling the entity manager |
@dominikzogg d'oh. i was looking at how far down the annotation registry was being added but i decided in the end that i wouldn't mention it. i usually do that right after the class loader is created so i've never run into anything like this. @mikebell my guess is that @dominikzogg is right on this. try moving the annotation registry call before you get $em from the container. thank you so much, @dominikzogg! |
@simensen i hope it's the solution and you know i try to support this provider as it would be mine ;-) |
Seem to be getting somewhere now. I've updated my console.php to - https://gist.github.com/mikebell/b7f7e94887cd00723830 I know get:
|
@mikebell change 10/11 with 13/14 |
I think this is because of how
All of which is a longer form (with explanation) of what @dominikzogg just said while I was writing this. :) |
Back to the "No Metadata Classes to process." error again. I'm going to park this for now, thanks for both your help, didn't expect to get this much help! |
@mikebell your welcome |
Try and change: "path" => __DIR__."/../src/Example/Api/Entities", with: "path" => __DIR__."/../src", That should work. |
My problem with the "No Metadata Classes to process." error was that my generated entities were missing a namespace. Looks like it needs to be the same as the provider's "namespace" config value. |
@mikebell Maybe to give you some more ways to use this provider. I used it in my silex skeleton which by default has example entities setup. It lacks proper documentation so if you need help setting it up then gimme a shout. Skeleton can be found at: |
exact same problem here with no success! |
Hello. You need to set alias to 'core' and disable use_simple_annotation_reader. ['mappings' => [
[
'alias' => 'core',
'type' => 'annotation',
'namespace' => 'TestApp\Entity',
'path' => __DIR__ . '/TestApp/Entity',
'use_simple_annotation_reader' => false,
],
]] |
It's an old post but if someone have the same problem, I suggest adding "orm.em.options" => array(
"mappings" => array(
// Using actual filesystem paths
array(
"type" => "annotation",
"namespace" => "Example\Api\Entities",
"path" => __DIR__."/../src/Example/Api/Entities",
"use_simple_annotation_reader" => false,
),
),
), Hope it will helps someone |
I'm trying to get this working in Silex but struggling when setting it up.
I get "No Metadata Classes to process." when trying to create the schema through my console app.
The schema validates fine if I run orm:validate-schema
Below is my config. Example\Api\Entities is mapped to "src/Example/Api/Entities" in my composer.json file (similar namespaces are working)
Changing the path to a none existant path breaks validate-schema as expected.
This is my entity file
I'm not really sure how to fix this. Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: