refactor: DECIMAL型プロパティを?stringに統一し、PHPStan Doctrine統合を追加#6572
Open
nanasess wants to merge 2 commits intoEC-CUBE:4.3-symfony7from
Open
refactor: DECIMAL型プロパティを?stringに統一し、PHPStan Doctrine統合を追加#6572nanasess wants to merge 2 commits intoEC-CUBE:4.3-symfony7from
nanasess wants to merge 2 commits intoEC-CUBE:4.3-symfony7from
Conversation
## Entity修正 - Order.php: subtotal, discount, delivery_fee_total, charge, tax, total, payment_total を ?string に統一 - OrderItem.php: quantity, tax, tax_rate, tax_adjust を ?string に統一 - Doctrine統合により不要になった phpstan-ignore コメントを削除 ## PHPStan設定 - phpstan-doctrine および phpstan-extension-installer を追加 - tests/object-manager.php を作成(Doctrine統合用) - phpstan.neon.dist にDoctrine統合設定を追加 ## その他の修正 - Cart.php: $errorsプロパティにphpstan-ignoreコメント追加 - DeliveryFee.php, LoginHistory.php: doctrine.associationTypeエラー対応 - OrderStatusRepository.php: findNotContainsBy()の戻り値型を修正 - OrderItemCollection.php: @templateアノテーション追加 Symfony Formのバリデーション処理でnullが設定される可能性があるため、 全てのDECIMAL型プロパティをnullable(?string)で統一。 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- OrderItem::getPriceIncTax()でtaxプロパティをstringにキャスト - PurchaseFlowのreduce()で$sumの不要なキャストを削除(初期値'0'から常にstring) - OrderStatusRepositoryのPHPDoc戻り値型をFQCNから短縮形に修正 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.3-symfony7 #6572 +/- ##
=============================================
Coverage 82.33% 82.33%
=============================================
Files 482 482
Lines 25691 25691
=============================================
Hits 21152 21152
Misses 4539 4539
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 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.
概要
DECIMAL型プロパティの型宣言を?stringに統一し、PHPStan Doctrine統合を追加しました。
変更内容
Entity修正
?stringに統一?stringに統一@phpstan-ignoreコメントを削除(30ファイル)PHPStan設定
phpstan-doctrineおよびphpstan-extension-installerを追加tests/object-manager.phpを作成(Doctrine統合用)phpstan.neon.distにDoctrine統合設定を追加その他の修正
$errorsプロパティに@phpstan-ignoreコメント追加doctrine.associationTypeエラー対応findNotContainsBy()の戻り値型を修正@templateアノテーション追加目的
?string)で統一@phpstan-ignoreコメントを削除してコードをクリーンに変更ファイル数
38ファイル (+181行, -52行)
テスト計画
🤖 Generated with Claude Code