From 800895b236b4be1352e27e6be9254d71cf0cb547 Mon Sep 17 00:00:00 2001 From: Chihiro Adachi <8196725+chihiro-adachi@users.noreply.github.com> Date: Wed, 31 Jan 2024 17:16:55 +0900 Subject: [PATCH 1/7] =?UTF-8?q?4.3=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PluginManager.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PluginManager.php b/PluginManager.php index be845ca..e46b0ef 100644 --- a/PluginManager.php +++ b/PluginManager.php @@ -24,7 +24,7 @@ use Eccube\Repository\PageRepository; use Plugin\ProductReview42\Entity\ProductReviewConfig; use Plugin\ProductReview42\Entity\ProductReviewStatus; -use Symfony\Component\DependencyInjection\ContainerInterface; +use Psr\Container\ContainerInterface; use Symfony\Component\Filesystem\Filesystem; class PluginManager extends AbstractPluginManager @@ -204,7 +204,7 @@ protected function createPage(EntityManagerInterface $em, $name, $url, $filename protected function copyTwigFiles(ContainerInterface $container) { - $templatePath = $container->getParameter('eccube_theme_front_dir') + $templatePath = $container->get(EccubeConfig::class)->get('eccube_theme_front_dir') .'/ProductReview42/Resource/template/default'; $fs = new Filesystem(); if ($fs->exists($templatePath)) { @@ -336,7 +336,7 @@ protected function removePage(EntityManagerInterface $em, $url) protected function removeTwigFiles(ContainerInterface $container) { - $templatePath = $container->getParameter('eccube_theme_front_dir') + $templatePath = $container->get(EccubeConfig::class)->get('eccube_theme_front_dir') .'/ProductReview42'; $fs = new Filesystem(); $fs->remove($templatePath); From 738bb95b5c87960467d78c97299fec025cea080e Mon Sep 17 00:00:00 2001 From: Chihiro Adachi <8196725+chihiro-adachi@users.noreply.github.com> Date: Wed, 31 Jan 2024 17:17:35 +0900 Subject: [PATCH 2/7] =?UTF-8?q?4.3=E3=81=A7=E5=8B=95=E4=BD=9C=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Tests/Web/ReviewAdminControllerTest.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Tests/Web/ReviewAdminControllerTest.php b/Tests/Web/ReviewAdminControllerTest.php index 57b7b11..5c7ebf0 100755 --- a/Tests/Web/ReviewAdminControllerTest.php +++ b/Tests/Web/ReviewAdminControllerTest.php @@ -13,6 +13,7 @@ namespace Plugin\ProductReview42\Tests\Web; +use Eccube\Common\Constant; use Eccube\Entity\Master\Sex; use Eccube\Entity\Product; use Eccube\Repository\Master\ProductStatusRepository; @@ -233,7 +234,7 @@ public function testReviewSearchWithPaging() $paging = $crawler->filter('ul.pagination .page-item')->last(); // Current active on page 2. - $this->assertStringContainsString('active', $paging->parents()->html()); + $this->assertStringContainsString('active', $paging->ancestors()->html()); $this->expected = 2; $this->actual = intval($paging->text()); $this->verify(); @@ -263,7 +264,9 @@ public function testDownloadCsv() $this->assertStringContainsString($review->getReviewerName(), $table->html()); - $this->expectOutputRegex("/{$review->getTitle()}/"); + if (version_compare(Constant::VERSION, '4.3', '<')) { + $this->expectOutputRegex("/{$review->getTitle()}/"); + } $this->client->request( 'POST', @@ -271,6 +274,12 @@ public function testDownloadCsv() ); $this->assertTrue($this->client->getResponse()->isSuccessful()); + + if (version_compare(Constant::VERSION, '4.3', '>=')) { + $content = $this->client->getInternalResponse()->getContent(); + $content = mb_convert_encoding($content, 'UTF-8', 'SJIS-win'); + $this->assertMatchesRegularExpression("/{$review->getTitle()}/", $content); + } } /** @@ -341,7 +350,7 @@ private function createProductReviewData($product = 1) $Review->setCustomer($Customer); $this->entityManager->persist($Review); - $this->entityManager->flush($Review); + $this->entityManager->flush(); return $Review; } From 7edc055edf8e8e0f9cef00987eb7ff5adce754a4 Mon Sep 17 00:00:00 2001 From: Chihiro Adachi <8196725+chihiro-adachi@users.noreply.github.com> Date: Wed, 31 Jan 2024 17:18:39 +0900 Subject: [PATCH 3/7] =?UTF-8?q?4.3=E3=81=AE=E3=82=B7=E3=82=B9=E3=83=86?= =?UTF-8?q?=E3=83=A0=E8=A6=81=E4=BB=B6=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 18 +++++++++++++----- .github/workflows/main.yml | 2 +- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6780c11..f29c90f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,14 +17,13 @@ on: jobs: run-on-linux: name: Run on Linux - runs-on: ${{ matrix.operating-system }} + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: - operating-system: [ ubuntu-18.04 ] - php: [ '7.4', '8.0', '8.1' ] + eccube_version: [ '4.2', '4.3' ] + php: [ '7.4', '8.0', '8.1', '8.2', '8.3' ] db: [ 'mysql', 'mysql8', 'pgsql' ] - eccube_version: [ '4.2' ] plugin_code: [ 'ProductReview42' ] include: - db: mysql @@ -39,6 +38,16 @@ jobs: database_url: postgres://postgres:password@127.0.0.1:5432/eccube_db database_server_version: 14 database_charset: utf8 + exclude: + - eccube_version: 4.2 + php: 8.2 + - eccube_version: 4.2 + php: 8.3 + - eccube_version: 4.3 + php: 7.4 + - eccube_version: 4.3 + php: 8.0 + services: mysql: image: mysql:5.7 @@ -72,7 +81,6 @@ jobs: - 1080:1080 - 1025:1025 steps: - - run: sudo apt-get purge -y hhvm - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a19786e..1eeedcb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,7 +5,7 @@ on: jobs: deploy: name: Build - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - name: Checkout uses: actions/checkout@v2 From 52466649eb1a64dc178675402d1032fe6575cc96 Mon Sep 17 00:00:00 2001 From: Chihiro Adachi <8196725+chihiro-adachi@users.noreply.github.com> Date: Mon, 5 Feb 2024 10:52:34 +0900 Subject: [PATCH 4/7] =?UTF-8?q?=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index dc5bfb0..4264f9f 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "ec-cube/productreview42", - "version": "4.2.4", + "version": "4.3.0", "description": "商品レビュー管理プラグイン", "type": "eccube-plugin", "require": { From 206f52e68ccda73c0d2a065053a124da716799d4 Mon Sep 17 00:00:00 2001 From: Chihiro Adachi <8196725+chihiro-adachi@users.noreply.github.com> Date: Thu, 8 Feb 2024 15:55:42 +0900 Subject: [PATCH 5/7] =?UTF-8?q?symfony6=E5=AF=BE=E5=BF=9C=E3=81=AE?= =?UTF-8?q?=E3=83=96=E3=83=A9=E3=83=B3=E3=83=81=E3=81=A7=E5=8B=95=E4=BD=9C?= =?UTF-8?q?=E3=81=95=E3=81=9B=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f29c90f..2c7cda3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - eccube_version: [ '4.2', '4.3' ] + eccube_version: [ '4.2', '4.3-symfony6' ] php: [ '7.4', '8.0', '8.1', '8.2', '8.3' ] db: [ 'mysql', 'mysql8', 'pgsql' ] plugin_code: [ 'ProductReview42' ] @@ -43,9 +43,9 @@ jobs: php: 8.2 - eccube_version: 4.2 php: 8.3 - - eccube_version: 4.3 + - eccube_version: 4.3-symfony6 php: 7.4 - - eccube_version: 4.3 + - eccube_version: 4.3-symfony6 php: 8.0 services: From 068dae7482dfddf4e569c56929b1251e6bd771f0 Mon Sep 17 00:00:00 2001 From: Chihiro Adachi <8196725+chihiro-adachi@users.noreply.github.com> Date: Thu, 8 Feb 2024 16:46:17 +0900 Subject: [PATCH 6/7] Fix "Call to undefined method PHPUnit\Util\Xml\SchemaFinder::available()" --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c7cda3..a232d76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -151,7 +151,7 @@ jobs: working-directory: 'ec-cube' run: | bin/console cache:clear --no-warmup - bin/phpunit -c app/Plugin/${PLUGIN_CODE}/phpunit.xml.dist app/Plugin/${PLUGIN_CODE}/Tests + vendor/bin/phpunit -c app/Plugin/${PLUGIN_CODE}/phpunit.xml.dist app/Plugin/${PLUGIN_CODE}/Tests - name: Disable Plugin working-directory: 'ec-cube' From 34245aba3fd34bcbf4fb73753cc46a11b3642e4e Mon Sep 17 00:00:00 2001 From: Chihiro Adachi <8196725+chihiro-adachi@users.noreply.github.com> Date: Tue, 9 Apr 2024 08:57:39 +0900 Subject: [PATCH 7/7] Update ci.yml --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a232d76..243fd66 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - eccube_version: [ '4.2', '4.3-symfony6' ] + eccube_version: [ '4.2', '4.3' ] php: [ '7.4', '8.0', '8.1', '8.2', '8.3' ] db: [ 'mysql', 'mysql8', 'pgsql' ] plugin_code: [ 'ProductReview42' ] @@ -43,9 +43,9 @@ jobs: php: 8.2 - eccube_version: 4.2 php: 8.3 - - eccube_version: 4.3-symfony6 + - eccube_version: 4.3 php: 7.4 - - eccube_version: 4.3-symfony6 + - eccube_version: 4.3 php: 8.0 services: