Skip to content

Conversation

@nanasess
Copy link
Contributor

@nanasess nanasess commented May 30, 2025

refs EC-CUBE/ec-cube#6381
リファクタリングツールである Rector を導入する

  • まずは副作用の少ないルールを適用
  • 段階的に対象範囲を広げていく
  • PHPのマイグレーションやEC-CUBEのバージョンアップに活用できる
  • rector-ci の導入も検討する

@nanasess
Copy link
Contributor Author

(new SC_Helper_Purchase_Ex())->rollbackOrder() 等は static::rollbackOrder() に修正した方がよさげ

リファクタリングツールである Rector を導入する
 - まずは副作用の少ないルールを適用
 - 段階的に対象範囲を広げていく
 - PHPのマイグレーションやEC-CUBEのバージョンアップに活用できる
@codecov
Copy link

codecov bot commented Jun 2, 2025

Codecov Report

Attention: Patch coverage is 48.14815% with 14 lines in your changes missing coverage. Please review.

Project coverage is 49.59%. Comparing base (ca2e30d) to head (16fe013).
Report is 21 commits behind head on master.

Files with missing lines Patch % Lines
data/class/helper/SC_Helper_Purchase.php 60.00% 6 Missing ⚠️
data/class/helper/SC_Helper_DB.php 50.00% 3 Missing ⚠️
data/class/helper/SC_Helper_Delivery.php 0.00% 3 Missing ⚠️
data/class/SC_Response.php 0.00% 1 Missing ⚠️
data/class/helper/SC_Helper_PageLayout.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1242   +/-   ##
=======================================
  Coverage   49.59%   49.59%           
=======================================
  Files          83       83           
  Lines       10685    10685           
=======================================
  Hits         5299     5299           
  Misses       5386     5386           
Flag Coverage Δ
tests 49.59% <48.14%> (ø)

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@seasoftjapan
Copy link
Contributor

EC-CUBE 2.4 の PHP 8 対応で Rector を何度か使いましたが、なかなか良かったです。

稀に破壊的な書き換えをすることもありましたが、概ね設定で抑制できたと思います。
標準で対応していない部分はプラグイン書いたこともありました。

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