kirby-meta-tags icon indicating copy to clipboard operation
kirby-meta-tags copied to clipboard

PHP 8.2 Creation of dynamic property is deprecated

Open Thomasorus opened this issue 2 years ago • 1 comments

Hi!

I was testing the waters for Kirby 3.9 RC1 and PHP8.2 and encountered a deprecation notice that I thought might be important to report:

Whoops\Exception\ErrorException thrown with message "Creation of dynamic property PedroBorges\KirbyMetaTags\MetaTags::$data is deprecated"

Stacktrace:
Whoops\Exception\ErrorException in /site/plugins/meta-tags/src/MetaTags.php:45

More information about this deprecation: https://stitcher.io/blog/deprecated-dynamic-properties-in-php-82

That's all, have a nice day.

Thomasorus avatar Dec 19 '22 22:12 Thomasorus

If you put #[\AllowDynamicProperties] on /site/plugins/meta-tags/src/MetaTags.php before opening the class MetaTags solves this.

isaactopo avatar Feb 02 '23 09:02 isaactopo