codestar-framework icon indicating copy to clipboard operation
codestar-framework copied to clipboard

PHP 8.2 Support

Open arafatjamil01 opened this issue 2 years ago • 8 comments

I tried to use PHP 8.2, and many deprecation notices were shown. It'd be great if it updated.

arafatjamil01 avatar Oct 26 '23 10:10 arafatjamil01

Yeah, it would be nice to have compatibility with PHP 8.2. One of our users got the following "deprecated" notices:

[15-Nov-2023 12:46:58 UTC] PHP Deprecated: Creation of dynamic property CSF_Field_code_editor::$field is deprecated in /kunden/XXXXXX_XXXX/wp/wp-content/plugins/speed-booster-pack/vendor/codestar-framework/classes/fields.class.php on line 14
[15-Nov-2023 12:46:58 UTC] PHP Deprecated: Creation of dynamic property CSF_Field_code_editor::$value is deprecated in /kunden/XXXXXX_XXXX/wp/wp-content/plugins/speed-booster-pack/vendor/codestar-framework/classes/fields.class.php on line 15
[15-Nov-2023 12:46:58 UTC] PHP Deprecated: Creation of dynamic property CSF_Field_code_editor::$unique is deprecated in /kunden/XXXXXX_XXXX/wp/wp-content/plugins/speed-booster-pack/vendor/codestar-framework/classes/fields.class.php on line 16
[15-Nov-2023 12:46:58 UTC] PHP Deprecated: Creation of dynamic property CSF_Field_code_editor::$where is deprecated in /kunden/XXXXXX_XXXX/wp/wp-content/plugins/speed-booster-pack/vendor/codestar-framework/classes/fields.class.php on line 17
[15-Nov-2023 12:46:58 UTC] PHP Deprecated: Creation of dynamic property CSF_Field_code_editor::$parent is deprecated in /kunden/XXXXXX_XXXX/wp/wp-content/plugins/speed-booster-pack/vendor/codestar-framework/classes/fields.class.php on line 18

https://wordpress.org/support/topic/debug-fehler/#post-17203731

optimocha avatar Nov 15 '23 13:11 optimocha

Hi @Codestar, can you please provide an update on the issue? We're currently encountering the same error that @optimocha mentioned, and it's affecting all of our plugins :(

Niloys7 avatar Nov 28 '23 13:11 Niloys7

It's 8.3 now

arafatjamil01 avatar Dec 13 '23 04:12 arafatjamil01

I'm experiencing the same issue. Looking forward to a fix. Does anyone have a temp fix that could work?

STV11C avatar Dec 14 '23 08:12 STV11C

@STV11C I added these properties to CSF_Abstract to resolve the error when wp_debug is enabled. Tested on PHP 8.2.8.

CleanShot 2023-12-14 at 23 39 51

public $field = array(); public $unique = ''; public $value = ''; public $parent = ''; public $where = '';

Niloys7 avatar Dec 14 '23 17:12 Niloys7

@Niloys7 - THANK YOU SO MUCH!

I received two more as follows:

Deprecated: Creation of dynamic property CSF_Metabox::$post_formats is deprecated in .../codestar-framework/classes/metabox-options.class.php on line 46
Deprecated: Creation of dynamic property CSF_Metabox::$page_templates is deprecated in .../codestar-framework/classes/metabox-options.class.php on line 47

I followed the same approach by adding the following two lines in metabox-options.class.php file:

public $post_formats   = '';
public $page_templates = '';

Hopefully these additions do not break anything :)

cs-fix

STV11C avatar Dec 16 '23 03:12 STV11C

Hi Guys,

It's fixed. You can re-download and use it.

Regards.

Codestar avatar Jan 28 '24 11:01 Codestar

Thank you. ❤️

arafatjamil01 avatar Jan 28 '24 15:01 arafatjamil01