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.4] Deprecated: Zend_Cache::throwException(): Implicitly marking parameter $e as nullable is deprecated #4215

Closed
addison74 opened this issue Sep 21, 2024 · 6 comments · Fixed by #4278

Comments

@addison74
Copy link
Contributor

[Test Environment]

  • Windows 11 + WSL
  • Docker 4.34.2
  • DDEV (Apache 2.4.61, PHP 8.4.0 alpha4, MariaDB 10.11.8) with MAGE_IS_DEVELOPER_MODE=1
  • Magento Sample Data

When I load the website for the first time I am getting the following errors

Deprecated:  Zend_Cache::throwException(): Implicitly marking parameter $e as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/shardj/zf1-future/library/Zend/Cache.php on line 205

Deprecated:  Zend_Db_Statement_Pdo::_execute(): Implicitly marking parameter $params as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/shardj/zf1-future/library/Zend/Db/Statement/Pdo.php on line 224

Deprecated:  Zend_Db_Statement::execute(): Implicitly marking parameter $params as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/shardj/zf1-future/library/Zend/Db/Statement.php on line 297

Screenshot attached bellow

screenshot

If I reload the page the warnings disappear.

It is related to PHP version 8.4 and ZF1-Future. I could post the issue in the ZF1 repository, but maybe we can find the solution together to propose it as a PR.

@addison74 addison74 added the bug label Sep 21, 2024
@addison74
Copy link
Contributor Author

addison74 commented Sep 21, 2024

More issues accessing the backend for the first time

Deprecated:  Zend_Captcha_Image::render(): Implicitly marking parameter $view as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/shardj/zf1-future/library/Zend/Captcha/Image.php on line 621

Deprecated:  Zend_Captcha_Adapter::render(): Implicitly marking parameter $view as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/shardj/zf1-future/library/Zend/Captcha/Adapter.php on line 53

Screenshot attached bellow

screenshot2

If I reload the page the warnings disappear.

@addison74
Copy link
Contributor Author

Go to the Backend > CMS > Pages. Restart DDEV (ddev restart) or your webserver.

Just restart DDEV then edit a CMS page in the Backend

Deprecated:  Zend_Acl::allow(): Implicitly marking parameter $assert as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/shardj/zf1-future/library/Zend/Acl.php on line 502

Deprecated:  Zend_Acl::deny(): Implicitly marking parameter $assert as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/shardj/zf1-future/library/Zend/Acl.php on line 517

Deprecated:  Zend_Acl::setRule(): Implicitly marking parameter $assert as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/shardj/zf1-future/library/Zend/Acl.php on line 602

Deprecated:  Zend_Acl::_roleDFSAllPrivileges(): Implicitly marking parameter $resource as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/shardj/zf1-future/library/Zend/Acl.php on line 922

Deprecated:  Zend_Acl::_roleDFSVisitAllPrivileges(): Implicitly marking parameter $resource as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/shardj/zf1-future/library/Zend/Acl.php on line 958

Deprecated:  Zend_Acl::_roleDFSOnePrivilege(): Implicitly marking parameter $resource as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/shardj/zf1-future/library/Zend/Acl.php on line 1001

Deprecated:  Zend_Acl::_roleDFSVisitOnePrivilege(): Implicitly marking parameter $resource as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/shardj/zf1-future/library/Zend/Acl.php on line 1047

Deprecated:  Zend_Acl::_getRuleType(): Implicitly marking parameter $resource as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/shardj/zf1-future/library/Zend/Acl.php on line 1101

Deprecated:  Zend_Acl::_getRules(): Implicitly marking parameter $role as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/shardj/zf1-future/library/Zend/Acl.php on line 1157

Deprecated:  Zend_Acl_Assert_Interface::assert(): Implicitly marking parameter $resource as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/shardj/zf1-future/library/Zend/Acl/Assert/Interface.php on line 62


Warning: session_start(): Session cache limiter cannot be sent after headers have already been sent (output started at /var/www/html/vendor/shardj/zf1-future/library/Zend/Acl/Assert/Interface.php:62)  in /var/www/html/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 156

#0 [internal function]: mageCoreErrorHandler()
#1 /var/www/html/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php(156): session_start()
#2 /var/www/html/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php(272): Mage_Core_Model_Session_Abstract_Varien->start()
#3 /var/www/html/app/code/core/Mage/Core/Model/Session/Abstract.php(79): Mage_Core_Model_Session_Abstract_Varien->init()
#4 /var/www/html/app/code/core/Mage/Core/Model/Session.php(43): Mage_Core_Model_Session_Abstract->init()
#5 /var/www/html/app/code/core/Mage/Core/Model/Config.php(1476): Mage_Core_Model_Session->__construct()
#6 /var/www/html/app/Mage.php(535): Mage_Core_Model_Config->getModelInstance()
#7 /var/www/html/app/Mage.php(548): Mage::getModel()
#8 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Action.php(493): Mage::getSingleton()
#9 /var/www/html/app/code/core/Mage/Adminhtml/Controller/Action.php(173): Mage_Core_Controller_Varien_Action->preDispatch()
#10 /var/www/html/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php(216): Mage_Adminhtml_Controller_Action->preDispatch()
#11 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Action.php(408): Mage_Adminhtml_Cms_PageController->preDispatch()
#12 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(255): Mage_Core_Controller_Varien_Action->dispatch()
#13 /var/www/html/app/code/core/Mage/Core/Controller/Varien/Front.php(180): Mage_Core_Controller_Varien_Router_Standard->match()
#14 /var/www/html/app/code/core/Mage/Core/Model/App.php(358): Mage_Core_Controller_Varien_Front->dispatch()
#15 /var/www/html/app/Mage.php(748): Mage_Core_Model_App->run()
#16 /var/www/html/index.php(56): Mage::run()
#17 {main}

Loading the page I am getting

Deprecated:  Zend_Xml_Security::scan(): Implicitly marking parameter $dom as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/shardj/zf1-future/library/Zend/Xml/Security.php on line 71

Deprecated:  Zend_Xml_Security::scanFile(): Implicitly marking parameter $dom as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/shardj/zf1-future/library/Zend/Xml/Security.php on line 148

From what I can see we will have enough issues with ZF1 Future and PHP 8.4.

@addison74
Copy link
Contributor Author

Backend > Reports > Sales > Orders

Deprecated:  Zend_Filter_LocalizedToNormalized::setOptions(): Implicitly marking parameter $options as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/shardj/zf1-future/library/Zend/Filter/LocalizedToNormalized.php on line 84

Deprecated:  Zend_Filter_NormalizedToLocalized::setOptions(): Implicitly marking parameter $options as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/vendor/shardj/zf1-future/library/Zend/Filter/NormalizedToLocalized.php on line 83

@sreichel
Copy link
Contributor

@addison74 no need for more test ... PR coming within minutes :)

@addison74
Copy link
Contributor Author

@sreichel - Got it 👍

@sreichel
Copy link
Contributor

PR done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants