Fix BC break when using RFC3339 constants with Zulu timezone#1593
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 2.4 #1593 +/- ##
============================================
+ Coverage 94.09% 94.12% +0.02%
- Complexity 455 459 +4
============================================
Files 99 99
Lines 1254 1259 +5
============================================
+ Hits 1180 1185 +5
Misses 74 74 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR attempts to fix a backward compatibility break introduced in version 2.3 where RFC 3339 timestamps with the Zulu timezone suffix ('Z') are no longer accepted as valid, addressing issue #1442.
Key changes:
- Modified the
CanValidateDateTimetrait to replace 'Z' suffix with '+00:00' for RFC3339_EXTENDED format validation - Added test case to verify RFC3339_EXTENDED format accepts timestamps with 'Z' suffix
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| library/Helpers/CanValidateDateTime.php | Adds logic to replace 'Z' timezone suffix with '+00:00' when validating RFC3339_EXTENDED format |
| tests/unit/Helpers/CanValidateDateTimeTest.php | Adds test case for RFC3339_EXTENDED format with Zulu timezone suffix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e922981 to
2caaaae
Compare
henriquemoody
approved these changes
Jan 7, 2026
2caaaae to
caa13e7
Compare
henriquemoody
approved these changes
Jan 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses BC break in 2.x series reported in #1442 (maybe too late, but better than never fixed!)
I'm not sure we should do this in 3.x. Doing it in 2.x just to ensure BC with 2.2. While the PHP constant says "RFC3339", the RFC itself has several formats and PHP does not provide a full breadth of constants for all of the specified formats, so it's really not our fault. There should be a
\DateTime::RFC3339_Zor something. I'll provide a 3.x follow up in the next few days.