Setting up NEO4j in Symfony2

牧云@^-^@ 提交于 2019-12-06 15:52:47

I did this implementation some time ago (~ two years) but didn't updated it due to the fact I don't use these vendors anymore.

This was splitted in two bundles, and that might give you some ideas and examples :

https://github.com/ikwattro/KwattroNeo4jOGMBundle

https://github.com/ikwattro/Neo4jUserBundle

Basically steps are common and lot of information can be found in the Symfony documentation.

  1. Create your user entity base on the neo4jphp-ogm annotations

  2. Create a User provider -> security

  3. Create a User Manager that will retrieve the users when the authentication happens

Concerning your last error concerning the authentication, by looking at the klaussilvera/neo4j-ogm-bundle last commit date, chance is high that it doesn't support neo4j authentication added in 2.2.

You might want to disable the neo4j authentication for your first tests or fork the current repository and create a PR adding the authentication parameters in the ConfigDefinition of the bundle.

I have now created a new repository which seems to work up till now:

https://github.com/JoranBeaufort/Neo4jUserBundle

Be careful: Like I stated, I am not an expert in Symfony or programming in general. The Bundle may have serious security issues. Hints of improvement are welcome.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!