{"id":17168378,"date":"2023-11-02T00:30:01","date_gmt":"2023-11-02T00:30:01","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/php-8-2-deprecation-notices-3\/"},"modified":"2023-11-02T00:30:01","modified_gmt":"2023-11-02T00:30:01","slug":"php-8-2-deprecation-notices-3","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/php-8-2-deprecation-notices-3\/","title":{"rendered":"PHP 8.2 Deprecation notices"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Hi,<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After updating to PHP 8.2, I&#8217;m getting these deprecation notices.  It looks like the Carbon library is out of date.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#091;02-Nov-2023 00:19:34 UTC] PHP Deprecated:  Return type of Carbon\\Carbon::createFromFormat($format, $time, $tz = null) should either be compatible with DateTime::createFromFormat(string $format, string $datetime, ?DateTimeZone $timezone = null): DateTime|false, or the #&#091;\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in \/var\/www\/html\/public\/content\/plugins\/stream\/includes\/lib\/Carbon.php on line 372\n&#091;02-Nov-2023 00:19:34 UTC] PHP Deprecated:  Return type of Carbon\\Carbon::setTimezone($value) should either be compatible with DateTime::setTimezone(DateTimeZone $timezone): DateTime, or the #&#091;\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in \/var\/www\/html\/public\/content\/plugins\/stream\/includes\/lib\/Carbon.php on line 751\n&#091;02-Nov-2023 00:19:34 UTC] PHP Deprecated:  Return type of Carbon\\Carbon::setTime($hour, $minute, $second = 0, $microseconds = 0) should either be compatible with DateTime::setTime(int $hour, int $minute, int $second = 0, int $microsecond = 0): DateTime, or the #&#091;\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in \/var\/www\/html\/public\/content\/plugins\/stream\/includes\/lib\/Carbon.php on line 682\n&#091;02-Nov-2023 00:19:34 UTC] PHP Deprecated:  Return type of Carbon\\Carbon::setDate($year, $month, $day) should either be compatible with DateTime::setDate(int $year, int $month, int $day): DateTime, or the #&#091;\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in \/var\/www\/html\/public\/content\/plugins\/stream\/includes\/lib\/Carbon.php on line 623\n&#091;02-Nov-2023 00:19:34 UTC] PHP Deprecated:  DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated in \/var\/www\/html\/public\/content\/plugins\/stream\/includes\/lib\/Carbon.php on line 190\n<\/code><\/pre>\n","protected":false},"template":"","class_list":["post-17168378","topic","type-topic","status-publish","hentry","topic-tag-deprecation"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/17168378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/17168378\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=17168378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}