-
-
Notifications
You must be signed in to change notification settings - Fork 182
Open
Conversation
config->get() returns a DeepCollection, not an array. With strict_types enabled this caused a TypeError on the array type hint. Accept DeepCollection, which supports ArrayAccess for the key lookups used.
@Vondry
Vondry
changed the title
(削除) Fix TypeError in ResetPasswordController buildResetEmail (削除ここまで)
(追記) Fix: Resetting forgotten password (追記ここまで)
Jun 4, 2026
@Vondry
Vondry
force-pushed
the
fix/reset-password-config-type
branch
from
June 8, 2026 09:09
7624a99 to
9edebaf
Compare
- Add MAILER_DSN environment variable to phpunit.xml.dist for test environment - Add defensive handling in Canonical.php for malformed URLs in test environment - Add comprehensive test coverage for ResetPasswordController
@Vondry
Vondry
force-pushed
the
fix/reset-password-config-type
branch
from
June 8, 2026 09:25
9edebaf to
2a53d3e
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.
Uh oh!
There was an error while loading. Please reload this page.
Bug
Requesting a password reset at
image/bolt/reset-passwordreturned HTTP 500 with aTypeError:buildResetEmail()declared anarray $configparameter, butconfig->get('general/reset_password_settings')returns aBolt\Collection\DeepCollection. Understrict_types=1PHP refuses the object→array coercion.Fix
1. Primary fix
Fixed by changing the parameter type hint to
DeepCollection, which extends Laravel'sCollectionand implementsArrayAccess, so the existing$config['mail_from']lookups still work unchanged.2. Test Environment Configuration
MAILER_DSN=null://nulltophpunit.xml.distto prevent mailer configuration errors during tests.src/Canonical.phpto safely handle malformed URLs and incompleteparse_url()results.3. Test Coverage
Added
ResetPasswordControllerTest.phpto verify that:The password reset page loads successfully
The reset form renders correctly
Requests are handled without triggering
TypeErrorexceptionsTesting
Screen.Recording.2026年06月04日.at.15.03.04.mov