-
-
Notifications
You must be signed in to change notification settings - Fork 229
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
RecursiveTextProcessor: Fix "Automatic conversion of false to array is deprecated" #6009
Conversation
…s deprecated" Fixes #6007
WalkthroughThe pull request modifies the Changes
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (6)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
src/Parser/RecursiveTextProcessor.php (1)
Line range hint
141-162
: Consider adding type hints for better type safety.Since this code deals with type-sensitive operations, consider adding return type hints to
getExtensionData
calls and type hints for the$track
variable. This would make the type safety requirements more explicit and help catch potential issues at development time.Example improvement:
- $track = $parserOutput->getExtensionData( ParserData::ANNOTATION_BLOCK ); + /** @var array|false $track */ + $track = $parserOutput->getExtensionData( ParserData::ANNOTATION_BLOCK );
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/Parser/RecursiveTextProcessor.php
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (6)
- GitHub Check: build (1.43, 8.2, mysql, mariadb:11.2, false, true)
- GitHub Check: build (1.42, 8.2, mysql, mariadb:11.2, false, true)
- GitHub Check: build (1.41, 8.1, mysql, mariadb:11.2, true, true)
- GitHub Check: build (1.40, 8.1, mysql, mariadb:11.2, false, false)
- GitHub Check: build (1.39, 8.1, mysql, mysql:8, false, false)
- GitHub Check: build (1.39, 8.1, mysql, mariadb:11.2, false, false)
🔇 Additional comments (1)
src/Parser/RecursiveTextProcessor.php (1)
150-152
: LGTM! Good fix for the PHP 8.1 deprecation warning.The added
is_array
check properly handles the case whengetExtensionData
returnsfalse
, preventing the deprecation warning about automatic conversion of false to array.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6009 +/- ##
=========================================
Coverage 56.90% 56.90%
Complexity 18953 18953
=========================================
Files 942 942
Lines 66914 66914
=========================================
Hits 38079 38079
Misses 28835 28835 ☔ View full report in Codecov by Sentry. |
Thanks @paladox for addressing this! It is fine to me, but I will let an experienced developer to respond to your question or merge it as is. |
Fixes #6007
Summary by CodeRabbit