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.0 porting status #51

Closed
32 tasks done
glensc opened this issue Feb 3, 2021 · 9 comments
Closed
32 tasks done

PHP 8.0 porting status #51

glensc opened this issue Feb 3, 2021 · 9 comments

Comments

@glensc
Copy link
Contributor

glensc commented Feb 3, 2021

List of documented backward-incompatible changes:

Tasks

@glensc
Copy link
Contributor Author

glensc commented Feb 3, 2021

PHP 8.x version_compare error

Either one of these happens:

  1. we can pick their patch
  2. (if I have time), I could do a mass replace of all code and use PHP_VERSION_ID instead.
  3. somebody else does the "2."

EDIT: this is fixed in #26 already (1.13.4 release)

@glensc glensc changed the title PHP 8.0 Porting status PHP 8.0 porting status Feb 3, 2021
@glensc
Copy link
Contributor Author

glensc commented Feb 7, 2021

@onlime you may have a better chance with this fork. it's in progress as well, but at least patches have been made, not yet reviewed and merged.

@onlime
Copy link
Contributor

onlime commented Feb 7, 2021

@onlime you may have a better chance with this fork. it's in progress as well, but at least patches have been made, not yet reviewed and merged.

Thanks @glensc - I know about zf1s/zf1 but newer found a simple way to replace shardj/zf1-future in my two use cases:

  • A large project which uses more than a third of all zf1 components: Would I need to specify all single components from zf1s/zf1 as separate Composer requirements?
  • ZF1 in a common path for all of my customers on a shared host: Customers require that library dir directly, without using Composer. Cannot tell them to change all their (legacy) projects.

So my question is: How to compile all zf1s/zf1 components into a single library dir? Or how to require all components in Composer? (composer require zf1s/zend-* is not supported)

@glensc
Copy link
Contributor Author

glensc commented Feb 8, 2021

@onlime you can install the monorepo as well:

composer require zf1s/zf1

or you can just download the zip and unpack it:

however, you still need to use composer autoloader, as the require_once calls embedded in the code have been removed. you can use your own autoloader if you wish, but composer autoloader just works.

for your shared customers you could:

  1. create shared composer project: composer create-project zf1s/zf1 /var/www/zf1 (or use git clone, zip download and unpack)
  2. tell customers to include one line in their codebase: require_once '/var/www/zf1/vendor/autoload.php';

if you still want to list each component separately, you can start with this list:

however, it's probably better just grep Zend_ from the codebase and deduct the package name.

EDIT: this needs to be fixed first for the composer solution to work: #57

@onlime
Copy link
Contributor

onlime commented Feb 8, 2021

@glensc Thanks for your detailed instructions! This all makes sense and would be very easy to implement.

But concerning my shared customers, it's impossible to communicate any change here. I definitely cannot tell them to migrate their projects to Composer autoloading, even if it would just be a matter of swapping out a single require_once line. I guess most customers that still run their projects on ZF1 have either an outdated deployment process or are just no longer responsible for the project. I cannot introduce any breaking change here. But on the other hand, I can easily recommend them to just fire up composer require zf1s/zf1 (after a fixed #57) if they are no longer happy with the shared zf1-future code base. I let it be their choice and I don't want to introduce any noise here.

@glensc
Copy link
Contributor Author

glensc commented May 15, 2021

@falkenhawk perhaps make a release with the merged code. it's not worse as it is for older PHP versions, and it's definitely something for PHP 8.0.

I don't think I'll work with any of the unfinished pull requests any time soon, and so appears to be for Megatherium.

@falkenhawk
Copy link
Member

@glensc thank you for your hard work on this so far. Okay I will cut a release in the following days, if time allows. I will also either try myself or ask around if someone could continue working on the unfinished PRs.

@glensc
Copy link
Contributor Author

glensc commented Aug 7, 2021

@falkenhawk how about that release?

EDIT: I've started PR, jump in and advice what else is needed:

@falkenhawk
Copy link
Member

Release 1.14.0 is out 🎉

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

No branches or pull requests

3 participants