No Code Attached Yet PHP 8.x
avatar HLeithner
HLeithner
28 Jul 2021

PHP deprecations for 8.1 has been implemented and this features are planed to be removed in 9.0

https://wiki.php.net/rfc/deprecations_php_8_1

Special attention should go to the removal of strftime

If this is relevant for 3.x is open for discussion, since 3.10 will be EOL before php 8.0 is EOL and at this point of time all Joomla Installation should be upgraded to 4.x (I know that this is more a wish then a fact).

For 4.x series I would say starting with 4.1 it's relevant.

Votes

# of Users Experiencing Issue
1/2
Average Importance Score
4.00

avatar HLeithner HLeithner - open - 28 Jul 2021
avatar joomla-cms-bot joomla-cms-bot - change - 28 Jul 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 28 Jul 2021
avatar PhilETaylor
PhilETaylor - comment - 28 Jul 2021
avatar PhilETaylor
PhilETaylor - comment - 6 Sep 2021

Joomal 3.10.1
PHP 8.1-RC2
http://example.com/installation/index.php


Deprecated: Joomla\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/input/src/Input.php on line 41

Deprecated: Return type of Joomla\Input\Input::count() should either be compatible with Countable::count(): int, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/input/src/Input.php on line 170

Deprecated: Joomla\CMS\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/src/Input/Input.php on line 31

Deprecated: Return type of Joomla\Registry\Registry::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/registry/src/Registry.php on line 126

Deprecated: Return type of Joomla\Registry\Registry::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/registry/src/Registry.php on line 439

Deprecated: Return type of Joomla\Registry\Registry::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/registry/src/Registry.php on line 453

Deprecated: Return type of Joomla\Registry\Registry::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/registry/src/Registry.php on line 468

Deprecated: Return type of Joomla\Registry\Registry::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/registry/src/Registry.php on line 482

Deprecated: Return type of Joomla\Registry\Registry::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/registry/src/Registry.php on line 288

Deprecated: Return type of Joomla\Registry\Registry::count() should either be compatible with Countable::count(): int, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/registry/src/Registry.php on line 112

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/src/Application/WebApplication.php on line 1256

Deprecated: Automatic conversion of false to array is deprecated in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/uri/src/UriHelper.php on line 50

After installation - loading the home page


Deprecated: Return type of Joomla\CMS\Date\Date::format($format, $local = false, $translate = true) should either be compatible with DateTime::format(string $format): string, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/src/Date/Date.php on line 281

Deprecated: Return type of Joomla\CMS\Date\Date::setTimezone($tz) should either be compatible with DateTime::setTimezone(DateTimeZone $timezone): DateTime, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/src/Date/Date.php on line 398

Deprecated: Joomla\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/input/src/Input.php on line 41

Deprecated: Return type of Joomla\Input\Input::count() should either be compatible with Countable::count(): int, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/input/src/Input.php on line 170

Deprecated: Joomla\CMS\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/src/Input/Input.php on line 31

Deprecated: Return type of Joomla\Registry\Registry::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/registry/src/Registry.php on line 126

Deprecated: Return type of Joomla\Registry\Registry::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/registry/src/Registry.php on line 439

Deprecated: Return type of Joomla\Registry\Registry::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/registry/src/Registry.php on line 453

Deprecated: Return type of Joomla\Registry\Registry::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/registry/src/Registry.php on line 468

Deprecated: Return type of Joomla\Registry\Registry::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/registry/src/Registry.php on line 482

Deprecated: Return type of Joomla\Registry\Registry::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/registry/src/Registry.php on line 288

Deprecated: Return type of Joomla\Registry\Registry::count() should either be compatible with Countable::count(): int, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/registry/src/Registry.php on line 112

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/src/Application/WebApplication.php on line 1256

Deprecated: Automatic conversion of false to array is deprecated in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/vendor/joomla/uri/src/UriHelper.php on line 50

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/src/Application/WebApplication.php on line 1305

Deprecated: Return type of Joomla\CMS\Session\Session::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/src/Session/Session.php on line 298

Warning: session_name(): Session name cannot be changed after headers have already been sent in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/joomla/session/handler/native.php on line 128

Deprecated: Joomla\CMS\Input\Cookie implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/src/Input/Cookie.php on line 0

Warning: session_cache_limiter(): Session cache limiter cannot be changed after headers have already been sent in /Users/phil/Sites/Joomla_3.10.1-Stable-Full_Package/libraries/joomla/session/handler/native.php on line 235
avatar Bakual
Bakual - comment - 6 Sep 2021

To get rid of strftime requires a rewrite of the calendar formfield. The we can drop it. Just needs someone skilled with JS ?

avatar dgrammatiko
dgrammatiko - comment - 6 Sep 2021

Just needs someone skilled with JS

Temporal is also coming to all the browsers in the coming months. This is important because it means that all the browsers, natively, will support almost all calendars. Of course, the project doesn't have to wait till the feature has landed as there's already a polyfill, so, in theory, someone could create a calendar even today. Also FWIW I'm already working on such an implementation for my own projects https://github.com/dgrammatiko/temporal-calendar

avatar PhilETaylor
PhilETaylor - comment - 22 Sep 2021

34 BC breaking changes in php 8.1 now documented...

https://github.com/php/php-src/blob/PHP-8.1/UPGRADING#L18-L179

avatar PhilETaylor
PhilETaylor - comment - 14 Oct 2021

is_resource is also going to be an issue for Joomla. https://externals.io/message/116127

avatar xillibit
xillibit - comment - 31 Oct 2021

strftime is set as deprecated in Php 8.1 and will be removed in Php 9.0

On 8.1.0-RC6-DEV with J!4.0.0 i have too an exception :

Call to a member function getTag() on null in \joomla-cms-40-dev\libraries\src\WebAsset\AssetItem\LangActiveAssetItem.php (line 46)

The stack trace :

`Call to a member function getTag() on null

at \joomla-cms-40-dev\libraries\src\WebAsset\AssetItem\LangActiveAssetItem.php:46
at Joomla\CMS\WebAsset\AssetItem\LangActiveAssetItem->__construct('template.active.language', '', array('description' => 'An asset to allow language specific css, eg 'language/[lang-CODE]/[lang-CODE].css', to use it as a dependency to the active template', 'type' => 'style', 'class' => 'LangActiveAssetItem', 'dependencies' => array('template.active'), 'assetSource' => array('registryFile' => 'templates\cassiopeia\joomla.asset.json')), array(), array())
(\joomla-cms-40-dev\libraries\src\WebAsset\WebAssetRegistry.php:241)
at Joomla\CMS\WebAsset\WebAssetRegistry->createAsset('template.active.language', '', array('description' => 'An asset to allow language specific css, eg 'language/[lang-CODE]/[lang-CODE].css', to use it as a dependency to the active template', 'type' => 'style', 'class' => 'LangActiveAssetItem', 'dependencies' => array('template.active'), 'assetSource' => array('registryFile' => 'templates\cassiopeia\joomla.asset.json')))
(\joomla-cms-40-dev\libraries\src\WebAsset\WebAssetRegistry.php:424)
at Joomla\CMS\WebAsset\WebAssetRegistry->parseRegistryFile('templates\cassiopeia\joomla.asset.json')
(\joomla-cms-40-dev\libraries\src\WebAsset\WebAssetRegistry.php:347)
at Joomla\CMS\WebAsset\WebAssetRegistry->parseRegistryFiles()
(\joomla-cms-40-dev\libraries\src\WebAsset\WebAssetRegistry.php:128)
at Joomla\CMS\WebAsset\WebAssetRegistry->get('style', 'theme.colors_standard')
(\joomla-cms-40-dev\libraries\src\WebAsset\WebAssetManager.php:257)
at Joomla\CMS\WebAsset\WebAssetManager->useAsset('style', 'theme.colors_standard')
(\joomla-cms-40-dev\libraries\src\WebAsset\WebAssetManager.php:225)
at Joomla\CMS\WebAsset\WebAssetManager->__call('registerandusestyle', array('theme.colors_standard', 'templates/cassiopeia/css/global/colors_standard.css'))
(\joomla-cms-40-dev\templates\cassiopeia\error.php:38)
at require('\joomla-cms-40-dev\templates\cassiopeia\error.php')
(\joomla-cms-40-dev\libraries\src\Document\HtmlDocument.php:771)
at Joomla\CMS\Document\HtmlDocument->_loadTemplate('\joomla-cms-40-dev\templates/cassiopeia', 'error.php')
(\joomla-cms-40-dev\libraries\src\Document\HtmlDocument.php:830)
at Joomla\CMS\Document\HtmlDocument->_fetchTemplate(array('template' => 'cassiopeia', 'directory' => '\joomla-cms-40-dev\templates', 'debug' => true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
(\joomla-cms-40-dev\libraries\src\Document\HtmlDocument.php:633)
at Joomla\CMS\Document\HtmlDocument->parse(array('template' => 'cassiopeia', 'directory' => '\joomla-cms-40-dev\templates', 'debug' => true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
(\joomla-cms-40-dev\libraries\src\Document\HtmlDocument.php:652)
at Joomla\CMS\Document\HtmlDocument->render(false, array('template' => 'cassiopeia', 'directory' => '\joomla-cms-40-dev\templates', 'debug' => true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
(\joomla-cms-40-dev\libraries\src\Document\ErrorDocument.php:140)
at Joomla\CMS\Document\ErrorDocument->render(false, array('template' => 'cassiopeia', 'directory' => '\joomla-cms-40-dev\templates', 'debug' => true, 'csp_nonce' => null, 'templateInherits' => '', 'params' => object(Registry), 'file' => 'error.php'))
(\joomla-cms-40-dev\libraries\src\Error\Renderer\HtmlRenderer.php:77)
at Joomla\CMS\Error\Renderer\HtmlRenderer->render(object(RuntimeException))
(\joomla-cms-40-dev\libraries\src\Exception\ExceptionHandler.php:128)
at Joomla\CMS\Exception\ExceptionHandler::render(object(RuntimeException))
(\joomla-cms-40-dev\libraries\src\Exception\ExceptionHandler.php:71)
at Joomla\CMS\Exception\ExceptionHandler::handleException(object(RuntimeException))
(\joomla-cms-40-dev\libraries\src\Application\CMSApplication.php:311)
at Joomla\CMS\Application\CMSApplication->execute()
(\joomla-cms-40-dev\includes\app.php:63)
at require_once('\joomla-cms-40-dev\includes\app.php')
(\joomla-cms-40-dev\index.php:32) `

avatar PhilETaylor
PhilETaylor - comment - 24 Dec 2021
avatar alikon alikon - change - 27 Dec 2021
Labels Added: No Code Attached Yet ?
Removed: ?
avatar alikon alikon - labeled - 27 Dec 2021
avatar PhilETaylor
PhilETaylor - comment - 28 Dec 2021

@Bakual @dgrammatiko Please see #36469 with replacement for strftime for calendar (with unit tests)

avatar sunnydrake
sunnydrake - comment - 1 Feb 2022

BAD SLOW FIX
Deprecated: Automatic conversion of false to array is deprecated in /libraries/vendor/joomla/uri/src/UriHelper.php on line 50
add line
if ($result===false) $result=array();

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in libraries/src/Uri/Uri.php on line 143
add line
if(is_null($live_site)) $live_site='';


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34952.

avatar sunnydrake
sunnydrake - comment - 1 Feb 2022

BAD SLOW FIX
Deprecated: Automatic conversion of false to array is deprecated in /libraries/vendor/joomla/uri/src/UriHelper.php on line 50
add line
if ($result===false) $result=array();

Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in libraries/src/Uri/Uri.php on line 143
add line
if(is_null($live_site)) $live_site='';


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34952.

avatar sunnydrake
sunnydrake - comment - 1 Feb 2022

JOOMLA 3.10
Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in libraries/src/Uri/Uri.php on line 141
replace
$live_site = ($uri->isSsl()) ? str_replace('http://', 'https://', (string) $config->get('live_site')) : $config->get('live_site');

database/driver/mysqli.php :254 possible passing param as null
at line 240 add
if (is_null($text)) return '';
Deprecated: ucfirst(): Passing null to parameter #1 ($string) of type string is deprecated in /libraries/src/MVC/Controller/BaseController.php on line 286
$class = ucfirst((string)$prefix) . 'Controller' . ucfirst((string)$type);
Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in libraries/src/MVC/Controller/BaseController.php on line 684
$task = strtolower((string)$task);
Deprecated: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in libraries/src/Document/HtmlDocument.php on line 595
$words = preg_split('# ' . $operators . ' #', $condition, 0, PREG_SPLIT_DELIM_CAPTURE);
Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in administrator/modules/mod_menu/menu.php on line 383
if (!in_array($item->type, array('separator', 'heading', 'container')) && trim((string)$item->link) === '')
BAD FIX need more research
Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /administrator/components/com_virtuemart/helpers/vrequest.php on line 144
replace FILTER_SANITIZE_STRING with FILTER_SANITIZE_FULL_SPECIAL_CHARS in all doc
Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in administrator/includes/helper.php on line 31
$option = strtolower((string)$app->input->get('option'));


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34952.
avatar zero-24
zero-24 - comment - 1 Feb 2022

@sunnydrake please create a dedicated issue with the coresponding versions and stacktraces so the issue can be debugged and fixed thanks.

avatar brianteeman
brianteeman - comment - 24 Feb 2022

Does this need to be kept open?

avatar sunnydrake
sunnydrake - comment - 26 Feb 2022

I fixed a lot of bugs for my version with plugins but... have no time for
upload. Sorry
Im from Kyiv Ukraine so im a bit busy with war at the moment, maybe another
time.

On Fri, Feb 25, 2022 at 12:06 AM Brian Teeman @.***>
wrote:

Does this need to be kept open?


Reply to this email directly, view it on GitHub
#34952 (comment),
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADSSLWHWOVP2DRD5XLAFGADU42TU7ANCNFSM5BEDJ7IQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID:
@.***>

avatar brianteeman
brianteeman - comment - 26 Feb 2022

stay safe!!

avatar laoneo
laoneo - comment - 20 Mar 2022

Please test #37329 as it is a followup of #36469.

avatar laoneo
laoneo - comment - 20 Mar 2022

For most of the cases, there are already pull requests open, so I guess we can close this one here then. If you want to keep track of open 8.1 pr's, use the 8.x label.

avatar laoneo
laoneo - comment - 7 Apr 2022

Please test #37502 which solves the input error.

avatar FIDELTORRES
FIDELTORRES - comment - 9 Nov 2022

sunnydrake espero que estes bien y tambien tu familia.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34952.

avatar FIDELTORRES
FIDELTORRES - comment - 9 Nov 2022

hola buen día, alguien me puede ayudar con este error.
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in
trabajo con PHP y SCRIPTCASE desde que migre a PHP 8.1 tengo estos problemas.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/34952.

avatar joomdonation joomdonation - change - 16 Nov 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-11-16 09:24:16
Closed_By joomdonation
Labels Added: PHP 8.x
Removed: ?
avatar joomdonation joomdonation - close - 16 Nov 2022
avatar joomdonation
joomdonation - comment - 16 Nov 2022

As of right now, Joomla 4 works well with PHP 8.1. There are still some deprecated warnings somewhere in our code but it was reported in separate issues. If there is any new problem found, it should be submitted in a separate issue, too.

With that said, I'm closing this issue.

Add a Comment

Login with GitHub to post a comment