refactor(controller): セッション処理を簡略化#6556
Open
nanasess wants to merge 2 commits intoEC-CUBE:4.3-symfony7from
Open
refactor(controller): セッション処理を簡略化#6556nanasess wants to merge 2 commits intoEC-CUBE:4.3-symfony7from
nanasess wants to merge 2 commits intoEC-CUBE:4.3-symfony7from
Conversation
- addFlash()の$messageパラメータにmixed型を追加(Symfony 7互換) - 不要なPHPDoc型キャスト(/** @var Session $session */)を削除 - clearMessage() - hasMessage() - addFlash() - setLoginTargetPath() FlashBagAwareSessionInterfaceはgetFlashBag()メソッドを持っているため、 型キャストは不要です。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…mplify-session-handling
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.
概要(Overview・Refs Issue)
AbstractControllerのセッション処理を簡略化し、Symfony 7との互換性を向上させます。
方針(Policy)
AbstractController::addFlash()メソッドのシグネチャに合わせてmixed型を使用FlashBagAwareSessionInterfaceがすでにgetFlashBag()メソッドを持っているため、冗長なPHPDoc型キャストを削除実装に関する補足(Appendix)
変更点
addFlash()の型宣言を更新$messageパラメータにmixed型を追加(Symfony 7のシグネチャに合わせる)不要な型キャストを削除
以下のメソッドから冗長なPHPDocアノテーション(
/** @var Session $session */)と中間変数を削除:clearMessage()hasMessage()addFlash()setLoginTargetPath()理由
プロパティ
$sessionはFlashBagAwareSessionInterface型で宣言されており、このインターフェースはgetFlashBag(): FlashBagInterfaceメソッドを持っているため、PHPDocによる型キャストは不要です。テスト(Test)
相談(Discussion)
特になし
マイナーバージョン互換性保持のための制限事項チェックリスト
🤖 Generated with Claude Code