Replies: 6 comments 4 replies
-
This a visual comparison for /lib/Zend directory between OpenMage 20.0.14 and ZF1-Future 1.21.2. The report can be downloaded from here: https://mega.nz/file/2UdHzZpB#luas9xRvYGENfMysJgH2TeLH2ZAyTxFSG6BkiYt4K08 This is the list of files that are on one directory and not the other (they have no correspondent). Files and directories found in OpenMage but not in ZF1-Future Files and directories found in Zf1-Future but not in OpenMage |
Beta Was this translation helpful? Give feedback.
-
This a visual comparison for /app/code/core/Zend directory between OpenMage 20.0.14 and ZF1-Future 1.21.2. The report can be downloaded from here: https://mega.nz/file/rEEzQKjb#lnZUK5DZI6m11gkRl91oPa9TCGioarGP411GTtv3fYI I ask myself the natural question if we opt for a repository that we maintain based on ZF1-Future do we still need this directory /app/code/core/Zend since we can operate all the changes in /lib/Zend? Some of you have even proposed drafts for cleaning up /app directory and leave all files in /lib/Zend. I guess the Magento team was intended to keep the original ZF1 in /lib/Zend for easy updates and create a custom version in /app/code/core/Zend. Based on Magento fallback the files were served from both directories. |
Beta Was this translation helpful? Give feedback.
-
COMPARISON for /app/code/core/Zend/Controller/Request/Http.php Open Mage - line 1037 public function getScheme()
{
return return (strtolower((string)$this->getServer('HTTPS')) == 'on') || $this->getServer('HTTP_X_FORWARDED_PROTO') == 'https' ?
self::SCHEME_HTTPS :
self::SCHEME_HTTP;
} ZF1-Future - line 1037 public function getScheme()
{
return ($this->getServer('HTTPS') == 'on') ? self::SCHEME_HTTPS : self::SCHEME_HTTP;
} In this PR #1462 we used both headers $_SERVER['HTTP_X_FORWARDED_PROTO'] and $_SERVER['HTTPS']. I think we need to make a connection between these two headers somewhere in the OM code so that will not be an issue if the ZF1-Future version is used from now on and which does not include Forwarded-Proto like in OM. It can be done in .htaccess too and use only HTTPS = on if the connection is secured. And we should have a line in README before implementing ZF1-Future. |
Beta Was this translation helpful? Give feedback.
-
These files have comments inside from the Magento team: /app/code/core/Zend/Db/Select.php /app/code/core/Zend/Filter/PregReplace.php /**
* This class replaces default Zend_Filter_PregReplace because of problem described in MPERF-10057
* The only difference between current class and original one is overwritten implementation of filter method and add new
* method _isValidMatchPattern
* /app/code/core/Zend/Form/Decorator/Form.php /**
* This class replaces default Zend_Form_Decorator_Form because of problem described in MPERF-9707/MPERF-9769
* The only difference between current class and original one is overwritten implementation of render method
* /app/code/core/Zend/Locale/Math/PhpMath.php /**
* This class replaces default Zend_Locale_Math_PhpMath because of issues described in MPERF-10261 and MPERF-10262
* The only difference between current class and original one is overwritten implementation of Sub method
* /app/code/core/Zend/Serializer/Adapter/PhpCode.php /**
* This class replaces default Zend_Serializer_Adapter_PhpCode because of problem described in MPERF-9450
* The only difference between current class and original one is overwritten implementation of unserialize method
* /app/code/core/Zend/Validate/EmailAddress.php /**
* This class replaces default Zend_Validate_Email_Address because of issues described in MPERF-9688 and MPERF-9689
* The only difference between current class and original one is overwritten implementation of _validateLocalPart method
* /app/code/core/Zend/Validate/HostName.php /app/code/core/Zend/Date.php /**
* This class replaces default Zend_Date because of problem described in Jira ticket MAGE-4872
* The only differences between current class and original one is overwritten implementation of mktime method
* It is obvious that the first evaluation for this major replacement must start from the comparison of the files in the /app/code/core/Zend directory with the one in ZF1-Future. The comparison provided by me is more than enough for an evaluation. Maybe we could have a customized version of the framework. |
Beta Was this translation helpful? Give feedback.
-
@addison74 PR for ZF1 is ready ... but check this tomorrow 👍 |
Beta Was this translation helpful? Give feedback.
-
Thank you to all who made this possible. ZF1-Future was implemented into OpenMage. |
Beta Was this translation helpful? Give feedback.
-
I know that there have been discussions on this topic, so I intend to complete this important project to replace ZF1 in OpenMage with ZF1-Future which is an active project and where new versions are periodically released based on a dedicated community. It was a pleasant surprise to me they have few issues, the reported ones are solved quickly, valid also for PRs. In addition it is compatible with PHP 8.1.
I recently found that parts of the ZF1 code in OpenMage no longer match current configurations, for example the TLS protocol used in SMTP is still limited to version 1.0, although for several years most MTA's no longer accept connections under version 1.2 for security reasons.
I had the opportunity these days to analyze the implications of this change and my opinion is that we could need a dedicated repository as part of OpenMage (for example openmage: zend) where a custom version of ZF1-Future will be provided which will be added to any new release of OpenMage and that we will maintain entirely.
At the first stage we will have to analyze the changes in the two directories used by this framework and which can be found here:
/app/code/core/Zend
/lib/Zend
We are not going to copy them simply because as you will see in the following posts there are differences that need to be analyzed in detail. intensive testing over a longer period is absolutely necessary. The files maybe need to be adapted and then with each new ZF1-Future version to operate the changes in the repository, most likely they will be some directly by copying and others will require manual changes.
Beta Was this translation helpful? Give feedback.
All reactions