Repository navigation
release: v1.6.70 - #310
Merged
Merged
release: v1.6.70#310
Conversation
…ption generateSmsVerificationFor() texted the subject's own phone, so a customer changing their number got the code on the old one, and a customer with no number got nothing. The phone option names the number to text; the SMS guard counts and traces the send against it. Without it nothing changes.
roncodes
added a commit
to fleetbase/storefront
that referenced
this pull request
Oct 14, 2026
requestPhoneVerification texted the number on file, so a customer changing their number got the code on the old one, and a customer with none got nothing while the endpoint reported success. It now passes the new number with core's phone option (fleetbase/core-api#310), so composer requires core-api ^1.6.70.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #310 +/- ##
===========================================
Coverage 100.00% 100.00%
- Complexity 8880 8881 +1
===========================================
Files 472 472
Lines 27918 27918
===========================================
Hits 27918 27918
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.
Release v1.6.70
A patch release for one bug, so fleetbase/storefront v0.4.25 can ship its fix. Merging into
maintriggersrelease.yml, which checks thatcomposer.jsonand the first line ofRELEASE.mdname1.6.70, then pushes thev1.6.70tag.What changed
VerificationCode::generateSmsVerificationFor()always texted$subject->phone. Storefront'srequest-phone-verificationpasses the customer's user as the subject and carries the new number only inmeta.phone. This caused two problems:{ "status": "ok" }.The method now takes a
phoneoption. When it's given, that number is texted, and the SMS guard reserves, counts and traces the send against it instead of the subject's number. Without the option, behaviour is unchanged: the subject's phone is used, and a subject with no phone still gets a saved code and no text.The other callers are unchanged: fleetops driver login and password reset, core 2FA, onboarding and the account-created listener.
Tests
Three new cases in
tests/Unit/Models/VerificationCodeGuardTest.php:The new cases sit before
leaves the code row untouched when the guard is disabledon purpose.VerificationCodeModelTestruns next in the same process and relies on the guard being left disabled by that last test. Appending tests after it fails four model tests. This order dependency already existed; this PR doesn't fix it.Validation, run locally on PHP 8.4:
pest(full suite): 2236 tests, 0 failed.php-cs-fixer --dry-runon the changed files: clean.php -lon PHP 8.2: clean.Before merging
release/v0.4.25requiresfleetbase/core-api ^1.6.70for this fix, so this release must be tagged before the Storefront release PR's CI can install.