fix: EC-CUBE 4.4 で削除される OrderItem::setTaxRuleId() の呼び出しを除去 - #199
Open
ttokoro20240902 wants to merge 1 commit into
Open
fix: EC-CUBE 4.4 で削除される OrderItem::setTaxRuleId() の呼び出しを除去#199ttokoro20240902 wants to merge 1 commit into
ttokoro20240902 wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
EC-CUBE 本体 4.4 で非推奨 public API を撤去する EC-CUBE/ec-cube#6937 により Eccube\Entity\OrderItem::setTaxRuleId() / getTaxRuleId() が削除されるため、 本プラグインからの呼び出しを削除する。 - Service/PurchaseFlow/Processor/CouponProcessor.php: クーポン値引き明細生成時の setTaxRuleId(null) と未使用になる $taxRuleId 変数を削除(意図が失われないよう コメントを残す) - Tests/Service/CouponServiceTest.php / Tests/Repository/CouponCouponOrderRepositoryTest.php: テストフィクスチャの setTaxRuleId() 呼び出しを削除 tax_rule_id カラムは OrderItem の private プロパティとして残るため既存データに影響はなく、 書き込んだ値を読み出す実装が本体にもプラグインにも存在しないため、代替処理は不要。 Refs #198 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ttokoro20240902
force-pushed
the
feature/remove-order-item-tax-rule-id
branch
from
August 3, 2026 05:34
fb72e33 to
11908f4
Compare
ttokoro20240902
changed the base branch from
feature/eccube-4.4-symfony7
to
4.4
August 7, 2026 07:46
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.
概要
close #198
EC-CUBE 本体 4.4 で非推奨 public API を撤去する EC-CUBE/ec-cube#6937 により
Eccube\Entity\OrderItem::setTaxRuleId()/getTaxRuleId()が削除されるため、本プラグインからの呼び出しを除去します。#197(EC-CUBE 4.4 対応)へのスタック PR です。base は
feature/eccube-4.4-symfony7。#197 がマージされたら base は自動的に4.4に切り替わります。変更内容
Service/PurchaseFlow/Processor/CouponProcessor.phpsetTaxRuleId($taxRuleId)と、未使用になる$taxRuleId変数を削除。意図が失われないようコメントを残すTests/Service/CouponServiceTest.phpsetTaxRuleId()4 箇所を削除Tests/Repository/CouponCouponOrderRepositoryTest.php削除だけで済む理由
tax_rule_idカラムはOrderItemの private プロパティとして残るため、既存データは失われませんsetTaxRuleId()による書き込みのみで、getTaxRuleId()での読み出しはありませんsrc/app/にもgetTaxRuleId()の呼び出しはなく、書き込んだ値の読み手が存在しませんtax_rule(税率ルール(ID))項目はCsvExportService::getData()がgetTaxRule()を探す実装のため、現状でも空欄出力であり、この変更で出力は変わりませんしたがって代替処理は不要で、呼び出しの削除のみで対応しています。
setTaxRate('0')/TaxType::NON_TAXABLEは変更なし)CouponServiceTestの「OrderItem に税率は設定しない」ケースは、tax_rule_idの既定値がnullのためsetTaxRuleId(null)の削除は挙動に影響しませんテスト
ローカルの docker-compose 4.4 環境(
8.2-apache-4.4/ SQLite / PHP 8.2.31)で確認済み:OrderControllerTest::testOrderEditWithCouponCancel(本体 4.4 テストハーネスの悲観ロック制約)で、本 PR とは無関係ですなお現行の本体 4.4 では
OrderItem::setTaxRuleId()はまだ削除されていない(非推奨のまま)ため、本 PR の適用前後どちらでもテストは成立します。本体 PR がマージされた時点で、本 PR 未適用だと fatal error になります。🤖 Generated with Claude Code