Skip to content

PHP Version constraint: stick to tested versions only#880

Merged
lcobucci merged 4 commits into
5.0.xfrom
Slamdunk-patch-1
Aug 23, 2022
Merged

PHP Version constraint: stick to tested versions only#880
lcobucci merged 4 commits into
5.0.xfrom
Slamdunk-patch-1

Conversation

@Slamdunk

Copy link
Copy Markdown
Collaborator

PHP doesn't follow SemVer, so we should provide support only for tested PHP versions

@Slamdunk Slamdunk added this to the 5.0.0 milestone Aug 23, 2022
@Slamdunk
Slamdunk requested review from Ocramius and lcobucci August 23, 2022 08:41

@Ocramius Ocramius left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, but we can add PHP 8.2 at this stage, since it is stable-ish.

Remember to:

  1. define config.platform.php to help dependabot/etc in upgrades
  2. update composer.lock to reflect the current composer.json

@Slamdunk

Copy link
Copy Markdown
Collaborator Author
  1. define config.platform.php to help dependabot/etc in upgrades

Can you elaborate a bit please? Can't find any doc about it 🤔

Comment thread composer.json
@Ocramius

Copy link
Copy Markdown
Collaborator
  1. define config.platform.php to help dependabot/etc in upgrades

Can you elaborate a bit please? Can't find any doc about it thinking

If we declare {"require": {"php": "~8.1.0 || ~8.2.0"}}, then @dependabot will pick up packages compatible with PHP 8.2.0 only (at some point).

To work around this, we can declare {"config": {"platform": {"php": "8.1.99"}}} to force Composer's SAT logic to always pick a dependency set that is compatible with PHP 8.1.x, while running composer update.

…e future upgrades are always going to be backward compatible
@Slamdunk

Copy link
Copy Markdown
Collaborator Author

{"config": {"platform": {"php": "8.1.99"}}}

Ah, LoL, yes, I was looking for a config.platform.php file 🤦

@Ocramius Ocramius left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, letting @lcobucci call the shots though

@lcobucci lcobucci left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Ship it!

@lcobucci
lcobucci merged commit 2483e07 into 5.0.x Aug 23, 2022
@lcobucci
lcobucci deleted the Slamdunk-patch-1 branch August 23, 2022 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants