Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creation of dynamic property is deprecated #161

Open
hgodinho opened this issue Sep 3, 2023 · 2 comments
Open

Creation of dynamic property is deprecated #161

hgodinho opened this issue Sep 3, 2023 · 2 comments
Assignees
Milestone

Comments

@hgodinho
Copy link

hgodinho commented Sep 3, 2023

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.

@hgodinho
Copy link
Author

hgodinho commented Sep 3, 2023

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

@hgodinho
Copy link
Author

hgodinho commented Sep 7, 2023

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

@JJJ JJJ self-assigned this Nov 12, 2023
@JJJ JJJ added this to the Ongoing milestone Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants