magento / zf1

ZF1 adopted for Magento 2. Use composer in Magento 2 root to download it.
BSD 3-Clause "New" or "Revised" License
60 stars 61 forks source link

AC-2892:Class magento/zendframework1/library/Zend/Pdf/NameTree.php no… #46

Closed faizan-shk closed 2 years ago

faizan-shk commented 2 years ago

…t compatible with PHP 8.1

- Fixed PHP8 error - ArrayAccess: Uncaught Exception: Deprecated Functionality: Return type of Zend_Pdf_NameTree::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 vendor/magento/zendframework1/library/Zend/Pdf/NameTree.php
- Fixed PHP8 error - Deprecated Functionality: Optional parameter $genNum declared before required parameter $factory is implicitly treated as a required parameter in vendor/magento/zendframework1/library/Zend/Pdf/Element/Reference.php on line 91

Fixes: https://github.com/magento/magento2/issues/35335 Fixes: https://github.com/magento/zf1/issues/44

karyna-t commented 2 years ago

This PR has been tested internally - all good. It will be automatically merged as soon as PR with additional fixes is merged (https://github.com/magento/zf1/pull/47) Thank you @faizan-shk

hostep commented 2 years ago

Isn't the shuffling of arguments considered backwards incompatible?

Maybe take a look at how this was fixed in ZF1-Future project: https://github.com/Shardj/zf1-future/commit/5ae9f922ca97bd59a7f70e5c2efb10b360eae331#diff-095112f5539b15e75b91f6100ae0439d924c83297d92bcf8b8f413d429280638, this is a better fix in my opinion.

faizan-shk commented 2 years ago

Isn't the shuffling of arguments considered backwards incompatible?

Maybe take a look at how this was fixed in ZF1-Future project: Shardj@5ae9f92#diff-095112f5539b15e75b91f6100ae0439d924c83297d92bcf8b8f413d429280638, this is a better fix in my opinion.

Agreed @hostep , refactored accordingly

xmav commented 2 years ago

Changes merged. New release will be published soon

xmav commented 2 years ago

Should be fixed in https://github.com/magento/zf1/releases/tag/1.15.1