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

Add automatic detection of required PHP version from Composer's platform setting #754

Merged
merged 2 commits into from
Jul 30, 2023

Conversation

jasongill
Copy link
Contributor


name: ⚙ Improvement
about: Supports automatic detection of PHP version from composer.lock or composer.json file
labels: enhancement


This is related to #751 and should help with #629, #713, and #639.

Description

This PR adds detection of the "config.platform.php" setting available in composer.json (which is also saved as platform-overrides.php in composer.lock), so that the required PHP version for an application using Composer will be automatically detected.

As the config.platform.php setting forces Composer to lock dependencies to a specific PHP version, it's a perfect way to detect the "required" version of PHP for a project without any risk of conflicts due to differing versions.

In case this PR introduced TypeScript/JavaScript code changes:

  • I have written test cases for the changes in this pull request
  • I have run npm run format before the commit.
  • I have run npm run lint before the commit.
  • I have run npm run release before the commit.
  • npm test returns with no unit test errors and all code covered.

@codecov
Copy link

codecov bot commented Jul 30, 2023

Codecov Report

Merging #754 (95916a7) into develop (72ae4cc) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##           develop      #754   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          577       589   +12     
  Branches        92        98    +6     
=========================================
+ Hits           577       589   +12     
Files Changed Coverage Δ
src/utils.ts 100.00% <100.00%> (ø)

@shivammathur shivammathur merged commit 36e04fc into shivammathur:develop Jul 30, 2023
57 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants