feat: enhance EncodingValidator with performance optimizations#34
feat: enhance EncodingValidator with performance optimizations#34konradmichalik merged 4 commits intomainfrom
Conversation
|
Warning Rate limit exceeded@jackd248 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 4 minutes and 18 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. 📒 Files selected for processing (2)
WalkthroughThis update removes JSON syntax validation from the EncodingValidator, both in code and documentation. The validator now focuses solely on encoding, BOM, invisible characters, and Unicode normalization. The ext-intl extension is moved from a required dependency to a suggestion in composer.json. Related tests and documentation are updated to reflect these changes. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant EncodingValidator
participant Parser (JsonParser/PhpParser)
User->>EncodingValidator: processFile(file, parser)
EncodingValidator->>EncodingValidator: Check if file is empty
alt Empty
EncodingValidator-->>User: Return (no issues)
else Not empty
EncodingValidator->>EncodingValidator: Check UTF-8 validity
alt Invalid UTF-8
EncodingValidator-->>User: Return (UTF-8 issue)
else Valid UTF-8
EncodingValidator->>EncodingValidator: Check for BOM
EncodingValidator->>EncodingValidator: Check invisible characters
EncodingValidator->>EncodingValidator: Check Unicode normalization
EncodingValidator-->>User: Return issues (if any)
end
end
Possibly related PRs
Poem
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 (
|
Summary by CodeRabbit
Documentation
ext-intlPHP extension is now suggested (not required) for Unicode normalization validation.Bug Fixes
Tests