#1 July 3, 2024 8:34am

doon.mok
Member
Registered: May 6, 2015
Posts: 144

Events 2 - PHP 8.2 and dynamic property depreciated

Hello,

We are testing PHP 8.2 with Events 2 v2.5 extension and we are getting the following below.

Deprecated: Creation of dynamic property BTXEvents\Event::$Array is deprecated in C:\MAMP\htdocs\upgrade\extensions\com.fastspot.2.events\classes\base-object.php on line 32

Offline

#2 July 8, 2024 3:19pm

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 978

Re: Events 2 - PHP 8.2 and dynamic property depreciated

You'll need to add an "#[\AllowDynamicProperties]" attribute to the top of the class to get the deprecated warning to go away. Adding it makes the extension require PHP 8 so it's a bit of a double-edged sword which is why I haven't added it directly yet.

Offline

#3 July 8, 2024 3:41pm

doon.mok
Member
Registered: May 6, 2015
Posts: 144

Re: Events 2 - PHP 8.2 and dynamic property depreciated

Thank you, Tim!

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.