diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index dac9fd444e..06f3757f61 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -172,6 +172,9 @@ jobs: docker tag ec-cube2 ghcr.io/ec-cube/ec-cube2-php:${PHP_VERSION_TAG}-apache TAG=${PHP_VERSION_TAG}-apache docker-compose up -d + - run: docker-compose exec -T ec-cube composer require smarty/smarty "^3.1" + if: matrix.php < 7.1 + - run: sleep 1 - run: | yarn install diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cc4ef800e7..05f2d4ad55 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -77,6 +77,9 @@ jobs: - name: composer install run: composer install --no-interaction -o + - run: composer require smarty/smarty "^3.1" + if: matrix.php < 7.1 + - name: Setup PHP uses: nanasess/setup-php@master with: @@ -178,6 +181,10 @@ jobs: - name: composer install run: composer install --no-interaction -o + - run: composer require smarty/smarty "^3.1" + if: matrix.php < 7.1 + shell: bash + - name: Start PostgreSQL on Windows # see https://www.cybertec-postgresql.com/en/postgresql-github-actions-continuous-integration/ run: | diff --git a/composer.json b/composer.json index 29263b233c..b4f51117fc 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "config": { "vendor-dir": "data/vendor", "platform": { - "php": "5.4.16" + "php": "7.4.0" }, "optimize-autoloader": true, "sort-packages": true, @@ -22,13 +22,16 @@ } }, "require-dev": { + "doctrine/instantiator": "~1.0.5", "fzaninotto/faker": "^1.8", - "nanasess/eccube2-fixture-generator": "^1.1", "nanasess/ec-cube2-class-extends-stubs": "^1.0", - "php5friends/phpunit48": ">=4.8.41" + "nanasess/eccube2-fixture-generator": "^1.1", + "php5friends/phpunit48": ">=4.8.41", + "phpdocumentor/reflection-docblock": "~2.0.5", + "symfony/yaml": "^2.8 || ^3.4 || ^4.4" }, "require": { - "php": ">=5.4.16", + "php": "^5.4 || ^7.0 || ^8.0", "ext-gd": "*", "ext-mbstring": "*", "mobiledetect/mobiledetectlib": "^2.8", @@ -42,7 +45,7 @@ "pear/xml_util": "*", "setasign/fpdf": "^1.8", "setasign/fpdi": "^1.6", - "smarty/smarty": "*" + "smarty/smarty": "^3.1 || ^4.3" }, "autoload": { "classmap": [ diff --git a/composer.lock b/composer.lock index 8aa71983bb..dba8e720f5 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "af90042f8bc44df63d44bc963ea3f29e", + "content-hash": "df4fdb9be635c8cd1ad5f094d26e0543", "packages": [ { "name": "mobiledetect/mobiledetectlib", @@ -741,29 +741,29 @@ }, { "name": "smarty/smarty", - "version": "v3.1.48", + "version": "v4.3.4", "source": { "type": "git", "url": "https://github.com/smarty-php/smarty.git", - "reference": "2fc443806cdcaee4441be4d0bb09f8fa56a17f2c" + "reference": "3931d8f54b8f7a4ffab538582d34d4397ba8daa5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/smarty-php/smarty/zipball/2fc443806cdcaee4441be4d0bb09f8fa56a17f2c", - "reference": "2fc443806cdcaee4441be4d0bb09f8fa56a17f2c", + "url": "https://api.github.com/repos/smarty-php/smarty/zipball/3931d8f54b8f7a4ffab538582d34d4397ba8daa5", + "reference": "3931d8f54b8f7a4ffab538582d34d4397ba8daa5", "shasum": "" }, "require": { - "php": "^5.2 || ^7.0" + "php": "^7.1 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^6.5 || ^5.7 || ^4.8", + "phpunit/phpunit": "^8.5 || ^7.5", "smarty/smarty-lexer": "^3.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.0.x-dev" } }, "autoload": { @@ -787,20 +787,23 @@ { "name": "Rodney Rehm", "email": "rodney.rehm@medialize.de" + }, + { + "name": "Simon Wisselink", + "homepage": "https://www.iwink.nl/" } ], "description": "Smarty - the compiling PHP template engine", - "homepage": "http://www.smarty.net", + "homepage": "https://smarty-php.github.io/smarty/", "keywords": [ "templating" ], "support": { - "forum": "http://www.smarty.net/forums/", - "irc": "irc://irc.freenode.org/smarty", + "forum": "https://github.com/smarty-php/smarty/discussions", "issues": "https://github.com/smarty-php/smarty/issues", - "source": "https://github.com/smarty-php/smarty/tree/v3.1.48" + "source": "https://github.com/smarty-php/smarty/tree/v4.3.4" }, - "time": "2023-03-28T19:45:54+00:00" + "time": "2023-09-14T10:59:08+00:00" } ], "packages-dev": [ @@ -1934,20 +1937,23 @@ }, { "name": "symfony/polyfill-ctype", - "version": "v1.19.0", + "version": "v1.26.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "aed596913b70fae57be53d86faa2e9ef85a2297b" + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/aed596913b70fae57be53d86faa2e9ef85a2297b", - "reference": "aed596913b70fae57be53d86faa2e9ef85a2297b", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" + }, + "provide": { + "ext-ctype": "*" }, "suggest": { "ext-ctype": "For best performance" @@ -1955,7 +1961,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.19-dev" + "dev-main": "1.26-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1993,7 +1999,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.19.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" }, "funding": [ { @@ -2009,7 +2015,7 @@ "type": "tidelift" } ], - "time": "2020-10-23T09:01:57+00:00" + "time": "2022-05-24T11:49:31+00:00" }, { "name": "symfony/yaml", @@ -2071,13 +2077,13 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.4.16", + "php": "^5.4 || ^7.0 || ^8.0", "ext-gd": "*", "ext-mbstring": "*" }, "platform-dev": [], "platform-overrides": { - "php": "5.4.16" + "php": "7.4.0" }, - "plugin-api-version": "2.6.0" + "plugin-api-version": "2.3.0" } diff --git a/data/class/SC_View.php b/data/class/SC_View.php index a988525dd9..7ded6219a4 100644 --- a/data/class/SC_View.php +++ b/data/class/SC_View.php @@ -23,7 +23,7 @@ class SC_View { - /** @var SmartyBC */ + /** @var Smarty */ public $_smarty; /** @var LC_Page */ @@ -41,9 +41,7 @@ public function __construct() public function init() { // include_phpの利用のためSmartyBCを呼び出す、ホントはinclude_phpをなくしたいそうすれば、blank.tplもなくせる - $this->_smarty = new SmartyBC; - // see https://github.com/smarty-php/smarty/issues/605#issuecomment-742832333 - $this->_smarty->setErrorReporting(E_ALL & ~E_WARNING & ~E_NOTICE); + $this->_smarty = new Smarty; $this->_smarty->left_delimiter = ''; $this->_smarty->registerPlugin('modifier', 'sfDispDBDate', function ($dbdate, $time = true) { return SC_Utils_Ex::sfDispDBDate($dbdate, $time); });