Raise the minimum PHP version to 8.3
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- php
- Domain
- build-system, documentation
Research direction
Start with the php constraint in composer.json and the symfony/polyfill-php81 entry in its require block, then run composer update --lock to refresh composer.lock. Confirm that array_is_list() is the only polyfilled call in src/ before removing the package, and update the minimum PHP version in README. Done when composer.json requires >=8.3, the polyfill is gone, and CI passes on PHP 8.3 and 8.4.
Written by the indexing model from the issue text.
Description
Description
composer.json requires php >=7.4, but nothing checks that. CI runs PHP 8.3 and 8.4 only, config.platform.php is pinned to 8.3.0, and the dev dependencies (PHPUnit 10, drupal/core-dev ^11) do not install below 8.3. The test suite cannot run on the minimum we advertise.
I ran a smoke test on PHP 7.4.33 with Drupal 9.5.11 and PHPUnit 9.6. The code in src/ still works there: the README example renders as documented and 57 of 63 tests pass. The other 6 fail because tests/src/ArrayToStdClassTest.php already declares mixed parameters, which is PHP 8 syntax. So 7.4 support works by accident and will break without anyone noticing.
The only Drupal that runs on PHP 7.4 is Drupal 9, which is end of life. Composer refuses to install any 9.5 release by default because of open security advisories.
Raise the minimum to PHP 8.3. That is the oldest version CI tests, so the declared minimum and the tested minimum become the same.
Acceptance Criteria
-
composer.jsonrequires"php": ">=8.3"andcomposer.lockis refreshed withcomposer update --lock. -
symfony/polyfill-php81is removed fromrequire. The only functionsrc/uses from it isarray_is_list(), which is native since PHP 8.1. - The README states PHP 8.3 as the minimum.
-
composer testpasses in CI on PHP 8.3 and 8.4. - The commit is marked as a breaking change (
feat!:or aBREAKING CHANGE:footer) so semantic-release publishes 3.0.0 instead of a 2.x release.
Additional Context
Sites on PHP older than 8.3 keep getting 2.x, currently v2.5.3, through their existing Composer constraint.
Related and out of scope: src/RecursiveTypeCaster.php:153 uses a (boolean) cast, which PHP 8.5 deprecates in favour of (bool). CI does not run 8.5 yet.
- Dominant language
- PHP
- Stars
- 11
- Forks
- 5
- Avg merge
- 12m
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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 e0ipso/schema-forms-php
-
Loosen validation to fix error with empty objectsPossibly taken @feuerwagen claimed this 865 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 42/100
e0ipso/schema-forms-php#38 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
e0ipso/schema-forms-php#37 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
e0ipso/schema-forms-php#29 ·
All issues in e0ipso/schema-forms-php
Similar issues
-
loginWithCustomTokenExchange() fails when an organization is configuredPossibly taken @awss1i claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
auth0/auth0-PHP#883 · 1 comment ·
Maintainers usually reply within 2 days
-
type/bug
Difficulty 1/5 Under an hour Newbie friendliness 75/100
flarum/framework#5231 · 1 comment ·
Maintainers usually reply within 1 day
-
major-release
Difficulty 1/5 Under an hour Newbie friendliness 67/100
Intervention/image#1553 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
omegaup/omegaup#10353 · 1 comment ·
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 61/100