Skip to content

Conversation

terabytesoftw
Copy link
Member

@terabytesoftw terabytesoftw commented Sep 29, 2025

Pull Request

Q A
Is bugfix? ✔️
New feature?
Breaks BC?

Summary by CodeRabbit

@coderabbitai
Copy link

coderabbitai bot commented Sep 29, 2025

Warning

Rate limit exceeded

@terabytesoftw has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 18 minutes and 22 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 0493724 and c0b5f93.

📒 Files selected for processing (3)
  • .github/workflows/build.yml (1 hunks)
  • CHANGELOG.md (1 hunks)
  • tests/adapter/ServerParamsPsr7Test.php (1 hunks)

Walkthrough

Adds a changelog entry for Bug #184 and removes PSR-7 ServerParams tests and their data providers for remote IP and server port. Expands a test class PHPDoc. No production code changes or public APIs altered.

Changes

Cohort / File(s) Summary of changes
Changelog update
CHANGELOG.md
Added entry under 0.1.1 noting removal of redundant remote IP and server port tests.
PSR-7 server params tests
tests/adapter/ServerParamsPsr7Test.php, tests/provider/ServerParamsPsr7Provider.php
Removed test methods and data providers for remote IP and server port; expanded class-level PHPDoc; deleted remoteIPCases() and serverPortCases() provider methods.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested labels

bug

Poem

I nibbled the tests, two crumbs at a time,
Remote IP? Server port? Gone—so sublime.
The changelog now hums with tidy delight,
Hop, hop, I keep the garden light.
With ears up high and whiskers neat,
I prune the code for cleaner beats. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly and concisely summarizes the main change by indicating that redundant remote IP and server port test cases are being removed in a refactor of tests, which aligns directly with the modifications in the test files and the overall objective of improving clarity and maintainability.

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 and usage tips.

@terabytesoftw terabytesoftw added the bug Something isn't working label Sep 29, 2025
@codecov
Copy link

codecov bot commented Sep 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (4468809) to head (0493724).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##                main      #184   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
  Complexity       362       362           
===========================================
  Files             13        13           
  Lines            909       909           
===========================================
  Hits             909       909           

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
tests/adapter/ServerParamsPsr7Test.php (1)

17-32: Clarify data-provider scope in PSR-7 server params test docblock

Replace in tests/adapter/ServerParamsPsr7Test.php docblock:

- * - Uses data providers for comprehensive edge case coverage.
+ * - Uses data providers where applicable (remote host, server name, server params);
+ *   remote IP and server port are covered via targeted tests.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4468809 and 0493724.

📒 Files selected for processing (3)
  • CHANGELOG.md (1 hunks)
  • tests/adapter/ServerParamsPsr7Test.php (1 hunks)
  • tests/provider/ServerParamsPsr7Provider.php (0 hunks)
💤 Files with no reviewable changes (1)
  • tests/provider/ServerParamsPsr7Provider.php
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: terabytesoftw
PR: yii2-extensions/psr-bridge#180
File: composer.json:64-65
Timestamp: 2025-09-28T11:51:01.252Z
Learning: In the yii2-extensions/psr-bridge project, terabytesoftw prefers removing the `--only-covered` flag from infection mutation testing commands to run mutation testing on all code rather than just covered code paths.
Learnt from: terabytesoftw
PR: yii2-extensions/psr-bridge#149
File: tests/http/stateless/ApplicationCoreTest.php:24-27
Timestamp: 2025-08-25T16:08:54.379Z
Learning: In the yii2-extensions/psr-bridge project, avoid importing functions that are not actually used in the code, even if they might seem logically related to the functionality being tested.
Learnt from: terabytesoftw
PR: yii2-extensions/psr-bridge#6
File: tests/http/RequestTest.php:1536-1552
Timestamp: 2025-07-20T16:35:15.341Z
Learning: In the yii2-extensions/psr-bridge project, the base TestCase class already handles $_SERVER cleanup in setUp() and tearDown() methods, so individual test methods that extend TestCase don't need manual $_SERVER restoration.
Learnt from: terabytesoftw
PR: yii2-extensions/psr-bridge#6
File: tests/http/RequestTest.php:1536-1552
Timestamp: 2025-07-20T16:35:15.341Z
Learning: In the yii2-extensions/psr-bridge project, the base TestCase class already handles $_SERVER cleanup in setUp() and tearDown() methods (lines 28 and 32), so individual test methods that extend TestCase don't need manual $_SERVER restoration.
📚 Learning: 2025-07-20T16:35:15.341Z
Learnt from: terabytesoftw
PR: yii2-extensions/psr-bridge#6
File: tests/http/RequestTest.php:1536-1552
Timestamp: 2025-07-20T16:35:15.341Z
Learning: In the yii2-extensions/psr-bridge project, the base TestCase class already handles $_SERVER cleanup in setUp() and tearDown() methods, so individual test methods that extend TestCase don't need manual $_SERVER restoration.

Applied to files:

  • tests/adapter/ServerParamsPsr7Test.php
📚 Learning: 2025-07-20T16:35:15.341Z
Learnt from: terabytesoftw
PR: yii2-extensions/psr-bridge#6
File: tests/http/RequestTest.php:1536-1552
Timestamp: 2025-07-20T16:35:15.341Z
Learning: In the yii2-extensions/psr-bridge project, the base TestCase class already handles $_SERVER cleanup in setUp() and tearDown() methods (lines 28 and 32), so individual test methods that extend TestCase don't need manual $_SERVER restoration.

Applied to files:

  • tests/adapter/ServerParamsPsr7Test.php
📚 Learning: 2025-07-20T16:33:57.495Z
Learnt from: terabytesoftw
PR: yii2-extensions/psr-bridge#6
File: tests/http/RequestTest.php:1564-1578
Timestamp: 2025-07-20T16:33:57.495Z
Learning: The TestCase class in yii2-extensions/psr-bridge automatically handles $_SERVER superglobal cleanup by saving its original state before each test and restoring it afterward in setUp() and tearDown() methods. Manual $_SERVER cleanup in individual test methods is unnecessary when extending this TestCase.

Applied to files:

  • tests/adapter/ServerParamsPsr7Test.php
📚 Learning: 2025-08-24T11:52:50.563Z
Learnt from: terabytesoftw
PR: yii2-extensions/psr-bridge#141
File: tests/http/stateless/ApplicationRoutingTest.php:1-164
Timestamp: 2025-08-24T11:52:50.563Z
Learning: In yii2-extensions/psr-bridge, tests that manipulate PHP superglobals ($_POST, $_GET, $_SERVER) in the http group do not require process isolation and work fine with the current PHPUnit configuration.

Applied to files:

  • tests/adapter/ServerParamsPsr7Test.php
📚 Learning: 2025-08-08T15:24:06.085Z
Learnt from: terabytesoftw
PR: yii2-extensions/psr-bridge#71
File: tests/TestCase.php:23-27
Timestamp: 2025-08-08T15:24:06.085Z
Learning: In yii2-extensions/psr-bridge (tests/TestCase.php), maintainer preference: it’s acceptable to use random-looking strings for test-only constants like COOKIE_VALIDATION_KEY; no need to replace with an obviously non-secret value unless CI/secret scanners become problematic.

Applied to files:

  • tests/adapter/ServerParamsPsr7Test.php
📚 Learning: 2025-08-29T15:39:21.600Z
Learnt from: terabytesoftw
PR: yii2-extensions/psr-bridge#161
File: tests/http/stateless/ApplicationEventTest.php:392-392
Timestamp: 2025-08-29T15:39:21.600Z
Learning: In yii2-extensions/psr-bridge tests, FactoryHelper::createRequest() can handle URIs both with and without leading slashes (e.g., 'site/index' and '/site/index' work equivalently). The leading slash is not required as the PSR-7 URI implementation and routing system normalize these paths. Both patterns are used throughout the test suite successfully.

Applied to files:

  • tests/adapter/ServerParamsPsr7Test.php
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (18)
  • GitHub Check: mutation / PHP 8.3-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.4-windows-2022
  • GitHub Check: phpunit / PHP 8.2-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.1-windows-2022
  • GitHub Check: phpunit / PHP 8.3-windows-2022
  • GitHub Check: phpunit / PHP 8.1-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.2-windows-2022
  • GitHub Check: phpunit / PHP 8.4-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.3-ubuntu-latest
  • GitHub Check: phpunit-dev / PHP 8.6-ubuntu-latest
  • GitHub Check: phpunit-dev / PHP 8.5-ubuntu-latest
  • GitHub Check: phpstan / PHP 8.4-ubuntu-latest
  • GitHub Check: linter / Super Linter
  • GitHub Check: linter / Super Linter
  • GitHub Check: phpunit / PHP 8.1-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.3-ubuntu-latest
  • GitHub Check: mutation / PHP 8.3-ubuntu-latest
  • GitHub Check: phpstan / PHP 8.4-ubuntu-latest

@terabytesoftw terabytesoftw merged commit dc34e6e into main Sep 29, 2025
27 checks passed
@terabytesoftw terabytesoftw deleted the fix-mini-162 branch September 29, 2025 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant