Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8: Deprecation notices #1038

Open
archetyped opened this issue Nov 3, 2023 · 3 comments
Open

PHP 8: Deprecation notices #1038

archetyped opened this issue Nov 3, 2023 · 3 comments
Assignees
Labels
compat:php PHP compatibility in-progress

Comments

@archetyped
Copy link
Owner

PHP 8 has changed how certain things are handled (function references, keywords, etc.). While functionality of such code has not changed, PHP 8 considers its usage to be deprecated (i.e. slated for removal in a future version of PHP).

As a result, while SLB is fully functional when running PHP 8, PHP may provide a deprecation notice for some parts of its code depending on a site's error reporting level.

By default, WordPress does not display PHP notices. If you are seeing undesired PHP notices (e.g. on a live site), disabling WordPress' debug output is recommended by removing the following from the site's wp-config.php:

// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );

See WordPress' debugging documentation for more details, including alternative debugging settings (such as logging debug messages for review rather than outputting them to the browser).


Work on updating code deprecated in PHP 8 is underway. Reporting specific deprecation notices is not necessary.

@archetyped archetyped added the compat:php PHP compatibility label Nov 3, 2023
@archetyped archetyped self-assigned this Nov 3, 2023
@ethanclevenger91
Copy link

#1046 would be an easy merge toward fixing some of these

@ethanclevenger91
Copy link

@archetyped we haven't seen a plugin update overall since November '22, to say nothing of this issue with a PR ready to go. Should we expect further updates to this plugin?

@pedjas
Copy link

pedjas commented Jun 21, 2024

Notice: PHP Deprecated: Use of "parent" in callables is deprecated in /home/webiste/public_html/wp-content/plugins/simple-lightbox/includes/class.options.php on line 501 is easy to fix

Replace
$ret = call_user_func_array( array( 'parent', 'add' ), $args );
with
$ret = call_user_func_array( array( parent::class, 'add' ), $args );

I do not understand why it is not yet fixed in offical code.

Is simple-lightbox abandoned?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compat:php PHP compatibility in-progress
Projects
None yet
Development

No branches or pull requests

3 participants