Skip to content

CI: test PHP 8.5, add 8.6 nightly and lowest deps, harden workflow - #583

Merged
Vitorinox merged 1 commit into
masterfrom
ci/php-8.5-and-improvements
Oct 27, 2026
Merged

Vitorinox merged 1 commit into
masterfrom
ci/php-8.5-and-improvements

Conversation

@Vitorinox

Copy link
Copy Markdown
Collaborator

Updates the GitHub Actions workflow and fixes a few things found while doing it.

Changes

.github/workflows/test.yml

  • PHP 8.5 added to the test matrix (7.4, 8.0 to 8.5). PHPStan now runs on 8.5.
  • PHP 8.6 nightly as a separate job with continue-on-error: true, so upcoming breakages (for example the ml/json-ld deprecations tracked in PHP 8.5 deprecations from ml/json-ld (tracking, see #554) #582) show up early without blocking PRs. Composer runs with --ignore-platform-req=php+ there.
  • fail-fast: false, so one failing PHP version no longer cancels the others.
  • ramsey/composer-install@v4 replaces the actions/cache of vendor. The old cache was keyed on composer.json only (there is no composer.lock), so it could reuse stale dependencies. The action caches Composer's download cache properly.
  • Lowest dependencies on PHP 7.4 (dependency-versions: lowest), highest everywhere else, to catch constraint problems such as psr/http-message 1 vs 2.
  • Hygiene: permissions: contents: read, a concurrency group that cancels outdated runs on PRs, workflow_dispatch for manual runs, and a composer validate --strict step. EMBED_STRICT_CACHE: 1 is kept on the test step. coverage: none speeds up setup-php.

composer.json

  • oscarotero/html-parser raised from ^0.1.4 to ^0.1.6. The new lowest-deps job showed that 0.1.4 and 0.1.5 fail two page fixtures (itmedia.co.jp and 4pda.to, wrong title and description extraction for non-ASCII pages). 0.1.6 and later pass.
  • homepage and support.issues now point to php-embed/Embed, and support.source was added. Author info is unchanged.

Local results (macOS, Homebrew PHP)

  • composer validate --strict: valid
  • actionlint: no issues
  • PHPUnit with highest deps: PHP 7.4, 8.1, 8.2, 8.3, 8.4, 8.5 all OK (237 tests). On PHP 8.0 one test (CurlClientTest::testInternationalizedHostIsPinnedInPunycode) errors locally; this looks specific to the Homebrew php@8.0 build (intl loaded as a separate extension), and the code under test is unchanged by this PR. CI will confirm.
  • PHPUnit with --prefer-lowest on PHP 7.4: OK (237 tests) after the html-parser bump, 2 failures before it.
  • PHPStan on PHP 8.5: no errors.

- Add PHP 8.5 to the matrix and run PHPStan on 8.5
- Add a PHP 8.6 nightly job that is allowed to fail
- Use ramsey/composer-install instead of caching vendor
- Test lowest dependencies on PHP 7.4
- Add fail-fast false, read-only permissions, concurrency,
  workflow_dispatch and composer validate --strict
- Require oscarotero/html-parser ^0.1.6 (0.1.4 and 0.1.5 fail tests)
- Point homepage and support links to php-embed/Embed
@Vitorinox
Vitorinox force-pushed the ci/php-8.5-and-improvements branch from 6eb4f09 to 094ffd9 Compare October 27, 2026 19:56
@Vitorinox
Vitorinox merged commit 1aad3a3 into master Oct 27, 2026
10 checks passed
@Vitorinox
Vitorinox deleted the ci/php-8.5-and-improvements branch October 27, 2026 19:56
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.

1 participant