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 7.4/8 support (OpenMage 20.x) #1133

Closed
Schrank opened this issue Dec 2, 2020 · 28 comments · Fixed by #1256
Closed

PHP 7.4/8 support (OpenMage 20.x) #1133

Schrank opened this issue Dec 2, 2020 · 28 comments · Fixed by #1256
Assignees

Comments

@Schrank
Copy link
Contributor

Schrank commented Dec 2, 2020

Feature description

I read #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

@ktomk
Copy link
Collaborator

ktomk commented Dec 2, 2020

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

@cmuench
Copy link
Member

cmuench commented Dec 2, 2020

@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
Copy link
Member

cmuench commented Dec 2, 2020

@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.

@Schrank
Copy link
Contributor Author

Schrank commented Dec 2, 2020

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 🙈

@ktomk
Copy link
Collaborator

ktomk commented Dec 2, 2020

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?

@cmuench
Copy link
Member

cmuench commented Dec 2, 2020

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

@ktomk
Copy link
Collaborator

ktomk commented Dec 2, 2020

And IIRC also checksums for brew, right? @cmuench

@cmuench
Copy link
Member

cmuench commented Dec 2, 2020

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

@cmuench
Copy link
Member

cmuench commented Dec 4, 2020

@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.

@ktomk ktomk mentioned this issue Dec 8, 2020
14 tasks
ktomk added a commit to ktomk/n98-magerun that referenced this issue Dec 22, 2020
After starting the migration from Travis-CI to Github CI in 3ca8553 the
build scripts in general came to attention for review.

Most prominently likely is

    build/local/test_setup.sh

which is the standard setup test/build: Install a Magento version with
Magerun.

Despite being important in (local!) CI, it has not yet been put into the
projects CI so far (at least not in the form of the build script).

Add the Test Setup to the CI running w/ Github Actions.

This change-set contains required changes to the build script itself so
that the db password and the Magento version can be injected. Change here
is to allow any of the test_setup_* parameters to be overridden which
previously was not possible.

Rationale on these changes:

The Ubuntu-18.04 runner on Github Actions currently runs PHP 8.0:

- As the default version in the build script is "magento-mirror-1.9.2.3"
  the different, PHP 8 compatible "openmage-20.0.4" version is in use.

- Magerun itself is not strictly install-able on PHP 8.0, composer install
  requires the --ignore-platform-reqs flag for the source version.

... NOTE: The default test-runner version has not been changed nor has it
been tested to check the latest magento-mirrog-1.9.x version.

Ref: 3ca8553
Ref-Issue: netz98#1138
By-Catch-Issue: netz98#1133
ktomk added a commit to ktomk/n98-magerun that referenced this issue Dec 23, 2020
After starting the migration from Travis-CI to Github CI in 3ca8553 the
build scripts in general came to attention for review.

Most prominently likely is

    build/local/test_setup.sh

which is the standard setup test/build: Install a Magento version with
Magerun.

Despite being important in (local!) CI, it has not yet been put into the
projects CI so far (at least not in the form of the build script).

Add the Test Setup to the CI running w/ Github Actions.

This change-set contains required changes to the build script itself so
that the db password and the Magento version can be injected. Change here
is to allow any of the test_setup_* parameters to be overridden which
previously was not possible.

Rationale on these changes:

The Ubuntu-18.04 runner on Github Actions currently runs PHP 8.0:

- As the default version in the build script is "magento-mirror-1.9.2.3"
  the different, PHP 8 compatible "openmage-20.0.4" version is in use.

- Magerun itself is not strictly install-able on PHP 8.0, composer install
  requires the --ignore-platform-reqs flag for the source version.

NOTE: The default test-runner version has been changed to the current
latest magento-mirror-1.9.4.5 version (taken from .travis.yml, change is
from magento-mirror-1.9.2.3). Both are _not_ compatible with the PHP 8.0
version on the Github runner:

> Fatal error: Uncaught Error: Call to undefined function
> get_magic_quotes_gpc() in ...
> /magento/www/app/code/core/Mage/Core/functions.php` on line 32

Ref: 3ca8553
Ref-Issue: netz98#1138
By-Catch-Issue: netz98#1133
ktomk added a commit that referenced this issue Dec 23, 2020
After starting the migration from Travis-CI to Github CI in 3ca8553 the
build scripts in general came to attention for review.

Most prominently likely is

    build/local/test_setup.sh

which is the standard setup test/build: Install a Magento version with
Magerun.

Despite being important in (local!) CI, it has not yet been put into the
projects CI so far (at least not in the form of the build script).

Add the Test Setup to the CI running w/ Github Actions.

This change-set contains required changes to the build script itself so
that the db password and the Magento version can be injected. Change here
is to allow any of the test_setup_* parameters to be overridden which
previously was not possible.

Rationale on these changes:

The Ubuntu-18.04 runner on Github Actions currently runs PHP 8.0:

- As the default version in the build script is "magento-mirror-1.9.2.3"
  the different, PHP 8 compatible "openmage-20.0.4" version is in use.

- Magerun itself is not strictly install-able on PHP 8.0, composer install
  requires the --ignore-platform-reqs flag for the source version.

NOTE: The default test-runner version has been changed to the current
latest magento-mirror-1.9.4.5 version (taken from .travis.yml, change is
from magento-mirror-1.9.2.3). Both are _not_ compatible with the PHP 8.0
version on the Github runner:

> Fatal error: Uncaught Error: Call to undefined function
> get_magic_quotes_gpc() in ...
> /magento/www/app/code/core/Mage/Core/functions.php` on line 32

Ref: 3ca8553
Ref-Issue: #1138
By-Catch-Issue: #1133
@ktomk
Copy link
Collaborator

ktomk commented Dec 23, 2020

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
Copy link
Collaborator

ktomk commented Feb 22, 2021

PHP 8 compat for symfony-autocomplete dependency in #1167

@perryholden
Copy link

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.

@cmuench
Copy link
Member

cmuench commented Mar 4, 2022

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

@cmuench
Copy link
Member

cmuench commented Jul 15, 2022

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 cmuench changed the title PHP 7.4/8 support PHP 7.4/8 support (OpenMage 20.x) Jul 15, 2022
@sreichel
Copy link
Collaborator

I started to work on this and made some updates. (cmuench#83)

@cmuench
Copy link
Member

cmuench commented Nov 23, 2022

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

@ktomk
Copy link
Collaborator

ktomk commented Dec 22, 2022

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.

@sreichel
Copy link
Collaborator

sreichel commented May 16, 2023

Think most of the work is done. (cmuench#87)

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 .... "Choice questions" have changed, progessbars work different ... it will break some pluigns for sure :/

@cmuench
Copy link
Member

cmuench commented May 16, 2023

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

@cmuench
Copy link
Member

cmuench commented May 17, 2023

@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.

@sreichel
Copy link
Collaborator

@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?

@cmuench
Copy link
Member

cmuench commented Aug 29, 2023

@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
Copy link
Member

cmuench commented Aug 29, 2023

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

@sreichel
Copy link
Collaborator

@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?

@cmuench
Copy link
Member

cmuench commented Aug 29, 2023

Btw ... whats your setting for N98_MAGERUN_TEST_MAGENTO_ROOT?

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

@sreichel
Copy link
Collaborator

@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.

@cmuench
Copy link
Member

cmuench commented Aug 29, 2023

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

@cmuench
Copy link
Member

cmuench commented Aug 29, 2023

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

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

Successfully merging a pull request may close this issue.

5 participants