[wp-trac] [WordPress Trac] #58876: Calling get_class() without arguments is deprecated in class-wp-http.php
WordPress Trac
noreply at wordpress.org
Mon Jul 24 12:52:47 UTC 2023
#58876: Calling get_class() without arguments is deprecated in class-wp-http.php
-----------------------------+---------------------
Reporter: ipajen | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.4
Component: HTTP API | Version:
Severity: normal | Resolution:
Keywords: php83 has-patch | Focuses:
-----------------------------+---------------------
Comment (by SergeyBiryukov):
Replying to [comment:6 jrf]:
> Replying to [comment:5 ipajen]:
> > Yes using 8.3.0beta1 but if I understand it correctly "Calling
get_class() without arguments is deprecated" in PHP8.1? Its confusing.
>
> No, it's not, but it will be deprecated in PHP 8.3.
>
> PHP 7.2
[https://www.php.net/manual/en/migration72.incompatible.php#migration72.incompatible
.no-null-to-get_class introduced a warning] about `get_class(null)`
though, which became a fatal error in PHP 8.0. You might be confused with
that ?
I was confused for a bit here too, because calling `get_class()` without
an argument
[https://wiki.php.net/rfc/deprecations_php_8_1#get_class_get_parent_class_and_get_called_class_without_argument
was proposed for deprecation in PHP 8.1], but apparently did not get
enough votes (50/50 split) at the time.
I see now that there is a
[https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures#get_class_and_get_parent_class
newer proposal] as part of deprecating functions with overloaded
signatures, which did get accepted in PHP 8.3.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58876#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list