magento-lts icon indicating copy to clipboard operation
magento-lts copied to clipboard

Replace ZF1Future with ZF1S

Open sreichel opened this issue 1 year ago • 11 comments

... later ...

ToDo:

  • diff
  • apply OM patches

sreichel avatar Jul 25 '24 10:07 sreichel

What are the advantages changing ZF1- Future with ZF1S?

addison74 avatar Jul 25 '24 11:07 addison74

IMHO ... we dont have to add the complete Zend framework ... only the parts/packages we need.

And ... i'd like fix https://github.com/OpenMage/magento-lts/discussions/3462

https://github.com/OpenMage/magento-lts/pull/4117 did not solve it. As @elidrissidev and my tests confirmed ZF1S works for some reason. I'm to lazy to search for ... better spent a few hours here. I already did it with ZF1Future so it will not take that long again ...

sreichel avatar Jul 25 '24 11:07 sreichel

Green for now ...

  • diff for php8 changes
  • apply OM patches
  • add PRs to ZF1S (to replace that patches)

... done :)

sreichel avatar Jul 25 '24 12:07 sreichel

There are some important changes that zf1s doesn't include by default such as the flag to prevent PDO from casting numeric types in PHP 8:

https://github.com/Shardj/zf1-future/blob/94d85abd45bdcb806b24a9adbe7c9eba65d54ba3/library/Zend/Db/Adapter/Pdo/Mysql.php#L113-L119

elidrissidev avatar Jul 25 '24 13:07 elidrissidev

Thanks. If follow ZF1Future too and make a diff later.

(btw ... i'd like to have casting to int/not casting to string, .... drop php 7!!! :P)

sreichel avatar Jul 25 '24 13:07 sreichel

(btw ... i'd like to have casting to int/not casting to string, .... drop php 7!!! :P)

I prefer that too, but there will be a lot of hard to find bugs, so I suggest leaving it as is for a separate PR in the future.

elidrissidev avatar Jul 25 '24 15:07 elidrissidev

Don't fix something that works :)

I would not drop support for PHP 7.4, I am using servers running Debian 11 and it is entering the LTS program until June 2026 and which I will not upgrade any time soon.

Debian LTS: https://wiki.debian.org/LTS Debian 11: https://www.debian.org/News/2021/20210814 => PHP 7.4 - End of August 2026

addison74 avatar Jul 25 '24 16:07 addison74

Don't fix something that works :)

Let us dream ... :P

O/c thats something that will not happen in near future.

sreichel avatar Jul 25 '24 16:07 sreichel

+1 to drop php 7 support https://www.php.net/eol.php

empiricompany avatar Jul 26 '24 06:07 empiricompany

On hold.

There are a lot of fixes in ZF1Future, but not in ZF1S.

I already started to prepare PRs, but this will take some time to make it good.

I like that mono-repo idea, but atm it seems to be a step backwards.

So we have to search for the not working autoloading from app/local|community|core ...

sreichel avatar Jul 26 '24 17:07 sreichel

Debian LTS: https://wiki.debian.org/LTS Debian 11: https://www.debian.org/News/2021/20210814 => PHP 7.4 - End of August 2026

We have droped php7.3 support in 03/2023.

Imho it would be great to could make use of fancy php8 stuff.

https://accesto.com/blog/php-performance-improvement-features/

Its arround 20% that still use latest releases with php7.4.

https://packagist.org/packages/openmage/magento-lts/php-stats#20.10

sreichel avatar Jul 27 '24 17:07 sreichel

Later ... maybe.

sreichel avatar Nov 14 '24 19:11 sreichel

zf1s as I understand, split the ZF components into individual composer packages. The intention is to change the dead ZF1 gradually to something non-dead. So, for example, Zend PDF can be swapped with FPDF. The problems:

  1. Require big changes to the core
  2. 3rd-party codes that rely on ZF will break

kiatng avatar Nov 17 '24 03:11 kiatng

2. 3rd-party codes that rely on ZF will break

Only if a not included Zend_* module is not included.

The biggest problem are the differencies between ZF1Future and ZF1S.

sreichel avatar Nov 17 '24 03:11 sreichel