Skip to content

Commit

Permalink
Merge pull request #64 from ptthao-yrglmvn/migration-4.3
Browse files Browse the repository at this point in the history
Compatible 4.3
  • Loading branch information
chihiro-adachi authored Apr 8, 2024
2 parents ed8cdac + 8d96b8f commit ae942b6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [ 'Recommend42' ]
include:
- db: mysql
Expand All @@ -39,6 +38,15 @@ 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
Expand Down Expand Up @@ -72,7 +80,6 @@ jobs:
- 1080:1080
- 1025:1025
steps:
- run: sudo apt-get purge -y hhvm
- name: Checkout
uses: actions/checkout@v2

Expand Down Expand Up @@ -143,7 +150,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'
Expand Down
7 changes: 4 additions & 3 deletions PluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

namespace Plugin\Recommend42;

use Eccube\Common\EccubeConfig;
use Eccube\Application;
use Eccube\Entity\Block;
use Eccube\Entity\BlockPosition;
Expand All @@ -23,7 +24,7 @@
use Eccube\Repository\BlockRepository;
use Eccube\Repository\LayoutRepository;
use Eccube\Repository\Master\DeviceTypeRepository;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Psr\Container\ContainerInterface;
use Symfony\Component\Filesystem\Filesystem;

/**
Expand Down Expand Up @@ -206,7 +207,7 @@ private function removeDataBlock(ContainerInterface $container)
*/
private function copyBlock(ContainerInterface $container)
{
$templateDir = $container->getParameter('eccube_theme_front_dir');
$templateDir = $container->get(EccubeConfig::class)->get('eccube_theme_front_dir');
// ファイルコピー
$file = new Filesystem();

Expand All @@ -223,7 +224,7 @@ private function copyBlock(ContainerInterface $container)
*/
private function removeBlock(ContainerInterface $container)
{
$templateDir = $container->getParameter('eccube_theme_front_dir');
$templateDir = $container->get(EccubeConfig::class)->get('eccube_theme_front_dir');
$file = new Filesystem();
$file->remove($templateDir.'/Block/'.$this->blockFileName.'.twig');
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ec-cube/recommend42",
"version": "4.2.2",
"version": "4.3.0",
"description": "おすすめ商品管理プラグイン",
"type": "eccube-plugin",
"require": {
Expand Down

0 comments on commit ae942b6

Please sign in to comment.