Skip to content

Commit

Permalink
Merge pull request #85 from matsuoshi/migrate4.1
Browse files Browse the repository at this point in the history
EC-CUBE 4.1 対応
  • Loading branch information
chihiro-adachi committed Aug 20, 2021
2 parents 8687906 + 747e159 commit aeed17b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 13 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ jobs:
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, xml, ctype, iconv, mysql, intl, zip, pgsql
tools: composer:v1
tools: composer:v2

- if: matrix.eccube-versions == '4.0'
run: sudo composer selfupdate --1

- name: Get composer cache directory
id: composer-cache
Expand All @@ -73,9 +76,13 @@ jobs:
- name: Install Composer dependencies
run : |
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
composer require --dev kiy0taka/eccube4-test-fixer
composer require pear/pear-core-minimal:^1.10.10 pear/archive_tar:^1.4.13 wapmorgan/unified-archive:^1.1.1 nobuhiko/bulk-insert-query
- name: Install Composer eccube4-test-fixer
if: matrix.eccube-versions == '4.0'
run : |
composer require --dev kiy0taka/eccube4-test-fixer
- name: Checkout
uses: actions/checkout@v2
with:
Expand All @@ -102,7 +109,7 @@ jobs:
DATABASE_URL: ${{ matrix.database_url }}
DATABASE_SERVER_VERSION: ${{ matrix.database_server_version }}

- name: Run Tests
- name: Run Tests for EC-CUBE4.1
if: matrix.eccube-versions != '4.0'
run: |
bin/phpunit app/Plugin/$PLUGIN_NAME/Tests
Expand Down
8 changes: 7 additions & 1 deletion Controller/Admin/ConfigController.php
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,13 @@ private function saveToC($em, $tmpDir, $csvName, $tableName = null, $allow_zero

$listTableColumns = [];
foreach ($columns as $column) {
$listTableColumns[] = $column->getName();
$columnName = $column->getName();
if ($tableName === 'dtb_member') {
if ($columnName === 'two_factor_auth_key' || $columnName === 'two_factor_auth_enabled') {
continue;
}
}
$listTableColumns[] = $columnName;
}

$builder = new BulkInsertQuery($em, $tableName);
Expand Down
12 changes: 3 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
{
"name": "ec-cube/DataMigration4",
"version": "2.1.0",
"name": "ec-cube/datamigration4",
"version": "4.1.0",
"description": "データ移行プラグイン",
"type": "eccube-plugin",
"repositories": [
{
"type": "pear",
"url": "http://pear.php.net/"
}
],
"require": {
"ec-cube/plugin-installer": "~0.0.8",
"ec-cube/plugin-installer": "~0.0.8 || ^2.0",
"pear/pear-core-minimal" : "^1.10.10",
"pear/archive_tar" : "^1.4.13",
"wapmorgan/unified-archive": "^1.1.1",
Expand Down

0 comments on commit aeed17b

Please sign in to comment.