fix #3390 【メールフォーム】メールフィールドの数が多い場合に、受信データ用テーブルのフィールドが不足状態で作成されるかどうか確認#4412
Open
kaburk wants to merge 1 commit into
Open
fix #3390 【メールフォーム】メールフィールドの数が多い場合に、受信データ用テーブルのフィールドが不足状態で作成されるかどうか確認#4412kaburk wants to merge 1 commit into
kaburk wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
メールフォーム(bc-mail)の受信データ用テーブル(mail_message_{id})について、メールフィールド数が多い場合でも初回作成時点で必要なカラムが不足しないようにする対応と、その回帰テスト追加を目的としたPRです。あわせて、二段階認証コードの有効期限判定を CakePHP の日時型で扱うよう改善しています。
Changes:
MailMessagesService::createTable()で MailFields を参照し、初回作成時にメールフィールド分のカラムもまとめて作成するよう変更- フィールド数が多いケースの初回作成をカバーするテストを追加し、既存 construction テストの後片付けを強化
- 二段階認証の verify で
FrozenTimeを用いた有効期限計算に変更し、テスト側も設定値を固定して安定化
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| plugins/bc-mail/tests/TestCase/Service/MailMessagesServiceTest.php | construction の後片付けを try/finally 化し、多フィールド初回作成の回帰テストを追加 |
| plugins/bc-mail/src/Service/MailMessagesService.php | 初回の受信テーブル作成時に MailFields を含めたスキーマで作成するよう拡張 |
| plugins/baser-core/tests/TestCase/Service/TwoFactorAuthenticationsServiceTest.php | allowTime を固定してテストを安定化し、保存結果のアサーションを追加 |
| plugins/baser-core/src/Service/TwoFactorAuthenticationsService.php | 有効期限判定を FrozenTime ベースに変更し、設定値のデフォルト/下限を追加 |
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.
よろしくお願いします!