Check the PHP version from composer.json require.php
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start with the RUNTIMES list in src/devready/checks/runtimes.py and the extractor pattern there, then read SAFE_SPEC in versions.py and the explain.py entries. Add a php runtime row and a composer.json extractor that reads only require.php via json.loads, returning it only if it matches SAFE_SPEC. Done when composer.json with ^8.1 and PHP 7.4 installed yields one fail showing both versions, a repo without composer.json yields no PHP result, and pytest plus ruff check and ruff format --check pass.
Written by the indexing model from the issue text.
Description
Problem: A PHP project declares its PHP version in composer.json ("require": {"php": "^8.1"}). DevReady does not check PHP, so a too-old or missing php only shows up when composer install fails.
Do:
- Add a
phprow toRUNTIMESinsrc/devready/checks/runtimes.py(exephp, args--version,.tool-versionsnamephp). Runtimes are only checked when the project declares them, so nothing changes for other repos. - Add an extractor for
composer.json:json.loads, readrequire.phponly, return it only if it matchesSAFE_SPECinversions.py(^,~,||are already supported). - Id:
project.php.composer, miss =fail(Composer refuses to install on a platform mismatch). - Add the
explain.pyentry, adocs/checks.mdrow, a CHANGELOG line, the README check list mention and unit tests (match, too old, missing php, norequire.php, invalid JSON, hostile spec).
Done when:
composer.jsonwith"php": "^8.1"and PHP 7.4 installed gives onefailshowing both versions.- A repo without
composer.jsongets no PHP result.
Done when: see the list above, plus pytest, ruff check and ruff format --check pass.
Notes:
- Read-only: never execute project files, never echo file contents; only a validated version or spec reaches the report.
- No network, no new runtime dependencies (Python >= 3.10 stdlib only).
- Comment below to claim it and I will assign you.
- Dominant language
- Python
- Stars
- 2
- Forks
- 3
- Avg merge
- 10h 51m
- Merged PRs (30d)
- 40
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Evalogical-Inc/devReady
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Evalogical-Inc/devReady#71 ·
Maintainers usually reply within 1 day
-
enhancement good first issue
Difficulty 2/5 3-5 days Newbie friendliness 72/100
Evalogical-Inc/devReady#61 ·
Maintainers usually reply within 1 day
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
Evalogical-Inc/devReady#72 ·
Maintainers usually reply within 1 day
-
Read the Java pin from .sdkmanrcPossibly taken @Utkarsh3725 claimed this today. Openenhancement good first issue help wanted
Difficulty 3/5 Half a day Newbie friendliness 74/100
Evalogical-Inc/devReady#70 ·
Maintainers usually reply within 1 day
-
enhancement good first issue help wanted
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Evalogical-Inc/devReady#69 ·
Maintainers usually reply within 1 day
All issues in Evalogical-Inc/devReady
Similar issues
-
Email validation accepts a trailing newlinePossibly taken @marcello-pichini claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
dbt-labs/spark-utils#51 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug frontend
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
vendrabuck/HERD#1419 ·
Maintainers usually reply within 1 day