Skip to content

Make php-8.1 minimum requirement #4124

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

Merged
merged 31 commits into from
Mar 12, 2025
Merged

Make php-8.1 minimum requirement #4124

merged 31 commits into from
Mar 12, 2025

Conversation

sreichel
Copy link
Contributor

@sreichel sreichel commented Jul 28, 2024

We removed 7.3 support in 03/2003 ... now - plus one year later - its time to make the next step.

PHP8 offers a lot of good features, i'd like to use when writing extension but i am limited due to php7 support.

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

According to packagist.org stats only 20% still use php7.4 with latest releases.

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


Note 1: If you have modules/extensions that dont work with php8, drop me a note! This should be no reason to stay on an old php version!

Note 2: OpenMage will still proberly work with older versions too - as long we not introduce backwards-incomaptible changes.

Note3 : with https://github.com/rectorphp/rector you have a tool to refactor your code for php8.

sreichel added 5 commits July 22, 2024 14:01
* Rector: CQ - UnusedForeachValueToArrayKeysRector

See Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector

* fixes + phpstan

See fix at rector: rectorphp/rector-src#6164
- updated workflows
- phpstan baseline (will be fixed later)
@sreichel sreichel changed the title Make php-8.,0 minimum requirement Make php-8.0 minimum requirement Jul 28, 2024
@sreichel sreichel marked this pull request as draft July 28, 2024 14:58
sreichel and others added 3 commits August 7, 2024 06:09
Co-authored-by: Ng Kiat Siong <kiatsiong.ng@gmail.com>
# Conflicts:
#	composer.lock
#	phpstan.dist.baseline.neon
@github-actions github-actions bot added Component: lib/Varien Relates to lib/Varien Component: Media Relates to Mage_Media Component: Install Relates to Mage_Install Component: lib/* Relates to lib/* labels Sep 4, 2024
@sreichel sreichel changed the title Make php-8.0 minimum requirement Make php-8.1 minimum requirement Sep 4, 2024
@sreichel sreichel marked this pull request as ready for review September 4, 2024 23:20
addison74
addison74 previously approved these changes Sep 5, 2024
@sreichel sreichel marked this pull request as draft September 5, 2024 23:05
@colinmollenhour
Copy link
Member

colinmollenhour commented Sep 9, 2024

Agreed with the changes, but I believe this should be in "next" so that it is in the next major version update.

MAJOR version when you make incompatible API changes

  • ...
  • dependencies updated in major ways (e.g. dropping support of PHP 7.4 or MySQL 5.6)

All new PRs are based on either "main" branch for MINOR and PATCH updates or "next" branch for MAJOR updates

Since v21 was not released yet this could still make it into v21.

EDIT: Just saw there is already #3920

@sreichel
Copy link
Contributor Author

sreichel commented Sep 9, 2024

@colinmollenhour its on draft, b/c we should think about to raise minimum version for main branch too.

# Conflicts:
#	.github/workflows/phpstan.yml
#	.github/workflows/sonar.yml
#	.github/workflows/syntax-php.yml
#	app/code/core/Mage/Media/Model/File/Image.php
#	composer.json
#	composer.lock
#	phpstan.dist.baseline.neon
@github-actions github-actions bot removed Component: Authorizenet Relates to Mage_Authorizenet Component: Centinel Relates to Mage_Centinel Component: Dataflow Relates to Mage_Dataflow Component: Uploader Relates to Mage_Uploader Component: Rss Relates to Mage_Rss Component: Paygate Relates to Mage_Paygate errors Relates to error pages Component: lib/Magento Relates to lib/Magento labels Mar 10, 2025
@sreichel sreichel marked this pull request as ready for review March 10, 2025 14:46
addison74
addison74 previously approved these changes Mar 11, 2025
# Conflicts:
#	composer.lock
addison74
addison74 previously approved these changes Mar 11, 2025
@github-actions github-actions bot added the Component: Reports Relates to Mage_Reports label Mar 11, 2025
Copy link

Copy link
Member

@colinmollenhour colinmollenhour left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @sreichel !

@addison74 addison74 merged commit 0d2fd40 into OpenMage:main Mar 12, 2025
22 checks passed
@sreichel sreichel deleted the drop-php7 branch March 12, 2025 12:51
fballiano added a commit to MahoCommerce/maho that referenced this pull request Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Api2 Relates to Mage_Api2 Component: Core Relates to Mage_Core Component: Install Relates to Mage_Install Component: lib/Varien Relates to lib/Varien Component: lib/* Relates to lib/* Component: PayPal Relates to Mage_Paypal Component: Reports Relates to Mage_Reports composer Relates to composer.json environment new feature php-cs-fixer phpcs phpstan phpunit rector
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants