Skip to content

chore(ci): add lowest-deps PHPUnit job to lock minimum constraints#2308

Open
ruflin wants to merge 1 commit into
9.xfrom
chore/ci-test-lowest-deps
Open

chore(ci): add lowest-deps PHPUnit job to lock minimum constraints#2308
ruflin wants to merge 1 commit into
9.xfrom
chore/ci-test-lowest-deps

Conversation

@ruflin

@ruflin ruflin commented Apr 30, 2026

Copy link
Copy Markdown
Owner

Summary

Without a --prefer-lowest job the minimum versions declared in
composer.json are never tested. Add a unit-only PHPUnit job on PHP 8.1
that installs dependencies with --prefer-lowest --prefer-stable so any
accidental tightening of a composer.json constraint is caught early.

Functional tests intentionally stay out of this job to avoid doubling
the cost of the ES-backed steps.

Identified during a P0/P1 code-review pass.

Test plan

  • Job runs on this PR; if it fails, expect a composer.json
    constraint that needs bumping.
  • Validate YAML.

Summary by CodeRabbit

  • Chores
    • Enhanced continuous integration testing to verify compatibility with minimum supported dependency versions.

Without a `--prefer-lowest` job the minimum versions declared in
`composer.json` are never tested. Add a unit-only PHPUnit job on PHP 8.1
that installs dependencies with `--prefer-lowest --prefer-stable` so any
accidental tightening of a `composer.json` constraint is caught early.

Functional tests intentionally stay out of this job to avoid doubling
the cost of the ES-backed steps.
Copilot AI review requested due to automatic review settings April 30, 2026 20:43
@coderabbitai

coderabbitai Bot commented Apr 30, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0c7a0cda-4b3e-4b6d-afc0-910f7c13ed19

📥 Commits

Reviewing files that changed from the base of the PR and between bbd7828 and 3820958.

📒 Files selected for processing (2)
  • .github/workflows/continuous-integration.yaml
  • CHANGELOG.md

📝 Walkthrough

Walkthrough

A new CI workflow job, phpunit-lowest, is introduced to test the codebase with the lowest allowed dependency versions on PHP 8.1. The job runs unit tests without coverage reporting and includes a 10-minute timeout.

Changes

Cohort / File(s) Summary
CI Workflow Configuration
.github/workflows/continuous-integration.yaml
Adds phpunit-lowest job that installs Composer dependencies with --prefer-lowest --prefer-stable, runs unit tests on PHP 8.1 with 10-minute timeout, and no coverage generation.
Changelog Documentation
CHANGELOG.md
Updates Unreleased section documenting introduction of the phpunit-lowest CI job.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A rabbit hops through tested ground,
With lowest versions, bugs unwound!
PHP 8.1, dependencies slim,
The CI pipeline's looking trim!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding a PHPUnit job that tests with lowest dependency versions to lock minimum constraints, which aligns with the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/ci-test-lowest-deps

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 1/8 review remaining, refill in 50 minutes and 54 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds CI coverage for minimum Composer constraints by introducing a dedicated PHPUnit job that installs the lowest dependency versions, helping ensure composer.json minimums remain valid over time.

Changes:

  • Add a phpunit-lowest GitHub Actions job (PHP 8.1) intended to run unit tests against lowest dependency versions.
  • Update CHANGELOG.md to document the new CI check.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
CHANGELOG.md Documents the addition of the new lowest-deps PHPUnit CI job.
.github/workflows/continuous-integration.yaml Adds a new phpunit-lowest job using ramsey/composer-install@v3 and runs unit tests only.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +137 to +142
- name: 'Install dependencies with Composer (lowest)'
uses: 'ramsey/composer-install@v3'
with:
dependency-versions: 'lowest'
composer-options: '--prefer-dist --prefer-stable'

Comment thread CHANGELOG.md
* Added support for "search after" based pagination [#1645](https://github.com/ruflin/Elastica/issues/1645)
* Added support for the `seq_no_primary_term` search option and the `if_seq_no` / `if_primary_term` index options to enable optimistic concurrency control [#2284](https://github.com/ruflin/Elastica/pull/2284)
### Changed
* Added a `phpunit-lowest` CI job that installs dependencies with `--prefer-lowest --prefer-stable` and runs the unit tests on PHP 8.1, ensuring that the minimum constraints declared in `composer.json` keep working.
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