n98-magerun icon indicating copy to clipboard operation
n98-magerun copied to clipboard

PHP 7.4/8 support (OpenMage 20.x)

Open Schrank opened this issue 5 years ago • 14 comments

Feature description

I read https://github.com/netz98/n98-magerun/issues/1014 and in the end it was fixed. Are you interested in a PHP 7.4/8 PR?

Problem and motivation

MageOne is offering Magento Support for 7.3 and 7.4 is on the roadmap and other vendors do that as well. n98-magerun is a brilliant tool to assist us in all kinds of stuff, so maintaining it, so we don't get spammed with error messages is helpful for us.

Is this something you're interested in working on

Yes

Schrank avatar Dec 02 '20 11:12 Schrank

I could offer technical assistance / support if wanted. E.g. covering this in the build, what do you think @cmuench ?

ktomk avatar Dec 02 '20 15:12 ktomk

@ktomk yes, of course. To be hones, I have currently no real Magento 1 project anymore. So I need help to be up-to-date.

cmuench avatar Dec 02 '20 15:12 cmuench

@ktomk btw... the build is currently broken. I tink it's the Composer 2 update in the Travis images. For the n98-magerun2 project, I ported everything to Github Actions.

cmuench avatar Dec 02 '20 16:12 cmuench

If someone is porting things to GA, we™ might want to add GPG signatures and phar files directly, so we can add it easily to phive 🙈

Schrank avatar Dec 02 '20 16:12 Schrank

Okay, I'll take a look into the GH actions build then. This should cover our backs @cmuench (btw. missed the UG date, hopefully next time)

@Schrank: One thing after the other, this would require to get the build reproducible which I deem feasible, but I want to look into getting it green first. You're asking this because of phive I assume, right?

ktomk avatar Dec 02 '20 20:12 ktomk

We have already phive support. https://magerun.net/phive-support-for-n98-magerun/

cmuench avatar Dec 02 '20 20:12 cmuench

And IIRC also checksums for brew, right? @cmuench

ktomk avatar Dec 02 '20 21:12 ktomk

@ktomk the brew package is not maintained by me, but I think so.

cmuench avatar Dec 02 '20 21:12 cmuench

@ktomk the travis job is running again. Did a quick fix and downgraded Composer to v1. For the future I see that we also migrate this project to Github Actions.

cmuench avatar Dec 04 '20 09:12 cmuench

I've just filed (and merged) PR #1147 which adds an extra use test (the install command) into Magerun Github CI.

It is a nice by-catch for mandatory PHP 8.0 compatibility with the Openmage 20.0.4 version (from now on builds will break if magerun can't install with PHP 8.0).

It already shows part of current level of PHP 8.0 compatibility: composer install requires --ignore-platform-reqs and the Magento fork needs to be Openmage (Adobe Magento baseline no compatibility with PHP 8 - likely is expected).

Take it with a grain of salt thought, this is not running any other kind of tests under PHP 8.0 (yet).

I'll chew on the PHP version requirements from here a bit and extend the CI build appropriately.

ktomk avatar Dec 23 '20 00:12 ktomk

PHP 8 compat for symfony-autocomplete dependency in #1167

ktomk avatar Feb 22 '21 07:02 ktomk

It's been a while since the last post here. I am curious how PHP 8.X support is coming along, especially as the latest versions of OpenMage support PHP 8.

perryholden avatar Mar 04 '22 16:03 perryholden

I am currently not working on that. My focus is currently n98-magerun2 with PHP 8.1 support.

cmuench avatar Mar 04 '22 17:03 cmuench

I did some first work to support OpenMage 20.0.4. https://github.com/cmuench/n98-magerun/tree/feature/php81

It's not easy because we have to update or rewrite at least this:

  • CI Setup (configuration)
  • Unit Tests
  • All Symfony dependencies
  • Try to be backwards compatible as possible

The branch contains a ddev setup with a command to install OpenMage in the container. A lot of commands are working out of the box with PHP 8.1 and OpenMage. A lot are broken due to incompatible Symfony console etc.

image

cmuench avatar Jul 15 '22 13:07 cmuench

I started to work on this and made some updates. (https://github.com/cmuench/n98-magerun/pull/83)

sreichel avatar Nov 22 '22 22:11 sreichel

@sreichel wow. Thanks. Sadly I am currently injured and cannot really work on the PC. I did a short review.

cmuench avatar Nov 23 '22 08:11 cmuench

Just an update as I did some chore and finally closed #1138 by #1273 , within the workflow we now have:

  • Test OpenMage on Ubuntu 20.04 with PHP 7.4 (green)
  • Test OpenMage on Ubuntu 20.04 with PHP 8.0 (allow-failures, experimental)

Was a bit hasty today and thought I could get rid of Ubuntu 18.04 entirely in the workflows (gives deprecation warnings), but that turned out wrong. So these two are at least what could survive.

ktomk avatar Dec 22 '22 20:12 ktomk

Think most of the work is done. (https://github.com/cmuench/n98-magerun/pull/87)

It's not easy because we have to update or rewrite at least this:

  • [ ] CI Setup (configuration)
  • [ ] Unit Tests
  • [x] All Symfony dependencies
  • [x] Try to be backwards compatible as possible .... "Choice questions" have changed, progessbars work different ... it will break some pluigns for sure :/

sreichel avatar May 16 '23 18:05 sreichel

@sreichel wow. ♥️ I will try to review it soon.

cmuench avatar May 16 '23 18:05 cmuench

@sreichel Seems that we have to update the Github Actions in the CI/CD. The system is not compatible anymore. We use a outdated Ubuntu.

cmuench avatar May 17 '23 13:05 cmuench

@cmuench i've some time to work on it. Seems something is broken. I cloned the project, started DDEV and used install command.

  • sample data is installed, even with default "no" selection
  • base url is not set in core_config_data
  • magento root folder is not detected, so no command works

Can you reproduce this?

sreichel avatar Aug 29 '23 13:08 sreichel

@sreichel I can confirm that there are issues with the sample data. I cannot confirm the installation issues. I was able to install OpenMage 20.0.20 from inside my ddev environment by using a fresh n98-magerun2.phar file (created with ./build.sh in the container). Base-URL was also set.

cmuench avatar Aug 29 '23 13:08 cmuench

@sreichel The installation via ddev install-openmage 20.0.20 should also work.

cmuench avatar Aug 29 '23 13:08 cmuench

@cmuench can you pls share the commands you've used?

ddev . bin/n98-magerun some:command did not work for me.

I'll test ddev install-command later. Thanks.

Btw ... whats your setting for N98_MAGERUN_TEST_MAGENTO_ROOT?

sreichel avatar Aug 29 '23 15:08 sreichel

Btw ... whats your setting for N98_MAGERUN_TEST_MAGENTO_ROOT?

export N98_MAGERUN_TEST_MAGENTO_ROOT=/opt/magento-test-environments/magento_20_0_20/

cmuench avatar Aug 29 '23 15:08 cmuench

@cmuench thanks. Can it be added to .ddev/config.yml? And - how about to set a default DB-port? I work with phpStorms DB-tool a dont want to change the port every time.

sreichel avatar Aug 29 '23 16:08 sreichel

@sreichel Yes, if we automatically would install a standardized OpenMage instance after ddev start.

cmuench avatar Aug 29 '23 16:08 cmuench

@sreichel Let's do all the discussions here: #1275

cmuench avatar Aug 29 '23 16:08 cmuench