- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 32
The "withHeader" method expects the type "string|iterable", "int" is passed #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The "withHeader" method expects the type "string|iterable", "int" is passed #150
Conversation
…HeadersInterface" interface expects the type "string|iterable", "int" is passed
…HeadersInterface" interface expects the type "string|iterable", "int" is passed
WalkthroughA new entry was added to the changelog documenting a fix for the Changes
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
CHANGELOG.md (1)
7-10
: Fix markdown heading structure and approve changelog entry.The changelog entry accurately documents the type safety fix. However, there's a markdown formatting issue where the heading level jumps directly to h3.
Apply this diff to fix the markdown structure:
+## Unreleased + ### Fixed - The "withHeader" method of the "\Spiral\RoadRunner\Jobs\Task\WritableHeadersInterface" interface expects the type "string|iterable", "int" is passed🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
7-7: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3(MD001, heading-increment)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
CHANGELOG.md
(1 hunks)src/Queue/RoadRunnerJob.php
(1 hunks)
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
CHANGELOG.md
7-7: Heading levels should only increment by one level at a time
Expected: h2; Actual: h3
(MD001, heading-increment)
🔇 Additional comments (1)
src/Queue/RoadRunnerJob.php (1)
56-56
: Excellent type safety fix!The explicit string casting resolves the type mismatch issue where
withHeader
expectsstring|iterable
but was receiving anint
. The pre-increment with explicit casting maintains the same logical behavior while ensuring type correctness.
Description
The "withHeader" method of the "\Spiral\RoadRunner\Jobs\Task\WritableHeadersInterface" interface expects the type "string|iterable", "int" is passed
Fixes # (issue)
Checklist
CHANGELOG.md
fileSummary by CodeRabbit