v1.6.59 - #242
Merged
Merged
Conversation
Both templates failed to parse, so every verification and credentials email threw
instead of sending. Any flow that delivers a code returned a 400 carrying the Blade
error: customer signup, SMS login with email fallback, password reset, account
closure, driver login.
syntax error, unexpected token "else", expecting end of file
(View: .../core-api/views/mail/verification.blade.php)
The greeting read:
Good Morning@if($user->name), {{ delinkify($user->name) }}@endif!
Blade only treats `@` as a directive when the preceding character is NOT a word
character — the rule that keeps foo@bar.com from compiling. `Morning@if(...)` was
therefore left as literal text, while the `@endif` after the echo compiled normally,
leaving an unmatched endif that broke the enclosing if/elseif/else. Confirmed by
compiling the view and reading the output: the `@if` is still there verbatim on the
same line as a real `<?php endif; ?>`.
Introduced in v1.6.56 by the fix for a null user name, and shipped again in v1.6.57
and v1.6.58.
Built the greeting in one expression instead, so no directive ever sits against a
word. delinkify() returns '' for a null or empty name, which is what makes the
no-name case fall through to the bare greeting.
Added a test that compiles EVERY blade view in the package and runs php -l over the
result. Nothing caught this because no test ever compiled a view — the templates were
only exercised through mocked mailers, which never render them. Verified the test
fails against the shipped template and passes against the fix.
Full suite green, coverage gate at 100%.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #242 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 6730 6730
===========================================
Files 397 397
Lines 22448 22448
===========================================
Hits 22448 22448
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Ready for immediate release: version bumped and
RELEASE.mdwritten, so merging tagsv1.6.59and publishes.Both mail templates failed to compile, so every verification and credentials email threw instead of sending. Any flow that delivers a code returned a 400 carrying the Blade error — customer signup, SMS login with email fallback, password reset, account closure, driver login.
Cause
The greeting read:
Blade only treats
@as a directive when the preceding character is not a word character — the rule that keepsfoo@bar.comfrom compiling. SoMorning@if(...)stayed literal text while the@endifafter the echo compiled normally, leaving an unmatchedendifthat broke the enclosingif/elseif/else. Confirmed by compiling the view and reading the output:Introduced in v1.6.56 by the fix for a null user name, and shipped again in v1.6.57 and v1.6.58.
user-credentials.blade.phphas the identical break.Fix
The greeting is built in one expression, so no directive ever sits against a word.
delinkify()returns''for a null or empty name, which is what makes the no-name case fall through to the bare greeting.Why nothing caught it
No test ever compiled a view — the templates were only exercised through mocked mailers, which never render them. This PR adds a test that compiles every Blade view in the package and runs
php -lover the result. I verified it fails against the shipped template and passes against the fix, so it is a real guard.Full suite green; coverage gate at 100%.
Impact on the contract runs
This is the cause of most of the current failures in both collections —
Request Customer Creation Code,Request Customer Login SMS,Request Driver Login SMS,Forgot Customer Password,Authenticate a Customer via SMS,Start Account Closure,Setups a verification request. They should clear once this is in the published image.Two failures are not explained by this and remain open: fleetops
List Organizations(Invalid platform API token.) and storefrontList Network Stores.🤖 Generated with Claude Code