themeum / kirki

Extending the customizer
https://kirki.org
MIT License
1.26k stars 329 forks source link

PHP 8.2 deprecation notices #2501

Closed IanDelMar closed 1 year ago

IanDelMar commented 1 year ago

Issue description:

Using PHP 8.2 Kirki causes a couple of deprecation notices related to dynamic properties.

Version used:

4.1.1

Using theme_mods or options?

theme_mods

PHP error messages that might be related

PHP Deprecated:  Creation of dynamic property Kirki\Compatibility\Framework::$modules is deprecated in /wp-content/plugins/kirki/kirki.php on line 73
PHP Deprecated:  Creation of dynamic property Kirki\Field\Repeater::$label is deprecated in /wp-content/plugins/kirki/kirki-packages/compatibility/src/Field.php on line 299
PHP Deprecated:  Creation of dynamic property Kirki\Field\Repeater::$row_label is deprecated in /wp-content/plugins/kirki/kirki-packages/compatibility/src/Field.php on line 299
PHP Deprecated:  Creation of dynamic property Kirki\Field\Repeater::$button_label is deprecated in /wp-content/plugins/kirki/kirki-packages/compatibility/src/Field.php on line 299

JS error messages that might be related

Code to reproduce the issue (config + field(s))

new \Kirki\Field\Repeater(
    [
        'settings'     => 'repeater_setting_2',
        'label'        => esc_html__( 'Repeater Control', 'kirki' ),
        'section'      => 'section_id',
        'priority'     => 10,
        'row_label'    => [
            'type'  => 'field',
            'value' => esc_html__( 'Your Custom Value', 'kirki' ),
            'field' => 'link_text',
        ],
        'button_label' => esc_html__( '"Add new" button label (optional) ', 'kirki' ),
        'default'      => [
            [
                'link_text'   => esc_html__( 'Kirki Site', 'kirki' ),
                'link_url'    => 'https://kirki.org/',
            ],
            [
                'link_text'   => esc_html__( 'Kirki WP', 'kirki' ),
                'link_url'    => 'https://wordpress.org/plugins/kirki/',
            ],
        ],
        'fields'       => [
            'link_text'   => [
                'type'        => 'text',
                'label'       => esc_html__( 'Link Text', 'kirki' ),
                'description' => esc_html__( 'Description', 'kirki' ),
                'default'     => '',
            ],
            'link_url'    => [
                'type'        => 'text',
                'label'       => esc_html__( 'Link URL', 'kirki' ),
                'description' => esc_html__( 'Description', 'kirki' ),
                'default'     => '',
            ],
        ],
    ]
);
IanDelMar commented 1 year ago

Has been resolved