berlindb/core

Creation of dynamic property is deprecated

Opened this issue · 2 comments

Hello!

Im having some troubles with BerlinDB in php 8.2, it throws an error saying Creation of dynamic property LCDR\DB\Row\Concept::$modified is deprecated this happens to all the properties from Row:

  Creation of dynamic property LCDR\DB\Row\Concept::$modified is deprecated

  at C:\Users\55119\Elucidário.art\elucidario\packages\core\vendor\berlindb\core\src\Database\Base.php:272
    268▕                }
    269270▕                // Set all properties
    271foreach ( $args as $key => $value ) {
  ➜ 272$this->{$key} = $value;
    273▕                }
    274▕        }
    275276▕        /**

  1   C:\Users\55119\Elucidário.art\elucidario\packages\core\vendor\bin\pest:119
      include("C:\Users\55119\Elucidário.art\elucidario\packages\core\vendor\pestphp\pest\bin\pest")
$ php -v
PHP 8.2.4 (cli) (built: Mar 14 2023 17:54:25) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.2.4, Copyright (c) Zend Technologies

link: https://www.php.net/manual/en/migration82.deprecated.php#:~:text=The%20creation%20of%20dynamic%20properties,not%20affected%20by%20this%20change.

adding #[\AllowDynamicProperties] to Base classe solved the issue.

actually if we add berlindb with ^2.0.1 version the problem occur, but if we switch the version to @dev it works correctly.