Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #146 +/- ##
=========================================
Coverage 99.24% 99.24%
Complexity 1143 1143
=========================================
Files 48 48
Lines 2517 2517
=========================================
Hits 2498 2498
Misses 19 19 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gnutix
force-pushed
the
fix/parse-trailing-newline
branch
from
November 9, 2026 08:45
e5db498 to
94cad78
Compare
ubuntu-latest now points to Ubuntu 26.04, which no longer installs tzdata-legacy. Without it, PHP doesn't know legacy time zone names such as CET and Asia/Rangoon, which the tests use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FQhVM8scWxQrMU3djngjpv (cherry picked from commit 1c48e3b)
Without the D modifier, PCRE's $ also matches before a final newline. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gnutix
force-pushed
the
fix/parse-trailing-newline
branch
from
November 9, 2026 08:46
94cad78 to
c642928
Compare
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.
Item 6 of #137.
Problem
In PCRE,
$without theDmodifier also matches before a final"\n", so every parser accepted one:Code that validates a string with
parse()and then stores the raw string kept the newline.Change
The
D(PCRE_DOLLAR_ENDONLY) modifier is added to the three regexes that do the parsing:PatternParser::parse(), which all the ISO parsers go through,Period::parse()andDuration::parse().A
"\n"case is added to the parse-failure providers of every class with aparse()method.LocalDateTesthad no such test, so it getstestParseInvalidStringThrowsException().CI
The last commit is #133's
Install tzdata-legacy in CI, cherry-picked: theubuntu-26.04runner image no longer ships legacy zone names such asCETandAsia/Rangoon, so PHPUnit fails on every branch based onmain(#143 and #144 too). It is the same change as in #133, so it merges cleanly whichever lands first.🤖 Generated with Claude Code (Opus 5.5)