Skip to content

Conversation

@alganet
Copy link
Member

@alganet alganet commented Jan 7, 2026

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_Z or something. I'll provide a 3.x follow up in the next few days.

@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.12%. Comparing base (79f214c) to head (caa13e7).
⚠️ Report is 1 commits behind head on 2.4.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 CanValidateDateTime trait 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.

@alganet alganet force-pushed the rfc3339-extended-bc branch from e922981 to 2caaaae Compare January 7, 2026 01:35
@alganet alganet requested a review from henriquemoody January 7, 2026 01:36
@alganet alganet force-pushed the rfc3339-extended-bc branch from 2caaaae to caa13e7 Compare January 7, 2026 08:02
@alganet alganet requested a review from henriquemoody January 7, 2026 08:02
@alganet alganet merged commit 5a29d9c into 2.4 Jan 7, 2026
17 checks passed
@alganet alganet deleted the rfc3339-extended-bc branch January 7, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants