bitExpert / magento2-force-login

Force Customer Login Module for Magento 2
https://marketplace.magento.com/bitexpert-magento2-force-customer-login.html
Apache License 2.0
166 stars 73 forks source link

task: add support for php 8.2 #227

Closed xaevik closed 11 months ago

xaevik commented 1 year ago

Description

Adds support for PHP 8.2 for Magento >= 2.4.6 installations

shochdoerfer commented 1 year ago

@xaevik awesome, thanks for helping out!

shochdoerfer commented 1 year ago

@xaevik the CI build fails because we sticked to Composer 1 for a long time (to be able to install the module also on older Magento instances). Now that hurts us ;(

I think the best would be to upgrade to Composer 2 and not care about older Magento versions anymore. Since we run the builds for Magento 2.4.x, I think all those versions should be compatible with Composer 2. Or what do you think?

xaevik commented 1 year ago

@shochdoerfer if you're only targeting Magento >= 2.4.x at this point, I would safely say bumping the composer version to >= 2.2 in the CI pipeline would be wise, I can update the PR if you'd like to include those changes.

As far as I remember, stock Magento 1.x never supported composer as a first party concern, but I know the OpenMage (which is an M 1.x fork) project does.

xaevik commented 1 year ago

@shochdoerfer I updated ci.yml to reflect the necessary changes:

This should allow the pipeline to run properly.

xaevik commented 1 year ago

Looks like a CodeSniffer dependency is missing, I'll address that shortly.

xaevik commented 1 year ago

Ok, looks like some more work is required here. Unfortunately captainhook is giving me some difficulties on my local but I'll set some time aside to look at this deeper tomorrow.

shochdoerfer commented 1 year ago

No worries. You can skip the git hook if that is easier for you ;) As long as we get the build green, I am fine.

xaevik commented 1 year ago

@shochdoerfer it looks as though phpstan.neon had an outdated ignoreErrors value. I removed it, ran tests locally and squashed all the commits. CI should (hopefully) return green this time.

shochdoerfer commented 1 year ago

Fingers crossed ;)

shochdoerfer commented 1 year ago

@xaevik looks good! Thx for the help. I know the version upgrades can be a bit annoying. Very much appreciate your support.

Will try to release a new package in the next few days. Just need to find the time for it.

shochdoerfer commented 1 year ago

@xaevik just wondering: Should we also remove the older PHP versions and Magento module versions from composer.json? I mean older versions of the module still work with those older versions and ideally the CI pipeline covers all versions we actively support.

xaevik commented 1 year ago

@shochdoerfer my general rule of thumb is to only support what is not considered end-of-life, in this case Magento >= 2.4.4 and PHP >= 8.1 (I need to add Magento 2.4.6 to the CI as I forgot).

I'll make some further refinements to composer.json as well to bring everything up to snuff.

xaevik commented 1 year ago

@shochdoerfer all right I've made the following changes:

Technically the direct PHP requirement in composer.json is not necessary as the direct dependency on magento/framework already takes care of this, but if you ever want to employ outside tools such as Mend Renovate or Dependabot it helps.

shochdoerfer commented 11 months ago

@xaevik thanks for helping out. And once again sorry for letting the PR hang for so long. Will release a version hopefully during this week.

xaevik commented 11 months ago

@shochdoerfer hey no worries, it's out now and now everyone can benefit from the change.

barryvdh commented 10 months ago

Can you tag an update for this? Thanks!

shochdoerfer commented 10 months ago

May bad, wanted to tag a release last week during my holiday, but somehow, things got out of my hand. Give me a day or two to get this done.

shochdoerfer commented 10 months ago

@barryvdh here you go https://github.com/bitExpert/magento2-force-login/releases/tag/v5.2.0

barryvdh commented 10 months ago

Thanks!