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 Tio\Laravel\GettextTranslationSaver::$config is deprecated #34

Closed
Outsidaz opened this issue Apr 12, 2023 · 4 comments

Comments

@Outsidaz
Copy link

Outsidaz commented Apr 12, 2023

Hi there,

I want you to notice, that on PHP 8.2 I've got a warning:

Creation of dynamic property Tio\Laravel\GettextTranslationSaver::$config is deprecated in <...>/vendor/tio/laravel/src/GettextTranslationSaver.php on line 26

PHP: 8.2.4
Laravel: 9.52.5

@Outsidaz
Copy link
Author

To fix the warning, need to change the declaration of the $config property from a dynamic property to a class property.

private array $config

@MichaelHoste
Copy link
Member

Thanks @Outsidaz !

We'll try to fix that soon, it seems quite easy to do.

Just so you know, we've got some weird issues between PHP 8.2 and one dependency of our test suite (cf. php-vcr/php-vcr#373) but once it's fixed, we'll update our CI to include PHP versions > 8.1

@MichaelHoste
Copy link
Member

To fix the warning, need to change the declaration of the $config property from a dynamic property to a class property.
private array $config

Thanks! That was my first impression too.
It's probably just something that we forgot, there was no reason for it to be a dynamic property.

@MichaelHoste
Copy link
Member

We fixed the deprecation warning in the 1.23 release.
Thanks for this 🙂

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