Git Product home page Git Product logo

zf1's Introduction

INFORMATION

This is a fork from Zend Framework 1.12.16 Release.

PURPOSE

Contains Zend Framework 1 plus performance improvements and bug fixes.

LICENSE

The files in this archive are released under the Zend Framework license. You can find a copy of this license in LICENSE.txt.

zf1's People

Contributors

a-lucas avatar adeelnawaz avatar akrabat avatar bkendig-disney avatar buskamuza avatar croensch avatar dooffy avatar erdraug avatar ezimuel avatar fascinosum avatar froschdesign avatar gelolabs avatar holtkamp avatar igrybkov avatar itscaro avatar ivan-ponomarev avatar jeremyquinton avatar karyna-tsymbal-atwix avatar mhujer avatar mlocati avatar nicolas-grekas avatar ondram avatar siad007 avatar slavvka avatar stepa4man avatar thomaswunderlich avatar viktym avatar vpelipenko avatar weierophinney avatar xmav avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zf1's Issues

Deprecated functionality exception in Zend_Pdf component

Preconditions

  1. Magento 2.4.4 with PHP 8.1
  2. PHP error reporting set to (E_ALL)

Steps to reproduce

  1. Create a shipment with shipping label
  2. In shipments grid, select the shipment and execute the Print Shipping Labels mass action

Expected result

Shipping label document opens.

Actual result

zend_pdf_deprecated_functionality

Error message is displayed:

Deprecated Functionality: Optional parameter $genNum declared before required parameter $factory is implicitly treated as a required parameter in /var/www/html/vendor/magento/zendframework1/library/Zend/Pdf/Element/Reference.php on line 91

public function __construct($objNum, $genNum = 0, Zend_Pdf_Element_Reference_Context $context, Zend_Pdf_ElementFactory $factory)

The entrypoint to the error seems to be Zend_Pdf::parse.

Fatal error Zend_Memory_Value not compatible with ArrayAccess

PHP Fatal error: During inheritance of ArrayAccess: Uncaught Exception: Deprecated Functionality: Return type of Zend_Memory_Value::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 /var/www/html/vendor/magento/zendframework1/library/Zend/Memory/Value.php

Here's a patch :

--- a/library/Zend/Memory/Value.php
+++ b/library/Zend/Memory/Value.php
@@ -86,7 +86,7 @@
      * @param integer $offset
      * @return boolean
      */
-    public function offsetExists($offset)
+    public function offsetExists(mixed $offset): bool
     {
         return $offset >= 0  &&  $offset < strlen($this->_value);
     }
@@ -98,7 +98,7 @@
      * @param integer $offset
      * @return string
      */
-    public function offsetGet($offset)
+    public function offsetGet(mixed $offset): mixed
     {
         return $this->_value[$offset];
     }
@@ -110,7 +110,7 @@
      * @param integer $offset
      * @param string $char
      */
-    public function offsetSet($offset, $char)
+    public function offsetSet(mixed $offset, mixed $value): void
     {
         $this->_value[$offset] = $char;
 
@@ -126,7 +126,7 @@
      *
      * @param integer $offset
      */
-    public function offsetUnset($offset)
+    public function offsetUnset(mixed $offset): void
     {
         unset($this->_value[$offset]);

cf magento/magento2#35335

PHP8 compatibility with sending mail

I am using PHP 8.1 and receiving the following error when sending mail.

Fatal error: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, Zend_Registry given in /var/www/ca/vendor/magento/zendframework1/library/Zend/Registry.php:207

The way array_key_exists has changed in php 8

For backward compatibility reasons, array_key_exists() will also return true if key is a property defined within an object given as array. This behaviour is deprecated as of PHP 7.4.0, and removed as of PHP 8.0.0.

Since the bit of code that is causing the TypeError was put into place to fix a previous bug, I have commented out the entire offsetExists() function in Registry.php so it would fall back to the function in ArrayObject.

Mail is now sending successfully with this function commented out.

Using composer >= 1.10.1 with an optimised autoloader results in a warning caused by this repository

When installing Magento 2.3.4 using composer (version 1.10.1 or higher) with the optimised autoloader flag results in this warning:

Deprecation Notice: Class Zend_Validate_Barcode_IntelligentMail located in ./vendor/magento/zendframework1/library/Zend/Validate/Barcode/Intelligentmail.php does not comply with psr-0 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201

FYI: composer version 1.10.0 started adding these warnings to prepare for composer 2.0 to be released soonish probably

If I have to guess, it's probably a case mismatch, the class is called Zend_Validate_Barcode_IntelligentMail, but the file is called Intelligentmail.php. Notice the different casing of the M letter.

Deprecated Functionality: str_replace() php 8.1 magento 2.4.4

Getting the below error for PHP 8.1.

1 exception(s):
Exception #0 (Exception): Deprecated Functionality: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /var/www/html/project/vendor/magento/zendframework1/library/Zend/Log/Formatter/Simple.php on line 103

Exception #0 (Exception): Deprecated Functionality: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /var/www/html/project/vendor/magento/zendframework1/library/Zend/Log/Formatter/Simple.php on line 103
<pre>#1 str_replace() called at [vendor/magento/zendframework1/library/Zend/Log/Formatter/Simple.php:103]
#2 Zend_Log_Formatter_Simple->format() called at [vendor/magento/zendframework1/library/Zend/Log/Writer/Stream.php:131]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.