berlindb / core

All of the required core code
MIT License
253 stars 27 forks source link

Issue/46 - Fix magic methods not working as intended #47

Open JJJ opened 4 years ago

JJJ commented 4 years ago

This pull request changes quite a bit about how classes store their properties.

All of this is required to make overrides work as intended. But then, WordPress functions that use WP_List_Util will then stop working, because they use array_key_exists() which will bypass PHP magic methods completely.

That means this PR either requires:

Fixes #46.

Related to: https://core.trac.wordpress.org/ticket/50095

JJJ commented 4 years ago

The above upstream WordPress core change was merged into WordPress 5.5!

alexstandiford commented 4 years ago

So should we assume that anything using BerlinDB should be on 5.5 or greater?

JJJ commented 4 years ago

So should we assume that anything using BerlinDB should be on 5.5 or greater?

Once this is merged, yes.

JJJ commented 3 years ago

add a note in the Readme

👍

BerlinDB currently requires a minimum of WordPress 5.5

It doesn't yet, but it will when #46 is resolved, which is in the Ongoing milestone for pretty much this reason.

Based on the WordPress functions that Berlin uses, its minimum is probably 3.3 thanks to it calling wp_suspend_cache_addition() in Query::cache_set().

That's a pretty big jump from 3.3 to 5.5, so I'm not super eager to merge this. 😬

alexstandiford commented 3 years ago

Yep, totally understandable.