Skip to content

Fix tests failing with --prefer-lowest#375

Merged
koriym merged 1 commit into
bearsunday:1.xfrom
koriym:fix-prefer-lowest-test
Jul 15, 2026
Merged

Fix tests failing with --prefer-lowest#375
koriym merged 1 commit into
bearsunday:1.xfrom
koriym:fix-prefer-lowest-test

Conversation

@koriym

@koriym koriym commented Jul 15, 2026

Copy link
Copy Markdown
Member

Problem

composer update --prefer-lowest + composer test produced 2 errors and 1 deprecation:

  1. Class Koriym\PhpServer\PhpServer not foundbear/devtools 1.0.2 (the lowest version) does not depend on koriym/php-server, but tests use it directly.
  2. PHP 8.4 deprecation: "Use of 'static' in callables is deprecated"webmozart/assert 1.x uses array('static', ) which is deprecated in PHP 8.4.

Fix

  • Add koriym/php-server: ^1.0 to require-dev
  • Pin webmozart/assert: ^2.0 in require-dev (compatible with phpdocumentor/reflection-docblock's ^1.9.1 || ^2 constraint)

Verification

  • composer update --prefer-lowest --prefer-stable + composer test — 403 tests, 0 errors, 0 deprecations
  • composer update + composer test — 403 tests, 0 errors, 0 deprecations
  • composer cs-fix — no violations

Add koriym/php-server to require-dev (not pulled by bear/devtools 1.0.2)
Pin webmozart/assert ^2.0 to avoid PHP 8.4 deprecation in 1.x
@koriym

koriym commented Jul 15, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 1a66fa9b-de69-4324-9dc7-bd408edd8c53

📥 Commits

Reviewing files that changed from the base of the PR and between 0797251 and 5422ff7.

📒 Files selected for processing (1)
  • composer.json

Walkthrough

composer.jsonrequire-devに、koriym/php-server^1.0)とwebmozart/assert^2.0)を追加しました。

Changes

開発依存関係

Layer / File(s) Summary
開発用依存関係の宣言
composer.json
require-devkoriym/php-serverwebmozart/assertを追加しました。

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 変更内容は --prefer-lowest でのテスト失敗修正を要約しており、主旨と一致しています。
Description check ✅ Passed 問題点、修正内容、検証結果が今回の依存関係変更と整合しています。
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

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

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (0797251) to head (5422ff7).

Additional details and impacted files
@@             Coverage Diff             @@
##                 1.x      #375   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity       687       687           
===========================================
  Files             96        96           
  Lines           1720      1720           
===========================================
  Hits            1720      1720           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@koriym
koriym merged commit 51e56dd into bearsunday:1.x Jul 15, 2026
18 checks passed
@koriym
koriym deleted the fix-prefer-lowest-test branch July 15, 2026 18:09
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