Closed oliverwhite19 closed 3 years ago
Seconding this. Does the latest version work with 6 without issue?
@andy-uriarte I tried porting this and there's quite a bit now that needs updating to be compatible, not just a version bump. I'd say this project is abandoned, real shame with open-source ๐
@chrispage1 maybe you share your port. I donโt think the backward compatibility is so broken between 5.6 and 6, we can made this working with 6.*. I really need some library for easy working with laravel and neo4j.
I would like to have support for laravel 6 too. Is there some news about this topic?
@YokiToki - unfortunately I didn't get that far with it. I just had the files locally on my machine and gave up pretty early on. From memory there were a lot of methods requiring extra properties etc. I'd definitely like to see a port but haven't got the time or the in-depth Eloquent knowledge to commit to one.
At Ulobby we maintain a fork ulobby/neoeloquent, that has just been updated to work with 5.8 and we expect to support 6, well before 5.8 is EOL (February 26th, 2020).
We're also working on branch where we replace the underlying neo4j client with the official Neo4j node driver using a Rialto bridge.
We are committed to maintaining our fork, as we use it production ๐
@berteltorp, great news, I hope I will have free time to try to somehow help with it. Thanks.
@berteltorp - great news indeed! Is it easy to get distant relationships, for example, if I have a user that has access to a file, and a file can have an infinite depth of subsequent files (like a directory structure), could I retrieve the furthest file in the chain?
@chrispage1
What you want to do is lookup based on a "variable length relationship" - and neo4j is perfect for that but it's not currently supported by neoeloquent.
One solution would be to use something like https://github.com/graphaware/neo4j-php-client to run a cypher query, and then get the id's of the files. And then run a subsequent query with neoeloquent to fetch those files and return a collection of Laravel models.
The cypher query could look something like this:
MATCH (user:User)-[:OWNS*..5]->(file:File)
WHERE id(user) = {$user_id}
RETURN id(file) as id
The *..5
signifies the depth you want the query to look. Depth can be omitted, by removing the ...5
but it is recommended to keep it.
The subsequent neoeleoquent query would then be:
$files = File::whereIn('id',$ids_from_first_query')->get();
More info on variable length queries here: https://graphaware.com/graphaware/2015/05/19/neo4j-cypher-variable-length-relationships-by-example.html
We have released a version that works with Laravel 6.0: https://github.com/ulobby/NeoEloquent/releases
@berteltorp - nice to see that someone is still pushing this! Thank you.
@berteltorp as far as i could see from your and @SimonThordal 's commits https://github.com/ulobby/NeoEloquent/compare/v6.0...6.0 these were the commits to have it compatible? or there is something else that's needed as well?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Is there a plan to add support for the newest version of Laravel? The currently supported versions are getting to the end of their support period, so having the option to upgrade while using NeoEloquent would be great.