Skip to content
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

Compatible 4.3 #64

Merged
merged 5 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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-symfony6' ]
dotani1111 marked this conversation as resolved.
Show resolved Hide resolved
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-symfony6
dotani1111 marked this conversation as resolved.
Show resolved Hide resolved
php: 7.4
- eccube_version: 4.3-symfony6
dotani1111 marked this conversation as resolved.
Show resolved Hide resolved
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
Loading