berlindb / core

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

`2.1.0` - Incorrect Column Retrieval in PHP `8.x` #159

Open spencerfinnell opened 1 year ago

spencerfinnell commented 1 year ago

Hey @JJJ,

I believe this change https://github.com/berlindb/core/commit/b8fdfc6c45abb13d66ce1894896a747ca3933dcf in release/2.1.0 is having unintended side effects in PHP 8.x

In 8.x the $columns value remains the same as the first time it is retrieved. In 7.4 the $columns value updates with new class instances.

You can see the difference here: https://onlinephp.io/c/b236e

Screenshot 2023-05-11 at 4 30 00 PM

I believe it's because of this: https://wiki.php.net/rfc/static_variable_inheritance