Skip to content

fix #3390 【メールフォーム】メールフィールドの数が多い場合に、受信データ用テーブルのフィールドが不足状態で作成されるかどうか確認#4412

Open
kaburk wants to merge 1 commit into
baserproject:5.2.xfrom
kaburk:5.2.x-#3390

Conversation

@kaburk

@kaburk kaburk commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

よろしくお願いします!

Copilot AI review requested due to automatic review settings June 5, 2026 13:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ベースに変更し、設定値のデフォルト/下限を追加

Comment thread plugins/bc-mail/tests/TestCase/Service/MailMessagesServiceTest.php Outdated
Comment thread plugins/bc-mail/src/Service/MailMessagesService.php Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants