neo4j-php-client icon indicating copy to clipboard operation
neo4j-php-client copied to clipboard

Preparation for migration to bolt V5

Open stefanak-michal opened this issue 2 years ago • 5 comments

In future PHP Bolt library will change protocol classes and it won't be using chain of responsibility anymore. Each protocol version class won't be extending the previous one. It will change because changes between versions are not consistent. Therefore this php client needs to be prepared for this change.

I updated version check in the code with fn version_compare.

stefanak-michal avatar Jul 29 '22 08:07 stefanak-michal

Good stuff! I am working on the connection resolver now, but will circle back to this later today!

Thanks :+1:

transistive avatar Jul 29 '22 08:07 transistive

Just doing a cursory glance at the lint tests: it starts to complain about undefined methods. It shouldn't be a big deal. We need to typehint the protocol in phpdoc as V3|V4|V4_1|V4_2|V4_3|V4_4 before it stops yelling at us. Looks like you didn't actually break anything! :tada:

transistive avatar Jul 29 '22 08:07 transistive

If interface reference will be used instead of abstract class will lint still complain about missing methods?

stefanak-michal avatar Jul 29 '22 08:07 stefanak-michal

Yes, if the methods aren't defined, it will. Psalm is really strict

transistive avatar Jul 29 '22 08:07 transistive

There are two complaints from Psalm I cannot solve until the actual new version is implemented. Consider this PR a draft until the new Bolt version has been released

transistive avatar Jul 29 '22 14:07 transistive