Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbalの3バージョンから削除されたfetchColumn関数をfetchOneに更新。 #6229

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

sai-gillingham
Copy link
Contributor

@sai-gillingham sai-gillingham commented Jun 12, 2024

概要(Overview・Refs Issue)

ECCUBEの最新バージョンで以下のコマンドを実行すると、
以下のエラーが発生するため、修正PRを作成いたしました。
bin/console doctrine:migrations:migrate --no-interaction

Call to undefined method Doctrine\DBAL\Connection::fetchColumn()"

原因としては、👇のPRが作成された時点ではECCUBEはdbalの2バージョンを利用していたため、その時点では問題がなかったのかもしれません。しかし、4.3ではdbalの3バージョンを利用しているため、dbalの3以降で削除された関数が最新のECCUBEのコードに含まれています。

方針(Policy)

実装に関する補足(Appendix)

テスト(Test)

テスト#1) 最新のECCUBEで下記のコマンドを実行したら、エラーが出るかどうかを確認すること。
bin/console doctrine:migrations:migrate --no-interaction

テスト#1が行った後、テスト #2)

  1. doctrine_migration_versionsテーブルからversion='DoctrineMigrations\Version20210216120000'レコードを削除する
  2. bin/console doctrine:migrations:migrate --no-interactionコマンドを実行する。
  3. dtb_blockテーブルでblock_name='Googleアナリティクス'をクエリーして、1レコードがあるか確認すること。
    • 2つ以上のレコードはNG。

相談(Discussion)

  • 1点ご提案があります。GitHub Actionsにマイグレーションテストを追加することで、より安全になると思いますが、いかがでしょうか?
  • 修正したマイグレーションファイルには、取り消し用down()関数にSQLが含まれていませんが、それで本当に大丈夫でしょうか?

マイナーバージョン互換性保持のための制限事項チェックリスト

  • 既存機能の仕様変更はありません
  • フックポイントの呼び出しタイミングの変更はありません
  • フックポイントのパラメータの削除・データ型の変更はありません
  • twigファイルに渡しているパラメータの削除・データ型の変更はありません
  • Serviceクラスの公開関数の、引数の削除・データ型の変更はありません
  • 入出力ファイル(CSVなど)のフォーマット変更はありません

レビュワー確認項目

  • 動作確認
  • コードレビュー
  • E2E/Unit テスト確認(テストの追加・変更が必要かどうか)
  • 互換性が保持されているか
  • セキュリティ上の問題がないか
    • 権限を超えた操作が可能にならないか
    • 不要なファイルアップロードがないか
    • 外部へ公開されるファイルや機能の追加ではないか
    • テンプレートでのエスケープ漏れがないか

Copy link

codecov bot commented Jun 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.79%. Comparing base (6116449) to head (9b0786c).

Additional details and impacted files
@@           Coverage Diff           @@
##              4.3    #6229   +/-   ##
=======================================
  Coverage   82.79%   82.79%           
=======================================
  Files         480      480           
  Lines       26419    26419           
=======================================
  Hits        21873    21873           
  Misses       4546     4546           
Flag Coverage Δ
E2E 82.79% <ø> (ø)
Unit 82.79% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sai-gillingham sai-gillingham changed the title dbalの3バージョンから削除されたfetchColumnをfetchOneに更新。 dbalの3バージョンから削除されたfetchColumn関数をfetchOneに更新。 Jun 12, 2024
Copy link
Contributor

@nanasess nanasess left a comment

Choose a reason for hiding this comment

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

LGTM

@dotani1111 dotani1111 merged commit 2791d1f into EC-CUBE:4.3 Jun 24, 2024
96 checks passed
@dotani1111 dotani1111 added this to the 4.3.0 milestone Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants