Skip to content

Rector の導入#1242

Draft
nanasess wants to merge 4 commits intoEC-CUBE:masterfrom
nanasess:use-rector
Draft

Rector の導入#1242
nanasess wants to merge 4 commits intoEC-CUBE:masterfrom
nanasess:use-rector

Conversation

@nanasess
Copy link
Copy Markdown
Contributor

@nanasess nanasess commented May 30, 2025

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

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

@nanasess
Copy link
Copy Markdown
Contributor Author

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

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

codecov bot commented Jun 2, 2025

Codecov Report

❌ Patch coverage is 59.25926% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.39%. Comparing base (9a599f3) to head (31bab3c).

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/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   54.39%   54.39%           
=======================================
  Files          84       84           
  Lines       10822    10822           
=======================================
  Hits         5887     5887           
  Misses       4935     4935           
Flag Coverage Δ
tests 54.39% <59.25%> (ø)

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
Copy Markdown
Contributor

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

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a14da9cc-1c35-427b-9046-abb291fec386

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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