Advertisement

Troubleshooting "Deprecated: Creation of dynamicproperty Joomla\CMS\Updater\Update::$sha256" Topic is solved

Need help with the Administration of your Joomla! 5.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
nacc
I've been banned!
Posts: 347
Joined: Mon Jul 03, 2023 7:08 pm

Troubleshooting "Deprecated: Creation of dynamicproperty Joomla\CMS\Updater\Update::$sha256"

Post by nacc » Thu Nov 30, 2023 7:05 pm

I'm trying to troubleshoot the non-fatal warning message I get when I use the Joomla! Update component. When I use the Joomla! Update component, I see these four warning messages on the screen (they appear to be the same message repeated four times and I've enlarged one of them in the screenshot):
updateJoomla-j5Warnings.png
The text of the warning message is:

Code: Select all

( ! ) Deprecated: Creation of dynamic property Joomla\CMS\Updater\Update::$sha256 is deprecated in C:\wamp64\[redacted]\libraries\src\Updater\Update.php on line 418
Call Stack
#	Time	Memory	Function	Location
1	0.0001	367632	{main}( )	...\index.php:0
2	0.0001	368352	require_once( 'C:\wamp64\public_html\testj5x\administrator\includes\app.php )	...\index.php:32
3	0.0161	616768	Joomla\CMS\Application\CMSApplication->execute( )	...\app.php:58
4	0.0178	741440	Joomla\CMS\Application\AdministratorApplication->doExecute( )	...\CMSApplication.php:306
5	0.0947	1671776	Joomla\CMS\Application\AdministratorApplication->dispatch( $component = ??? )	...\AdministratorApplication.php:195
6	0.1005	1665160	Joomla\CMS\Component\ComponentHelper::renderComponent( $option = 'com_joomlaupdate', $params = ??? )	...\AdministratorApplication.php:150
7	0.1024	1727296	Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch( )	...\ComponentHelper.php:361
8	0.1031	1730720	Joomla\CMS\MVC\Controller\BaseController->execute( $task = 'display' )	...\ComponentDispatcher.php:143
9	0.1031	1730720	Joomla\Component\Joomlaupdate\Administrator\Controller\DisplayController->display( $cachable = ???, $urlparams = ??? )	...\BaseController.php:730
10	0.7185	1856392	Joomla\Component\Joomlaupdate\Administrator\View\Joomlaupdate\HtmlView->display( $tpl = ??? )	...\DisplayController.php:88
11	0.7185	1856392	Joomla\CMS\MVC\View\AbstractView->get( $property = 'UpdateInformation', $default = ??? )	...\HtmlView.php:157
12	0.7185	1856440	Joomla\Component\Joomlaupdate\Administrator\Model\UpdateModel->getUpdateInformation( )	...\AbstractView.php:159
13	0.7426	1876136	Joomla\CMS\Updater\Update->loadFromXml( $url = 'https://update.joomla.org/core/j5/default.xml', $minimumStability = 4 )	...\UpdateModel.php:308
14	1.5764	1891080	xml_parse( $parser = class XMLParser { }, $data = '<?xml version="1.0" ?>\n<updates>\n\t<update>\n\t\t<name>Joomla! 5.0</name>\n\t\t<description>Joomla! 5.0 CMS</description>\n\t\t<element>joomla</element>\n\t\t<type>file</type>\n\t\t<version>5.0.1</version>\n\t\t<infourl title="Joomla 5.0.1 Release">https://www.joomla.org/announcements/release-news/5901-joomla-5-0-1-and-4-4-1-security-and-bug-fix-release.html</infourl>\n\t\t<downloads>\n\t\t\t<downloadurl type="full" format="zip">https://downloads.joomla.org/cms/joomla5/5-0-1/Joomla_5.0.1-Stable-Update_Package.zip</downloadurl>\n\t\t\t<d'... )	...\Update.php:505
15	1.5785	1904112	Joomla\CMS\Updater\Update->_endElement( $parser = class XMLParser { }, $name = 'UPDATES' )
My FPA report appears below:
Forum Post Assistant (v1.6.6) : 1-Dec-2023 wrote:
Last PHP Error(s) Reported :: wrote:[01-Dec-2023 05:42:31 Australia/Sydney] PHP 15. Joomla\CMS\Updater\Update->_endElement($parser = class XMLParser { }, $name = 'UPDATES') C:\wamp64\[redacted]\libraries\src\Updater\Update.php:505
Basic Environment :: wrote:Joomla! Instance :: Joomla! 5.0.1-Stable (Kuboresha) 28-November-2023
Joomla! Configured :: Yes | Read-Only (444) |
Configuration Options :: Offline: false | SEF: true | SEF Suffix: false | SEF ReWrite: true | .htaccess/web.config: Yes | GZip: false | Cache: false | CacheTime: 15 | CacheHandler: file | CachePlatformPrefix: false | FTP Layer: N/A | Proxy: false | LiveSite: | Session lifetime: 15 | Session handler: filesystem | Shared sessions: false | SSL: 0 | Error Reporting: default | Site Debug: false | Language Debug: false | Default Access: Public | Unicode Slugs: false | dbConnection Type: mysqli | PHP Supports J! 5.0.1: Yes | Database Supports J! 5.0.1: Yes | Database Credentials Present: Password missing |

Host Configuration :: OS: Windows NT | OS Version: 6.3 | Technology: AMD64 | Web Server: Apache/2.4.51 (Win64) PHP/8.2.9 mod_fcgid/2.3.10-dev | Encoding: gzip, deflate | System TMP Writable: Yes | Free Disk Space : 488.78 GiB |

PHP Configuration :: Version: 8.2.9 | PHP API: apache2handler | Session Path Writable: Yes | Display Errors: 0 | Error Reporting: 32767 | Log Errors To: c:/wamp64/logs/php_error.log | Last Known Error: 01st December 2023 05:42:31. | Register Globals: | Magic Quotes: | Safe Mode: | Allow url fopen: 1 | Open Base: | Uploads: 1 | Max. Upload Size: 128M | Max. POST Size: 256M | Max. Input Time: 60 | Max. Execution Time: 120 | Memory Limit: 512M

Database Configuration :: Version: 8.0.34 (Client:mysqlnd 8.2.9) | Database Size: 6.48 MiB | #of Tables with config prefix:  80 | #of other Tables:  0 | User Privileges : GRANT PROXY
Detailed Environment :: wrote:PHP Extensions :: Core (8.2.9) | bcmath (8.2.9) | calendar (8.2.9) | ctype (8.2.9) | date (8.2.9) | filter (8.2.9) | hash (8.2.9) | iconv (8.2.9) | json (8.2.9) | SPL (8.2.9) | pcre (8.2.9) | random (8.2.9) | readline (8.2.9) | Reflection (8.2.9) | session (8.2.9) | standard (8.2.9) | mysqlnd (mysqlnd 8.2.9) | tokenizer (8.2.9) | zlib (8.2.9) | libxml (8.2.9) | dom (20031129) | PDO (8.2.9) | openssl (8.2.9) | SimpleXML (8.2.9) | xml (8.2.9) | xmlreader (8.2.9) | xmlwriter (8.2.9) | apache2handler (8.2.9) | ldap (8.2.9) | curl (8.2.9) | com_dotnet (8.2.9) | fileinfo (8.2.9) | gd (8.2.9) | gettext (8.2.9) | gmp (8.2.9) | intl (8.2.9) | imap (8.2.9) | mbstring (8.2.9) | exif (8.2.9) | mysqli (8.2.9) | odbc (8.2.9) | Phar (8.2.9) | pdo_mysql (8.2.9) | pdo_sqlite (8.2.9) | shmop (8.2.9) | snmp (8.2.9) | soap (8.2.9) | sockets (8.2.9) | sqlite3 (8.2.9) | xsl (8.2.9) | zip (1.21.1) | Zend OPcache (8.2.9) | xdebug (3.2.2) | Zend Engine (4.2.9) |
Potential Missing Extensions ::

Switch User Environment :: PHP CGI: No | Server SU: No | PHP SU: No | Potential Ownership Issues: No

Apache Modules :: core | mod_win32 | mpm_winnt | http_core | mod_so | mod_access_compat | mod_actions | mod_alias | mod_allowmethods | mod_asis | mod_auth_basic | mod_auth_digest | mod_authn_core | mod_authn_file | mod_authz_core | mod_authz_groupfile | mod_authz_host | mod_authz_user | mod_autoindex | mod_cache | mod_cache_disk | mod_cgi | mod_dir | mod_env | mod_file_cache | mod_include | mod_isapi | mod_log_config | mod_mime | mod_negotiation | mod_rewrite | mod_setenvif | mod_userdir | mod_vhost_alias | mod_php | mod_fcgid | Apache/2.4.51 (Win64) PHP/8.2.9 mod_fcgid/2.3.10-dev |
Potential Missing Modules :: mod_expires | mod_deflate | mod_ssl |
Folder Permissions :: wrote:Core Folders :: images/ (Writable) | components/ (Writable) | modules/ (Writable) | plugins/ (Writable) | language/ (Writable) | templates/ (Writable) | cache/ (Writable) | logs/ (Does Not Exist) | tmp/ (Writable) | administrator/components/ (Writable) | administrator/modules/ (Writable) | administrator/language/ (Writable) | administrator/templates/ (Writable) | administrator/logs/ (Writable) | api/ (Writable) |
Wampserver on Windows using database username = "root" with db password = "" (which is normal).

The message is non-fatal and does not prevent normal operations; the message appears only on the Joomla! Update page in the backend. The message does not appear on my J! 4.x websites; only on J! 5.x. I would like to know what causes this message, please.
You do not have the required permissions to view the files attached to this post.

Advertisement
User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 18246
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Troubleshooting "Deprecated: Creation of dynamicproperty Joomla\CMS\Updater\Update::$sha256"

Post by toivo » Fri Dec 01, 2023 4:54 am

Creating dynamic properties is listed as the first feature in the document PHP: Migrating from PHP 8.1.x to PHP 8.2.x - Deprecated Features.

If the option 'Error Reporting' allows Deprecated messages to be reported, the message is displayed because Joomla Update creates the class variable $sha256 on the fly, without declaring it first in the definition of the Update class. Deprecated messages can always be filtered by setting 'Error Reporting' in Global Configuration to 'Simple' or 'None', which in fact is the recommended value for live production sites.

This issue in Joomla 5 was reported three months ago. A pull request (PR) was published yesterday for testing, [#42429] - [5] fix Deprecated: Creation of dynamic property. The PR fixes the initial issue but causes the option 'Re-install Joomla! core files' to fail. No doubt it will get fixed soon.
Toivo Talikka, Global Moderator

nacc
I've been banned!
Posts: 347
Joined: Mon Jul 03, 2023 7:08 pm

Re: Troubleshooting "Deprecated: Creation of dynamicproperty Joomla\CMS\Updater\Update::$sha256"

Post by nacc » Fri Dec 01, 2023 5:15 am

Thanks, @toivo.

Interestingly, I made one very small change to my normal operation: I disabled automatic Wampserver startup on system boot, shut down the PC and cold-booted it. The message about $sha256 at with the Joomla! Update component hasn't reappeared. It's bizarre that I made no other changes and a system reboot seems to have made the message disappear.

Yes, I'm aware that error messages can be filtered out. I deliberately do not want to sweep errors under the carpet. These test sites that I host on Wampserver exist so that I can make sure that Joomla runs without errors (not that it runs with errors that I want to hide).

I'll mark this as closed. Thanks for looking into this. I guess it was "just one of those things". :-[

Advertisement

Locked

Return to “Administration Joomla! 5.x”