neoxygen / neo4j-neoclient

Simple PHP HttpClient for the Neo4j ReST API with Multi DB Support
MIT License
121 stars 138 forks source link

ServiceContainer not found #59

Closed pascaldevink closed 8 years ago

pascaldevink commented 9 years ago

Whenever I inject the neoxygen.neoclient service, I get the following exception:

[Symfony\Component\Debug\Exception\ClassNotFoundException]
  Attempted to load class "ServiceContainer" from namespace "Neoxygen\NeoClient".
  Did you forget a "use" statement for another namespace?

The documentation is a little unclear on how to use the dependency injection services provided other than being able to configure it.

I'm using Symphony 2.7 and version 3.3.10 of this library.

ikwattro commented 9 years ago

I agree there is a lack of documentation about how to implement this in Symfony.

As it uses the DI and Config, in fact you just need to create a bundle and override to configuration to match the name of the bundle.

While I update the documentation, you can take a look at the code used in this bundle :

https://github.com/graphaware/GithubNeo4j/tree/master/src/GraphAware/Neo4jBundle

pascaldevink commented 9 years ago

Thanks. I managed to use the DI functionality in the end, but it still strikes me as odd that a ClassNotFoundException would occur upon injecting any service provided by the bundle.

ikwattro commented 9 years ago

Maybe with some piece of code I can narrow down from where the problem comes from.