Skip to content

Conversation

@terabytesoftw
Copy link
Member

@terabytesoftw terabytesoftw commented Sep 25, 2025

Pull Request

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

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive configuration guide for the PSR Bridge extension: setup, component replacement, error handling/custom views, memory-management patterns, PSR-7 factory wiring, and stateless/worker-mode configuration, with examples and “Next steps” links.
  • Chores
    • Updated deployment badge targets for FrankenPHP and RoadRunner in the README to new repository paths.

@coderabbitai
Copy link

coderabbitai bot commented Sep 25, 2025

Walkthrough

Expands documentation and README badges: adds a comprehensive configuration guide in docs/configuration.md for the PSR Bridge extension (setup, component replacement, error handling, custom error views, memory-management patterns, PSR-7 factory mappings, and StatelessApplication worker-mode), and updates two deployment badge links in README.md.

Changes

Cohort / File(s) Summary
Docs: Configuration guide
docs/configuration.md
Adds a full configuration guide for the PSR Bridge extension: PSR Request/Response replacement, CSRF/Cookie validation toggles, ErrorHandler configuration (errorAction, discardExistingOutput), custom error/exception/call-stack views and displayVars, memory-management examples (logger flushing, clean workflow), PSR‑7 factory interface mappings to HttpSoft, StatelessApplication worker-mode configuration, expanded overview and "Next steps" links.
Docs: README badges
README.md
Updates FrankenPHP and RoadRunner deployment badge URLs to point to new repo paths (franken-php, road-runner) while preserving badge styling/links.

Sequence Diagram(s)

No sequence diagrams — documentation-only changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

bug

Poem

I’m a rabbit with a README bright,
Tucking configs in the moonlit night.
PSR bridges, error views in line,
Flush the logs, the workers shine.
Hop onward — docs and badges, all done right! 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title clearly communicates the primary update by specifying an enhanced guide in configuration.md with detailed PSR Bridge component setup and worker-mode integration, which directly reflects the extensive documentation enhancements introduced in the pull request. It refers to the exact file changed and summarizes the core additions without unnecessary detail, making it easy for team members to understand the intent at a glance. The phrasing is concise and specific, avoiding generic or vague language, and it matches the PR objectives of improving documentation coverage and usability.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-mini-151

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aeb50fb and bbbde8e.

📒 Files selected for processing (2)
  • README.md (1 hunks)
  • docs/configuration.md (1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: terabytesoftw
PR: yii2-extensions/psr-bridge#172
File: docs/testing.md:17-45
Timestamp: 2025-09-25T20:39:56.387Z
Learning: In the yii2-extensions/psr-bridge repository, documentation formatting in markdown files is handled automatically by prettier, so sentence fragments before code blocks are intentional formatting choices that should not be flagged as readability issues.
📚 Learning: 2025-09-25T20:39:56.387Z
Learnt from: terabytesoftw
PR: yii2-extensions/psr-bridge#172
File: docs/testing.md:17-45
Timestamp: 2025-09-25T20:39:56.387Z
Learning: In the yii2-extensions/psr-bridge repository, documentation formatting in markdown files is handled automatically by prettier, so sentence fragments before code blocks are intentional formatting choices that should not be flagged as readability issues.

Applied to files:

  • docs/configuration.md
📚 Learning: 2025-07-22T00:50:26.546Z
Learnt from: terabytesoftw
PR: yii2-extensions/psr-bridge#21
File: tests/http/PSR7ResponseTest.php:0-0
Timestamp: 2025-07-22T00:50:26.546Z
Learning: In yii2-extensions/psr-bridge, the ResponseAdapter::formatCookieHeader() method uses `$expire !== 1` to skip validation for Yii2's special deletion cookies, but this should be extended to handle all expired cookies, not just the special case where expire=1.

Applied to files:

  • docs/configuration.md
📚 Learning: 2025-08-08T15:28:00.166Z
Learnt from: terabytesoftw
PR: yii2-extensions/psr-bridge#71
File: tests/adapter/ServerRequestAdapterTest.php:2215-2215
Timestamp: 2025-08-08T15:28:00.166Z
Learning: In yii2-extensions/psr-bridge tests, prefer using self::COOKIE_VALIDATION_KEY from tests/TestCase over hardcoded 'cookieValidationKey' strings to avoid secret scanners FP and improve maintainability.

Applied to files:

  • docs/configuration.md
📚 Learning: 2025-08-08T15:28:00.166Z
Learnt from: terabytesoftw
PR: yii2-extensions/psr-bridge#71
File: tests/adapter/ServerRequestAdapterTest.php:2215-2215
Timestamp: 2025-08-08T15:28:00.166Z
Learning: In yii2-extensions/psr-bridge, tests extend tests/TestCase which defines a protected const COOKIE_VALIDATION_KEY. Test code should use self::COOKIE_VALIDATION_KEY instead of hardcoded cookieValidationKey literals.

Applied to files:

  • docs/configuration.md
📚 Learning: 2025-08-03T16:24:09.241Z
Learnt from: terabytesoftw
PR: yii2-extensions/psr-bridge#53
File: src/http/ErrorHandler.php:258-272
Timestamp: 2025-08-03T16:24:09.241Z
Learning: In yii2-extensions/psr-bridge, the StatelessApplication creates a new Response instance for each request in the reset() method, then passes it to ErrorHandler::setResponse(). This means the template response is not shared across requests, so calling clear() on it in createErrorResponse() is safe and doesn't cause side effects.

Applied to files:

  • docs/configuration.md
🔇 Additional comments (2)
README.md (1)

88-89: Badge target repositories look correct

The FrankenPHP and RoadRunner badges now point directly at their dedicated repositories, which matches the reorganisation of those runtimes. Looks good to me.

docs/configuration.md (1)

147-149: workerMode property confirmed on Request
The yii2\extensions\psrbridge\http\Request class declares public bool $workerMode (default true) and is exercised in tests—no changes to the docs required.


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.

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 943499d and aeb50fb.

📒 Files selected for processing (1)
  • docs/configuration.md (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: terabytesoftw
PR: yii2-extensions/psr-bridge#172
File: docs/testing.md:17-45
Timestamp: 2025-09-25T20:39:56.387Z
Learning: In the yii2-extensions/psr-bridge repository, documentation formatting in markdown files is handled automatically by prettier, so sentence fragments before code blocks are intentional formatting choices that should not be flagged as readability issues.
📚 Learning: 2025-09-25T20:39:56.387Z
Learnt from: terabytesoftw
PR: yii2-extensions/psr-bridge#172
File: docs/testing.md:17-45
Timestamp: 2025-09-25T20:39:56.387Z
Learning: In the yii2-extensions/psr-bridge repository, documentation formatting in markdown files is handled automatically by prettier, so sentence fragments before code blocks are intentional formatting choices that should not be flagged as readability issues.

Applied to files:

  • docs/configuration.md
⏰ 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). (1)
  • GitHub Check: linter / Super Linter

@terabytesoftw terabytesoftw merged commit ea3f3cd into main Sep 25, 2025
17 checks passed
@terabytesoftw terabytesoftw deleted the fix-mini-151 branch September 25, 2025 22:10
@terabytesoftw terabytesoftw added the bug Something isn't working label Sep 25, 2025
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.

2 participants