-
-
Notifications
You must be signed in to change notification settings - Fork 56
chore: run the project on PHP 8.5 #467
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
Conversation
|
Warning Rate limit exceeded@martin-georgiev has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 9 minutes and 53 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)
WalkthroughAdds PHP 8.5 to CI matrices and PHP setup steps, tightens composer PHP constraint to <8.6, adjusts php-cs-fixer rule key, small code cleanups (introduces integer-fit helper, switches callable shorthand in two places, tweaks WKT trimming), updates docs phrasing, and removes a test-side resource cleanup. Changes
Sequence Diagram(s)sequenceDiagram
participant Caller as Validator / Transformer
participant Base as BaseIntegerArray
rect #e8f6ff
Caller->>Base: provide string value (e.g., "12345678901234567890")
Base->>Base: fitsInPHPInteger(string)
alt FILTER_VALIDATE_INT returns int
Base-->>Caller: treat as PHP-int-compatible (continue)
else not PHP-int
Base-->>Caller: throw OutOfBounds/Type exception or continue to min/max checks
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
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. Comment |
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: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (9)
.github/workflows/ci.yml(1 hunks).github/workflows/integration-tests.yml(2 hunks).github/workflows/unit-tests.yml(1 hunks)ci/php-cs-fixer/config.php(1 hunks)docs/CONTRIBUTING.md(2 hunks)src/MartinGeorgiev/Doctrine/DBAL/Types/BaseIntegerArray.php(3 hunks)src/MartinGeorgiev/Doctrine/DBAL/Types/SpatialDataArray.php(1 hunks)src/MartinGeorgiev/Utils/PHPArrayToPostgresValueTransformer.php(1 hunks)tests/Unit/MartinGeorgiev/Utils/PHPArrayToPostgresValueTransformerTest.php(0 hunks)
💤 Files with no reviewable changes (1)
- tests/Unit/MartinGeorgiev/Utils/PHPArrayToPostgresValueTransformerTest.php
🚧 Files skipped from review as they are similar to previous changes (2)
- .github/workflows/integration-tests.yml
- .github/workflows/unit-tests.yml
⏰ 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). (15)
- GitHub Check: Code Quality
- GitHub Check: PostgreSQL 16 + PostGIS 3.4 + PHP 8.5
- GitHub Check: PostgreSQL 17 + PostGIS 3.5 + PHP 8.5
- GitHub Check: PostgreSQL 16 + PostGIS 3.4 + PHP 8.3
- GitHub Check: PostgreSQL 18 + PostGIS 3.6 + PHP 8.1
- GitHub Check: PostgreSQL 17 + PostGIS 3.4 + PHP 8.3
- GitHub Check: PostgreSQL 17 + PostGIS 3.6 + PHP 8.1
- GitHub Check: PostgreSQL 17 + PostGIS 3.4 + PHP 8.2
- GitHub Check: PostgreSQL 16 + PostGIS 3.5 + PHP 8.2
- GitHub Check: PostgreSQL 17 + PostGIS 3.4 + PHP 8.1
- GitHub Check: PostgreSQL 16 + PostGIS 3.5 + PHP 8.1
- GitHub Check: PHP 8.5 + Doctrine ORM 2.14 + Doctrine Lexer 2.1
- GitHub Check: PHP 8.3 + Doctrine ORM 2.18 + Doctrine Lexer 3.0
- GitHub Check: sloth
- GitHub Check: wait-for-tests-worflows-before-upload
🔇 Additional comments (8)
src/MartinGeorgiev/Utils/PHPArrayToPostgresValueTransformer.php (1)
33-33: LGTM! Modernizes callable syntax for consistency.The change from string callable
'is_array'to first-class callableis_array(...)is a good modernization that aligns with PHP 8.1+ best practices. This also makes the code consistent with line 39, which already uses the same syntax forself::formatValue(...).src/MartinGeorgiev/Doctrine/DBAL/Types/SpatialDataArray.php (1)
203-203: LGTM! Modern first-class callable syntax.The switch to
trim(...)syntax is a clean modernization that leverages PHP 8.1's first-class callable feature. This is more type-safe than passing the function name as a string while maintaining identical functionality.docs/CONTRIBUTING.md (2)
131-132: Documentation updated to reflect PHP 8.5 support and improved hyphenation.The documentation now correctly reflects PHP 8.5 as the example version for local development, and "PostgreSQL-related" is properly hyphenated for consistency with modern style conventions.
142-142: Example configuration updated to use PHP 8.5.The devenv.local.nix example now shows PHP 8.5, which aligns with the minimum supported version being updated in this PR.
.github/workflows/ci.yml (1)
49-49: PHP 8.5 support is complete across all workflow files and configuration.Verification confirms that all requested files have been consistently updated:
.github/workflows/ci.yml: PHP 8.5 set at line 49 ✓.github/workflows/integration-tests.yml: PHP 8.5 included in matrix ✓.github/workflows/unit-tests.yml: PHP 8.5 included in matrix ✓composer.json: Constraint correctly set to^8.1 <8.6✓No further changes needed.
src/MartinGeorgiev/Doctrine/DBAL/Types/BaseIntegerArray.php (3)
90-93: LGTM! Excellent refactoring.The new helper method properly encapsulates the integer-fit check using
FILTER_VALIDATE_INT, which correctly respects platform-dependentPHP_INT_MAXandPHP_INT_MINlimits. The!== falsecomparison correctly handles the case where "0" validates to0.
47-47: LGTM! Correct usage of the helper.The helper is correctly used here to validate that the string value fits in a PHP integer before proceeding with the cast and range validation. This eliminates code duplication while maintaining the correct validation flow.
77-77: LGTM! Consistent usage of the helper.The helper is correctly applied here as well, maintaining consistency with the database validation path and completing the refactoring to eliminate duplicated logic.
Summary by CodeRabbit
Tests
Chores
Documentation
Refactor