forked from KenTanaka/ec-cube4-data-backup-plugin
-
Notifications
You must be signed in to change notification settings - Fork 3
feat: EC-CUBE 4.4への対応 #5
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
Open
KenTanaka
wants to merge
10
commits into
EC-CUBE:main
Choose a base branch
from
KenTanaka:feat-4.4
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2380098
Upgrade plugin compatible version ECCUBE 4.2
ptthao-yrglmvn 0df41dd
Update git action setup
ptthao-yrglmvn e9f5a1e
Update git action setup
ptthao-yrglmvn e934bd7
Declaring compatibility with class extends
ptthao-yrglmvn cf2e4b9
PostResponseEvent was deprecated and replaced by TerminateEvent
ptthao-yrglmvn 7abafc4
use assertStringContainsString to check a substring
ptthao-yrglmvn d519b78
Merge pull request #3 from ptthao-yrglmvn/migration-4.2
shinya eaa21da
update ubuntu version
ji-eunsoo 71c440c
Merge pull request #4 from ji-eunsoo/fix_ubuntu_version_18
shinya 11c8626
Symfony7適合 - 基本となる改修は Claudeで実施
KenTanaka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,22 @@ | ||
|
|
||
| name: Packaging for EC-CUBE Plugin | ||
| on: | ||
| release: | ||
| types: [ published ] | ||
| jobs: | ||
| deploy: | ||
| name: Build | ||
| runs-on: ubuntu-18.04 | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v2 | ||
| uses: actions/checkout@v4 | ||
| - name: Packaging | ||
| working-directory: ../ | ||
| run: | | ||
| rm -rf $GITHUB_WORKSPACE/.github | ||
| rm -rf $GITHUB_WORKSPACE/Tests | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Testsは除外のままでよいと思いますが、何かパッケージにいれる理由がありますでしょうか。 |
||
| # 開発・テスト用ファイルは配布パッケージに含めない | ||
| rm -rf $GITHUB_WORKSPACE/docker-compose*.yml $GITHUB_WORKSPACE/dockerbuild | ||
| rm -f $GITHUB_WORKSPACE/CLAUDE.md $GITHUB_WORKSPACE/phpstan.neon.dist | ||
| rm -f $GITHUB_WORKSPACE/Resource/rector.php "$GITHUB_WORKSPACE/Resource/.php-cs-fixer.dist.php" | ||
| find $GITHUB_WORKSPACE -name "dummy" -delete | ||
| find $GITHUB_WORKSPACE -name ".git*" -and ! -name ".gitkeep" -print0 | xargs -0 rm -rf | ||
| chmod -R o+w $GITHUB_WORKSPACE | ||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| composer.phar | ||
| /vendor/ | ||
|
|
||
| # 本プラグインはライブラリ (type: eccube-plugin) のため composer.lock はコミットしない | ||
| # https://getcomposer.org/doc/02-libraries.md#lock-file | ||
| composer.lock | ||
|
|
||
| # 静的解析・整形ツールのキャッシュ | ||
| .php-cs-fixer.cache | ||
|
|
||
| # Playwright MCP の一時生成物 | ||
| /.playwright-mcp/ |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with this repository. | ||
|
|
||
| ## このリポジトリについて | ||
|
|
||
| EC-CUBE 4 系の**データバックアッププラグイン**。管理画面から全テーブルを CSV ダンプし tar.gz でダウンロードする。 | ||
|
|
||
| - 管理画面: `/%eccube_admin_route%/databackup44/config`(`Controller/Admin/Databackup4Controller.php`) | ||
| - サービス: `Service/Databackup4Service.php`(DBAL SchemaManager / CSV dump) | ||
|
|
||
| プラグインコードは `Databackup44`、Composer パッケージ名は `ec-cube/databackup44`。 | ||
|
|
||
| ### ブランチ運用 | ||
|
|
||
| `4.2`/`4.3` = Databackup42(アノテーション / DBAL 2)。`4.4` = Databackup44(Attribute / DBAL 3 / PHP 8.2+)。非互換のため別ブランチ保守。 | ||
|
|
||
| ## 開発・テスト | ||
|
|
||
| 本体に組み込んだ状態で動作する。`docker-compose.dev.yml` の entrypoint がインストール・有効化を行う。 | ||
|
|
||
| ```bash | ||
| export COMPOSE_FILE=docker-compose.yml:docker-compose.dev.yml | ||
| docker compose up -d --wait | ||
| ``` | ||
|
|
||
| ### PHPUnit | ||
|
|
||
| ```bash | ||
| docker compose exec ec-cube bash -lc \ | ||
| "APP_ENV=test bin/console cache:clear --no-warmup && ./vendor/bin/phpunit -c app/Plugin/Databackup44/phpunit.xml.dist app/Plugin/Databackup44/Tests" | ||
| ``` | ||
|
|
||
| **注意**: 有効化後・PHPUnit 前に `APP_ENV=test` で cache:clear すること。 | ||
|
|
||
| ## 規約・移行メモ | ||
|
|
||
| - 開発ツール設定(`rector.php` / `.php-cs-fixer.dist.php`)は `Resource/` 配下に置く(ルート直下禁止) | ||
| - Docker は `APP_ENV=dev`(test だとセッションがモックでログイン不可) | ||
| - HTTP 開発時は `dockerbuild/dev-framework.yaml` で cookie SameSite を緩和 | ||
| - プラグイン有効化後 `cache:clear` を 2 回 | ||
| - DBAL 3: `createSchemaManager()` / `executeQuery()` / `fetchAllAssociative()` / `fetchNumeric()` |
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
マトリクス変数
dbnameが未定義です。strategy.matrixやinclude内でdbnameが定義されていないため、matrix.dbnameは空として評価されてしまいます。これにより、データベースが正しく作成されずテストが失敗する原因となります。database_url内の指定に合わせて、固定値のeccube_dbを指定してください。🐛 修正案
mysql8: image: mysql:8 env: MYSQL_ROOT_PASSWORD: password - MYSQL_DATABASE: ${{ matrix.dbname }} + MYSQL_DATABASE: eccube_db ports: - 3308:3306 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 postgres: image: postgres:14 env: POSTGRES_USER: postgres POSTGRES_PASSWORD: password - POSTGRES_DB: ${{ matrix.dbname }} + POSTGRES_DB: eccube_db📝 Committable suggestion
🧰 Tools
🪛 actionlint (1.7.12)
[error] 42-42: property "dbname" is not defined in object type {database_charset: string; database_server_version: number; database_url: string; db: string; eccube_version: number; php: number; plugin_code: string}
(expression)
[error] 51-51: property "dbname" is not defined in object type {database_charset: string; database_server_version: number; database_url: string; db: string; eccube_version: number; php: number; plugin_code: string}
(expression)
🤖 Prompt for AI Agents
Source: Linters/SAST tools