-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Specify the platform configuration in composer.json #3862
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove the composer.lock IMO, but until then, 👍
If we have no composer.lock, and somebody requires a version that requires PHP 7.3, the 7.2 build will fail and prevent the PR from being merged, won't it? |
Instead of relying on CI building against the lowest supported version, this approach does the same in the development environment and does not require the lowest supported PHP version to resolve the dependencies. |
What if the version in the Also see @beberlei and I struggling to fix the build the other day because of a similar issue: https://doctrine.slack.com/archives/GERFT2W5T/p1579212730062400?thread_ts=1579212399.059900&cid=GERFT2W5T |
Then the incompatibility will be detected on CI. For most packages, the lowest version requirement is by design since they are using certain language features or APIs while the highest version requirement is implicit and is not by design. I.e. it's a relatively rare case to worry about. |
That's my point. There might be no incompatibility. There might exist a more recent version of the lib that is compatible with 7.4, yet one that is compatible with 7.2 and not 7.4 is in use.
did you mean "while the highest"? |
Yes, corrected. |
I see. Makes sense. Let’s reconsider this once it happens. |
I agree that we will be quite unlucky if it happens. Relying on packages that aggressively bump the versions of php (such as |
Having the target platform specified in Composer configuration will help make sure we won't lock the dependencies to a version incompatible with the oldest supported PHP version (see the linked build) without the need to use the oldest supported PHP in the development environment.