picandocodigo / List-Category-Posts

WordPress plugin which allows you to list posts from a category into a post/page using the [catlist] shortcode.
http://wordpress.org/extend/plugins/list-category-posts/
GNU General Public License v2.0
241 stars 112 forks source link

PHP 8.2 deprecation notices related to dynamic properties #503

Open bhdd opened 1 year ago

bhdd commented 1 year ago

Expected behavior

No deprecation notices.

Actual behavior

The following deprecation notices: Deprecated: Creation of dynamic property CatListDisplayer::$parent is deprecated in [path]\wp-content\plugins\list-category-posts\include\lcp-catlistdisplayer.php on line 24 Deprecated: Creation of dynamic property CatList::$saved_wp_query is deprecated in [path]\wp-content\plugins\list-category-posts\include\lcp-catlist.php on line 55 Deprecated: Creation of dynamic property CatList::$saved_post is deprecated in [path]\wp-content\plugins\list-category-posts\include\lcp-catlist.php on line 57

Shortcode used and steps to reproduce the behavior

[catlist id=10 numberposts=10 pagination=no title_class=lcp_title date=yes orderby=date date_tag=span date_class=lcp_date instance=1]

WP version, LCP plugin version (versions of other software if relevant, e.g. PHP)

WP 6.3 LCP 0.88.1 PHP 8.2

Declaring the properties in the appropriate class addresses the deprecation notices as expected.

klemens-st commented 1 year ago

PHP 8.2 is still in beta support for WordPress, by the time it is raised to compatible we will update our code but we will not be releasing a fix at this moment.