From 3af48bbc261c07e239f3ed4144a520e3f65f58c4 Mon Sep 17 00:00:00 2001 From: Okom3pom Date: Wed, 6 Oct 2021 07:14:33 +0200 Subject: [PATCH 001/128] Add Missing Hooks --- upgrade/sql/8.0.0.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index d18b5eeed..ddf6af58e 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -16,6 +16,9 @@ INSERT IGNORE INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `po (NULL, 'actionAdminSecurityControllerPostProcessGeneralBefore', 'On post-process in Admin Security Controller', 'This hook is called on Admin Security Controller post-process before processing the General form', '1'), (NULL, 'dashboardZoneThree', 'Dashboard column three', 'This hook is displayed in the third column of the dashboard', '1'), (NULL, 'actionPresentPaymentOptions', 'Payment options Presenter', 'This hook is called before payment options are presented', '1') + (NULL, 'actionCustomerLogoutBefore', 'Before customer logout', 'This hook allows you to execute code before customer logout', '1'), + (NULL, 'actionCustomerLogoutAfter', 'After customer logout', 'This hook allows you to execute code after customer logout', '1'), + (NULL, 'displayCheckoutSummaryTop', 'Cart summary top', 'This hook allows you to display new elements in top of cart summary', '1') ; ALTER TABLE `PREFIX_employee_session` ADD `date_upd` DATETIME NOT NULL AFTER `token`; From 82f49a59ec6af61afd5433be6a54ed9c8513f83d Mon Sep 17 00:00:00 2001 From: Okom3pom Date: Tue, 18 Jan 2022 11:46:53 +0100 Subject: [PATCH 002/128] Check last version module --- classes/Twig/Block/UpgradeChecklist.php | 2 +- classes/UpgradeSelfCheck.php | 1 - views/templates/block/checklist.twig | 26 +++++++------------------ 3 files changed, 8 insertions(+), 21 deletions(-) diff --git a/classes/Twig/Block/UpgradeChecklist.php b/classes/Twig/Block/UpgradeChecklist.php index 36548cc49..5baa361f1 100644 --- a/classes/Twig/Block/UpgradeChecklist.php +++ b/classes/Twig/Block/UpgradeChecklist.php @@ -112,7 +112,7 @@ public function render() 'showErrorMessage' => !$this->selfCheck->isOkForUpgrade(), 'moduleVersion' => $this->selfCheck->getModuleVersion(), 'moduleIsUpToDate' => $this->selfCheck->isModuleVersionLatest(), - 'versionGreaterThan1_5_3' => version_compare(_PS_VERSION_, '1.5.3.0', '>'), + 'moduleUpdateLink' => Context::getContext()->link->getAdminLink('AdminModulesUpdates'), 'adminToken' => Tools14::getAdminTokenLite('AdminModules'), 'informationsLink' => Context::getContext()->link->getAdminLink('AdminInformation'), 'rootDirectoryIsWritable' => $this->selfCheck->isRootDirectoryWritable(), diff --git a/classes/UpgradeSelfCheck.php b/classes/UpgradeSelfCheck.php index f3be2eecc..894a73202 100644 --- a/classes/UpgradeSelfCheck.php +++ b/classes/UpgradeSelfCheck.php @@ -349,7 +349,6 @@ public function isOkForUpgrade() && $this->isAdminAutoUpgradeDirectoryWritable() && $this->isShopDeactivated() && $this->isCacheDisabled() - && $this->isModuleVersionLatest() && $this->isPrestaShopReady(); } diff --git a/views/templates/block/checklist.twig b/views/templates/block/checklist.twig index 3637b133a..639488d8d 100644 --- a/views/templates/block/checklist.twig +++ b/views/templates/block/checklist.twig @@ -1,34 +1,22 @@ {% import "@ModuleAutoUpgrade/macros/icons.twig" as icons %} -
{{ 'The pre-Upgrade checklist'|trans }}
+ {% if not moduleIsUpToDate %} +

+ {{ 'Your current version of the module is out of date. Update now'|trans }} + {{ 'Modules > Module Manager > Updates'|trans|raw }} +

+ {% endif %} {% if showErrorMessage %} -

{{ 'The checklist is not OK. You can only upgrade your shop once all indicators are green.'|trans }}

+

{{ 'The checklist is not OK. You can only upgrade your shop once all indicators are green.'|trans }}

{% endif %}

{{ 'Before starting the upgrade process, please make sure this checklist is all green.'|trans }}

- - - - {% endif %} - + - + - +
{{ 'The 1-click upgrade module is up-to-date (your current version is v%s)'|trans([moduleVersion]) }} - {% if not moduleIsUpToDate %} - {% if versionGreaterThan1_5_3 %} - {{ 'Update'|trans({}, 'Admin.Actions') }} - {% endif %} - {{ 'Download'|trans }} - {% endif %} - - {% if moduleIsUpToDate %} - {{ icons.ok }} - {% else %} - {{ icons.nok }} - {% endif %} -
{% if not phpUpgradeRequired %} From 6198a06c272f2008a9a5851e731902b8a64b29d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Viguier?= <16720275+jf-viguier@users.noreply.github.com> Date: Wed, 26 Jan 2022 12:06:57 +0100 Subject: [PATCH 003/128] Add 410 http code to redirect_type column --- upgrade/sql/8.0.0.sql | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index 37ebe6713..983b1a2d6 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -28,3 +28,10 @@ ALTER TABLE `PREFIX_customer_session` ADD `date_upd` DATETIME NOT NULL AFTER `to ALTER TABLE `PREFIX_customer_session` ADD `date_add` DATETIME NOT NULL AFTER `date_upd`; ALTER TABLE `PREFIX_carrier` DROP COLUMN `id_tax_rules_group`; + +ALTER TABLE `PREFIX_product` MODIFY COLUMN `redirect_type` ENUM( + '404', '410', '301-product', '302-product', '301-category', '302-category' +) NOT NULL DEFAULT '404'; +ALTER TABLE `PREFIX_product_shop` MODIFY COLUMN `redirect_type` ENUM( + '404', '410', '301-product', '302-product', '301-category', '302-category' +) NOT NULL DEFAULT '404'; From cb8787a49ee14235fe0c78df25389f021fee76e3 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Thu, 3 Feb 2022 10:49:01 +0100 Subject: [PATCH 004/128] Improved Github Action PHP (PHPStan + PHPLinter + PHPCSFixer) --- .github/workflows/php.yml | 77 +++++++++++++++---- tests/phpstan.sh | 28 +++++++ ...pstan-PS-16.neon => phpstan-1.6.1.18.neon} | 17 +--- tests/phpstan/phpstan-1.7.1.2.neon | 5 ++ tests/phpstan/phpstan-1.7.2.5.neon | 5 ++ tests/phpstan/phpstan-1.7.3.4.neon | 5 ++ tests/phpstan/phpstan-1.7.4.4.neon | 5 ++ tests/phpstan/phpstan-1.7.5.1.neon | 5 ++ tests/phpstan/phpstan-1.7.6.neon | 5 ++ tests/phpstan/phpstan-1.7.7.neon | 5 ++ tests/phpstan/phpstan-1.7.8.neon | 5 ++ tests/phpstan/phpstan-latest.neon | 5 ++ tests/phpstan/phpstan.neon | 24 ++---- 13 files changed, 144 insertions(+), 47 deletions(-) create mode 100755 tests/phpstan.sh rename tests/phpstan/{phpstan-PS-16.neon => phpstan-1.6.1.18.neon} (70%) create mode 100644 tests/phpstan/phpstan-1.7.1.2.neon create mode 100644 tests/phpstan/phpstan-1.7.2.5.neon create mode 100644 tests/phpstan/phpstan-1.7.3.4.neon create mode 100644 tests/phpstan/phpstan-1.7.4.4.neon create mode 100644 tests/phpstan/phpstan-1.7.5.1.neon create mode 100644 tests/phpstan/phpstan-1.7.6.neon create mode 100644 tests/phpstan/phpstan-1.7.7.neon create mode 100644 tests/phpstan/phpstan-1.7.8.neon create mode 100644 tests/phpstan/phpstan-latest.neon diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index bcb55edbe..fce5554eb 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -1,6 +1,57 @@ name: PHP tests on: [push, pull_request] jobs: + # Check there is no syntax errors in the project + php-linter: + name: PHP Syntax check 5.6 => 8.1 + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2.0.0 + + - name: PHP syntax checker 5.6 + uses: prestashop/github-action-php-lint/5.6@master + + - name: PHP syntax checker 7.2 + uses: prestashop/github-action-php-lint/7.2@master + + - name: PHP syntax checker 7.3 + uses: prestashop/github-action-php-lint/7.3@master + + - name: PHP syntax checker 7.4 + uses: prestashop/github-action-php-lint/7.4@master + + - name: PHP syntax checker 8.0 + uses: prestashop/github-action-php-lint/8.0@master + + - name: PHP syntax checker 8.1 + uses: prestashop/github-action-php-lint/8.1@master + + # Check the PHP code follow the coding standards + php-cs-fixer: + name: PHP-CS-Fixer + runs-on: ubuntu-latest + steps: + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + + - name: Checkout + uses: actions/checkout@v2.0.0 + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: vendor + key: php-${{ hashFiles('composer.lock') }} + + - name: Install dependencies + run: composer install + + - name: Run PHP-CS-Fixer + run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --using-cache=no --diff-format udiff + php-unit: strategy: matrix: @@ -20,22 +71,30 @@ jobs: - run: composer install --prefer-dist - run: ./vendor/phpunit/phpunit/phpunit tests + # Run PHPStan against the module and a PrestaShop release phpstan: name: PHPStan runs-on: ubuntu-latest strategy: matrix: - presta-versions: [ '1.6.1.18', '1.7.6.9', 'latest' ] + presta-versions: ['1.6.1.18', '1.7.1.2', '1.7.2.5', '1.7.3.4', '1.7.4.4', '1.7.5.1', '1.7.6', '1.7.7', '1.7.8', 'latest'] steps: + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '7.4' + - name: Checkout uses: actions/checkout@v2.0.0 + # Add vendor folder in cache to make next builds faster - name: Cache vendor folder uses: actions/cache@v1 with: path: vendor key: php-${{ hashFiles('composer.lock') }} + # Add composer local folder in cache to make next builds faster - name: Cache composer folder uses: actions/cache@v1 with: @@ -44,18 +103,6 @@ jobs: - run: composer install + # Docker images prestashop/prestashop may be used, even if the shop remains uninstalled - name: Execute PHPStan on PrestaShop (Tag ${{ matrix.presta-versions }}) - env: - PS_VERSION: ${{ matrix.presta-versions }} - IS_16: ${{ startsWith(matrix.presta-versions, '1.6') }} - run: | - PHPSTAN_FILE="phpstan.neon" && [[ $IS_16 == true ]] && PHPSTAN_FILE="phpstan-PS-16.neon" - echo $PHPSTAN_FILE - docker rm -f temp-ps || true - docker volume rm -f ps-volume || true - docker run -d --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:$PS_VERSION - docker exec -t temp-ps rm -rf /var/www/html/modules/autoupgrade - docker build -t phpstan:php-7.4 ./tests/phpstan/ - docker run --rm --volumes-from temp-ps -v $PWD:/var/www/html/modules/autoupgrade \ - -e _PS_ROOT_DIR_=/var/www/html --workdir=/var/www/html/modules/autoupgrade phpstan:php-7.4 \ - analyse --configuration=/var/www/html/modules/autoupgrade/tests/phpstan/$PHPSTAN_FILE + run: ./tests/phpstan.sh ${{ matrix.presta-versions }} diff --git a/tests/phpstan.sh b/tests/phpstan.sh new file mode 100755 index 000000000..dd0cb7b26 --- /dev/null +++ b/tests/phpstan.sh @@ -0,0 +1,28 @@ +#!/bin/bash +PS_VERSION=$1 + +set -e + +# Docker images prestashop/prestashop may be used, even if the shop remains uninstalled +echo "Pull PrestaShop files (Tag ${PS_VERSION})" + +docker rm -f temp-ps || true +docker volume rm -f ps-volume || true + +docker run -tid --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:$PS_VERSION + +# Clear previous instance of the module in the PrestaShop volume +echo "Clear previous module" + +docker exec -t temp-ps rm -rf /var/www/html/modules/autoupgrade + +# Run a container for PHPStan, having access to the module content and PrestaShop sources. +# This tool is outside the composer.json because of the compatibility with PHP 5.6 +echo "Run PHPStan using phpstan-${PS_VERSION}.neon file" + +docker run --rm --volumes-from temp-ps \ + -v $PWD:/var/www/html/modules/autoupgrade \ + -e _PS_ROOT_DIR_=/var/www/html \ + --workdir=/var/www/html/modules/autoupgrade phpstan/phpstan:0.12 \ + analyse \ + --configuration=/var/www/html/modules/autoupgrade/tests/phpstan/phpstan-$PS_VERSION.neon diff --git a/tests/phpstan/phpstan-PS-16.neon b/tests/phpstan/phpstan-1.6.1.18.neon similarity index 70% rename from tests/phpstan/phpstan-PS-16.neon rename to tests/phpstan/phpstan-1.6.1.18.neon index c97a097f4..64de9b502 100644 --- a/tests/phpstan/phpstan-PS-16.neon +++ b/tests/phpstan/phpstan-1.6.1.18.neon @@ -1,20 +1,14 @@ -################################################################################# -# This file is a copy of phpstan.neon with additional rules for PS 1.6 -# Its objective is to avoid false-positive results regarding non-existing classes -################################################################################# +includes: + - %currentWorkingDirectory%/tests/phpstan/phpstan.neon + parameters: - bootstrapFiles: - - ./../../tests/phpstan/bootstrap.php - reportUnmatchedIgnoredErrors: false - paths: - - ./../../classes excludes_analyse: - ./../../classes/Tools14.php - ./../../classes/pclzip.lib.php - ./../../functions.php - ./../../classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php - ./../../classes/UpgradeTools/SymfonyAdapter.php - ignoreErrors: + ignoreErrors: # module specific - '#Function deactivate_custom_modules not found.#' - '#Constant MCRYPT_[A-Z0-9_]+ not found.#' @@ -26,12 +20,9 @@ parameters: - '#AppKernel#' - '#Access to offset 0 on an unknown class mysqli_result.#' - '#Iterating over an object of an unknown class mysqli_result.#' - # Below are messages ignored on PS 1.6 - '#[cC]lass PrestaShop\\PrestaShop\\Core\\Addon\\Theme\\ThemeManagerBuilder#' - '#PrestaShop\\Module\\AutoUpgrade\\UpgradeTools\\ModuleAdapter#' - '#PrestaShop\\PrestaShop\\Adapter\\Module\\ModuleDataUpdater#' - '#PrestaShopBundle\\Install\\Upgrade#' - '#Call to an undefined static method ConfigurationTest::test_curl\(\).#' - - level: 5 \ No newline at end of file diff --git a/tests/phpstan/phpstan-1.7.1.2.neon b/tests/phpstan/phpstan-1.7.1.2.neon new file mode 100644 index 000000000..23b71e8d8 --- /dev/null +++ b/tests/phpstan/phpstan-1.7.1.2.neon @@ -0,0 +1,5 @@ +includes: + - %currentWorkingDirectory%/tests/phpstan/phpstan.neon + +parameters: + ignoreErrors: diff --git a/tests/phpstan/phpstan-1.7.2.5.neon b/tests/phpstan/phpstan-1.7.2.5.neon new file mode 100644 index 000000000..23b71e8d8 --- /dev/null +++ b/tests/phpstan/phpstan-1.7.2.5.neon @@ -0,0 +1,5 @@ +includes: + - %currentWorkingDirectory%/tests/phpstan/phpstan.neon + +parameters: + ignoreErrors: diff --git a/tests/phpstan/phpstan-1.7.3.4.neon b/tests/phpstan/phpstan-1.7.3.4.neon new file mode 100644 index 000000000..23b71e8d8 --- /dev/null +++ b/tests/phpstan/phpstan-1.7.3.4.neon @@ -0,0 +1,5 @@ +includes: + - %currentWorkingDirectory%/tests/phpstan/phpstan.neon + +parameters: + ignoreErrors: diff --git a/tests/phpstan/phpstan-1.7.4.4.neon b/tests/phpstan/phpstan-1.7.4.4.neon new file mode 100644 index 000000000..23b71e8d8 --- /dev/null +++ b/tests/phpstan/phpstan-1.7.4.4.neon @@ -0,0 +1,5 @@ +includes: + - %currentWorkingDirectory%/tests/phpstan/phpstan.neon + +parameters: + ignoreErrors: diff --git a/tests/phpstan/phpstan-1.7.5.1.neon b/tests/phpstan/phpstan-1.7.5.1.neon new file mode 100644 index 000000000..23b71e8d8 --- /dev/null +++ b/tests/phpstan/phpstan-1.7.5.1.neon @@ -0,0 +1,5 @@ +includes: + - %currentWorkingDirectory%/tests/phpstan/phpstan.neon + +parameters: + ignoreErrors: diff --git a/tests/phpstan/phpstan-1.7.6.neon b/tests/phpstan/phpstan-1.7.6.neon new file mode 100644 index 000000000..23b71e8d8 --- /dev/null +++ b/tests/phpstan/phpstan-1.7.6.neon @@ -0,0 +1,5 @@ +includes: + - %currentWorkingDirectory%/tests/phpstan/phpstan.neon + +parameters: + ignoreErrors: diff --git a/tests/phpstan/phpstan-1.7.7.neon b/tests/phpstan/phpstan-1.7.7.neon new file mode 100644 index 000000000..23b71e8d8 --- /dev/null +++ b/tests/phpstan/phpstan-1.7.7.neon @@ -0,0 +1,5 @@ +includes: + - %currentWorkingDirectory%/tests/phpstan/phpstan.neon + +parameters: + ignoreErrors: diff --git a/tests/phpstan/phpstan-1.7.8.neon b/tests/phpstan/phpstan-1.7.8.neon new file mode 100644 index 000000000..23b71e8d8 --- /dev/null +++ b/tests/phpstan/phpstan-1.7.8.neon @@ -0,0 +1,5 @@ +includes: + - %currentWorkingDirectory%/tests/phpstan/phpstan.neon + +parameters: + ignoreErrors: diff --git a/tests/phpstan/phpstan-latest.neon b/tests/phpstan/phpstan-latest.neon new file mode 100644 index 000000000..23b71e8d8 --- /dev/null +++ b/tests/phpstan/phpstan-latest.neon @@ -0,0 +1,5 @@ +includes: + - %currentWorkingDirectory%/tests/phpstan/phpstan.neon + +parameters: + ignoreErrors: diff --git a/tests/phpstan/phpstan.neon b/tests/phpstan/phpstan.neon index 13f00c831..1d516bd22 100644 --- a/tests/phpstan/phpstan.neon +++ b/tests/phpstan/phpstan.neon @@ -1,25 +1,11 @@ +includes: + - %currentWorkingDirectory%/vendor/prestashop/php-dev-tools/phpstan/ps-module-extension.neon parameters: - bootstrapFiles: - - ./../../tests/phpstan/bootstrap.php - reportUnmatchedIgnoredErrors: false - paths: + paths: + # From PHPStan 0.12, paths to check are relative to the neon file - ./../../classes excludes_analyse: - ./../../classes/Tools14.php - ./../../classes/pclzip.lib.php - ./../../functions.php - ignoreErrors: - # module specific - - '#Function deactivate_custom_modules not found.#' - - '#Constant MCRYPT_[A-Z0-9_]+ not found.#' - - "#Call to function method_exists#" - - '#.* property (Module::)?\$installed.*#' - # CLDR related check - - '#[cC]lass PrestaShop\\PrestaShop\\Core\\Cldr\\Update#' - # AppKernel wasn't properly listed in autoloader - - '#AppKernel#' - - '#Access to offset 0 on an unknown class mysqli_result.#' - - '#Iterating over an object of an unknown class mysqli_result.#' - - '#PrestaShop\\PrestaShop\\Core\\CommandBus\\TacticianCommandBusAdapter#' - - level: 5 + level: 5 From 1f92c531624a850d722804aa6d90ba48ce925db2 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Thu, 3 Feb 2022 10:49:18 +0100 Subject: [PATCH 005/128] Some fixes --- .github/workflows/php.yml | 2 +- .php_cs.dist | 41 +++++----------------- Readme.md => README.md | 0 composer.json | 71 ++++++++++++++++++++------------------- 4 files changed, 45 insertions(+), 69 deletions(-) rename Readme.md => README.md (100%) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index fce5554eb..2909efe02 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -47,7 +47,7 @@ jobs: key: php-${{ hashFiles('composer.lock') }} - name: Install dependencies - run: composer install + run: composer require prestashop/php-dev-tools:^3.4 - name: Run PHP-CS-Fixer run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --using-cache=no --diff-format udiff diff --git a/.php_cs.dist b/.php_cs.dist index c618b640c..9830d6d3d 100644 --- a/.php_cs.dist +++ b/.php_cs.dist @@ -1,36 +1,11 @@ in(__DIR__) - ->exclude('translations') - ->notPath('classes/Tools14.php'); +$config = new PrestaShop\CodingStandards\CsFixer\Config(); -return PhpCsFixer\Config::create() - ->setRiskyAllowed(true) - ->setRules([ - '@Symfony' => true, - 'concat_space' => [ - 'spacing' => 'one', - ], - 'cast_spaces' => [ - 'space' => 'single', - ], - 'error_suppression' => [ - 'mute_deprecation_error' => false, - 'noise_remaining_usages' => false, - 'noise_remaining_usages_exclude' => [], - ], - 'function_to_constant' => false, - 'no_alias_functions' => false, - 'non_printable_character' => false, - 'phpdoc_summary' => false, - 'phpdoc_align' => [ - 'align' => 'left', - ], - 'protected_to_private' => false, - 'psr4' => false, - 'self_accessor' => false, - 'yoda_style' => null, - 'non_printable_character' => true, - ]) - ->setFinder($finder); +$config + ->setUsingCache(true) + ->getFinder() + ->in(__DIR__) + ->exclude('vendor'); + +return $config; diff --git a/Readme.md b/README.md similarity index 100% rename from Readme.md rename to README.md diff --git a/composer.json b/composer.json index 4a03a8bbd..0e7c3afb9 100644 --- a/composer.json +++ b/composer.json @@ -1,38 +1,39 @@ { - "name": "prestashop/autoupgrade", - "description": "PrestaShop module autoupgrade", - "homepage": "https://github.com/PrestaShop/autoupgrade", - "license": "AFL-3.0", - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "require": { - "php": ">=5.6", - "ext-zip": "*", - "symfony/filesystem": "~2.8", - "doctrine/collections": "~1.3.0", - "twig/twig": "^1.35|^3" + "name": "prestashop/autoupgrade", + "description": "PrestaShop module autoupgrade", + "homepage": "https://github.com/PrestaShop/autoupgrade", + "license": "AFL-3.0", + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "require": { + "php": ">=5.6", + "ext-zip": "*", + "symfony/filesystem": "~2.8", + "doctrine/collections": "~1.3.0", + "twig/twig": "^1.35|^3" + }, + "require-dev": { + "phpunit/phpunit": "^5" + }, + "config": { + "preferred-install": "dist", + "classmap-authoritative": true, + "platform": { + "php": "5.6" }, - "config": { - "preferred-install": "dist", - "platform": { - "php": "5.6" - }, - "prepend-autoloader": false, - "optimize-autoloader": true - }, - "type": "prestashop-module", - "autoload": { - "psr-4": { - "PrestaShop\\Module\\AutoUpgrade\\": "classes/", - "PrestaShop\\Module\\AutoUpgrade\\Temp\\": "templates/" - } - }, - "require-dev": { - "phpunit/phpunit": "^5" - }, - "author": "PrestaShop" + "prepend-autoloader": false, + "optimize-autoloader": true + }, + "type": "prestashop-module", + "autoload": { + "psr-4": { + "PrestaShop\\Module\\AutoUpgrade\\": "classes/", + "PrestaShop\\Module\\AutoUpgrade\\Temp\\": "templates/" + } + }, + "author": "PrestaShop" } From 1a832fbcd14a4eda0c041641c3b927fd8579e1b6 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Thu, 3 Feb 2022 11:07:11 +0100 Subject: [PATCH 006/128] Fixed CI --- .github/workflows/php.yml | 42 +- .php_cs.dist => .php-cs-fixer.dist.php | 0 AdminSelfUpgrade.php | 140 +++--- ajax-upgradetab.php | 2 +- ajax-upgradetabconfig.php | 4 +- autoupgrade.php | 29 +- classes/AjaxResponse.php | 10 +- classes/BackupFinder.php | 4 +- classes/ChannelInfo.php | 24 +- classes/ErrorHandler.php | 14 +- classes/Log/LegacyLogger.php | 6 +- classes/Log/Logger.php | 24 +- classes/Log/LoggerInterface.php | 18 +- classes/Log/StreamedLogger.php | 2 +- .../Parameters/FileConfigurationStorage.php | 4 +- classes/Parameters/UpgradeConfiguration.php | 14 +- .../UpgradeConfigurationStorage.php | 4 +- classes/Parameters/UpgradeFileNames.php | 4 +- classes/PrestashopConfiguration.php | 10 +- classes/State.php | 12 +- classes/TaskRunner/AbstractTask.php | 6 +- .../Miscellaneous/CheckFilesVersion.php | 12 +- .../Miscellaneous/CompareReleases.php | 12 +- .../TaskRunner/Miscellaneous/UpdateConfig.php | 22 +- .../TaskRunner/Rollback/NoRollbackFound.php | 2 +- classes/TaskRunner/Rollback/RestoreDb.php | 38 +- classes/TaskRunner/Rollback/RestoreFiles.php | 18 +- classes/TaskRunner/Rollback/Rollback.php | 6 +- .../TaskRunner/Rollback/RollbackComplete.php | 2 +- .../TaskRunner/Upgrade/AllUpgradeTasks.php | 4 +- classes/TaskRunner/Upgrade/BackupDb.php | 34 +- classes/TaskRunner/Upgrade/BackupFiles.php | 16 +- classes/TaskRunner/Upgrade/CleanDatabase.php | 2 +- classes/TaskRunner/Upgrade/Download.php | 28 +- classes/TaskRunner/Upgrade/RemoveSamples.php | 54 +- classes/TaskRunner/Upgrade/Unzip.php | 18 +- .../TaskRunner/Upgrade/UpgradeComplete.php | 16 +- classes/TaskRunner/Upgrade/UpgradeDb.php | 4 +- classes/TaskRunner/Upgrade/UpgradeFiles.php | 52 +- classes/TaskRunner/Upgrade/UpgradeModules.php | 26 +- classes/TaskRunner/Upgrade/UpgradeNow.php | 22 +- classes/Tools14.php | 86 ++-- classes/Twig/Block/ChannelInfoBlock.php | 4 +- classes/Twig/Block/RollbackForm.php | 4 +- classes/Twig/Block/UpgradeButtonBlock.php | 40 +- classes/Twig/Block/UpgradeChecklist.php | 8 +- classes/Twig/Form/BackupOptionsForm.php | 22 +- classes/Twig/Form/FormRenderer.php | 18 +- classes/Twig/Form/UpgradeOptionsForm.php | 72 +-- classes/Twig/TransFilterExtension.php | 8 +- classes/Twig/TransFilterExtension3.php | 8 +- classes/UpgradeContainer.php | 26 +- classes/UpgradeException.php | 2 +- classes/UpgradePage.php | 218 ++++----- classes/UpgradeSelfCheck.php | 6 +- classes/UpgradeTools/CacheCleaner.php | 14 +- .../CoreUpgrader/CoreUpgrader.php | 54 +- .../CoreUpgrader/CoreUpgrader16.php | 14 +- .../CoreUpgrader/CoreUpgrader17.php | 30 +- classes/UpgradeTools/Database.php | 2 +- classes/UpgradeTools/FileFilter.php | 16 +- classes/UpgradeTools/FilesystemAdapter.php | 20 +- classes/UpgradeTools/ModuleAdapter.php | 45 +- classes/UpgradeTools/SettingsFileWriter.php | 10 +- classes/UpgradeTools/Translation.php | 18 +- classes/UpgradeTools/Translator.php | 6 +- classes/Upgrader.php | 38 +- classes/Workspace.php | 4 +- classes/ZipAction.php | 40 +- classes/index.php | 1 - cli-rollback.php | 2 +- cli-updateconfig.php | 7 +- cli-upgrade.php | 2 +- functions.php | 12 +- tests/CoreUpgraderTest.php | 12 +- tests/ErrorHandlerTest.php | 8 +- tests/FilesystemAdapterTest.php | 34 +- tests/SettingsFileWriterTest.php | 6 +- tests/StreamedLoggerTest.php | 14 +- tests/TranslatorTest.php | 22 +- tests/UpgradeContainerTest.php | 42 +- tests/phpstan/bootstrap.php | 2 +- tests/phpstan/phpstan-1.6.1.18.neon | 26 +- tests/phpstan/phpstan-1.7.1.2.neon | 5 - tests/phpstan/phpstan-1.7.2.5.neon | 18 +- tests/phpstan/phpstan-1.7.3.4.neon | 18 +- tests/phpstan/phpstan-1.7.4.4.neon | 12 +- tests/phpstan/phpstan-1.7.5.1.neon | 7 +- tests/phpstan/phpstan-1.7.6.neon | 10 +- tests/phpstan/phpstan-1.7.7.neon | 6 +- tests/phpstan/phpstan-1.7.8.neon | 7 +- tests/phpstan/phpstan-latest.neon | 6 +- tests/phpstan/phpstan.neon | 17 +- translations/cs.php | 4 +- translations/de.php | 14 +- translations/en.php | 5 +- translations/es.php | 6 +- translations/fr.php | 4 +- translations/index.php | 13 +- translations/it.php | 6 +- translations/pl.php | 4 +- translations/ru.php | 6 +- upgrade/classes/ToolsInstall.php | 41 +- upgrade/classes/index.php | 3 +- upgrade/index.php | 13 +- upgrade/install-4.10.1.php | 2 +- upgrade/php/add_accounting_tab.php | 3 +- upgrade/php/add_attribute_position.php | 15 +- upgrade/php/add_carrier_position.php | 9 +- ...lumn_order_state_deleted_if_not_exists.php | 9 +- ..._column_orders_reference_if_not_exists.php | 5 +- ...dd_default_restrictions_modules_groups.php | 17 +- upgrade/php/add_feature_position.php | 9 +- upgrade/php/add_group_attribute_position.php | 9 +- .../php/add_id_shop_to_shipper_lang_index.php | 7 +- upgrade/php/add_missing_columns_customer.php | 23 +- upgrade/php/add_missing_image_key.php | 7 +- upgrade/php/add_missing_rewrite_value.php | 13 +- .../add_missing_shop_column_pagenotfound.php | 9 +- upgrade/php/add_module_to_hook.php | 23 +- upgrade/php/add_new_groups.php | 21 +- upgrade/php/add_new_status_stock.php | 51 +- upgrade/php/add_new_tab.php | 64 +-- .../add_order_reference_in_order_payment.php | 31 +- upgrade/php/add_order_state.php | 27 +- upgrade/php/add_quick_access_tab.php | 3 +- .../add_required_customization_field_flag.php | 9 +- upgrade/php/add_stock_tab.php | 5 +- .../php/add_supplier_manufacturer_routes.php | 8 +- upgrade/php/add_unknown_gender.php | 19 +- upgrade/php/alter_blocklink.php | 5 +- upgrade/php/alter_cms_block.php | 9 +- upgrade/php/alter_ignore_drop_key.php | 5 +- .../php/alter_productcomments_guest_index.php | 5 +- .../attribute_group_clean_combinations.php | 15 +- upgrade/php/block_category_1521.php | 9 +- upgrade/php/blocknewsletter.php | 3 +- upgrade/php/blocknewsletter1530.php | 7 +- upgrade/php/category_product_index_unique.php | 7 +- .../php/check_webservice_account_table.php | 4 +- upgrade/php/clean_category_product.php | 6 +- upgrade/php/clean_tabs_15.php | 463 +++++++++--------- upgrade/php/cms_block.php | 5 +- upgrade/php/cms_multishop.php | 25 +- upgrade/php/configuration_double_cleaner.php | 13 +- upgrade/php/convert_product_price.php | 16 +- upgrade/php/copy_tab_rights.php | 2 +- upgrade/php/country_to_timezone.php | 9 +- upgrade/php/create_multistore.php | 33 +- .../customization_field_multishop_lang.php | 11 +- upgrade/php/deactivate_custom_modules.php | 37 +- upgrade/php/delete_hook.php | 1 - upgrade/php/delivery_number_set.php | 13 +- ...rop_column_from_product_lang_if_exists.php | 1 - .../php/drop_image_type_non_unique_index.php | 5 +- upgrade/php/drop_module_non_unique_index.php | 6 +- upgrade/php/ecotax_tax_application_fix.php | 5 +- upgrade/php/editorial_update.php | 33 +- upgrade/php/editorial_update_multishop.php | 7 +- upgrade/php/fix_cms_shop_1520.php | 13 +- .../fix_download_product_feature_active.php | 5 +- upgrade/php/fix_unique_specific_price.php | 9 +- upgrade/php/generate_ntree.php | 23 +- .../generate_root_category_for_multishop.php | 35 +- upgrade/php/generate_tax_rules.php | 59 ++- upgrade/php/generic_add_missing_column.php | 9 +- upgrade/php/gridextjs_deprecated.php | 2 +- upgrade/php/group_reduction_column_fix.php | 5 +- upgrade/php/hook_blocksearch_on_header.php | 13 +- upgrade/php/id_currency_country_fix.php | 5 +- upgrade/php/image_shop1510.php | 8 +- upgrade/php/index.php | 13 +- upgrade/php/invoice_number_set.php | 13 +- upgrade/php/latin1_database_to_utf8.php | 131 +++-- .../php/migrate_block_info_to_cms_block.php | 71 ++- upgrade/php/migrate_orders.php | 126 ++--- upgrade/php/migrate_tabs_15.php | 80 +-- upgrade/php/migrate_tabs_17.php | 20 +- upgrade/php/migrate_tabs_multi_shop.php | 16 +- .../php/module_blockwishlist_multishop.php | 5 +- .../php/module_reinstall_blockmyaccount.php | 15 +- upgrade/php/module_reinstall_blocksearch.php | 15 +- upgrade/php/move_crossselling.php | 7 +- upgrade/php/move_translations_module_file.php | 18 +- upgrade/php/outstanding_allow_amount1530.php | 9 +- ...15010_drop_column_id_address_if_exists.php | 7 +- upgrade/php/p15012_add_missing_columns.php | 105 ++-- upgrade/php/p15013_add_missing_columns.php | 13 +- upgrade/php/p15014_add_missing_columns.php | 11 +- ...copy_missing_images_tab_from_installer.php | 11 +- upgrade/php/p15014_upgrade_sekeywords.php | 5 +- .../php/p15015_blockadvertising_extension.php | 13 +- upgrade/php/p15016_add_missing_columns.php | 31 +- .../php/p15017_add_id_shop_to_primary_key.php | 17 +- upgrade/php/p15018_change_image_types.php | 97 ++-- upgrade/php/p1531_redirect_type.php | 7 +- upgrade/php/p1540_add_missing_columns.php | 25 +- upgrade/php/p16011_media_server.php | 9 +- upgrade/php/p16012_pack_rework.php | 35 +- upgrade/php/p1603_add_attachment_size.php | 7 +- upgrade/php/p1606module_exceptions.php | 29 +- .../php/p1607_drop_primary_key_if_exists.php | 5 +- upgrade/php/ps1600_add_missing_index.php | 5 +- upgrade/php/ps16012_update_alias.php | 17 +- upgrade/php/ps1604_update_employee_date.php | 2 +- upgrade/php/ps1605_change_index.php | 7 +- upgrade/php/ps1607_language_code_update.php | 7 +- upgrade/php/ps1700_stores.php | 11 +- upgrade/php/ps_1700_add_locale.php | 9 +- .../ps_1700_add_payment_preferences_tab.php | 1 - upgrade/php/ps_1700_right_management.php | 29 +- ...30_add_quick_access_evaluation_catalog.php | 7 +- ...om_store_to_store_lang_and_clean_store.php | 7 +- ...0_move_some_aeuc_configuration_to_core.php | 17 +- upgrade/php/ps_1740_update_module_tabs.php | 7 +- upgrade/php/ps_1750_update_module_tabs.php | 28 +- upgrade/php/ps_1751_update_module_sf_tab.php | 2 +- ...py_data_from_currency_to_currency_lang.php | 12 +- upgrade/php/ps_1760_update_tabs.php | 14 +- upgrade/php/ps_1770_preset_tab_enabled.php | 9 +- upgrade/php/ps_1770_update_charset.php | 6 - .../ps_1770_update_order_status_colors.php | 7 +- upgrade/php/ps_1780_add_feature_flag_tab.php | 7 +- upgrade/php/ps_update_tabs.php | 128 +++-- upgrade/php/regenerate_level_depth.php | 12 +- .../php/remove_duplicate_category_groups.php | 12 +- upgrade/php/remove_module_from_hook.php | 15 +- upgrade/php/remove_tab.php | 5 +- upgrade/php/reorderpositions.php | 63 ++- .../php/select_current_payment_modules.php | 20 +- upgrade/php/set_discount_category.php | 7 +- upgrade/php/set_payment_module.php | 13 +- upgrade/php/set_payment_module_group.php | 11 +- upgrade/php/set_product_suppliers.php | 25 +- upgrade/php/set_stock_available.php | 21 +- upgrade/php/setallgroupsonhomecategory.php | 11 +- upgrade/php/shop_url.php | 15 +- upgrade/php/sql_indexes.php | 14 +- upgrade/php/update_carrier_url.php | 7 +- upgrade/php/update_customer_default_group.php | 21 +- .../php/update_feature_detachable_cache.php | 13 +- upgrade/php/update_for_13version.php | 19 +- upgrade/php/update_genders_images.php | 17 +- upgrade/php/update_image_size_in_db.php | 19 +- .../update_mailalerts_add_column_idshop.php | 8 +- upgrade/php/update_module_blocklayered.php | 5 +- upgrade/php/update_module_followup.php | 5 +- upgrade/php/update_module_loyalty.php | 12 +- upgrade/php/update_module_pagesnotfound.php | 9 +- .../php/update_module_product_comments.php | 11 +- upgrade/php/update_modules_multishop.php | 25 +- upgrade/php/update_modules_sql.php | 13 +- upgrade/php/update_order_canada.php | 69 ++- upgrade/php/update_order_detail_taxes.php | 43 +- upgrade/php/update_order_details.php | 7 +- upgrade/php/update_order_messages.php | 29 +- upgrade/php/update_products_ecotax_v133.php | 5 +- upgrade/php/update_stock_mvt_reason.php | 23 +- upgrade/php/updateproductcomments.php | 33 +- upgrade/php/updatetabicon_from_11version.php | 9 +- upgrade/php/upgrade_cms_15.php | 13 +- upgrade/php/upgrade_cms_15_rename.php | 13 +- upgrade/sql/index.php | 13 +- upgrade/upgrade.php | 29 +- 264 files changed, 2640 insertions(+), 2732 deletions(-) rename .php_cs.dist => .php-cs-fixer.dist.php (100%) delete mode 100644 tests/phpstan/phpstan-1.7.1.2.neon diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 2909efe02..9300ba15d 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -11,21 +11,33 @@ jobs: - name: PHP syntax checker 5.6 uses: prestashop/github-action-php-lint/5.6@master + with: + folder-to-exclude: "! -path \"./.github/*\"" - name: PHP syntax checker 7.2 uses: prestashop/github-action-php-lint/7.2@master + with: + folder-to-exclude: "! -path \"./.github/*\"" - name: PHP syntax checker 7.3 uses: prestashop/github-action-php-lint/7.3@master + with: + folder-to-exclude: "! -path \"./.github/*\"" - name: PHP syntax checker 7.4 uses: prestashop/github-action-php-lint/7.4@master + with: + folder-to-exclude: "! -path \"./.github/*\"" - name: PHP syntax checker 8.0 uses: prestashop/github-action-php-lint/8.0@master + with: + folder-to-exclude: "! -path \"./.github/*\"" - name: PHP syntax checker 8.1 uses: prestashop/github-action-php-lint/8.1@master + with: + folder-to-exclude: "! -path \"./.github/*\"" # Check the PHP code follow the coding standards php-cs-fixer: @@ -35,7 +47,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '7.4' + php-version: '5.6' - name: Checkout uses: actions/checkout@v2.0.0 @@ -47,10 +59,12 @@ jobs: key: php-${{ hashFiles('composer.lock') }} - name: Install dependencies - run: composer require prestashop/php-dev-tools:^3.4 + run: | + composer global require friendsofphp/php-cs-fixer + composer global require prestashop/php-dev-tools - name: Run PHP-CS-Fixer - run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --using-cache=no --diff-format udiff + run: php-cs-fixer fix --dry-run --diff --using-cache=no php-unit: strategy: @@ -77,13 +91,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - presta-versions: ['1.6.1.18', '1.7.1.2', '1.7.2.5', '1.7.3.4', '1.7.4.4', '1.7.5.1', '1.7.6', '1.7.7', '1.7.8', 'latest'] + presta-versions: ['1.6.1.18', '1.7.2.5', '1.7.3.4', '1.7.4.4', '1.7.5.1', '1.7.6', '1.7.7', '1.7.8', 'latest'] steps: - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '7.4' - - name: Checkout uses: actions/checkout@v2.0.0 @@ -103,6 +112,17 @@ jobs: - run: composer install - # Docker images prestashop/prestashop may be used, even if the shop remains uninstalled - name: Execute PHPStan on PrestaShop (Tag ${{ matrix.presta-versions }}) - run: ./tests/phpstan.sh ${{ matrix.presta-versions }} + run: | + docker rm -f temp-ps || true + docker volume rm -f ps-volume || true + docker run -d --rm -v ps-volume:/var/www/html --name temp-ps prestashop/prestashop:${{ matrix.presta-versions }} + docker exec -t temp-ps rm -rf /var/www/html/modules/autoupgrade + docker build -t phpstan:php-7.4 ./tests/phpstan/ + docker run --rm \ + --volumes-from temp-ps \ + -v $PWD:/var/www/html/modules/autoupgrade \ + -e _PS_ROOT_DIR_=/var/www/html \ + --workdir=/var/www/html/modules/autoupgrade \ + phpstan:php-7.4 \ + analyse --configuration=/var/www/html/modules/autoupgrade/tests/phpstan/phpstan-${{ matrix.presta-versions }}.neon diff --git a/.php_cs.dist b/.php-cs-fixer.dist.php similarity index 100% rename from .php_cs.dist rename to .php-cs-fixer.dist.php diff --git a/AdminSelfUpgrade.php b/AdminSelfUpgrade.php index 17e73a533..4da61e124 100755 --- a/AdminSelfUpgrade.php +++ b/AdminSelfUpgrade.php @@ -27,10 +27,10 @@ use PrestaShop\Module\AutoUpgrade\AjaxResponse; use PrestaShop\Module\AutoUpgrade\BackupFinder; use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeFileNames; -use PrestaShop\Module\AutoUpgrade\UpgradePage; -use PrestaShop\Module\AutoUpgrade\UpgradeSelfCheck; use PrestaShop\Module\AutoUpgrade\Tools14; use PrestaShop\Module\AutoUpgrade\UpgradeContainer; +use PrestaShop\Module\AutoUpgrade\UpgradePage; +use PrestaShop\Module\AutoUpgrade\UpgradeSelfCheck; use PrestaShop\Module\AutoUpgrade\UpgradeTools\FilesystemAdapter; require_once _PS_ROOT_DIR_ . '/modules/autoupgrade/vendor/autoload.php'; @@ -43,7 +43,7 @@ class AdminSelfUpgrade extends AdminController // used for translations public static $l_cache; // retrocompatibility - public $noTabLink = array(); + public $noTabLink = []; public $id = -1; public $ajax = false; @@ -77,22 +77,32 @@ class AdminSelfUpgrade extends AdminController public $manualMode; public $deactivateCustomModule; - public static $classes14 = array('Cache', 'CacheFS', 'CarrierModule', 'Db', 'FrontController', 'Helper', 'ImportModule', + public static $classes14 = ['Cache', 'CacheFS', 'CarrierModule', 'Db', 'FrontController', 'Helper', 'ImportModule', 'MCached', 'Module', 'ModuleGraph', 'ModuleGraphEngine', 'ModuleGrid', 'ModuleGridEngine', 'MySQL', 'Order', 'OrderDetail', 'OrderDiscount', 'OrderHistory', 'OrderMessage', 'OrderReturn', 'OrderReturnState', 'OrderSlip', 'OrderState', 'PDF', 'RangePrice', 'RangeWeight', 'StockMvt', - 'StockMvtReason', 'SubDomain', 'Shop', 'Tax', 'TaxRule', 'TaxRulesGroup', 'WebserviceKey', 'WebserviceRequest', '', ); + 'StockMvtReason', 'SubDomain', 'Shop', 'Tax', 'TaxRule', 'TaxRulesGroup', 'WebserviceKey', 'WebserviceRequest', '', ]; public static $maxBackupFileSize = 15728640; // 15 Mo - public $_fieldsUpgradeOptions = array(); - public $_fieldsBackupOptions = array(); + public $_fieldsUpgradeOptions = []; + public $_fieldsBackupOptions = []; /** * @var UpgradeContainer */ private $upgradeContainer; + /** + * @var Db + */ + public $db; + + /** + * @var array + */ + public $_errors = []; + public function viewAccess($disable = false) { if ($this->ajax) { @@ -126,13 +136,15 @@ public function __construct() if (defined('_PS_ADMIN_DIR_')) { // Check that the 1-click upgrade working directory is existing or create it if (!file_exists($this->autoupgradePath) && !@mkdir($this->autoupgradePath)) { - $this->_errors[] = $this->trans('Unable to create the directory "%s"', array($this->autoupgradePath), 'Modules.Autoupgrade.Admin'); + $this->_errors[] = $this->trans('Unable to create the directory "%s"', [$this->autoupgradePath], 'Modules.Autoupgrade.Admin'); + return; } // Make sure that the 1-click upgrade working directory is writeable if (!is_writable($this->autoupgradePath)) { - $this->_errors[] = $this->trans('Unable to write in the directory "%s"', array($this->autoupgradePath), 'Modules.Autoupgrade.Admin'); + $this->_errors[] = $this->trans('Unable to write in the directory "%s"', [$this->autoupgradePath], 'Modules.Autoupgrade.Admin'); + return; } @@ -152,7 +164,8 @@ public function __construct() // Make sure that the XML config directory exists if (!file_exists(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml') && !@mkdir(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml', 0775)) { - $this->_errors[] = $this->trans('Unable to create the directory "%s"', array(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml'), 'Modules.Autoupgrade.Admin'); + $this->_errors[] = $this->trans('Unable to create the directory "%s"', [_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml'], 'Modules.Autoupgrade.Admin'); + return; } else { @chmod(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml', 0775); @@ -162,7 +175,8 @@ public function __construct() if (!file_exists(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'index.php') && (file_exists(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'index.php') && !@copy(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'index.php', _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'index.php'))) { - $this->_errors[] = $this->trans('Unable to create the directory "%s"', array(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml'), 'Modules.Autoupgrade.Admin'); + $this->_errors[] = $this->trans('Unable to create the directory "%s"', [_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml'], 'Modules.Autoupgrade.Admin'); + return; } } @@ -177,47 +191,47 @@ public function __construct() */ private function _setFields() { - $this->_fieldsBackupOptions = array( - 'PS_AUTOUP_BACKUP' => array( - 'title' => $this->trans('Back up my files and database', array(), 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', 'defaultValue' => '1', - 'type' => 'bool', 'desc' => $this->trans('Automatically back up your database and files in order to restore your shop if needed. This is experimental: you should still perform your own manual backup for safety.', array(), 'Modules.Autoupgrade.Admin'), - ), - 'PS_AUTOUP_KEEP_IMAGES' => array( - 'title' => $this->trans('Back up my images', array(), 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', 'defaultValue' => '1', - 'type' => 'bool', 'desc' => $this->trans('To save time, you can decide not to back your images up. In any case, always make sure you did back them up manually.', array(), 'Modules.Autoupgrade.Admin'), - ), - ); - $this->_fieldsUpgradeOptions = array( - 'PS_AUTOUP_PERFORMANCE' => array( - 'title' => $this->trans('Server performance', array(), 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isInt', 'defaultValue' => '1', - 'type' => 'select', 'desc' => $this->trans('Unless you are using a dedicated server, select "Low".', array(), 'Modules.Autoupgrade.Admin') . '
' . - $this->trans('A high value can cause the upgrade to fail if your server is not powerful enough to process the upgrade tasks in a short amount of time.', array(), 'Modules.Autoupgrade.Admin'), - 'choices' => array(1 => $this->trans('Low (recommended)', array(), 'Modules.Autoupgrade.Admin'), 2 => $this->trans('Medium', array(), 'Modules.Autoupgrade.Admin'), 3 => $this->trans('High', array(), 'Modules.Autoupgrade.Admin')), - ), - 'PS_AUTOUP_CUSTOM_MOD_DESACT' => array( - 'title' => $this->trans('Disable non-native modules', array(), 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', - 'type' => 'bool', 'desc' => $this->trans('As non-native modules can experience some compatibility issues, we recommend to disable them by default.', array(), 'Modules.Autoupgrade.Admin') . '
' . - $this->trans('Keeping them enabled might prevent you from loading the "Modules" page properly after the upgrade.', array(), 'Modules.Autoupgrade.Admin'), - ), - 'PS_AUTOUP_UPDATE_DEFAULT_THEME' => array( - 'title' => $this->trans('Upgrade the default theme', array(), 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', 'defaultValue' => '1', - 'type' => 'bool', 'desc' => $this->trans('If you customized the default PrestaShop theme in its folder (folder name "classic" in 1.7), enabling this option will lose your modifications.', array(), 'Modules.Autoupgrade.Admin') . '
' - . $this->trans('If you are using your own theme, enabling this option will simply update the default theme files, and your own theme will be safe.', array(), 'Modules.Autoupgrade.Admin'), - ), - 'PS_AUTOUP_CHANGE_DEFAULT_THEME' => array( - 'title' => $this->trans('Switch to the default theme', array(), 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', 'defaultValue' => '0', - 'type' => 'bool', 'desc' => $this->trans('This will change your theme: your shop will then use the default theme of the version of PrestaShop you are upgrading to.', array(), 'Modules.Autoupgrade.Admin'), - ), - 'PS_AUTOUP_UPDATE_RTL_FILES' => array( - 'title' => $this->trans('Regenerate RTL stylesheet', array(), 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', 'defaultValue' => '1', - 'type' => 'bool', 'desc' => $this->trans('If enabled, any RTL-specific files that you might have added to all your themes might be deleted by the created stylesheet.', array(), 'Modules.Autoupgrade.Admin'), - ), - 'PS_AUTOUP_KEEP_MAILS' => array( - 'title' => $this->trans('Keep the customized email templates', array(), 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', - 'type' => 'bool', 'desc' => $this->trans('This will not upgrade the default PrestaShop e-mails.', array(), 'Modules.Autoupgrade.Admin') . '
' - . $this->trans('If you customized the default PrestaShop e-mail templates, enabling this option will keep your modifications.', array(), 'Modules.Autoupgrade.Admin'), - ), - ); + $this->_fieldsBackupOptions = [ + 'PS_AUTOUP_BACKUP' => [ + 'title' => $this->trans('Back up my files and database', [], 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', 'defaultValue' => '1', + 'type' => 'bool', 'desc' => $this->trans('Automatically back up your database and files in order to restore your shop if needed. This is experimental: you should still perform your own manual backup for safety.', [], 'Modules.Autoupgrade.Admin'), + ], + 'PS_AUTOUP_KEEP_IMAGES' => [ + 'title' => $this->trans('Back up my images', [], 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', 'defaultValue' => '1', + 'type' => 'bool', 'desc' => $this->trans('To save time, you can decide not to back your images up. In any case, always make sure you did back them up manually.', [], 'Modules.Autoupgrade.Admin'), + ], + ]; + $this->_fieldsUpgradeOptions = [ + 'PS_AUTOUP_PERFORMANCE' => [ + 'title' => $this->trans('Server performance', [], 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isInt', 'defaultValue' => '1', + 'type' => 'select', 'desc' => $this->trans('Unless you are using a dedicated server, select "Low".', [], 'Modules.Autoupgrade.Admin') . '
' . + $this->trans('A high value can cause the upgrade to fail if your server is not powerful enough to process the upgrade tasks in a short amount of time.', [], 'Modules.Autoupgrade.Admin'), + 'choices' => [1 => $this->trans('Low (recommended)', [], 'Modules.Autoupgrade.Admin'), 2 => $this->trans('Medium', [], 'Modules.Autoupgrade.Admin'), 3 => $this->trans('High', [], 'Modules.Autoupgrade.Admin')], + ], + 'PS_AUTOUP_CUSTOM_MOD_DESACT' => [ + 'title' => $this->trans('Disable non-native modules', [], 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', + 'type' => 'bool', 'desc' => $this->trans('As non-native modules can experience some compatibility issues, we recommend to disable them by default.', [], 'Modules.Autoupgrade.Admin') . '
' . + $this->trans('Keeping them enabled might prevent you from loading the "Modules" page properly after the upgrade.', [], 'Modules.Autoupgrade.Admin'), + ], + 'PS_AUTOUP_UPDATE_DEFAULT_THEME' => [ + 'title' => $this->trans('Upgrade the default theme', [], 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', 'defaultValue' => '1', + 'type' => 'bool', 'desc' => $this->trans('If you customized the default PrestaShop theme in its folder (folder name "classic" in 1.7), enabling this option will lose your modifications.', [], 'Modules.Autoupgrade.Admin') . '
' + . $this->trans('If you are using your own theme, enabling this option will simply update the default theme files, and your own theme will be safe.', [], 'Modules.Autoupgrade.Admin'), + ], + 'PS_AUTOUP_CHANGE_DEFAULT_THEME' => [ + 'title' => $this->trans('Switch to the default theme', [], 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', 'defaultValue' => '0', + 'type' => 'bool', 'desc' => $this->trans('This will change your theme: your shop will then use the default theme of the version of PrestaShop you are upgrading to.', [], 'Modules.Autoupgrade.Admin'), + ], + 'PS_AUTOUP_UPDATE_RTL_FILES' => [ + 'title' => $this->trans('Regenerate RTL stylesheet', [], 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', 'defaultValue' => '1', + 'type' => 'bool', 'desc' => $this->trans('If enabled, any RTL-specific files that you might have added to all your themes might be deleted by the created stylesheet.', [], 'Modules.Autoupgrade.Admin'), + ], + 'PS_AUTOUP_KEEP_MAILS' => [ + 'title' => $this->trans('Keep the customized email templates', [], 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', + 'type' => 'bool', 'desc' => $this->trans('This will not upgrade the default PrestaShop e-mails.', [], 'Modules.Autoupgrade.Admin') . '
' + . $this->trans('If you customized the default PrestaShop e-mail templates, enabling this option will keep your modifications.', [], 'Modules.Autoupgrade.Admin'), + ], + ]; } /** @@ -246,7 +260,7 @@ public function init() $this->action = empty($_REQUEST['action']) ? null : $_REQUEST['action']; $this->initPath(); $this->upgradeContainer->getState()->importFromArray( - empty($_REQUEST['params']) ? array() : $_REQUEST['params'] + empty($_REQUEST['params']) ? [] : $_REQUEST['params'] ); // If you have defined this somewhere, you know what you do @@ -269,9 +283,9 @@ public function init() $upgrader->clearXmlMd5File($this->upgradeContainer->getProperty(UpgradeContainer::PS_VERSION)); $upgrader->clearXmlMd5File($upgrader->version_num); if ($upgradeConfiguration->get('channel') == 'private' && !$upgradeConfiguration->get('private_allow_major')) { - $upgrader->checkPSVersion(true, array('private', 'minor')); + $upgrader->checkPSVersion(true, ['private', 'minor']); } else { - $upgrader->checkPSVersion(true, array('minor')); + $upgrader->checkPSVersion(true, ['minor']); } Tools14::redirectAdmin(self::$currentIndex . '&conf=5&token=' . Tools14::getValue('token')); } @@ -304,14 +318,14 @@ public function initPath() if (!file_exists($this->backupPath . DIRECTORY_SEPARATOR . 'index.php')) { if (!copy(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'index.php', $this->backupPath . DIRECTORY_SEPARATOR . 'index.php')) { - $this->_errors[] = $this->trans('Unable to create file %s', array($this->backupPath . DIRECTORY_SEPARATOR . 'index.php'), 'Modules.Autoupgrade.Admin'); + $this->_errors[] = $this->trans('Unable to create file %s', [$this->backupPath . DIRECTORY_SEPARATOR . 'index.php'], 'Modules.Autoupgrade.Admin'); } } $tmp = "order deny,allow\ndeny from all"; if (!file_exists($this->backupPath . DIRECTORY_SEPARATOR . '.htaccess')) { if (!file_put_contents($this->backupPath . DIRECTORY_SEPARATOR . '.htaccess', $tmp)) { - $this->_errors[] = $this->trans('Unable to create file %s', array($this->backupPath . DIRECTORY_SEPARATOR . '.htaccess'), 'Modules.Autoupgrade.Admin'); + $this->_errors[] = $this->trans('Unable to create file %s', [$this->backupPath . DIRECTORY_SEPARATOR . '.htaccess'], 'Modules.Autoupgrade.Admin'); } } } @@ -337,7 +351,7 @@ public function postProcess() if (Tools14::isSubmit('customSubmitAutoUpgrade')) { $config_keys = array_keys(array_merge($this->_fieldsUpgradeOptions, $this->_fieldsBackupOptions)); - $config = array(); + $config = []; foreach ($config_keys as $key) { if (isset($_POST[$key])) { $config[$key] = $_POST[$key]; @@ -369,7 +383,7 @@ public function postProcess() if ($res) { Tools14::redirectAdmin(self::$currentIndex . '&conf=1&token=' . Tools14::getValue('token')); } else { - $this->_errors[] = $this->trans('Error when trying to delete backups %s', array($name), 'Modules.Autoupgrade.Admin'); + $this->_errors[] = $this->trans('Error when trying to delete backups %s', [$name], 'Modules.Autoupgrade.Admin'); } } parent::postProcess(); @@ -378,14 +392,14 @@ public function postProcess() public function display() { // Make sure the user has configured the upgrade options, or set default values - $configuration_keys = array( + $configuration_keys = [ 'PS_AUTOUP_UPDATE_DEFAULT_THEME' => 1, 'PS_AUTOUP_CHANGE_DEFAULT_THEME' => 0, 'PS_AUTOUP_UPDATE_RTL_FILES' => 1, 'PS_AUTOUP_KEEP_MAILS' => 0, 'PS_AUTOUP_CUSTOM_MOD_DESACT' => 1, 'PS_AUTOUP_PERFORMANCE' => 1, - ); + ]; foreach ($configuration_keys as $k => $default_value) { if (Configuration::get($k) == '') { @@ -436,7 +450,7 @@ public function display() $this->ajax = true; $this->content = $this->_html; - return parent::display(); + parent::display(); } /** @@ -463,7 +477,7 @@ public function displayErrors() * @param string $domain * @param string $locale */ - public function trans($id, array $parameters = array(), $domain = null, $locale = null) + public function trans($id, array $parameters = [], $domain = null, $locale = null) { return (new \PrestaShop\Module\AutoUpgrade\UpgradeTools\Translator(__CLASS__))->trans($id, $parameters, $domain, $locale); } diff --git a/ajax-upgradetab.php b/ajax-upgradetab.php index 579c5d266..3eb3ea8b1 100755 --- a/ajax-upgradetab.php +++ b/ajax-upgradetab.php @@ -45,7 +45,7 @@ } echo '{wrong token}'; http_response_code(401); - die(1); + exit(1); } $controller = TaskRepository::get(Tools14::getValue('action'), $container); diff --git a/ajax-upgradetabconfig.php b/ajax-upgradetabconfig.php index 3ecdb907c..35c4bbfab 100644 --- a/ajax-upgradetabconfig.php +++ b/ajax-upgradetabconfig.php @@ -40,7 +40,7 @@ function autoupgrade_init_container($callerFilePath) { if (PHP_SAPI === 'cli') { - $options = getopt('', array('dir:')); + $options = getopt('', ['dir:']); if (isset($options['dir'])) { $_POST['dir'] = $options['dir']; } @@ -75,7 +75,7 @@ function autoupgrade_init_container($callerFilePath) } $container = new \PrestaShop\Module\AutoUpgrade\UpgradeContainer(_PS_ROOT_DIR_, _PS_ADMIN_DIR_); - $container->getState()->importFromArray(empty($_REQUEST['params']) ? array() : $_REQUEST['params']); + $container->getState()->importFromArray(empty($_REQUEST['params']) ? [] : $_REQUEST['params']); return $container; } diff --git a/autoupgrade.php b/autoupgrade.php index 58657d8a5..81377a0bb 100644 --- a/autoupgrade.php +++ b/autoupgrade.php @@ -26,6 +26,11 @@ */ class Autoupgrade extends Module { + /** + * @var int + */ + public $multishop_context; + public function __construct() { $this->name = 'autoupgrade'; @@ -43,20 +48,20 @@ public function __construct() if (defined('PS_ADMIN_DIR')) { define('_PS_ADMIN_DIR_', PS_ADMIN_DIR); } else { - $this->_errors[] = $this->trans('This version of PrestaShop cannot be upgraded: the PS_ADMIN_DIR constant is missing.', array(), 'Modules.Autoupgrade.Admin'); + $this->_errors[] = $this->trans('This version of PrestaShop cannot be upgraded: the PS_ADMIN_DIR constant is missing.', [], 'Modules.Autoupgrade.Admin'); } } - $this->displayName = $this->trans('1-Click Upgrade', array(), 'Modules.Autoupgrade.Admin'); - $this->description = $this->trans('Upgrade to the latest version of PrestaShop in a few clicks, thanks to this automated method.', array(), 'Modules.Autoupgrade.Admin'); + $this->displayName = $this->trans('1-Click Upgrade', [], 'Modules.Autoupgrade.Admin'); + $this->description = $this->trans('Upgrade to the latest version of PrestaShop in a few clicks, thanks to this automated method.', [], 'Modules.Autoupgrade.Admin'); - $this->ps_versions_compliancy = array('min' => '1.6.0.0', 'max' => _PS_VERSION_); + $this->ps_versions_compliancy = ['min' => '1.6.0.0', 'max' => _PS_VERSION_]; } public function install() { if (50600 > PHP_VERSION_ID) { - $this->_errors[] = $this->trans('This version of 1-click upgrade requires PHP 5.6 to work properly. Please upgrade your server configuration.', array(), 'Modules.Autoupgrade.Admin'); + $this->_errors[] = $this->trans('This version of 1-click upgrade requires PHP 5.6 to work properly. Please upgrade your server configuration.', [], 'Modules.Autoupgrade.Admin'); return false; } @@ -65,12 +70,11 @@ public function install() return false; } - // Before creating a new tab "AdminSelfUpgrade" we need to remove any existing "AdminUpgrade" tab (present in v1.4.4.0 and v1.4.4.1) if ($id_tab = Tab::getIdFromClassName('AdminUpgrade')) { $tab = new Tab((int) $id_tab); if (!$tab->delete()) { - $this->_errors[] = $this->trans('Unable to delete outdated "AdminUpgrade" tab (tab ID: %idtab%).', array('%idtab%' => (int) $id_tab), 'Modules.Autoupgrade.Admin'); + $this->_errors[] = $this->trans('Unable to delete outdated "AdminUpgrade" tab (tab ID: %idtab%).', ['%idtab%' => (int) $id_tab], 'Modules.Autoupgrade.Admin'); } } @@ -84,10 +88,10 @@ public function install() $tab->name[(int) $lang['id_lang']] = '1-Click Upgrade'; } if (!$tab->save()) { - return $this->_abortInstall($this->trans('Unable to create the "AdminSelfUpgrade" tab', array(), 'Modules.Autoupgrade.Admin')); + return $this->_abortInstall($this->trans('Unable to create the "AdminSelfUpgrade" tab', [], 'Modules.Autoupgrade.Admin')); } if (!@copy(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'logo.gif', _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'img' . DIRECTORY_SEPARATOR . 't' . DIRECTORY_SEPARATOR . 'AdminSelfUpgrade.gif')) { - return $this->_abortInstall($this->trans('Unable to copy logo.gif in %s', array(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'img' . DIRECTORY_SEPARATOR . 't' . DIRECTORY_SEPARATOR), 'Modules.Autoupgrade.Admin')); + return $this->_abortInstall($this->trans('Unable to copy logo.gif in %s', [_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'img' . DIRECTORY_SEPARATOR . 't' . DIRECTORY_SEPARATOR], 'Modules.Autoupgrade.Admin')); } } else { $tab = new Tab((int) $id_tab); @@ -97,10 +101,9 @@ public function install() if (Validate::isLoadedObject($tab)) { Configuration::updateValue('PS_AUTOUPDATE_MODULE_IDTAB', (int) $tab->id); } else { - return $this->_abortInstall($this->trans('Unable to load the "AdminSelfUpgrade" tab', array(), 'Modules.Autoupgrade.Admin')); + return $this->_abortInstall($this->trans('Unable to load the "AdminSelfUpgrade" tab', [], 'Modules.Autoupgrade.Admin')); } - return parent::install() && $this->registerHookAndSetToTop('dashboardZoneOne'); } @@ -130,7 +133,7 @@ public function uninstall() */ public function registerHookAndSetToTop($hookName) { - return $this->registerHook($hookName) && $this->updatePosition((int) Hook::getIdByName($hookName), 0); + return $this->registerHook($hookName) && $this->updatePosition((int) Hook::getIdByName($hookName), false); } public function hookDashboardZoneOne($params) @@ -211,7 +214,7 @@ private static function _removeDirectory($dir) * @param string $domain * @param string $locale */ - public function trans($id, array $parameters = array(), $domain = null, $locale = null) + public function trans($id, array $parameters = [], $domain = null, $locale = null) { require_once _PS_ROOT_DIR_ . '/modules/autoupgrade/classes/UpgradeTools/Translator.php'; diff --git a/classes/AjaxResponse.php b/classes/AjaxResponse.php index 86b8c25e3..c9a08f3e9 100644 --- a/classes/AjaxResponse.php +++ b/classes/AjaxResponse.php @@ -59,7 +59,7 @@ class AjaxResponse /** * @var array Params to send (upgrade conf, details on the work to do ...) */ - private $nextParams = array(); + private $nextParams = []; /** * Request format of the data to return. @@ -93,7 +93,7 @@ public function __construct(State $state, Logger $logger) */ public function getResponse() { - $return = array( + $return = [ 'error' => $this->error, 'stepDone' => $this->stepDone, 'next' => $this->next, @@ -104,12 +104,12 @@ public function getResponse() 'nextParams' => array_merge( $this->nextParams, $this->state->export(), - array( + [ 'typeResult' => self::RESPONSE_FORMAT, 'config' => $this->upgradeConfiguration->toArray(), - ) + ] ), - ); + ]; return $return; } diff --git a/classes/BackupFinder.php b/classes/BackupFinder.php index d688b14b6..8f8bf1b0e 100644 --- a/classes/BackupFinder.php +++ b/classes/BackupFinder.php @@ -79,7 +79,7 @@ private function buildBackupList() */ private function getBackupDbAvailable($backupPath) { - $array = array(); + $array = []; $files = scandir($backupPath); @@ -99,7 +99,7 @@ private function getBackupDbAvailable($backupPath) */ private function getBackupFilesAvailable($backupPath) { - $array = array(); + $array = []; $files = scandir($backupPath); foreach ($files as $file) { diff --git a/classes/ChannelInfo.php b/classes/ChannelInfo.php index 26e8c0840..2663020a4 100644 --- a/classes/ChannelInfo.php +++ b/classes/ChannelInfo.php @@ -31,7 +31,7 @@ class ChannelInfo { - private $info = array(); + private $info = []; /** * @var string @@ -48,7 +48,7 @@ class ChannelInfo public function __construct(Upgrader $upgrader, UpgradeConfiguration $config, $channel) { $this->channel = $channel; - $publicChannels = array('minor', 'major', 'rc', 'beta', 'alpha'); + $publicChannels = ['minor', 'major', 'rc', 'beta', 'alpha']; preg_match('#([0-9]+\.[0-9]+)(?:\.[0-9]+){1,2}#', _PS_VERSION_, $matches); $upgrader->branch = $matches[1]; @@ -56,12 +56,12 @@ public function __construct(Upgrader $upgrader, UpgradeConfiguration $config, $c if (in_array($channel, $publicChannels)) { if ($channel == 'private' && !$config->get('private_allow_major')) { - $upgrader->checkPSVersion(false, array('private', 'minor')); + $upgrader->checkPSVersion(false, ['private', 'minor']); } else { - $upgrader->checkPSVersion(false, array('minor')); + $upgrader->checkPSVersion(false, ['minor']); } - $this->info = array( + $this->info = [ 'branch' => $upgrader->branch, 'available' => $upgrader->available, 'version_num' => $upgrader->version_num, @@ -69,7 +69,7 @@ public function __construct(Upgrader $upgrader, UpgradeConfiguration $config, $c 'link' => $upgrader->link, 'md5' => $upgrader->md5, 'changelog' => $upgrader->changelog, - ); + ]; return; } @@ -77,12 +77,12 @@ public function __construct(Upgrader $upgrader, UpgradeConfiguration $config, $c switch ($channel) { case 'private': if (!$config->get('private_allow_major')) { - $upgrader->checkPSVersion(false, array('private', 'minor')); + $upgrader->checkPSVersion(false, ['private', 'minor']); } else { - $upgrader->checkPSVersion(false, array('minor')); + $upgrader->checkPSVersion(false, ['minor']); } - $this->info = array( + $this->info = [ 'available' => $upgrader->available, 'branch' => $upgrader->branch, 'version_num' => $upgrader->version_num, @@ -90,14 +90,14 @@ public function __construct(Upgrader $upgrader, UpgradeConfiguration $config, $c 'link' => $config->get('private_release_link'), 'md5' => $config->get('private_release_md5'), 'changelog' => $upgrader->changelog, - ); + ]; break; case 'archive': case 'directory': - $this->info = array( + $this->info = [ 'available' => true, - ); + ]; break; } } diff --git a/classes/ErrorHandler.php b/classes/ErrorHandler.php index 0f87f5283..b4215447a 100644 --- a/classes/ErrorHandler.php +++ b/classes/ErrorHandler.php @@ -57,9 +57,9 @@ public function __construct(Logger $logger) public function enable() { error_reporting(E_ALL); - set_error_handler(array($this, 'errorHandler')); - set_exception_handler(array($this, 'exceptionHandler')); - register_shutdown_function(array($this, 'fatalHandler')); + set_error_handler([$this, 'errorHandler']); + set_exception_handler([$this, 'exceptionHandler']); + register_shutdown_function([$this, 'fatalHandler']); } /** @@ -120,7 +120,7 @@ public function fatalHandler() { $lastError = error_get_last(); $trace = isset($lastError['backtrace']) ? var_export($lastError['backtrace'], true) : null; - if ($lastError && in_array($lastError['type'], array(E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR), true)) { + if ($lastError && in_array($lastError['type'], [E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR], true)) { $this->report($lastError['file'], $lastError['line'], Logger::CRITICAL, $lastError['message'], $trace, true); } } @@ -134,12 +134,12 @@ public function fatalHandler() */ public function generateJsonLog($log) { - return json_encode(array( + return json_encode([ 'nextQuickInfo' => $this->logger->getInfos(), - 'nextErrors' => array_merge($this->logger->getErrors(), array($log)), + 'nextErrors' => array_merge($this->logger->getErrors(), [$log]), 'error' => true, 'next' => 'error', - )); + ]); } /** diff --git a/classes/Log/LegacyLogger.php b/classes/Log/LegacyLogger.php index ccebaf83d..32a07f27a 100644 --- a/classes/Log/LegacyLogger.php +++ b/classes/Log/LegacyLogger.php @@ -33,8 +33,8 @@ */ class LegacyLogger extends Logger { - protected $normalMessages = array(); - protected $severeMessages = array(); + protected $normalMessages = []; + protected $severeMessages = []; protected $lastInfo = ''; /** @@ -83,7 +83,7 @@ public function getLastInfo() /** * {@inheritdoc} */ - public function log($level, $message, array $context = array()) + public function log($level, $message, array $context = []) { if (empty($message)) { return; diff --git a/classes/Log/Logger.php b/classes/Log/Logger.php index df24b581f..e23edf757 100644 --- a/classes/Log/Logger.php +++ b/classes/Log/Logger.php @@ -41,7 +41,7 @@ abstract class Logger implements LoggerInterface const ALERT = 7; const EMERGENCY = 8; - protected static $levels = array( + protected static $levels = [ self::DEBUG => 'DEBUG', self::INFO => 'INFO', self::NOTICE => 'NOTICE', @@ -50,44 +50,44 @@ abstract class Logger implements LoggerInterface self::CRITICAL => 'CRITICAL', self::ALERT => 'ALERT', self::EMERGENCY => 'EMERGENCY', - ); + ]; - public function alert($message, array $context = array()) + public function alert($message, array $context = []) { $this->log(self::ALERT, $message, $context); } - public function critical($message, array $context = array()) + public function critical($message, array $context = []) { $this->log(self::CRITICAL, $message, $context); } - public function debug($message, array $context = array()) + public function debug($message, array $context = []) { $this->log(self::DEBUG, $message, $context); } - public function emergency($message, array $context = array()) + public function emergency($message, array $context = []) { $this->log(self::EMERGENCY, $message, $context); } - public function error($message, array $context = array()) + public function error($message, array $context = []) { $this->log(self::ERROR, $message, $context); } - public function info($message, array $context = array()) + public function info($message, array $context = []) { $this->log(self::INFO, $message, $context); } - public function notice($message, array $context = array()) + public function notice($message, array $context = []) { $this->log(self::NOTICE, $message, $context); } - public function warning($message, array $context = array()) + public function warning($message, array $context = []) { $this->log(self::WARNING, $message, $context); } @@ -100,7 +100,7 @@ public function warning($message, array $context = array()) */ public function getErrors() { - return array(); + return []; } /** @@ -111,7 +111,7 @@ public function getErrors() */ public function getInfos() { - return array(); + return []; } /** diff --git a/classes/Log/LoggerInterface.php b/classes/Log/LoggerInterface.php index a27d1319b..2d68f9dd3 100644 --- a/classes/Log/LoggerInterface.php +++ b/classes/Log/LoggerInterface.php @@ -31,7 +31,7 @@ interface LoggerInterface * @param string $message * @param array $context */ - public function emergency($message, array $context = array()); + public function emergency($message, array $context = []); /** * Action must be taken immediately. @@ -42,7 +42,7 @@ public function emergency($message, array $context = array()); * @param string $message * @param array $context */ - public function alert($message, array $context = array()); + public function alert($message, array $context = []); /** * Critical conditions. @@ -52,7 +52,7 @@ public function alert($message, array $context = array()); * @param string $message * @param array $context */ - public function critical($message, array $context = array()); + public function critical($message, array $context = []); /** * Runtime errors that do not require immediate action but should typically @@ -61,7 +61,7 @@ public function critical($message, array $context = array()); * @param string $message * @param array $context */ - public function error($message, array $context = array()); + public function error($message, array $context = []); /** * Exceptional occurrences that are not errors. @@ -72,7 +72,7 @@ public function error($message, array $context = array()); * @param string $message * @param array $context */ - public function warning($message, array $context = array()); + public function warning($message, array $context = []); /** * Normal but significant events. @@ -80,7 +80,7 @@ public function warning($message, array $context = array()); * @param string $message * @param array $context */ - public function notice($message, array $context = array()); + public function notice($message, array $context = []); /** * Interesting events. @@ -90,7 +90,7 @@ public function notice($message, array $context = array()); * @param string $message * @param array $context */ - public function info($message, array $context = array()); + public function info($message, array $context = []); /** * Detailed debug information. @@ -98,7 +98,7 @@ public function info($message, array $context = array()); * @param string $message * @param array $context */ - public function debug($message, array $context = array()); + public function debug($message, array $context = []); /** * Logs with an arbitrary level. @@ -107,5 +107,5 @@ public function debug($message, array $context = array()); * @param string $message * @param array $context */ - public function log($level, $message, array $context = array()); + public function log($level, $message, array $context = []); } diff --git a/classes/Log/StreamedLogger.php b/classes/Log/StreamedLogger.php index e93909faf..7c02f3f05 100644 --- a/classes/Log/StreamedLogger.php +++ b/classes/Log/StreamedLogger.php @@ -75,7 +75,7 @@ public function isFiltered($level) /** * {@inherit}. */ - public function log($level, $message, array $context = array()) + public function log($level, $message, array $context = []) { if (empty($message)) { return; diff --git a/classes/Parameters/FileConfigurationStorage.php b/classes/Parameters/FileConfigurationStorage.php index d982c1355..ed9eb1f3e 100644 --- a/classes/Parameters/FileConfigurationStorage.php +++ b/classes/Parameters/FileConfigurationStorage.php @@ -63,7 +63,7 @@ public function __construct($path) public function load($fileName = '') { $configFilePath = $this->configPath . $fileName; - $config = array(); + $config = []; if (file_exists($configFilePath)) { $config = @unserialize(base64_decode(Tools14::file_get_contents($configFilePath))); @@ -96,7 +96,7 @@ public function save($config, $fileName) */ public function getFilesList() { - $files = array(); + $files = []; foreach (UpgradeFileNames::$tmp_files as $file) { $files[$file] = $this->getFilePath(constant('PrestaShop\\Module\\AutoUpgrade\\Parameters\\UpgradeFileNames::' . $file)); } diff --git a/classes/Parameters/UpgradeConfiguration.php b/classes/Parameters/UpgradeConfiguration.php index a0986d172..61324057d 100644 --- a/classes/Parameters/UpgradeConfiguration.php +++ b/classes/Parameters/UpgradeConfiguration.php @@ -39,12 +39,12 @@ class UpgradeConfiguration extends ArrayCollection * * @var array */ - protected $performanceValues = array( - 'loopFiles' => array(400, 800, 1600), // files - 'loopTime' => array(6, 12, 25), // seconds - 'maxBackupFileSize' => array(15728640, 31457280, 62914560), // bytes - 'maxWrittenAllowed' => array(4194304, 8388608, 16777216), // bytes - ); + protected $performanceValues = [ + 'loopFiles' => [400, 800, 1600], // files + 'loopTime' => [6, 12, 25], // seconds + 'maxBackupFileSize' => [15728640, 31457280, 62914560], // bytes + 'maxWrittenAllowed' => [4194304, 8388608, 16777216], // bytes + ]; /** * Get the name of the new release archive. @@ -164,7 +164,7 @@ public function shouldUpdateRTLFiles() return (bool) $this->get('PS_AUTOUP_UPDATE_RTL_FILES'); } - public function merge(array $array = array()) + public function merge(array $array = []) { foreach ($array as $key => $value) { $this->set($key, $value); diff --git a/classes/Parameters/UpgradeConfigurationStorage.php b/classes/Parameters/UpgradeConfigurationStorage.php index 8fac28f8e..b16ac802f 100644 --- a/classes/Parameters/UpgradeConfigurationStorage.php +++ b/classes/Parameters/UpgradeConfigurationStorage.php @@ -65,7 +65,7 @@ public function save($config, $configFileName) public function getDefaultData() { - return array( + return [ 'PS_AUTOUP_PERFORMANCE' => 1, 'PS_AUTOUP_CUSTOM_MOD_DESACT' => 1, 'PS_AUTOUP_UPDATE_DEFAULT_THEME' => 1, @@ -75,6 +75,6 @@ public function getDefaultData() 'PS_AUTOUP_KEEP_IMAGES' => 1, 'channel' => Upgrader::DEFAULT_CHANNEL, 'archive.filename' => Upgrader::DEFAULT_FILENAME, - ); + ]; } } diff --git a/classes/Parameters/UpgradeFileNames.php b/classes/Parameters/UpgradeFileNames.php index b2cd1deca..bb8167c4f 100644 --- a/classes/Parameters/UpgradeFileNames.php +++ b/classes/Parameters/UpgradeFileNames.php @@ -142,7 +142,7 @@ class UpgradeFileNames * * @var array */ - public static $tmp_files = array( + public static $tmp_files = [ 'QUERIES_TO_UPGRADE_LIST', // used ? 'FILES_TO_UPGRADE_LIST', 'FILES_DIFF_LIST', @@ -154,5 +154,5 @@ class UpgradeFileNames 'FILES_FROM_ARCHIVE_LIST', 'MAILS_CUSTOM_LIST', 'TRANSLATION_FILES_CUSTOM_LIST', - ); + ]; } diff --git a/classes/PrestashopConfiguration.php b/classes/PrestashopConfiguration.php index 7af6952b2..d5fc75d1a 100644 --- a/classes/PrestashopConfiguration.php +++ b/classes/PrestashopConfiguration.php @@ -33,7 +33,7 @@ class PrestashopConfiguration { // Variables used for cache private $moduleVersion; - private $allowed_array = array(); + private $allowed_array = []; // Variables from main class private $autoupgradeDir; @@ -72,11 +72,11 @@ public function getPrestaShopVersion() if (defined('_PS_VERSION_')) { return _PS_VERSION_; } - $files = array( + $files = [ $this->psRootDir . '/config/settings.inc.php', $this->psRootDir . '/config/autoload.php', $this->psRootDir . '/app/AppKernel.php', - ); + ]; foreach ($files as $file) { if (!file_exists($file)) { continue; @@ -110,7 +110,7 @@ public function checkAutoupgradeLastVersion($extAutoupgradeLastVersion) */ protected function getRootWritableDetails() { - $result = array(); + $result = []; // Root directory permissions cannot be checked recursively anymore, it takes too much time $result['root_writable'] = ConfigurationTest::test_dir('/', false, $report); $result['root_writable_report'] = $report ? $report : true; // Avoid null in the array as it makes the shop non-compliant @@ -127,7 +127,7 @@ protected function getRootWritableDetails() */ public function findPrestaShopVersionInFile($content) { - $matches = array(); + $matches = []; // Example: define('_PS_VERSION_', '1.7.3.4'); if (1 === preg_match("/define\([\"']_PS_VERSION_[\"'], [\"'](?[0-9.]+)[\"']\)/", $content, $matches)) { return $matches['version']; diff --git a/classes/State.php b/classes/State.php index 440a19a4a..58002609e 100644 --- a/classes/State.php +++ b/classes/State.php @@ -38,7 +38,7 @@ class State private $backupDbFilename; private $restoreName; private $restoreFilesFilename; - private $restoreDbFilenames = array(); + private $restoreDbFilenames = []; // STEP BackupDb private $backup_lines; @@ -73,13 +73,13 @@ class State * * @var array */ - private $installedLanguagesIso = array(); + private $installedLanguagesIso = []; /** * modules_addons is an array of array(id_addons => name_module). * * @var array */ - private $modules_addons = array(); + private $modules_addons = []; /** * @var bool Determining if all steps went totally successfully @@ -123,16 +123,16 @@ public function export() public function initDefault(Upgrader $upgrader, $prodRootDir, $version) { - $postData = http_build_query(array( + $postData = http_build_query([ 'action' => 'native', 'iso_code' => 'all', 'method' => 'listing', 'version' => $this->getInstallVersion(), - )); + ]); $xml_local = $prodRootDir . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'modules_native_addons.xml'; $xml = $upgrader->getApiAddons($xml_local, $postData, true); - $modules_addons = array(); + $modules_addons = []; if (is_object($xml)) { foreach ($xml as $mod) { $modules_addons[(string) $mod->id] = (string) $mod->name; diff --git a/classes/TaskRunner/AbstractTask.php b/classes/TaskRunner/AbstractTask.php index 2895314fc..2b14e0c5e 100644 --- a/classes/TaskRunner/AbstractTask.php +++ b/classes/TaskRunner/AbstractTask.php @@ -37,7 +37,7 @@ abstract class AbstractTask * value = the next step you want instead * example : public static $skipAction = array(); */ - public static $skipAction = array(); + public static $skipAction = []; /** * @var Logger @@ -58,7 +58,7 @@ abstract class AbstractTask protected $stepDone; protected $status; protected $error; - protected $nextParams = array(); + protected $nextParams = []; protected $next; public function __construct(UpgradeContainer $container) @@ -111,7 +111,7 @@ private function checkTaskMayRun() $currentAction = get_class($this); if (isset(self::$skipAction[$currentAction])) { $this->next = self::$skipAction[$currentAction]; - $this->logger->info($this->translator->trans('Action %s skipped', array($currentAction), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Action %s skipped', [$currentAction], 'Modules.Autoupgrade.Admin')); } } diff --git a/classes/TaskRunner/Miscellaneous/CheckFilesVersion.php b/classes/TaskRunner/Miscellaneous/CheckFilesVersion.php index 9ade951fb..0738ef388 100644 --- a/classes/TaskRunner/Miscellaneous/CheckFilesVersion.php +++ b/classes/TaskRunner/Miscellaneous/CheckFilesVersion.php @@ -44,28 +44,28 @@ public function run() if ($changedFileList === false) { $this->nextParams['status'] = 'error'; - $this->nextParams['msg'] = $this->translator->trans('Unable to check files for the installed version of PrestaShop.', array(), 'Modules.Autoupgrade.Admin'); + $this->nextParams['msg'] = $this->translator->trans('Unable to check files for the installed version of PrestaShop.', [], 'Modules.Autoupgrade.Admin'); return; } - foreach (array('core', 'translation', 'mail') as $type) { + foreach (['core', 'translation', 'mail'] as $type) { if (!isset($changedFileList[$type])) { - $changedFileList[$type] = array(); + $changedFileList[$type] = []; } } if ($upgrader->isAuthenticPrestashopVersion() === true) { $this->nextParams['status'] = 'ok'; - $this->nextParams['msg'] = $this->translator->trans('Core files are ok', array(), 'Modules.Autoupgrade.Admin'); + $this->nextParams['msg'] = $this->translator->trans('Core files are ok', [], 'Modules.Autoupgrade.Admin'); } else { $this->nextParams['status'] = 'warn'; $this->nextParams['msg'] = $this->translator->trans( '%modificationscount% file modifications have been detected, including %coremodifications% from core and native modules:', - array( + [ '%modificationscount%' => count(array_merge($changedFileList['core'], $changedFileList['mail'], $changedFileList['translation'])), '%coremodifications%' => count($changedFileList['core']), - ), + ], 'Modules.Autoupgrade.Admin' ); } diff --git a/classes/TaskRunner/Miscellaneous/CompareReleases.php b/classes/TaskRunner/Miscellaneous/CompareReleases.php index 84a7a189d..d452b2b77 100644 --- a/classes/TaskRunner/Miscellaneous/CompareReleases.php +++ b/classes/TaskRunner/Miscellaneous/CompareReleases.php @@ -27,8 +27,8 @@ namespace PrestaShop\Module\AutoUpgrade\TaskRunner\Miscellaneous; -use PrestaShop\Module\AutoUpgrade\TaskRunner\AbstractTask; use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeFileNames; +use PrestaShop\Module\AutoUpgrade\TaskRunner\AbstractTask; /** * get the list of all modified and deleted files between current version @@ -54,9 +54,9 @@ public function run() $upgrader->branch = $matches[1]; $upgrader->channel = $channel; if ($this->container->getUpgradeConfiguration()->get('channel') == 'private' && !$this->container->getUpgradeConfiguration()->get('private_allow_major')) { - $upgrader->checkPSVersion(false, array('private', 'minor')); + $upgrader->checkPSVersion(false, ['private', 'minor']); } else { - $upgrader->checkPSVersion(false, array('minor')); + $upgrader->checkPSVersion(false, ['minor']); } $version = $upgrader->version_num; } @@ -70,13 +70,13 @@ public function run() if (count($diffFileList) > 0) { $this->nextParams['msg'] = $this->translator->trans( '%modifiedfiles% files will be modified, %deletedfiles% files will be deleted (if they are found).', - array( + [ '%modifiedfiles%' => count($diffFileList['modified']), '%deletedfiles%' => count($diffFileList['deleted']), - ), + ], 'Modules.Autoupgrade.Admin'); } else { - $this->nextParams['msg'] = $this->translator->trans('No diff files found.', array(), 'Modules.Autoupgrade.Admin'); + $this->nextParams['msg'] = $this->translator->trans('No diff files found.', [], 'Modules.Autoupgrade.Admin'); } $this->nextParams['result'] = $diffFileList; } diff --git a/classes/TaskRunner/Miscellaneous/UpdateConfig.php b/classes/TaskRunner/Miscellaneous/UpdateConfig.php index f5b230269..7b9212765 100644 --- a/classes/TaskRunner/Miscellaneous/UpdateConfig.php +++ b/classes/TaskRunner/Miscellaneous/UpdateConfig.php @@ -27,10 +27,10 @@ namespace PrestaShop\Module\AutoUpgrade\TaskRunner\Miscellaneous; -use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeFileNames; -use PrestaShop\Module\AutoUpgrade\UpgradeContainer; use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeConfigurationStorage; +use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeFileNames; use PrestaShop\Module\AutoUpgrade\TaskRunner\AbstractTask; +use PrestaShop\Module\AutoUpgrade\UpgradeContainer; use PrestaShop\Module\AutoUpgrade\Upgrader; /** @@ -52,7 +52,7 @@ public function run() // Was coming from AdminSelfUpgrade::currentParams before $configurationData = $this->getConfigurationData(); - $config = array(); + $config = []; // update channel if (isset($configurationData['channel'])) { $config['channel'] = $configurationData['channel']; @@ -71,20 +71,20 @@ public function run() $file = $configurationData['archive_prestashop']; if (!file_exists($this->container->getProperty(UpgradeContainer::DOWNLOAD_PATH) . DIRECTORY_SEPARATOR . $file)) { $this->error = true; - $this->logger->info($this->translator->trans('File %s does not exist. Unable to select that channel.', array($file), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('File %s does not exist. Unable to select that channel.', [$file], 'Modules.Autoupgrade.Admin')); return false; } if (empty($configurationData['archive_num'])) { $this->error = true; - $this->logger->info($this->translator->trans('Version number is missing. Unable to select that channel.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Version number is missing. Unable to select that channel.', [], 'Modules.Autoupgrade.Admin')); return false; } $xmlFile = $configurationData['archive_xml']; if (!empty($xmlFile) && !file_exists($this->container->getProperty(UpgradeContainer::DOWNLOAD_PATH) . DIRECTORY_SEPARATOR . $xmlFile)) { $this->error = true; - $this->logger->info($this->translator->trans('File %s does not exist. Unable to select that channel', array($xmlFile), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('File %s does not exist. Unable to select that channel', [$xmlFile], 'Modules.Autoupgrade.Admin')); return false; } @@ -93,13 +93,13 @@ public function run() $config['archive.version_num'] = $configurationData['archive_num']; $config['archive.xml'] = $configurationData['archive_xml']; // $config['archive_name'] = $request['archive_name']; - $this->logger->info($this->translator->trans('Upgrade process will use archive.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Upgrade process will use archive.', [], 'Modules.Autoupgrade.Admin')); } if (isset($configurationData['directory_num'])) { $config['channel'] = 'directory'; if (empty($configurationData['directory_num']) || strpos($configurationData['directory_num'], '.') === false) { $this->error = true; - $this->logger->info($this->translator->trans('Version number is missing. Unable to select that channel.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Version number is missing. Unable to select that channel.', [], 'Modules.Autoupgrade.Admin')); return false; } @@ -115,7 +115,7 @@ public function run() if (!$this->writeConfig($config)) { $this->error = true; - $this->logger->info($this->translator->trans('Error on saving configuration', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Error on saving configuration', [], 'Modules.Autoupgrade.Admin')); } } @@ -144,7 +144,7 @@ protected function getCLIParams() protected function getRequestParams() { - return empty($_REQUEST['params']) ? array() : $_REQUEST['params']; + return empty($_REQUEST['params']) ? [] : $_REQUEST['params']; } /** @@ -164,7 +164,7 @@ private function writeConfig($config) } $this->container->getUpgradeConfiguration()->merge($config); - $this->logger->info($this->translator->trans('Configuration successfully updated.', array(), 'Modules.Autoupgrade.Admin') . ' ' . $this->translator->trans('This page will now be reloaded and the module will check if a new version is available.', array(), 'Modules.Autoupgrade.Admin') . ''); + $this->logger->info($this->translator->trans('Configuration successfully updated.', [], 'Modules.Autoupgrade.Admin') . ' ' . $this->translator->trans('This page will now be reloaded and the module will check if a new version is available.', [], 'Modules.Autoupgrade.Admin') . ''); return (new UpgradeConfigurationStorage($this->container->getProperty(UpgradeContainer::WORKSPACE_PATH) . DIRECTORY_SEPARATOR))->save($this->container->getUpgradeConfiguration(), UpgradeFileNames::CONFIG_FILENAME); } diff --git a/classes/TaskRunner/Rollback/NoRollbackFound.php b/classes/TaskRunner/Rollback/NoRollbackFound.php index 4e8853f4e..00a199826 100644 --- a/classes/TaskRunner/Rollback/NoRollbackFound.php +++ b/classes/TaskRunner/Rollback/NoRollbackFound.php @@ -33,7 +33,7 @@ class NoRollbackFound extends AbstractTask { public function run() { - $this->logger->info($this->translator->trans('Nothing to restore', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Nothing to restore', [], 'Modules.Autoupgrade.Admin')); $this->next = 'rollbackComplete'; } } diff --git a/classes/TaskRunner/Rollback/RestoreDb.php b/classes/TaskRunner/Rollback/RestoreDb.php index 42771142e..a62afcdc4 100644 --- a/classes/TaskRunner/Rollback/RestoreDb.php +++ b/classes/TaskRunner/Rollback/RestoreDb.php @@ -29,8 +29,8 @@ use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeFileNames; use PrestaShop\Module\AutoUpgrade\TaskRunner\AbstractTask; -use PrestaShop\Module\AutoUpgrade\UpgradeTools\Database; use PrestaShop\Module\AutoUpgrade\UpgradeContainer; +use PrestaShop\Module\AutoUpgrade\UpgradeTools\Database; /** * Restores database from backup file. @@ -40,15 +40,15 @@ class RestoreDb extends AbstractTask public function run() { $databaseTools = new Database($this->container->getDb()); - $ignore_stats_table = array( + $ignore_stats_table = [ _DB_PREFIX_ . 'connections', _DB_PREFIX_ . 'connections_page', _DB_PREFIX_ . 'connections_source', _DB_PREFIX_ . 'guest', _DB_PREFIX_ . 'statssearch', - ); + ]; $startTime = time(); - $listQuery = array(); + $listQuery = []; // deal with running backup rest if exist if (file_exists($this->container->getProperty(UpgradeContainer::WORKSPACE_PATH) . DIRECTORY_SEPARATOR . UpgradeFileNames::QUERIES_TO_RESTORE_LIST)) { @@ -63,7 +63,7 @@ public function run() if (!preg_match('#auto-backupdb_([0-9]{6})_#', $currentDbFilename, $match)) { $this->next = 'error'; $this->error = true; - $this->logger->error($this->translator->trans('%s: File format does not match.', array($currentDbFilename), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('%s: File format does not match.', [$currentDbFilename], 'Modules.Autoupgrade.Admin')); return false; } @@ -72,15 +72,15 @@ public function run() $dot_pos = strrpos($currentDbFilename, '.'); $fileext = substr($currentDbFilename, $dot_pos + 1); - $requests = array(); + $requests = []; $content = ''; $this->logger->debug($this->translator->trans( 'Opening backup database file %filename% in %extension% mode', - array( + [ '%filename%' => $currentDbFilename, '%extension%' => $fileext, - ), + ], 'Modules.Autoupgrade.Admin' )); @@ -116,7 +116,7 @@ public function run() $currentDbFilename = ''; if (empty($content)) { - $this->logger->error($this->translator->trans('Database backup is empty.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('Database backup is empty.', [], 'Modules.Autoupgrade.Admin')); $this->next = 'rollback'; return false; @@ -130,7 +130,7 @@ public function run() // Get tables before backup if ($this->container->getState()->getDbStep() == '1') { - $tables_after_restore = array(); + $tables_after_restore = []; foreach ($listQuery as $q) { if (preg_match('/`(?' . _DB_PREFIX_ . '[a-zA-Z0-9_-]+)`/', $q, $matches)) { if (isset($matches['table'])) { @@ -165,14 +165,14 @@ public function run() if ($restoreDbFilenamesCount) { $this->logger->info($this->translator->trans( 'Database restoration file %filename% done. %filescount% file(s) left...', - array( + [ '%filename%' => $this->container->getState()->getDbStep(), '%filescount%' => $restoreDbFilenamesCount, - ), + ], 'Modules.Autoupgrade.Admin' )); } else { - $this->logger->info($this->translator->trans('Database restoration file %1$s done.', array($this->container->getState()->getDbStep()), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Database restoration file %1$s done.', [$this->container->getState()->getDbStep()], 'Modules.Autoupgrade.Admin')); } $this->stepDone = true; @@ -181,7 +181,7 @@ public function run() if ($restoreDbFilenamesCount === 0) { $this->next = 'rollbackComplete'; - $this->logger->info($this->translator->trans('Database has been restored.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Database has been restored.', [], 'Modules.Autoupgrade.Admin')); $databaseTools->cleanTablesAfterBackup($this->container->getFileConfigurationStorage()->load(UpgradeFileNames::DB_TABLES_TO_CLEAN_LIST)); $this->container->getFileConfigurationStorage()->clean(UpgradeFileNames::DB_TABLES_TO_CLEAN_LIST); @@ -201,8 +201,8 @@ public function run() if (is_array($listQuery)) { $listQuery = array_unshift($listQuery, $query); } - $this->logger->error($this->translator->trans('[SQL ERROR]', array(), 'Modules.Autoupgrade.Admin') . ' ' . $query . ' - ' . $this->container->getDb()->getMsgError()); - $this->logger->info($this->translator->trans('Error during database restoration', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('[SQL ERROR]', [], 'Modules.Autoupgrade.Admin') . ' ' . $query . ' - ' . $this->container->getDb()->getMsgError()); + $this->logger->info($this->translator->trans('Error during database restoration', [], 'Modules.Autoupgrade.Admin')); $this->next = 'error'; $this->error = true; unlink($this->container->getProperty(UpgradeContainer::WORKSPACE_PATH) . DIRECTORY_SEPARATOR . UpgradeFileNames::QUERIES_TO_RESTORE_LIST); @@ -230,10 +230,10 @@ public function run() $this->next = 'restoreDb'; $this->logger->info($this->translator->trans( '%numberqueries% queries left for file %filename%...', - array( + [ '%numberqueries%' => $queries_left, '%filename%' => $this->container->getState()->getDbStep(), - ), + ], 'Modules.Autoupgrade.Admin' )); unset($query, $listQuery); @@ -241,7 +241,7 @@ public function run() $this->stepDone = true; $this->status = 'ok'; $this->next = 'rollbackComplete'; - $this->logger->info($this->translator->trans('Database restoration done.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Database restoration done.', [], 'Modules.Autoupgrade.Admin')); $databaseTools->cleanTablesAfterBackup($this->container->getFileConfigurationStorage()->load(UpgradeFileNames::DB_TABLES_TO_CLEAN_LIST)); $this->container->getFileConfigurationStorage()->clean(UpgradeFileNames::DB_TABLES_TO_CLEAN_LIST); diff --git a/classes/TaskRunner/Rollback/RestoreFiles.php b/classes/TaskRunner/Rollback/RestoreFiles.php index 9e7b45f63..ff54ffa36 100644 --- a/classes/TaskRunner/Rollback/RestoreFiles.php +++ b/classes/TaskRunner/Rollback/RestoreFiles.php @@ -52,7 +52,7 @@ public function run() $this->container->getFileConfigurationStorage()->save($fromArchive, UpgradeFileNames::FILES_FROM_ARCHIVE_LIST); // get list of files to remove $toRemove = $this->container->getFilesystemAdapter()->listFilesToRemove(); - $toRemoveOnly = array(); + $toRemoveOnly = []; // let's reverse the array in order to make possible to rmdir // remove fullpath. This will be added later in the loop. @@ -66,17 +66,17 @@ public function run() } } - $this->logger->debug($this->translator->trans('%s file(s) will be removed before restoring the backup files.', array(count($toRemoveOnly)), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('%s file(s) will be removed before restoring the backup files.', [count($toRemoveOnly)], 'Modules.Autoupgrade.Admin')); $this->container->getFileConfigurationStorage()->save($toRemoveOnly, UpgradeFileNames::FILES_TO_REMOVE_LIST); if (empty($fromArchive) || empty($toRemove)) { if (empty($fromArchive)) { - $this->logger->error($this->translator->trans('[ERROR] Backup file %s does not exist.', array(UpgradeFileNames::FILES_FROM_ARCHIVE_LIST), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('[ERROR] Backup file %s does not exist.', [UpgradeFileNames::FILES_FROM_ARCHIVE_LIST], 'Modules.Autoupgrade.Admin')); } if (empty($toRemove)) { - $this->logger->error($this->translator->trans('[ERROR] File "%s" does not exist.', array(UpgradeFileNames::FILES_TO_REMOVE_LIST), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('[ERROR] File "%s" does not exist.', [UpgradeFileNames::FILES_TO_REMOVE_LIST], 'Modules.Autoupgrade.Admin')); } - $this->logger->info($this->translator->trans('Unable to remove upgraded files.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Unable to remove upgraded files.', [], 'Modules.Autoupgrade.Admin')); $this->next = 'error'; return false; @@ -92,10 +92,10 @@ public function run() $this->next = 'error'; $this->logger->error($this->translator->trans( 'Unable to extract file %filename% into directory %directoryname%.', - array( + [ '%filename%' => $filepath, '%directoryname%' => $destExtract, - ), + ], 'Modules.Autoupgrade.Admin' )); @@ -109,8 +109,8 @@ public function run() } $this->next = 'restoreDb'; - $this->logger->debug($this->translator->trans('Files restored.', array(), 'Modules.Autoupgrade.Admin')); - $this->logger->info($this->translator->trans('Files restored. Now restoring database...', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('Files restored.', [], 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Files restored. Now restoring database...', [], 'Modules.Autoupgrade.Admin')); return true; } diff --git a/classes/TaskRunner/Rollback/Rollback.php b/classes/TaskRunner/Rollback/Rollback.php index 7f050bdca..3c19e40fc 100644 --- a/classes/TaskRunner/Rollback/Rollback.php +++ b/classes/TaskRunner/Rollback/Rollback.php @@ -59,7 +59,7 @@ public function run() } if (!is_file($this->container->getProperty(UpgradeContainer::BACKUP_PATH) . DIRECTORY_SEPARATOR . $this->container->getState()->getRestoreFilesFilename())) { $this->next = 'error'; - $this->logger->error($this->translator->trans('[ERROR] File %s is missing: unable to restore files. Operation aborted.', array($this->container->getState()->getRestoreFilesFilename()), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('[ERROR] File %s is missing: unable to restore files. Operation aborted.', [$this->container->getState()->getRestoreFilesFilename()], 'Modules.Autoupgrade.Admin')); return false; } @@ -75,13 +75,13 @@ public function run() $this->container->getState()->setRestoreDbFilenames($restoreDbFilenames); if (count($restoreDbFilenames) == 0) { $this->next = 'error'; - $this->logger->error($this->translator->trans('[ERROR] No backup database files found: it would be impossible to restore the database. Operation aborted.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('[ERROR] No backup database files found: it would be impossible to restore the database. Operation aborted.', [], 'Modules.Autoupgrade.Admin')); return false; } $this->next = 'restoreFiles'; - $this->logger->info($this->translator->trans('Restoring files ...', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Restoring files ...', [], 'Modules.Autoupgrade.Admin')); // remove tmp files related to restoreFiles if (file_exists($this->container->getProperty(UpgradeContainer::WORKSPACE_PATH) . DIRECTORY_SEPARATOR . UpgradeFileNames::FILES_FROM_ARCHIVE_LIST)) { unlink($this->container->getProperty(UpgradeContainer::WORKSPACE_PATH) . DIRECTORY_SEPARATOR . UpgradeFileNames::FILES_FROM_ARCHIVE_LIST); diff --git a/classes/TaskRunner/Rollback/RollbackComplete.php b/classes/TaskRunner/Rollback/RollbackComplete.php index 0d51b8477..64566e05d 100644 --- a/classes/TaskRunner/Rollback/RollbackComplete.php +++ b/classes/TaskRunner/Rollback/RollbackComplete.php @@ -36,7 +36,7 @@ class RollbackComplete extends AbstractTask { public function run() { - $this->logger->info($this->translator->trans('Restoration process done. Congratulations! You can now reactivate your shop.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Restoration process done. Congratulations! You can now reactivate your shop.', [], 'Modules.Autoupgrade.Admin')); $this->next = ''; } } diff --git a/classes/TaskRunner/Upgrade/AllUpgradeTasks.php b/classes/TaskRunner/Upgrade/AllUpgradeTasks.php index 6f5ba24e1..9d76a3c71 100644 --- a/classes/TaskRunner/Upgrade/AllUpgradeTasks.php +++ b/classes/TaskRunner/Upgrade/AllUpgradeTasks.php @@ -56,11 +56,11 @@ public function setOptions(array $options) } if (!empty($options['channel'])) { - $this->container->getUpgradeConfiguration()->merge(array( + $this->container->getUpgradeConfiguration()->merge([ 'channel' => $options['channel'], // Switch on default theme if major upgrade (i.e: 1.6 -> 1.7) 'PS_AUTOUP_CHANGE_DEFAULT_THEME' => ($options['channel'] === 'major'), - )); + ]); $this->container->getUpgrader()->channel = $options['channel']; $this->container->getUpgrader()->checkPSVersion(true); } diff --git a/classes/TaskRunner/Upgrade/BackupDb.php b/classes/TaskRunner/Upgrade/BackupDb.php index 2b785cdd4..4473c23ef 100644 --- a/classes/TaskRunner/Upgrade/BackupDb.php +++ b/classes/TaskRunner/Upgrade/BackupDb.php @@ -27,9 +27,9 @@ namespace PrestaShop\Module\AutoUpgrade\TaskRunner\Upgrade; -use PrestaShop\Module\AutoUpgrade\Tools14; use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeFileNames; use PrestaShop\Module\AutoUpgrade\TaskRunner\AbstractTask; +use PrestaShop\Module\AutoUpgrade\Tools14; use PrestaShop\Module\AutoUpgrade\UpgradeContainer; class BackupDb extends AbstractTask @@ -39,7 +39,7 @@ public function run() if (!$this->container->getUpgradeConfiguration()->get('PS_AUTOUP_BACKUP')) { $this->stepDone = true; $this->container->getState()->setDbStep(0); - $this->logger->info($this->translator->trans('Database backup skipped. Now upgrading files...', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Database backup skipped. Now upgrading files...', [], 'Modules.Autoupgrade.Admin')); $this->next = 'upgradeFiles'; return true; @@ -49,7 +49,7 @@ public function run() $relative_backup_path = str_replace(_PS_ROOT_DIR_, '', $this->container->getProperty(UpgradeContainer::BACKUP_PATH)); $report = ''; if (!\ConfigurationTest::test_dir($relative_backup_path, false, $report)) { - $this->logger->error($this->translator->trans('Backup directory is not writable (%path%).', array('%path%' => $this->container->getProperty(UpgradeContainer::BACKUP_PATH)), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('Backup directory is not writable (%path%).', ['%path%' => $this->container->getProperty(UpgradeContainer::BACKUP_PATH)], 'Modules.Autoupgrade.Admin')); $this->next = 'error'; $this->error = true; @@ -61,11 +61,11 @@ public function run() $start_time = time(); $time_elapsed = 0; - $ignore_stats_table = array(_DB_PREFIX_ . 'connections', + $ignore_stats_table = [_DB_PREFIX_ . 'connections', _DB_PREFIX_ . 'connections_page', _DB_PREFIX_ . 'connections_source', _DB_PREFIX_ . 'guest', - _DB_PREFIX_ . 'statssearch', ); + _DB_PREFIX_ . 'statssearch', ]; // INIT LOOP if (!$this->container->getFileConfigurationStorage()->exists(UpgradeFileNames::DB_TABLES_TO_BACKUP_LIST)) { @@ -127,7 +127,7 @@ public function run() if (file_exists($backupfile)) { $this->next = 'error'; $this->error = true; - $this->logger->error($this->translator->trans('Backup file %s already exists. Operation aborted.', array($backupfile), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('Backup file %s already exists. Operation aborted.', [$backupfile], 'Modules.Autoupgrade.Admin')); } if (function_exists('bzopen')) { @@ -141,10 +141,10 @@ public function run() } if ($fp === false) { - $this->logger->error($this->translator->trans('Unable to create backup database file %s.', array(addslashes($backupfile)), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('Unable to create backup database file %s.', [addslashes($backupfile)], 'Modules.Autoupgrade.Admin')); $this->next = 'error'; $this->error = true; - $this->logger->info($this->translator->trans('Error during database backup.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Error during database backup.', [], 'Modules.Autoupgrade.Admin')); return false; } @@ -168,8 +168,8 @@ public function run() if (file_exists($backupfile)) { unlink($backupfile); } - $this->logger->error($this->translator->trans('An error occurred while backing up. Unable to obtain the schema of %s', array($table), 'Modules.Autoupgrade.Admin')); - $this->logger->info($this->translator->trans('Error during database backup.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('An error occurred while backing up. Unable to obtain the schema of %s', [$table], 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Error during database backup.', [], 'Modules.Autoupgrade.Admin')); $this->next = 'error'; $this->error = true; @@ -246,7 +246,7 @@ public function run() } ++$found; $time_elapsed = time() - $start_time; - $this->logger->debug($this->translator->trans('%s table has been saved.', array($table), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('%s table has been saved.', [$table], 'Modules.Autoupgrade.Admin')); } while (($time_elapsed < $timeAllowed) && ($written < $this->container->getUpgradeConfiguration()->getMaxSizeToWritePerCall())); // end of loop @@ -259,10 +259,10 @@ public function run() $this->container->getFileConfigurationStorage()->save($tablesToBackup, UpgradeFileNames::DB_TABLES_TO_BACKUP_LIST); if (count($tablesToBackup) > 0) { - $this->logger->debug($this->translator->trans('%s tables have been saved.', array($found), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('%s tables have been saved.', [$found], 'Modules.Autoupgrade.Admin')); $this->next = 'backupDb'; $this->stepDone = false; - $this->logger->info($this->translator->trans('Database backup: %s table(s) left...', array(count($tablesToBackup)), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Database backup: %s table(s) left...', [count($tablesToBackup)], 'Modules.Autoupgrade.Admin')); return true; } @@ -270,8 +270,8 @@ public function run() if (file_exists($backupfile)) { unlink($backupfile); } - $this->logger->error($this->translator->trans('No valid tables were found to back up. Backup of file %s canceled.', array($backupfile), 'Modules.Autoupgrade.Admin')); - $this->logger->info($this->translator->trans('Error during database backup for file %s.', array($backupfile), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('No valid tables were found to back up. Backup of file %s canceled.', [$backupfile], 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Error during database backup for file %s.', [$backupfile], 'Modules.Autoupgrade.Admin')); $this->error = true; return false; @@ -281,13 +281,13 @@ public function run() ->setBackupLines(null) ->setBackupTable(null); if ($found) { - $this->logger->info($this->translator->trans('%s tables have been saved.', array($found), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('%s tables have been saved.', [$found], 'Modules.Autoupgrade.Admin')); } $this->stepDone = true; // reset dbStep at the end of this step $this->container->getState()->setDbStep(0); - $this->logger->info($this->translator->trans('Database backup done in filename %s. Now upgrading files...', array($this->container->getState()->getBackupName()), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Database backup done in filename %s. Now upgrading files...', [$this->container->getState()->getBackupName()], 'Modules.Autoupgrade.Admin')); $this->next = 'upgradeFiles'; return true; diff --git a/classes/TaskRunner/Upgrade/BackupFiles.php b/classes/TaskRunner/Upgrade/BackupFiles.php index 4b2f0263e..0d8ac72ff 100644 --- a/classes/TaskRunner/Upgrade/BackupFiles.php +++ b/classes/TaskRunner/Upgrade/BackupFiles.php @@ -48,8 +48,8 @@ public function run() if (empty($backupFilesFilename)) { $this->next = 'error'; $this->error = true; - $this->logger->info($this->translator->trans('Error during backupFiles', array(), 'Modules.Autoupgrade.Admin')); - $this->logger->error($this->translator->trans('[ERROR] backupFiles filename has not been set', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Error during backupFiles', [], 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('[ERROR] backupFiles filename has not been set', [], 'Modules.Autoupgrade.Admin')); return false; } @@ -60,7 +60,7 @@ public function run() $filesToBackup = array_reverse($filesToBackup); $this->container->getFileConfigurationStorage()->save($filesToBackup, UpgradeFileNames::FILES_TO_BACKUP_LIST); if (count($filesToBackup)) { - $this->logger->debug($this->translator->trans('%s Files to backup.', array(count($filesToBackup)), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('%s Files to backup.', [count($filesToBackup)], 'Modules.Autoupgrade.Admin')); } // delete old backup, create new @@ -68,19 +68,19 @@ public function run() unlink($this->container->getProperty(UpgradeContainer::BACKUP_PATH) . DIRECTORY_SEPARATOR . $backupFilesFilename); } - $this->logger->debug($this->translator->trans('Backup files initialized in %s', array($backupFilesFilename), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('Backup files initialized in %s', [$backupFilesFilename], 'Modules.Autoupgrade.Admin')); } $filesToBackup = $this->container->getFileConfigurationStorage()->load(UpgradeFileNames::FILES_TO_BACKUP_LIST); $this->next = 'backupFiles'; if (is_array($filesToBackup) && count($filesToBackup)) { - $this->logger->info($this->translator->trans('Backup files in progress. %d files left', array(count($filesToBackup)), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Backup files in progress. %d files left', [count($filesToBackup)], 'Modules.Autoupgrade.Admin')); $this->stepDone = false; $res = $this->container->getZipAction()->compress($filesToBackup, $this->container->getProperty(UpgradeContainer::BACKUP_PATH) . DIRECTORY_SEPARATOR . $backupFilesFilename); if (!$res) { $this->next = 'error'; - $this->logger->info($this->translator->trans('Unable to open archive', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Unable to open archive', [], 'Modules.Autoupgrade.Admin')); return false; } @@ -91,8 +91,8 @@ public function run() $this->stepDone = true; $this->status = 'ok'; $this->next = 'backupDb'; - $this->logger->debug($this->translator->trans('All files have been added to archive.', array(), 'Modules.Autoupgrade.Admin')); - $this->logger->info($this->translator->trans('All files saved. Now backing up database', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('All files have been added to archive.', [], 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('All files saved. Now backing up database', [], 'Modules.Autoupgrade.Admin')); } } } diff --git a/classes/TaskRunner/Upgrade/CleanDatabase.php b/classes/TaskRunner/Upgrade/CleanDatabase.php index d07d68035..ecb2ae182 100644 --- a/classes/TaskRunner/Upgrade/CleanDatabase.php +++ b/classes/TaskRunner/Upgrade/CleanDatabase.php @@ -46,6 +46,6 @@ public function run() $this->status = 'ok'; $this->next = 'upgradeComplete'; - $this->logger->info($this->translator->trans('The database has been cleaned.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('The database has been cleaned.', [], 'Modules.Autoupgrade.Admin')); } } diff --git a/classes/TaskRunner/Upgrade/Download.php b/classes/TaskRunner/Upgrade/Download.php index d26096bce..b1c898658 100644 --- a/classes/TaskRunner/Upgrade/Download.php +++ b/classes/TaskRunner/Upgrade/Download.php @@ -27,8 +27,8 @@ namespace PrestaShop\Module\AutoUpgrade\TaskRunner\Upgrade; -use PrestaShop\Module\AutoUpgrade\UpgradeContainer; use PrestaShop\Module\AutoUpgrade\TaskRunner\AbstractTask; +use PrestaShop\Module\AutoUpgrade\UpgradeContainer; use PrestaShop\Module\AutoUpgrade\UpgradeTools\FilesystemAdapter; /** @@ -39,7 +39,7 @@ class Download extends AbstractTask public function run() { if (!\ConfigurationTest::test_fopen() && !\ConfigurationTest::test_curl()) { - $this->logger->error($this->translator->trans('You need allow_url_fopen or cURL enabled for automatic download to work. You can also manually upload it in filepath %s.', array($this->container->getFilePath()), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('You need allow_url_fopen or cURL enabled for automatic download to work. You can also manually upload it in filepath %s.', [$this->container->getFilePath()], 'Modules.Autoupgrade.Admin')); $this->next = 'error'; return; @@ -51,20 +51,20 @@ public function run() $upgrader->channel = $this->container->getUpgradeConfiguration()->get('channel'); $upgrader->branch = $matches[1]; if ($this->container->getUpgradeConfiguration()->get('channel') == 'private' && !$this->container->getUpgradeConfiguration()->get('private_allow_major')) { - $upgrader->checkPSVersion(false, array('private', 'minor')); + $upgrader->checkPSVersion(false, ['private', 'minor']); } else { - $upgrader->checkPSVersion(false, array('minor')); + $upgrader->checkPSVersion(false, ['minor']); } if ($upgrader->channel == 'private') { $upgrader->link = $this->container->getUpgradeConfiguration()->get('private_release_link'); $upgrader->md5 = $this->container->getUpgradeConfiguration()->get('private_release_md5'); } - $this->logger->debug($this->translator->trans('Downloading from %s', array($upgrader->link), 'Modules.Autoupgrade.Admin')); - $this->logger->debug($this->translator->trans('File will be saved in %s', array($this->container->getFilePath()), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('Downloading from %s', [$upgrader->link], 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('File will be saved in %s', [$this->container->getFilePath()], 'Modules.Autoupgrade.Admin')); if (file_exists($this->container->getProperty(UpgradeContainer::DOWNLOAD_PATH))) { FilesystemAdapter::deleteDirectory($this->container->getProperty(UpgradeContainer::DOWNLOAD_PATH), false); - $this->logger->debug($this->translator->trans('Download directory has been emptied', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('Download directory has been emptied', [], 'Modules.Autoupgrade.Admin')); } $report = ''; $relative_download_path = str_replace(_PS_ROOT_DIR_, '', $this->container->getProperty(UpgradeContainer::DOWNLOAD_PATH)); @@ -74,23 +74,23 @@ public function run() $md5file = md5_file(realpath($this->container->getProperty(UpgradeContainer::ARCHIVE_FILEPATH))); if ($md5file == $upgrader->md5) { $this->next = 'unzip'; - $this->logger->debug($this->translator->trans('Download complete.', array(), 'Modules.Autoupgrade.Admin')); - $this->logger->info($this->translator->trans('Download complete. Now extracting...', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('Download complete.', [], 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Download complete. Now extracting...', [], 'Modules.Autoupgrade.Admin')); } else { - $this->logger->error($this->translator->trans('Download complete but MD5 sum does not match (%s).', array($md5file), 'Modules.Autoupgrade.Admin')); - $this->logger->info($this->translator->trans('Download complete but MD5 sum does not match (%s). Operation aborted.', array($md5file), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('Download complete but MD5 sum does not match (%s).', [$md5file], 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Download complete but MD5 sum does not match (%s). Operation aborted.', [$md5file], 'Modules.Autoupgrade.Admin')); $this->next = 'error'; } } else { if ($upgrader->channel == 'private') { - $this->logger->error($this->translator->trans('Error during download. The private key may be incorrect.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('Error during download. The private key may be incorrect.', [], 'Modules.Autoupgrade.Admin')); } else { - $this->logger->error($this->translator->trans('Error during download', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('Error during download', [], 'Modules.Autoupgrade.Admin')); } $this->next = 'error'; } } else { - $this->logger->error($this->translator->trans('Download directory %s is not writable.', array($this->container->getProperty(UpgradeContainer::DOWNLOAD_PATH)), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('Download directory %s is not writable.', [$this->container->getProperty(UpgradeContainer::DOWNLOAD_PATH)], 'Modules.Autoupgrade.Admin')); $this->next = 'error'; } } diff --git a/classes/TaskRunner/Upgrade/RemoveSamples.php b/classes/TaskRunner/Upgrade/RemoveSamples.php index 58ac9a330..d9d71cd96 100644 --- a/classes/TaskRunner/Upgrade/RemoveSamples.php +++ b/classes/TaskRunner/Upgrade/RemoveSamples.php @@ -47,32 +47,32 @@ public function run() // This part runs at the first call of this step if (null === $removeList) { if (!$this->container->getFilesystemAdapter()->isReleaseValid($latestPath)) { - $this->logger->error($this->translator->trans('Could not assert the folder %s contains a valid PrestaShop release, exiting.', array($latestPath), 'Modules.Autoupgrade.Admin')); - $this->logger->error($this->translator->trans('A file may be missing, or the release is stored in a subfolder by mistake.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('Could not assert the folder %s contains a valid PrestaShop release, exiting.', [$latestPath], 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('A file may be missing, or the release is stored in a subfolder by mistake.', [], 'Modules.Autoupgrade.Admin')); $this->next = 'error'; return; } - $removeList = $this->container->getFilesystemAdapter()->listSampleFilesFromArray(array( - array('path' => $latestPath . '/img/c', 'filter' => '.jpg'), - array('path' => $latestPath . '/img/cms', 'filter' => '.jpg'), - array('path' => $latestPath . '/img/l', 'filter' => '.jpg'), - array('path' => $latestPath . '/img/m', 'filter' => '.jpg'), - array('path' => $latestPath . '/img/os', 'filter' => '.jpg'), - array('path' => $latestPath . '/img/p', 'filter' => '.jpg'), - array('path' => $latestPath . '/img/s', 'filter' => '.jpg'), - array('path' => $latestPath . '/img/scenes', 'filter' => '.jpg'), - array('path' => $latestPath . '/img/st', 'filter' => '.jpg'), - array('path' => $latestPath . '/img/su', 'filter' => '.jpg'), - array('path' => $latestPath . '/img', 'filter' => '404.gif'), - array('path' => $latestPath . '/img', 'filter' => 'favicon.ico'), - array('path' => $latestPath . '/img', 'filter' => 'logo.jpg'), - array('path' => $latestPath . '/img', 'filter' => 'logo_stores.gif'), - array('path' => $latestPath . '/modules/editorial', 'filter' => 'homepage_logo.jpg'), + $removeList = $this->container->getFilesystemAdapter()->listSampleFilesFromArray([ + ['path' => $latestPath . '/img/c', 'filter' => '.jpg'], + ['path' => $latestPath . '/img/cms', 'filter' => '.jpg'], + ['path' => $latestPath . '/img/l', 'filter' => '.jpg'], + ['path' => $latestPath . '/img/m', 'filter' => '.jpg'], + ['path' => $latestPath . '/img/os', 'filter' => '.jpg'], + ['path' => $latestPath . '/img/p', 'filter' => '.jpg'], + ['path' => $latestPath . '/img/s', 'filter' => '.jpg'], + ['path' => $latestPath . '/img/scenes', 'filter' => '.jpg'], + ['path' => $latestPath . '/img/st', 'filter' => '.jpg'], + ['path' => $latestPath . '/img/su', 'filter' => '.jpg'], + ['path' => $latestPath . '/img', 'filter' => '404.gif'], + ['path' => $latestPath . '/img', 'filter' => 'favicon.ico'], + ['path' => $latestPath . '/img', 'filter' => 'logo.jpg'], + ['path' => $latestPath . '/img', 'filter' => 'logo_stores.gif'], + ['path' => $latestPath . '/modules/editorial', 'filter' => 'homepage_logo.jpg'], // remove all override present in the archive - array('path' => $latestPath . '/override', 'filter' => '.php'), - )); + ['path' => $latestPath . '/override', 'filter' => '.php'], + ]); $this->container->getState()->setRemoveList( array_reverse($removeList) @@ -81,7 +81,7 @@ public function run() if (count($removeList)) { $this->logger->debug( $this->translator->trans('Starting to remove %s sample files', - array(count($removeList)), 'Modules.Autoupgrade.Admin')); + [count($removeList)], 'Modules.Autoupgrade.Admin')); } } @@ -94,10 +94,10 @@ public function run() $this->next = 'error'; $this->logger->error($this->translator->trans( 'Error while removing item %itemname%, %itemscount% items left.', - array( + [ '%itemname%' => $file, '%itemscount%' => count($removeList), - ), + ], 'Modules.Autoupgrade.Admin' )); @@ -107,10 +107,10 @@ public function run() if (count($removeList)) { $this->logger->debug($this->translator->trans( '%itemname% item removed. %itemscount% items left.', - array( + [ '%itemname%' => $file, '%itemscount%' => count($removeList), - ), + ], 'Modules.Autoupgrade.Admin' )); } @@ -123,7 +123,7 @@ public function run() $this->logger->info( $this->translator->trans( 'All sample files removed. Now backing up files.', - array(), + [], 'Modules.Autoupgrade.Admin' )); @@ -132,7 +132,7 @@ public function run() $this->logger->info( $this->translator->trans( 'All sample files removed. Backup process skipped. Now upgrading files.', - array(), + [], 'Modules.Autoupgrade.Admin' )); } diff --git a/classes/TaskRunner/Upgrade/Unzip.php b/classes/TaskRunner/Upgrade/Unzip.php index db82c8096..1e0bb574b 100644 --- a/classes/TaskRunner/Upgrade/Unzip.php +++ b/classes/TaskRunner/Upgrade/Unzip.php @@ -28,9 +28,9 @@ namespace PrestaShop\Module\AutoUpgrade\TaskRunner\Upgrade; use PrestaShop\Module\AutoUpgrade\TaskRunner\AbstractTask; -use Symfony\Component\Filesystem\Filesystem; use PrestaShop\Module\AutoUpgrade\UpgradeContainer; use PrestaShop\Module\AutoUpgrade\UpgradeTools\FilesystemAdapter; +use Symfony\Component\Filesystem\Filesystem; /** * extract chosen version into $this->upgradeClass->latestPath directory. @@ -44,12 +44,12 @@ public function run() if (file_exists($destExtract)) { FilesystemAdapter::deleteDirectory($destExtract, false); - $this->logger->debug($this->translator->trans('"/latest" directory has been emptied', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('"/latest" directory has been emptied', [], 'Modules.Autoupgrade.Admin')); } $relative_extract_path = str_replace(_PS_ROOT_DIR_, '', $destExtract); $report = ''; if (!\ConfigurationTest::test_dir($relative_extract_path, false, $report)) { - $this->logger->error($this->translator->trans('Extraction directory %s is not writable.', array($destExtract), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('Extraction directory %s is not writable.', [$destExtract], 'Modules.Autoupgrade.Admin')); $this->next = 'error'; $this->error = true; @@ -63,10 +63,10 @@ public function run() $this->error = true; $this->logger->info($this->translator->trans( 'Unable to extract %filepath% file into %destination% folder...', - array( + [ '%filepath%' => $filepath, '%destination%' => $destExtract, - ), + ], 'Modules.Autoupgrade.Admin' )); @@ -85,10 +85,10 @@ public function run() $this->next = 'error'; $this->logger->info($this->translator->trans( 'Unable to extract %filepath% file into %destination% folder...', - array( + [ '%filepath%' => $filepath, '%destination%' => $destExtract, - ), + ], 'Modules.Autoupgrade.Admin' )); @@ -100,7 +100,7 @@ public function run() if (!is_dir($zipSubfolder)) { $this->next = 'error'; $this->logger->error( - $this->translator->trans('No prestashop/ folder found in the ZIP file. Aborting.', array(), 'Modules.Autoupgrade.Admin')); + $this->translator->trans('No prestashop/ folder found in the ZIP file. Aborting.', [], 'Modules.Autoupgrade.Admin')); return; } @@ -116,7 +116,7 @@ public function run() // Unsetting to force listing $this->container->getState()->setRemoveList(null); $this->next = 'removeSamples'; - $this->logger->info($this->translator->trans('File extraction complete. Removing sample files...', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('File extraction complete. Removing sample files...', [], 'Modules.Autoupgrade.Admin')); @unlink($newZip); diff --git a/classes/TaskRunner/Upgrade/UpgradeComplete.php b/classes/TaskRunner/Upgrade/UpgradeComplete.php index c3875fa89..bf7a18177 100644 --- a/classes/TaskRunner/Upgrade/UpgradeComplete.php +++ b/classes/TaskRunner/Upgrade/UpgradeComplete.php @@ -27,10 +27,10 @@ namespace PrestaShop\Module\AutoUpgrade\TaskRunner\Upgrade; +use Configuration; use PrestaShop\Module\AutoUpgrade\TaskRunner\AbstractTask; -use PrestaShop\Module\AutoUpgrade\UpgradeTools\FilesystemAdapter; use PrestaShop\Module\AutoUpgrade\UpgradeContainer; -use Configuration; +use PrestaShop\Module\AutoUpgrade\UpgradeTools\FilesystemAdapter; /** * Ends the upgrade process and displays the success message. @@ -40,22 +40,22 @@ class UpgradeComplete extends AbstractTask public function run() { $this->logger->info($this->container->getState()->getWarningExists() ? - $this->translator->trans('Upgrade process done, but some warnings have been found.', array(), 'Modules.Autoupgrade.Admin') : - $this->translator->trans('Upgrade process done. Congratulations! You can now reactivate your shop.', array(), 'Modules.Autoupgrade.Admin') + $this->translator->trans('Upgrade process done, but some warnings have been found.', [], 'Modules.Autoupgrade.Admin') : + $this->translator->trans('Upgrade process done. Congratulations! You can now reactivate your shop.', [], 'Modules.Autoupgrade.Admin') ); $this->next = ''; if ($this->container->getUpgradeConfiguration()->get('channel') != 'archive' && file_exists($this->container->getFilePath()) && unlink($this->container->getFilePath())) { - $this->logger->debug($this->translator->trans('%s removed', array($this->container->getFilePath()), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('%s removed', [$this->container->getFilePath()], 'Modules.Autoupgrade.Admin')); } elseif (is_file($this->container->getFilePath())) { - $this->logger->debug('' . $this->translator->trans('Please remove %s by FTP', array($this->container->getFilePath()), 'Modules.Autoupgrade.Admin') . ''); + $this->logger->debug('' . $this->translator->trans('Please remove %s by FTP', [$this->container->getFilePath()], 'Modules.Autoupgrade.Admin') . ''); } if ($this->container->getUpgradeConfiguration()->get('channel') != 'directory' && file_exists($this->container->getProperty(UpgradeContainer::LATEST_PATH)) && FilesystemAdapter::deleteDirectory($this->container->getProperty(UpgradeContainer::LATEST_PATH))) { - $this->logger->debug($this->translator->trans('%s removed', array($this->container->getProperty(UpgradeContainer::LATEST_PATH)), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('%s removed', [$this->container->getProperty(UpgradeContainer::LATEST_PATH)], 'Modules.Autoupgrade.Admin')); } elseif (is_dir($this->container->getProperty(UpgradeContainer::LATEST_PATH))) { - $this->logger->debug('' . $this->translator->trans('Please remove %s by FTP', array($this->container->getProperty(UpgradeContainer::LATEST_PATH)), 'Modules.Autoupgrade.Admin') . ''); + $this->logger->debug('' . $this->translator->trans('Please remove %s by FTP', [$this->container->getProperty(UpgradeContainer::LATEST_PATH)], 'Modules.Autoupgrade.Admin') . ''); } // Reinit config diff --git a/classes/TaskRunner/Upgrade/UpgradeDb.php b/classes/TaskRunner/Upgrade/UpgradeDb.php index 38ddba423..c26ca0f9e 100644 --- a/classes/TaskRunner/Upgrade/UpgradeDb.php +++ b/classes/TaskRunner/Upgrade/UpgradeDb.php @@ -45,14 +45,14 @@ public function run() foreach ($e->getQuickInfos() as $log) { $this->logger->debug($log); } - $this->logger->error($this->translator->trans('Error during database upgrade. You may need to restore your database.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('Error during database upgrade. You may need to restore your database.', [], 'Modules.Autoupgrade.Admin')); $this->logger->error($e->getMessage()); return false; } $this->next = 'upgradeModules'; $this->stepDone = true; - $this->logger->info($this->translator->trans('Database upgraded. Now upgrading your Addons modules...', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Database upgraded. Now upgrading your Addons modules...', [], 'Modules.Autoupgrade.Admin')); return true; } diff --git a/classes/TaskRunner/Upgrade/UpgradeFiles.php b/classes/TaskRunner/Upgrade/UpgradeFiles.php index 82bc2d1c2..f22251861 100644 --- a/classes/TaskRunner/Upgrade/UpgradeFiles.php +++ b/classes/TaskRunner/Upgrade/UpgradeFiles.php @@ -27,8 +27,8 @@ namespace PrestaShop\Module\AutoUpgrade\TaskRunner\Upgrade; -use PrestaShop\Module\AutoUpgrade\TaskRunner\AbstractTask; use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeFileNames; +use PrestaShop\Module\AutoUpgrade\TaskRunner\AbstractTask; use PrestaShop\Module\AutoUpgrade\UpgradeContainer; use PrestaShop\Module\AutoUpgrade\UpgradeTools\FilesystemAdapter; @@ -50,7 +50,7 @@ public function run() $filesToUpgrade = $this->container->getFileConfigurationStorage()->load(UpgradeFileNames::FILES_TO_UPGRADE_LIST); if (!is_array($filesToUpgrade)) { $this->next = 'error'; - $this->logger->error($this->translator->trans('filesToUpgrade is not an array', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('filesToUpgrade is not an array', [], 'Modules.Autoupgrade.Admin')); return false; } @@ -62,7 +62,7 @@ public function run() if (file_exists(UpgradeFileNames::FILES_TO_UPGRADE_LIST)) { unlink(UpgradeFileNames::FILES_TO_UPGRADE_LIST); } - $this->logger->info($this->translator->trans('All files upgraded. Now upgrading database...', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('All files upgraded. Now upgrading database...', [], 'Modules.Autoupgrade.Admin')); $this->stepDone = true; break; } @@ -71,13 +71,13 @@ public function run() if (!$this->upgradeThisFile($file)) { // put the file back to the begin of the list $this->next = 'error'; - $this->logger->error($this->translator->trans('Error when trying to upgrade file %s.', array($file), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('Error when trying to upgrade file %s.', [$file], 'Modules.Autoupgrade.Admin')); break; } } $this->container->getFileConfigurationStorage()->save($filesToUpgrade, UpgradeFileNames::FILES_TO_UPGRADE_LIST); if (count($filesToUpgrade) > 0) { - $this->logger->info($this->translator->trans('%s files left to upgrade.', array(count($filesToUpgrade)), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('%s files left to upgrade.', [count($filesToUpgrade)], 'Modules.Autoupgrade.Admin')); $this->stepDone = false; } @@ -94,10 +94,10 @@ public function run() */ protected function listFilesToUpgrade($dir) { - $list = array(); + $list = []; if (!is_dir($dir)) { - $this->logger->error($this->translator->trans('[ERROR] %s does not exist or is not a directory.', array($dir), 'Modules.Autoupgrade.Admin')); - $this->logger->info($this->translator->trans('Nothing has been extracted. It seems the unzipping step has been skipped.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('[ERROR] %s does not exist or is not a directory.', [$dir], 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Nothing has been extracted. It seems the unzipping step has been skipped.', [], 'Modules.Autoupgrade.Admin')); $this->next = 'error'; return false; @@ -113,8 +113,8 @@ protected function listFilesToUpgrade($dir) 'upgrade', $this->container->getProperty(UpgradeContainer::LATEST_PATH) )) { - if (!in_array($file, array('.', '..'))) { - $this->logger->debug($this->translator->trans('File %s is preserved', array($file), 'Modules.Autoupgrade.Admin')); + if (!in_array($file, ['.', '..'])) { + $this->logger->debug($this->translator->trans('File %s is preserved', [$file], 'Modules.Autoupgrade.Admin')); } continue; } @@ -141,7 +141,7 @@ public function upgradeThisFile($file) $dest = $this->destUpgradePath . $file; if ($this->container->getFilesystemAdapter()->isFileSkipped($file, $dest, 'upgrade')) { - $this->logger->debug($this->translator->trans('%s ignored', array($file), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('%s ignored', [$file], 'Modules.Autoupgrade.Admin')); return true; } @@ -149,21 +149,21 @@ public function upgradeThisFile($file) // if $dest is not a directory (that can happen), just remove that file if (!is_dir($dest) && file_exists($dest)) { unlink($dest); - $this->logger->debug($this->translator->trans('[WARNING] File %1$s has been deleted.', array($file), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('[WARNING] File %1$s has been deleted.', [$file], 'Modules.Autoupgrade.Admin')); } if (!file_exists($dest)) { if (mkdir($dest)) { - $this->logger->debug($this->translator->trans('Directory %1$s created.', array($file), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('Directory %1$s created.', [$file], 'Modules.Autoupgrade.Admin')); return true; } else { $this->next = 'error'; - $this->logger->error($this->translator->trans('Error while creating directory %s.', array($dest), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('Error while creating directory %s.', [$dest], 'Modules.Autoupgrade.Admin')); return false; } } else { // directory already exists - $this->logger->debug($this->translator->trans('Directory %s already exists.', array($file), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('Directory %s already exists.', [$file], 'Modules.Autoupgrade.Admin')); return true; } @@ -172,13 +172,13 @@ public function upgradeThisFile($file) if ($translationAdapter->isTranslationFile($file) && file_exists($dest)) { $type_trad = $translationAdapter->getTranslationFileType($file); if ($translationAdapter->mergeTranslationFile($orig, $dest, $type_trad)) { - $this->logger->info($this->translator->trans('[TRANSLATION] The translation files have been merged into file %s.', array($dest), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('[TRANSLATION] The translation files have been merged into file %s.', [$dest], 'Modules.Autoupgrade.Admin')); return true; } $this->logger->warning($this->translator->trans( '[TRANSLATION] The translation files have not been merged into file %filename%. Switch to copy %filename%.', - array('%filename%' => $dest), + ['%filename%' => $dest], 'Modules.Autoupgrade.Admin' )); } @@ -186,12 +186,12 @@ public function upgradeThisFile($file) // upgrade exception were above. This part now process all files that have to be upgraded (means to modify or to remove) // delete before updating (and this will also remove deprecated files) if (copy($orig, $dest)) { - $this->logger->debug($this->translator->trans('Copied %1$s.', array($file), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('Copied %1$s.', [$file], 'Modules.Autoupgrade.Admin')); return true; } else { $this->next = 'error'; - $this->logger->error($this->translator->trans('Error while copying file %s', array($file), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('Error while copying file %s', [$file], 'Modules.Autoupgrade.Admin')); return false; } @@ -223,8 +223,8 @@ protected function warmUp() { $newReleasePath = $this->container->getProperty(UpgradeContainer::LATEST_PATH); if (!$this->container->getFilesystemAdapter()->isReleaseValid($newReleasePath)) { - $this->logger->error($this->translator->trans('Could not assert the folder %s contains a valid PrestaShop release, exiting.', array($newReleasePath), 'Modules.Autoupgrade.Admin')); - $this->logger->error($this->translator->trans('A file may be missing, or the release is stored in a subfolder by mistake.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('Could not assert the folder %s contains a valid PrestaShop release, exiting.', [$newReleasePath], 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('A file may be missing, or the release is stored in a subfolder by mistake.', [], 'Modules.Autoupgrade.Admin')); $this->next = 'error'; return false; @@ -244,7 +244,7 @@ protected function warmUp() // get files differences (previously generated) $admin_dir = trim(str_replace($this->container->getProperty(UpgradeContainer::PS_ROOT_PATH), '', $this->container->getProperty(UpgradeContainer::PS_ADMIN_PATH)), DIRECTORY_SEPARATOR); $filepath_list_diff = $this->container->getProperty(UpgradeContainer::WORKSPACE_PATH) . DIRECTORY_SEPARATOR . UpgradeFileNames::FILES_DIFF_LIST; - $list_files_diff = array(); + $list_files_diff = []; if (file_exists($filepath_list_diff)) { $list_files_diff = $this->container->getFileConfigurationStorage()->load(UpgradeFileNames::FILES_DIFF_LIST); // only keep list of files to delete. The modified files will be listed with _listFilesToUpgrade @@ -266,7 +266,7 @@ protected function warmUp() // also add files to remove $list_files_to_upgrade = array_reverse(array_merge($list_files_diff, $list_files_to_upgrade)); - $filesToMoveToTheEnd = array( + $filesToMoveToTheEnd = [ DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php', DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'composer' . DIRECTORY_SEPARATOR . 'ClassLoader.php', DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'composer' . DIRECTORY_SEPARATOR . 'autoload_classmap.php', @@ -278,7 +278,7 @@ protected function warmUp() DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'composer' . DIRECTORY_SEPARATOR . 'include_paths.php', DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'composer', DIRECTORY_SEPARATOR . 'vendor', - ); + ]; foreach ($filesToMoveToTheEnd as $file) { if ($key = array_search($file, $list_files_to_upgrade)) { @@ -292,12 +292,12 @@ protected function warmUp() $total_files_to_upgrade = count($list_files_to_upgrade); if ($total_files_to_upgrade == 0) { - $this->logger->error($this->translator->trans('[ERROR] Unable to find files to upgrade.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('[ERROR] Unable to find files to upgrade.', [], 'Modules.Autoupgrade.Admin')); $this->next = 'error'; return false; } - $this->logger->info($this->translator->trans('%s files will be upgraded.', array($total_files_to_upgrade), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('%s files will be upgraded.', [$total_files_to_upgrade], 'Modules.Autoupgrade.Admin')); $this->next = 'upgradeFiles'; $this->stepDone = false; diff --git a/classes/TaskRunner/Upgrade/UpgradeModules.php b/classes/TaskRunner/Upgrade/UpgradeModules.php index e6fb9a057..cf760ffcc 100644 --- a/classes/TaskRunner/Upgrade/UpgradeModules.php +++ b/classes/TaskRunner/Upgrade/UpgradeModules.php @@ -27,11 +27,11 @@ namespace PrestaShop\Module\AutoUpgrade\TaskRunner\Upgrade; -use PrestaShop\Module\AutoUpgrade\UpgradeException; use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeFileNames; use PrestaShop\Module\AutoUpgrade\TaskRunner\AbstractTask; -use PrestaShop\Module\AutoUpgrade\UpgradeTools\FilesystemAdapter; use PrestaShop\Module\AutoUpgrade\UpgradeContainer; +use PrestaShop\Module\AutoUpgrade\UpgradeException; +use PrestaShop\Module\AutoUpgrade\UpgradeTools\FilesystemAdapter; /** * Upgrade all partners modules according to the installed prestashop version. @@ -51,7 +51,7 @@ public function run() if (!is_array($listModules)) { $this->next = 'upgradeComplete'; $this->container->getState()->setWarningExists(true); - $this->logger->error($this->translator->trans('listModules is not an array. No module has been updated.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('listModules is not an array. No module has been updated.', [], 'Modules.Autoupgrade.Admin')); return true; } @@ -64,7 +64,7 @@ public function run() try { $this->logger->debug($this->translator->trans('Upgrading module %module%...', ['%module%' => $module_info['name']], 'Modules.Autoupgrade.Admin')); $this->container->getModuleAdapter()->upgradeModule($module_info['id'], $module_info['name']); - $this->logger->debug($this->translator->trans('The files of module %s have been upgraded.', array($module_info['name']), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('The files of module %s have been upgraded.', [$module_info['name']], 'Modules.Autoupgrade.Admin')); } catch (UpgradeException $e) { $this->handleException($e); if ($e->getSeverity() === UpgradeException::SEVERITY_ERROR) { @@ -80,11 +80,11 @@ public function run() $this->next = 'upgradeModules'; if ($modules_left) { - $this->logger->info($this->translator->trans('%s modules left to upgrade.', array($modules_left), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('%s modules left to upgrade.', [$modules_left], 'Modules.Autoupgrade.Admin')); } $this->stepDone = false; } else { - $modules_to_delete = array( + $modules_to_delete = [ 'backwardcompatibility' => 'Backward Compatibility', 'dibs' => 'Dibs', 'cloudcache' => 'Cloudcache', @@ -93,7 +93,7 @@ public function run() 'dejala' => 'Dejala', 'stripejs' => 'Stripejs', 'blockvariouslinks' => 'Block Various Links', - ); + ]; foreach ($modules_to_delete as $key => $module) { $this->container->getDb()->execute('DELETE ms.*, hm.* @@ -108,19 +108,19 @@ public function run() if (FilesystemAdapter::deleteDirectory($path)) { $this->logger->debug($this->translator->trans( 'The %modulename% module is not compatible with version %version%, it will be removed from your FTP.', - array( + [ '%modulename%' => $module, '%version%' => $this->container->getState()->getInstallVersion(), - ), + ], 'Modules.Autoupgrade.Admin' )); } else { $this->logger->error($this->translator->trans( 'The %modulename% module is not compatible with version %version%, please remove it from your FTP.', - array( + [ '%modulename%' => $module, '%version%' => $this->container->getState()->getInstallVersion(), - ), + ], 'Modules.Autoupgrade.Admin' )); } @@ -130,7 +130,7 @@ public function run() $this->stepDone = true; $this->status = 'ok'; $this->next = 'cleanDatabase'; - $this->logger->info($this->translator->trans('Addons modules files have been upgraded.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Addons modules files have been upgraded.', [], 'Modules.Autoupgrade.Admin')); return true; } @@ -152,7 +152,7 @@ public function warmUp() $total_modules_to_upgrade = count($modulesToUpgrade); if ($total_modules_to_upgrade) { - $this->logger->info($this->translator->trans('%s modules will be upgraded.', array($total_modules_to_upgrade), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('%s modules will be upgraded.', [$total_modules_to_upgrade], 'Modules.Autoupgrade.Admin')); } $this->stepDone = false; diff --git a/classes/TaskRunner/Upgrade/UpgradeNow.php b/classes/TaskRunner/Upgrade/UpgradeNow.php index e114f34a9..bae4f1222 100644 --- a/classes/TaskRunner/Upgrade/UpgradeNow.php +++ b/classes/TaskRunner/Upgrade/UpgradeNow.php @@ -37,7 +37,7 @@ class UpgradeNow extends AbstractTask { public function run() { - $this->logger->info($this->translator->trans('Starting upgrade...', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Starting upgrade...', [], 'Modules.Autoupgrade.Admin')); $this->container->getWorkspace()->createFolders(); @@ -48,14 +48,14 @@ public function run() $upgrader->branch = $matches[1]; $upgrader->channel = $channel; if ($this->container->getUpgradeConfiguration()->get('channel') == 'private' && !$this->container->getUpgradeConfiguration()->get('private_allow_major')) { - $upgrader->checkPSVersion(false, array('private', 'minor')); + $upgrader->checkPSVersion(false, ['private', 'minor']); } else { - $upgrader->checkPSVersion(false, array('minor')); + $upgrader->checkPSVersion(false, ['minor']); } if ($upgrader->isLastVersion()) { $this->next = ''; - $this->logger->info($this->translator->trans('You already have the %s version.', array($upgrader->version_name), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('You already have the %s version.', [$upgrader->version_name], 'Modules.Autoupgrade.Admin')); return; } @@ -64,23 +64,23 @@ public function run() case 'directory': // if channel directory is chosen, we assume it's "ready for use" (samples already removed for example) $this->next = 'removeSamples'; - $this->logger->debug($this->translator->trans('Downloading and unzipping steps have been skipped, upgrade process will now remove sample data.', array(), 'Modules.Autoupgrade.Admin')); - $this->logger->info($this->translator->trans('Shop deactivated. Removing sample files...', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('Downloading and unzipping steps have been skipped, upgrade process will now remove sample data.', [], 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Shop deactivated. Removing sample files...', [], 'Modules.Autoupgrade.Admin')); break; case 'archive': $this->next = 'unzip'; - $this->logger->debug($this->translator->trans('Downloading step has been skipped, upgrade process will now unzip the local archive.', array(), 'Modules.Autoupgrade.Admin')); - $this->logger->info($this->translator->trans('Shop deactivated. Extracting files...', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('Downloading step has been skipped, upgrade process will now unzip the local archive.', [], 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Shop deactivated. Extracting files...', [], 'Modules.Autoupgrade.Admin')); break; default: $this->next = 'download'; - $this->logger->info($this->translator->trans('Shop deactivated. Now downloading... (this can take a while)', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->translator->trans('Shop deactivated. Now downloading... (this can take a while)', [], 'Modules.Autoupgrade.Admin')); if ($upgrader->channel == 'private') { $upgrader->link = $this->container->getUpgradeConfiguration()->get('private_release_link'); $upgrader->md5 = $this->container->getUpgradeConfiguration()->get('private_release_md5'); } - $this->logger->debug($this->translator->trans('Downloaded archive will come from %s', array($upgrader->link), 'Modules.Autoupgrade.Admin')); - $this->logger->debug($this->translator->trans('MD5 hash will be checked against %s', array($upgrader->md5), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('Downloaded archive will come from %s', [$upgrader->link], 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->translator->trans('MD5 hash will be checked against %s', [$upgrader->md5], 'Modules.Autoupgrade.Admin')); } } } diff --git a/classes/Tools14.php b/classes/Tools14.php index e8bc1a2dc..15693eca7 100755 --- a/classes/Tools14.php +++ b/classes/Tools14.php @@ -31,7 +31,7 @@ class Tools14 { - protected static $file_exists_cache = array(); + protected static $file_exists_cache = []; protected static $_forceCompile; protected static $_caching; @@ -527,7 +527,7 @@ public static function displayDate($date, $id_lang, $full = false, $separator = return $date; } if (!Validate::isDate($date) || !Validate::isBool($full)) { - die(self::displayError('Invalid date')); + exit(self::displayError('Invalid date')); } $language = Language::getLanguage((int) $id_lang); @@ -555,7 +555,7 @@ public static function safeOutput($string, $html = false) public static function htmlentitiesUTF8($string, $type = ENT_QUOTES) { if (is_array($string)) { - return array_map(array('Tools', 'htmlentitiesUTF8'), $string); + return array_map(['Tools', 'htmlentitiesUTF8'], $string); } return htmlentities($string, $type, 'utf-8'); @@ -564,7 +564,7 @@ public static function htmlentitiesUTF8($string, $type = ENT_QUOTES) public static function htmlentitiesDecodeUTF8($string) { if (is_array($string)) { - return array_map(array('Tools', 'htmlentitiesDecodeUTF8'), $string); + return array_map(['Tools', 'htmlentitiesDecodeUTF8'], $string); } return html_entity_decode($string, ENT_QUOTES, 'utf-8'); @@ -572,7 +572,7 @@ public static function htmlentitiesDecodeUTF8($string) public static function safePostVars() { - $_POST = array_map(array('Tools', 'htmlentitiesUTF8'), $_POST); + $_POST = array_map(['Tools', 'htmlentitiesUTF8'], $_POST); } /** @@ -647,7 +647,7 @@ public static function dieObject($object, $kill = true) print_r($object); echo '
'; if ($kill) { - die('END'); + exit('END'); } return $object; @@ -937,7 +937,7 @@ public static function getPath($id_category, $path = '', $linkOntheLastItem = fa } elseif ($categoryType === 'CMS') { $category = new CMSCategory((int) ($id_category), (int) ($cookie->id_lang)); if (!Validate::isLoadedObject($category)) { - die(self::displayError()); + exit(self::displayError()); } $categoryLink = $link->getCMSCategoryLink($category); @@ -1024,7 +1024,7 @@ public static function historyc_l($key, $translations) { global $cookie; if (!$translations || !is_array($translations)) { - die(self::displayError()); + exit(self::displayError()); } $iso = strtoupper(Language::getIsoById($cookie->id_lang)); $lang = key_exists($iso, $translations) ? $translations[$iso] : false; @@ -1139,7 +1139,7 @@ public static function truncate($str, $maxLen, $suffix = '...') */ public static function dateYears() { - $tab = array(); + $tab = []; for ($i = date('Y'); $i >= 1900; --$i) { $tab[] = $i; } @@ -1167,7 +1167,7 @@ public static function dateMonths() public static function hourGenerate($hours, $minutes, $seconds) { - return implode(':', array($hours, $minutes, $seconds)); + return implode(':', [$hours, $minutes, $seconds]); } public static function dateFrom($date) @@ -1310,7 +1310,7 @@ public static function getTimezones($select = false) // Multiple select $tmz = Db::getInstance(_PS_USE_SQL_SLAVE_)->s('SELECT * FROM ' . _DB_PREFIX_ . 'timezone'); - $tab = array(); + $tab = []; foreach ($tmz as $timezone) { $tab[$timezone['id_timezone']] = str_replace('_', ' ', $timezone['name']); } @@ -1393,7 +1393,7 @@ public static function file_exists_cache($filename) */ public static function shouldUseFopen($url) { - return in_array(ini_get('allow_url_fopen'), array('On', 'on', '1')) || !preg_match('/^https?:\/\//', $url); + return in_array(ini_get('allow_url_fopen'), ['On', 'on', '1']) || !preg_match('/^https?:\/\//', $url); } public static function file_get_contents($url, $use_include_path = false, $stream_context = null, $curl_timeout = 5) @@ -1402,7 +1402,7 @@ public static function file_get_contents($url, $use_include_path = false, $strea $url = str_replace('https', 'http', $url); } if ($stream_context == null && preg_match('/^https?:\/\//', $url)) { - $stream_context = @stream_context_create(array('http' => array('timeout' => $curl_timeout, 'header' => "User-Agent:MyAgent/1.0\r\n"))); + $stream_context = @stream_context_create(['http' => ['timeout' => $curl_timeout, 'header' => "User-Agent:MyAgent/1.0\r\n"]]); } if (self::shouldUseFopen($url)) { $var = @file_get_contents($url, $use_include_path, $stream_context); @@ -1449,11 +1449,11 @@ public static function minifyHTML($html_content) if (strlen($html_content) > 0) { //set an alphabetical order for args $html_content = preg_replace_callback( - '/(<[a-zA-Z0-9]+)((\s?[a-zA-Z0-9]+=[\"\\\'][^\"\\\']*[\"\\\']\s?)*)>/', array('Tools', 'minifyHTMLpregCallback'), $html_content); + '/(<[a-zA-Z0-9]+)((\s?[a-zA-Z0-9]+=[\"\\\'][^\"\\\']*[\"\\\']\s?)*)>/', ['Tools', 'minifyHTMLpregCallback'], $html_content); require_once _PS_TOOL_DIR_ . 'minify_html/minify_html.class.php'; $html_content = str_replace(chr(194) . chr(160), ' ', $html_content); - $html_content = Minify_HTML::minify($html_content, array('xhtml', 'cssMinifier', 'jsMinifier')); + $html_content = Minify_HTML::minify($html_content, ['xhtml', 'cssMinifier', 'jsMinifier']); if (Configuration::get('PS_HIGH_HTML_THEME_COMPRESSION')) { //$html_content = preg_replace('/"([^\>\s"]*)"/i', '$1', $html_content);//FIXME create a js bug @@ -1506,7 +1506,7 @@ public static function getBrightness($hex) public static function minifyHTMLpregCallback($preg_matches) { - $args = array(); + $args = []; preg_match_all('/[a-zA-Z0-9]+=[\"\\\'][^\"\\\']*[\"\\\']/is', $preg_matches[2], $args); $args = $args[0]; sort($args); @@ -1520,7 +1520,7 @@ public static function packJSinHTML($html_content) if (strlen($html_content) > 0) { $htmlContentCopy = $html_content; $html_content = preg_replace_callback( - '/\\s*(]*?>)([\\s\\S]*?)(<\\/script>)\\s*/i', array('Tools', 'packJSinHTMLpregCallback'), $html_content); + '/\\s*(]*?>)([\\s\\S]*?)(<\\/script>)\\s*/i', ['Tools', 'packJSinHTMLpregCallback'], $html_content); // If the string is too big preg_replace return an error // In this case, we don't compress the content @@ -1572,7 +1572,7 @@ public static function minifyCSS($css_content, $fileuri = false) $current_css_file = $fileuri; if (strlen($css_content) > 0) { $css_content = preg_replace('#/\*.*?\*/#s', '', $css_content); - $css_content = preg_replace_callback('#url\((?:\'|")?([^\)\'"]*)(?:\'|")?\)#s', array('Tools', 'replaceByAbsoluteURL'), $css_content); + $css_content = preg_replace_callback('#url\((?:\'|")?([^\)\'"]*)(?:\'|")?\)#s', ['Tools', 'replaceByAbsoluteURL'], $css_content); $css_content = preg_replace('#\s+#', ' ', $css_content); $css_content = str_replace("\t", '', $css_content); @@ -1626,7 +1626,7 @@ public static function addJS($js_uri) { global $js_files; if (!isset($js_files)) { - $js_files = array(); + $js_files = []; } // avoid useless operation... if (in_array($js_uri, $js_files)) { @@ -1635,7 +1635,7 @@ public static function addJS($js_uri) // detect mass add if (!is_array($js_uri) && !in_array($js_uri, $js_files)) { - $js_uri = array($js_uri); + $js_uri = [$js_uri]; } else { foreach ($js_uri as $key => $js) { if (in_array($js, $js_files)) { @@ -1705,7 +1705,7 @@ public static function addCSS($css_uri, $css_media_type = 'all') } // detect mass add - $css_uri = array($css_uri => $css_media_type); + $css_uri = [$css_uri => $css_media_type]; // adding file to the big array... if (is_array($css_files)) { @@ -1724,19 +1724,19 @@ public static function cccCss() { global $css_files; //inits - $css_files_by_media = array(); - $compressed_css_files = array(); - $compressed_css_files_not_found = array(); - $compressed_css_files_infos = array(); + $css_files_by_media = []; + $compressed_css_files = []; + $compressed_css_files_not_found = []; + $compressed_css_files_infos = []; $protocolLink = self::getCurrentUrlProtocolPrefix(); // group css files by media foreach ($css_files as $filename => $media) { if (!array_key_exists($media, $css_files_by_media)) { - $css_files_by_media[$media] = array(); + $css_files_by_media[$media] = []; } - $infos = array(); + $infos = []; $infos['uri'] = $filename; $url_data = parse_url($filename); $infos['path'] = _PS_ROOT_DIR_ . self::str_replace_once(__PS_BASE_URI__, '/', $url_data['path']); @@ -1750,7 +1750,7 @@ public static function cccCss() ); if (!array_key_exists($media, $compressed_css_files_infos)) { - $compressed_css_files_infos[$media] = array('key' => ''); + $compressed_css_files_infos[$media] = ['key' => '']; } $compressed_css_files_infos[$media]['key'] .= $filename; } @@ -1759,10 +1759,10 @@ public static function cccCss() foreach ($compressed_css_files_infos as $media => &$info) { $key = md5($info['key'] . $protocolLink); $filename = _PS_THEME_DIR_ . 'cache/' . $key . '_' . $media . '.css'; - $info = array( + $info = [ 'key' => $key, 'date' => file_exists($filename) ? @filemtime($filename) : 0, - ); + ]; } // aggregate and compress css files content, write new caches files foreach ($css_files_by_media as $media => $media_infos) { @@ -1790,7 +1790,7 @@ public static function cccCss() } // rebuild the original css_files array - $css_files = array(); + $css_files = []; foreach ($compressed_css_files as $media => $filename) { $url = str_replace(_PS_THEME_DIR_, _THEMES_DIR_ . _THEME_NAME_ . '/', $filename); $css_files[$protocolLink . self::getMediaServer($url) . $url] = $media; @@ -1804,12 +1804,12 @@ public static function cccJS() { global $js_files; //inits - $compressed_js_files_not_found = array(); - $js_files_infos = array(); + $compressed_js_files_not_found = []; + $js_files_infos = []; $js_files_date = 0; $compressed_js_file_date = 0; $compressed_js_filename = ''; - $js_external_files = array(); + $js_external_files = []; $protocolLink = self::getCurrentUrlProtocolPrefix(); // get js files infos @@ -1819,7 +1819,7 @@ public static function cccJS() if ($expr[0] == 'http') { $js_external_files[] = $filename; } else { - $infos = array(); + $infos = []; $infos['uri'] = $filename; $url_data = parse_url($filename); $infos['path'] = _PS_ROOT_DIR_ . self::str_replace_once(__PS_BASE_URI__, '/', $url_data['path']); @@ -1863,7 +1863,7 @@ public static function cccJS() // rebuild the original js_files array $url = str_replace(_PS_ROOT_DIR_ . '/', __PS_BASE_URI__, $compressed_js_path); - $js_files = array_merge(array($protocolLink . self::getMediaServer($url) . $url), $js_external_files); + $js_files = array_merge([$protocolLink . self::getMediaServer($url) . $url], $js_external_files); } private static $_cache_nb_media_servers = null; @@ -1887,7 +1887,7 @@ public static function getMediaServer($filename) public static function generateHtaccess($path, $rewrite_settings, $cache_control, $specific = '', $disableMuliviews = false) { - $tab = array('ErrorDocument' => array(), 'RewriteEngine' => array(), 'RewriteRule' => array()); + $tab = ['ErrorDocument' => [], 'RewriteEngine' => [], 'RewriteRule' => []]; $multilang = (Language::countActiveLanguages() > 1); // ErrorDocument @@ -2142,7 +2142,7 @@ public static function isCallable($function) public static function pRegexp($s, $delim) { $s = str_replace($delim, '\\' . $delim, $s); - foreach (array('?', '[', ']', '(', ')', '{', '}', '-', '.', '+', '*', '^', '$') as $char) { + foreach (['?', '[', ']', '(', ')', '{', '}', '-', '.', '+', '*', '^', '$'] as $char) { $s = str_replace($char, '\\' . $char, $s); } @@ -2242,14 +2242,14 @@ public static function getProductsOrder($type, $value = null, $prefix = false) } $value = (null === $value || $value === false || $value === '') ? (int) Configuration::get('PS_PRODUCTS_ORDER_BY') : $value; - $list = array(0 => 'name', 1 => 'price', 2 => 'date_add', 3 => 'date_upd', 4 => 'position', 5 => 'manufacturer_name', 6 => 'quantity'); + $list = [0 => 'name', 1 => 'price', 2 => 'date_add', 3 => 'date_upd', 4 => 'position', 5 => 'manufacturer_name', 6 => 'quantity']; return $orderByPrefix . ((isset($list[$value])) ? $list[$value] : ((in_array($value, $list)) ? $value : 'position')); break; case 'way': $value = (null === $value || $value === false || $value === '') ? (int) Configuration::get('PS_PRODUCTS_ORDER_WAY') : $value; - $list = array(0 => 'asc', 1 => 'desc'); + $list = [0 => 'asc', 1 => 'desc']; return (isset($list[$value])) ? $list[$value] : ((in_array($value, $list)) ? $value : 'asc'); break; @@ -2292,7 +2292,7 @@ public static function display404Error() header('HTTP/1.1 404 Not Found'); header('Status: 404 Not Found'); include dirname(__FILE__) . '/../404.php'; - die; + exit; } /** @@ -2306,7 +2306,7 @@ public static function display404Error() public static function dieOrLog($msg, $die = true) { if ($die || (defined('_PS_MODE_DEV_') && _PS_MODE_DEV_)) { - die($msg); + exit($msg); } return Logger::addLog($msg); @@ -2390,7 +2390,7 @@ public static function apacheModExists($name) public static function nl2br($str) { - return str_replace(array("\r\n", "\r", "\n"), '
', $str); + return str_replace(["\r\n", "\r", "\n"], '
', $str); } /** diff --git a/classes/Twig/Block/ChannelInfoBlock.php b/classes/Twig/Block/ChannelInfoBlock.php index f00419306..b3421255b 100644 --- a/classes/Twig/Block/ChannelInfoBlock.php +++ b/classes/Twig/Block/ChannelInfoBlock.php @@ -77,9 +77,9 @@ public function render() return $this->twig->render( '@ModuleAutoUpgrade/block/channelInfo.twig', - array( + [ 'upgradeInfo' => $upgradeInfo, - ) + ] ); } } diff --git a/classes/Twig/Block/RollbackForm.php b/classes/Twig/Block/RollbackForm.php index 4ac1c0018..779420020 100644 --- a/classes/Twig/Block/RollbackForm.php +++ b/classes/Twig/Block/RollbackForm.php @@ -52,9 +52,9 @@ public function render() { return $this->twig->render( '@ModuleAutoUpgrade/block/rollbackForm.twig', - array( + [ 'availableBackups' => $this->backupFinder->getAvailableBackups(), - ) + ] ); } } diff --git a/classes/Twig/Block/UpgradeButtonBlock.php b/classes/Twig/Block/UpgradeButtonBlock.php index fb8e77b06..3676e1e1d 100644 --- a/classes/Twig/Block/UpgradeButtonBlock.php +++ b/classes/Twig/Block/UpgradeButtonBlock.php @@ -29,12 +29,12 @@ use Configuration; use PrestaShop\Module\AutoUpgrade\ChannelInfo; -use Twig_Environment; -use PrestaShop\Module\AutoUpgrade\Upgrader; use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeConfiguration; use PrestaShop\Module\AutoUpgrade\TaskRunner\AbstractTask; +use PrestaShop\Module\AutoUpgrade\Upgrader; use PrestaShop\Module\AutoUpgrade\UpgradeSelfCheck; use PrestaShop\Module\AutoUpgrade\UpgradeTools\Translator; +use Twig_Environment; class UpgradeButtonBlock { @@ -119,22 +119,22 @@ public function render() $versionCompare = version_compare(_PS_VERSION_, $this->upgrader->version_num); $channel = $this->config->get('channel'); - if (!in_array($channel, array('archive', 'directory')) && !empty($this->upgrader->version_num)) { + if (!in_array($channel, ['archive', 'directory']) && !empty($this->upgrader->version_num)) { $latestVersion = "{$this->upgrader->version_name} - ({$this->upgrader->version_num})"; } else { - $latestVersion = $translator->trans('N/A', array(), 'Admin.Global'); + $latestVersion = $translator->trans('N/A', [], 'Admin.Global'); } $showUpgradeButton = false; $showUpgradeLink = false; $upgradeLink = ''; $changelogLink = ''; - $skipActions = array(); + $skipActions = []; // decide to display "Start Upgrade" or not if ($this->selfCheck->isOkForUpgrade() && $versionCompare < 0) { $showUpgradeButton = true; - if (!in_array($channel, array('archive', 'directory'))) { + if (!in_array($channel, ['archive', 'directory'])) { if ($channel == 'private') { $this->upgrader->link = $this->config->get('private_release_link'); } @@ -155,7 +155,7 @@ public function render() $dir = glob($this->downloadPath . DIRECTORY_SEPARATOR . '*.zip'); $xml = glob($this->downloadPath . DIRECTORY_SEPARATOR . '*.xml'); - $data = array( + $data = [ 'versionCompare' => $versionCompare, 'currentPsVersion' => _PS_VERSION_, 'latestChannelVersion' => $latestVersion, @@ -169,11 +169,11 @@ public function render() 'token' => $this->token, 'channelOptions' => $this->getOptChannels(), 'channelInfoBlock' => $this->buildChannelInfoBlock($channel), - 'privateChannel' => array( + 'privateChannel' => [ 'releaseLink' => $this->config->get('private_release_link'), 'releaseMd5' => $this->config->get('private_release_md5'), 'allowMajor' => $this->config->get('private_allow_major'), - ), + ], 'archiveFiles' => $dir, 'xmlFiles' => $xml, 'archiveFileName' => $this->config->get('archive.filename'), @@ -183,7 +183,7 @@ public function render() 'directoryVersionNumber' => $this->config->get('directory.version_num'), 'manualMode' => $this->manualMode, 'phpVersion' => PHP_VERSION, - ); + ]; return $this->twig->render('@ModuleAutoUpgrade/block/upgradeButtonBlock.twig', $data); } @@ -195,17 +195,17 @@ private function getOptChannels() { $translator = $this->translator; - return array( + return [ // Hey ! I'm really using a fieldset element to regroup fields ?! ! - array('useMajor', 'major', $translator->trans('Major release', array(), 'Modules.Autoupgrade.Admin')), - array('useMinor', 'minor', $translator->trans('Minor release (recommended)', array(), 'Modules.Autoupgrade.Admin')), - array('useRC', 'rc', $translator->trans('Release candidates', array(), 'Modules.Autoupgrade.Admin')), - array('useBeta', 'beta', $translator->trans('Beta releases', array(), 'Modules.Autoupgrade.Admin')), - array('useAlpha', 'alpha', $translator->trans('Alpha releases', array(), 'Modules.Autoupgrade.Admin')), - array('usePrivate', 'private', $translator->trans('Private release (require link and MD5 hash)', array(), 'Modules.Autoupgrade.Admin')), - array('useArchive', 'archive', $translator->trans('Local archive', array(), 'Modules.Autoupgrade.Admin')), - array('useDirectory', 'directory', $translator->trans('Local directory', array(), 'Modules.Autoupgrade.Admin')), - ); + ['useMajor', 'major', $translator->trans('Major release', [], 'Modules.Autoupgrade.Admin')], + ['useMinor', 'minor', $translator->trans('Minor release (recommended)', [], 'Modules.Autoupgrade.Admin')], + ['useRC', 'rc', $translator->trans('Release candidates', [], 'Modules.Autoupgrade.Admin')], + ['useBeta', 'beta', $translator->trans('Beta releases', [], 'Modules.Autoupgrade.Admin')], + ['useAlpha', 'alpha', $translator->trans('Alpha releases', [], 'Modules.Autoupgrade.Admin')], + ['usePrivate', 'private', $translator->trans('Private release (require link and MD5 hash)', [], 'Modules.Autoupgrade.Admin')], + ['useArchive', 'archive', $translator->trans('Local archive', [], 'Modules.Autoupgrade.Admin')], + ['useDirectory', 'directory', $translator->trans('Local directory', [], 'Modules.Autoupgrade.Admin')], + ]; } private function getInfoForChannel($channel) diff --git a/classes/Twig/Block/UpgradeChecklist.php b/classes/Twig/Block/UpgradeChecklist.php index 36548cc49..0e5c970fa 100644 --- a/classes/Twig/Block/UpgradeChecklist.php +++ b/classes/Twig/Block/UpgradeChecklist.php @@ -27,9 +27,9 @@ namespace PrestaShop\Module\AutoUpgrade\Twig\Block; -use PrestaShop\Module\AutoUpgrade\UpgradeSelfCheck; -use PrestaShop\Module\AutoUpgrade\Tools14; use Context; +use PrestaShop\Module\AutoUpgrade\Tools14; +use PrestaShop\Module\AutoUpgrade\UpgradeSelfCheck; use Twig_Environment; /** @@ -108,7 +108,7 @@ public function __construct( */ public function render() { - $data = array( + $data = [ 'showErrorMessage' => !$this->selfCheck->isOkForUpgrade(), 'moduleVersion' => $this->selfCheck->getModuleVersion(), 'moduleIsUpToDate' => $this->selfCheck->isModuleVersionLatest(), @@ -129,7 +129,7 @@ public function render() 'maxExecutionTime' => $this->selfCheck->getMaxExecutionTime(), 'phpUpgradeRequired' => $this->selfCheck->isPhpUpgradeRequired(), 'isPrestaShopReady' => $this->selfCheck->isPrestaShopReady(), - ); + ]; return $this->twig->render('@ModuleAutoUpgrade/block/checklist.twig', $data); } diff --git a/classes/Twig/Form/BackupOptionsForm.php b/classes/Twig/Form/BackupOptionsForm.php index 0a3d5712d..79f96afa5 100644 --- a/classes/Twig/Form/BackupOptionsForm.php +++ b/classes/Twig/Form/BackupOptionsForm.php @@ -53,11 +53,11 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) $translationDomain = 'Modules.Autoupgrade.Admin'; - $this->fields = array( - 'PS_AUTOUP_BACKUP' => array( + $this->fields = [ + 'PS_AUTOUP_BACKUP' => [ 'title' => $this->translator->trans( 'Back up my files and database', - array(), + [], $translationDomain ), 'cast' => 'intval', @@ -66,14 +66,14 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'type' => 'bool', 'desc' => $this->translator->trans( 'Automatically back up your database and files in order to restore your shop if needed. This is experimental: you should still perform your own manual backup for safety.', - array(), + [], $translationDomain ), - ), - 'PS_AUTOUP_KEEP_IMAGES' => array( + ], + 'PS_AUTOUP_KEEP_IMAGES' => [ 'title' => $this->translator->trans( 'Back up my images', - array(), + [], $translationDomain ), 'cast' => 'intval', @@ -82,11 +82,11 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'type' => 'bool', 'desc' => $this->translator->trans( 'To save time, you can decide not to back your images up. In any case, always make sure you did back them up manually.', - array(), + [], $translationDomain ), - ), - ); + ], + ]; } public function render() @@ -96,7 +96,7 @@ public function render() $this->fields, $this->translator->trans( 'Backup Options', - array(), + [], 'Modules.Autoupgrade.Admin' ), '', diff --git a/classes/Twig/Form/FormRenderer.php b/classes/Twig/Form/FormRenderer.php index bc6a5981a..3213fb557 100644 --- a/classes/Twig/Form/FormRenderer.php +++ b/classes/Twig/Form/FormRenderer.php @@ -62,7 +62,7 @@ public function render($name, $fields, $tabname, $size, $icon) { $required = false; - $formFields = array(); + $formFields = []; foreach ($fields as $key => $field) { $html = ''; @@ -74,7 +74,7 @@ public function render($name, $fields, $tabname, $size, $icon) $val = isset($field['defaultValue']) ? $field['defaultValue'] : false; } - if (!in_array($field['type'], array('image', 'radio', 'select', 'container', 'bool', 'container_end')) || isset($field['show'])) { + if (!in_array($field['type'], ['image', 'radio', 'select', 'container', 'bool', 'container_end']) || isset($field['show'])) { $html .= '
' . ($field['title'] ? '' : '') . '
'; @@ -115,11 +115,11 @@ public function render($name, $fields, $tabname, $size, $icon) $html .= $this->renderTextField($field, $key, $val, $disabled); } - if ($required && !in_array($field['type'], array('image', 'radio'))) { + if ($required && !in_array($field['type'], ['image', 'radio'])) { $html .= ' *'; } - if (isset($field['desc']) && !in_array($field['type'], array('bool', 'select'))) { + if (isset($field['desc']) && !in_array($field['type'], ['bool', 'select'])) { $html .= '

'; if (!empty($field['thumb']) && $field['thumb']['pos'] == 'after') { $html .= $this->renderThumb($field); @@ -127,7 +127,7 @@ public function render($name, $fields, $tabname, $size, $icon) $html .= $field['desc'] . '

'; } - if (!in_array($field['type'], array('image', 'radio', 'select', 'container', 'bool', 'container_end')) || isset($field['show'])) { + if (!in_array($field['type'], ['image', 'radio', 'select', 'container', 'bool', 'container_end']) || isset($field['show'])) { $html .= '
'; } @@ -136,11 +136,11 @@ public function render($name, $fields, $tabname, $size, $icon) return $this->twig->render( '@ModuleAutoUpgrade/form.twig', - array( + [ 'name' => $name, 'tabName' => $tabname, 'fields' => $formFields, - ) + ] ); } @@ -153,11 +153,11 @@ private function renderBool($field, $key, $val) diff --git a/classes/Twig/Form/UpgradeOptionsForm.php b/classes/Twig/Form/UpgradeOptionsForm.php index ebe8cd739..b4b616664 100644 --- a/classes/Twig/Form/UpgradeOptionsForm.php +++ b/classes/Twig/Form/UpgradeOptionsForm.php @@ -54,11 +54,11 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) // TODO: Class const $translationDomain = 'Modules.Autoupgrade.Admin'; - $this->fields = array( - 'PS_AUTOUP_PERFORMANCE' => array( + $this->fields = [ + 'PS_AUTOUP_PERFORMANCE' => [ 'title' => $translator->trans( 'Server performance', - array(), + [], $translationDomain ), 'cast' => 'intval', @@ -66,32 +66,32 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'defaultValue' => '1', 'type' => 'select', 'desc' => $translator->trans( 'Unless you are using a dedicated server, select "Low".', - array(), + [], $translationDomain ) . '
' . $translator->trans( 'A high value can cause the upgrade to fail if your server is not powerful enough to process the upgrade tasks in a short amount of time.', - array(), + [], $translationDomain ), - 'choices' => array( + 'choices' => [ 1 => $translator->trans( 'Low (recommended)', - array(), + [], $translationDomain ), - 2 => $translator->trans('Medium', array(), $translationDomain), + 2 => $translator->trans('Medium', [], $translationDomain), 3 => $translator->trans( 'High', - array(), + [], $translationDomain ), - ), - ), - 'PS_AUTOUP_CUSTOM_MOD_DESACT' => array( + ], + ], + 'PS_AUTOUP_CUSTOM_MOD_DESACT' => [ 'title' => $translator->trans( 'Disable non-native modules', - array(), + [], $translationDomain ), 'cast' => 'intval', @@ -99,19 +99,19 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'type' => 'bool', 'desc' => $translator->trans( 'As non-native modules can experience some compatibility issues, we recommend to disable them by default.', - array(), + [], $translationDomain ) . '
' . $translator->trans( 'Keeping them enabled might prevent you from loading the "Modules" page properly after the upgrade.', - array(), + [], $translationDomain ), - ), - 'PS_AUTOUP_UPDATE_DEFAULT_THEME' => array( + ], + 'PS_AUTOUP_UPDATE_DEFAULT_THEME' => [ 'title' => $translator->trans( 'Upgrade the default theme', - array(), + [], $translationDomain ), 'cast' => 'intval', @@ -120,20 +120,20 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'type' => 'bool', 'desc' => $translator->trans( 'If you customized the default PrestaShop theme in its folder (folder name "classic" in 1.7), enabling this option will lose your modifications.', - array(), + [], $translationDomain ) . '
' . $translator->trans( 'If you are using your own theme, enabling this option will simply update the default theme files, and your own theme will be safe.', - array(), + [], $translationDomain ), - ), + ], - 'PS_AUTOUP_CHANGE_DEFAULT_THEME' => array( + 'PS_AUTOUP_CHANGE_DEFAULT_THEME' => [ 'title' => $translator->trans( 'Switch to the default theme', - array(), + [], $translationDomain ), 'cast' => 'intval', @@ -142,15 +142,15 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'type' => 'bool', 'desc' => $translator->trans( 'This will change your theme: your shop will then use the default theme of the version of PrestaShop you are upgrading to.', - array(), + [], $translationDomain ), - ), + ], - 'PS_AUTOUP_UPDATE_RTL_FILES' => array( + 'PS_AUTOUP_UPDATE_RTL_FILES' => [ 'title' => $translator->trans( 'Regenerate RTL stylesheet', - array(), + [], $translationDomain ), 'cast' => 'intval', @@ -159,15 +159,15 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'type' => 'bool', 'desc' => $translator->trans( 'If enabled, any RTL-specific files that you might have added to all your themes might be deleted by the created stylesheet.', - array(), + [], $translationDomain ), - ), + ], - 'PS_AUTOUP_KEEP_MAILS' => array( + 'PS_AUTOUP_KEEP_MAILS' => [ 'title' => $translator->trans( 'Keep the customized email templates', - array(), + [], $translationDomain ), 'cast' => 'intval', @@ -175,16 +175,16 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'type' => 'bool', 'desc' => $translator->trans( 'This will not upgrade the default PrestaShop e-mails.', - array(), + [], $translationDomain ) . '
' . $translator->trans( 'If you customized the default PrestaShop e-mail templates, enabling this option will keep your modifications.', - array(), + [], $translationDomain ), - ), - ); + ], + ]; } public function render() @@ -194,7 +194,7 @@ public function render() $this->fields, $this->translator->trans( 'Upgrade Options', - array(), + [], 'Modules.Autoupgrade.Admin' ), '', diff --git a/classes/Twig/TransFilterExtension.php b/classes/Twig/TransFilterExtension.php index 94f560450..384ec9394 100644 --- a/classes/Twig/TransFilterExtension.php +++ b/classes/Twig/TransFilterExtension.php @@ -50,12 +50,12 @@ public function __construct($translator) public function getFilters() { - return array( - new Twig_SimpleFilter('trans', array($this, 'trans')), - ); + return [ + new Twig_SimpleFilter('trans', [$this, 'trans']), + ]; } - public function trans($string, $params = array()) + public function trans($string, $params = []) { return $this->translator->trans($string, $params, self::DOMAIN); } diff --git a/classes/Twig/TransFilterExtension3.php b/classes/Twig/TransFilterExtension3.php index ce7bae0c1..51e949f53 100644 --- a/classes/Twig/TransFilterExtension3.php +++ b/classes/Twig/TransFilterExtension3.php @@ -50,12 +50,12 @@ public function __construct($translator) public function getFilters() { - return array( - new TwigFilter('trans', array($this, 'trans')), - ); + return [ + new TwigFilter('trans', [$this, 'trans']), + ]; } - public function trans($string, $params = array()) + public function trans($string, $params = []) { return $this->translator->trans($string, $params, self::DOMAIN); } diff --git a/classes/UpgradeContainer.php b/classes/UpgradeContainer.php index f7bdf618a..a398440c1 100644 --- a/classes/UpgradeContainer.php +++ b/classes/UpgradeContainer.php @@ -29,6 +29,11 @@ use PrestaShop\Module\AutoUpgrade\Log\LegacyLogger; use PrestaShop\Module\AutoUpgrade\Log\Logger; +use PrestaShop\Module\AutoUpgrade\Parameters\FileConfigurationStorage; +use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeConfiguration; +use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeConfigurationStorage; +use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeFileNames; +use PrestaShop\Module\AutoUpgrade\Twig\TransFilterExtension; use PrestaShop\Module\AutoUpgrade\Twig\TransFilterExtension3; use PrestaShop\Module\AutoUpgrade\UpgradeTools\CacheCleaner; use PrestaShop\Module\AutoUpgrade\UpgradeTools\FileFilter; @@ -36,14 +41,9 @@ use PrestaShop\Module\AutoUpgrade\UpgradeTools\ModuleAdapter; use PrestaShop\Module\AutoUpgrade\UpgradeTools\SymfonyAdapter; use PrestaShop\Module\AutoUpgrade\UpgradeTools\Translation; -use PrestaShop\Module\AutoUpgrade\Parameters\FileConfigurationStorage; -use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeConfigurationStorage; -use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeConfiguration; -use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeFileNames; -use PrestaShop\Module\AutoUpgrade\Twig\TransFilterExtension; use PrestaShop\Module\AutoUpgrade\UpgradeTools\Translator; -use Twig_Loader_Filesystem; use Twig_Environment; +use Twig_Loader_Filesystem; /** * Class responsible of the easy (& Lazy) loading of the different services @@ -305,19 +305,19 @@ public function getUpgrader() if (!empty($archiveXml)) { $upgrader->version_md5[$upgrader->version_num] = $this->getProperty(self::DOWNLOAD_PATH) . DIRECTORY_SEPARATOR . $archiveXml; } - $upgrader->checkPSVersion(true, array('archive')); + $upgrader->checkPSVersion(true, ['archive']); break; case 'directory': $upgrader->channel = 'directory'; $upgrader->version_num = $upgradeConfiguration->get('directory.version_num'); - $upgrader->checkPSVersion(true, array('directory')); + $upgrader->checkPSVersion(true, ['directory']); break; default: $upgrader->channel = $channel; if ($upgradeConfiguration->get('channel') == 'private' && !$upgradeConfiguration->get('private_allow_major')) { - $upgrader->checkPSVersion(false, array('private', 'minor')); + $upgrader->checkPSVersion(false, ['private', 'minor']); } else { - $upgrader->checkPSVersion(false, array('minor')); + $upgrader->checkPSVersion(false, ['minor']); } } $this->getState()->setInstallVersion($upgrader->version_num); @@ -510,11 +510,11 @@ public function getWorkspace() return $this->workspace; } - $paths = array(); - $properties = array( + $paths = []; + $properties = [ self::WORKSPACE_PATH, self::BACKUP_PATH, self::DOWNLOAD_PATH, self::LATEST_PATH, - self::TMP_PATH, ); + self::TMP_PATH, ]; foreach ($properties as $property) { $paths[] = $this->getProperty($property); diff --git a/classes/UpgradeException.php b/classes/UpgradeException.php index 4ec25385d..6fc1e792c 100644 --- a/classes/UpgradeException.php +++ b/classes/UpgradeException.php @@ -35,7 +35,7 @@ class UpgradeException extends \Exception const SEVERITY_ERROR = 1; const SEVERITY_WARNING = 2; - private $quickInfos = array(); + private $quickInfos = []; private $severity = self::SEVERITY_ERROR; diff --git a/classes/UpgradePage.php b/classes/UpgradePage.php index 12907a57d..fa511762b 100644 --- a/classes/UpgradePage.php +++ b/classes/UpgradePage.php @@ -27,13 +27,13 @@ namespace PrestaShop\Module\AutoUpgrade; +use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeConfiguration; use PrestaShop\Module\AutoUpgrade\Twig\Block\RollbackForm; use PrestaShop\Module\AutoUpgrade\Twig\Block\UpgradeButtonBlock; use PrestaShop\Module\AutoUpgrade\Twig\Block\UpgradeChecklist; use PrestaShop\Module\AutoUpgrade\Twig\Form\BackupOptionsForm; use PrestaShop\Module\AutoUpgrade\Twig\Form\FormRenderer; use PrestaShop\Module\AutoUpgrade\Twig\Form\UpgradeOptionsForm; -use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeConfiguration; use PrestaShop\Module\AutoUpgrade\UpgradeTools\Translator; use Twig_Environment; @@ -180,7 +180,7 @@ public function display($ajaxResult) ->render('@ModuleAutoUpgrade:error.twig', $errMessageData); } - $templateData = array( + $templateData = [ 'psBaseUri' => __PS_BASE_URI__, 'translationDomain' => $translationDomain, 'jsParams' => $this->getJsParams($ajaxResult), @@ -191,7 +191,7 @@ public function display($ajaxResult) 'upgradeOptions' => $this->getUpgradeOptionsForm(), 'currentIndex' => $this->currentIndex, 'token' => $this->token, - ); + ]; return $twig->render('@ModuleAutoUpgrade/main.twig', $templateData); } @@ -269,23 +269,23 @@ private function getErrorMessage() // PrestaShop demo mode if (defined('_PS_MODE_DEMO_') && true == _PS_MODE_DEMO_) { - return array( - 'message' => $translator->trans('This functionality has been disabled.', array(), self::TRANSLATION_DOMAIN), - ); + return [ + 'message' => $translator->trans('This functionality has been disabled.', [], self::TRANSLATION_DOMAIN), + ]; } if (!file_exists($this->autoupgradePath . DIRECTORY_SEPARATOR . 'ajax-upgradetab.php')) { - return array( + return [ 'showWarningIcon' => true, 'message' => $translator->trans( '[TECHNICAL ERROR] ajax-upgradetab.php is missing. Please reinstall or reset the module.', - array(), + [], self::TRANSLATION_DOMAIN ), - ); + ]; } - return array(); + return []; } /** @@ -301,7 +301,7 @@ private function getJsParams($ajaxResult) $translator = $this->translator; - $jsParams = array( + $jsParams = [ 'manualMode' => (bool) $this->manualMode, '_PS_MODE_DEV_' => (defined('_PS_MODE_DEV_') && true == _PS_MODE_DEV_), 'PS_AUTOUP_BACKUP' => (bool) $this->config->get('PS_AUTOUP_BACKUP'), @@ -314,50 +314,50 @@ private function getJsParams($ajaxResult) 'currentIndex' => $this->currentIndex, 'tab' => 'AdminSelfUpgrade', 'channel' => $this->config->get('channel'), - 'translation' => array( - 'confirmDeleteBackup' => $translator->trans('Are you sure you want to delete this backup?', array(), $translationDomain), - 'delete' => $translator->trans('Delete', array(), 'Admin.Actions'), - 'updateInProgress' => $translator->trans('An update is currently in progress... Click "OK" to abort.', array(), $translationDomain), - 'upgradingPrestaShop' => $translator->trans('Upgrading PrestaShop', array(), $translationDomain), - 'upgradeComplete' => $translator->trans('Upgrade complete', array(), $translationDomain), - 'upgradeCompleteWithWarnings' => $translator->trans('Upgrade complete, but warning notifications has been found.', array(), $translationDomain), - 'todoList' => array( - $translator->trans('Cookies have changed, you will need to log in again once you refreshed the page', array(), $translationDomain), - $translator->trans('Javascript and CSS files have changed, please clear your browser cache with CTRL-F5', array(), $translationDomain), - $translator->trans('Please check that your front-office theme is functional (try to create an account, place an order...)', array(), $translationDomain), - $translator->trans('Product images do not appear in the front-office? Try regenerating the thumbnails in Preferences > Images', array(), $translationDomain), - $translator->trans('Do not forget to reactivate your shop once you have checked everything!', array(), $translationDomain), - ), - 'todoListTitle' => $translator->trans('ToDo list:', array(), $translationDomain), - 'startingRestore' => $translator->trans('Starting restoration...', array(), $translationDomain), - 'restoreComplete' => $translator->trans('Restoration complete.', array(), $translationDomain), - 'cannotDownloadFile' => $translator->trans('Your server cannot download the file. Please upload it first by ftp in your admin/autoupgrade directory', array(), $translationDomain), - 'jsonParseErrorForAction' => $translator->trans('Javascript error (parseJSON) detected for action ', array(), $translationDomain), - 'manuallyGoToButton' => $translator->trans('Manually go to %s button', array(), $translationDomain), - 'endOfProcess' => $translator->trans('End of process', array(), $translationDomain), - 'processCancelledCheckForRestore' => $translator->trans('Operation canceled. Checking for restoration...', array(), $translationDomain), - 'confirmRestoreBackup' => $translator->trans('Do you want to restore %s?', array($this->backupName), $translationDomain), - 'processCancelledWithError' => $translator->trans('Operation canceled. An error happened.', array(), $translationDomain), - 'missingAjaxUpgradeTab' => $translator->trans('[TECHNICAL ERROR] ajax-upgradetab.php is missing. Please reinstall the module.', array(), $translationDomain), - 'clickToRefreshAndUseNewConfiguration' => $translator->trans('Click to refresh the page and use the new configuration', array(), $translationDomain), - 'errorDetectedDuring' => $translator->trans('Error detected during', array(), $translationDomain), - 'downloadTimeout' => $translator->trans('The request exceeded the max_time_limit. Please change your server configuration.', array(), $translationDomain), - 'seeOrHideList' => $translator->trans('See or hide the list', array(), $translationDomain), - 'coreFiles' => $translator->trans('Core file(s)', array(), $translationDomain), - 'mailFiles' => $translator->trans('Mail file(s)', array(), $translationDomain), - 'translationFiles' => $translator->trans('Translation file(s)', array(), $translationDomain), - 'linkAndMd5CannotBeEmpty' => $translator->trans('Link and MD5 hash cannot be empty', array(), $translationDomain), - 'needToEnterArchiveVersionNumber' => $translator->trans('You need to enter the version number associated with the archive.', array(), $translationDomain), - 'noArchiveSelected' => $translator->trans('No archive has been selected.', array(), $translationDomain), - 'needToEnterDirectoryVersionNumber' => $translator->trans('You need to enter the version number associated with the directory.', array(), $translationDomain), - 'confirmSkipBackup' => $translator->trans('Please confirm that you want to skip the backup.', array(), $translationDomain), - 'confirmPreserveFileOptions' => $translator->trans('Please confirm that you want to preserve file options.', array(), $translationDomain), - 'lessOptions' => $translator->trans('Less options', array(), $translationDomain), - 'moreOptions' => $translator->trans('More options (Expert mode)', array(), $translationDomain), - 'filesWillBeDeleted' => $translator->trans('These files will be deleted', array(), $translationDomain), - 'filesWillBeReplaced' => $translator->trans('These files will be replaced', array(), $translationDomain), - ), - ); + 'translation' => [ + 'confirmDeleteBackup' => $translator->trans('Are you sure you want to delete this backup?', [], $translationDomain), + 'delete' => $translator->trans('Delete', [], 'Admin.Actions'), + 'updateInProgress' => $translator->trans('An update is currently in progress... Click "OK" to abort.', [], $translationDomain), + 'upgradingPrestaShop' => $translator->trans('Upgrading PrestaShop', [], $translationDomain), + 'upgradeComplete' => $translator->trans('Upgrade complete', [], $translationDomain), + 'upgradeCompleteWithWarnings' => $translator->trans('Upgrade complete, but warning notifications has been found.', [], $translationDomain), + 'todoList' => [ + $translator->trans('Cookies have changed, you will need to log in again once you refreshed the page', [], $translationDomain), + $translator->trans('Javascript and CSS files have changed, please clear your browser cache with CTRL-F5', [], $translationDomain), + $translator->trans('Please check that your front-office theme is functional (try to create an account, place an order...)', [], $translationDomain), + $translator->trans('Product images do not appear in the front-office? Try regenerating the thumbnails in Preferences > Images', [], $translationDomain), + $translator->trans('Do not forget to reactivate your shop once you have checked everything!', [], $translationDomain), + ], + 'todoListTitle' => $translator->trans('ToDo list:', [], $translationDomain), + 'startingRestore' => $translator->trans('Starting restoration...', [], $translationDomain), + 'restoreComplete' => $translator->trans('Restoration complete.', [], $translationDomain), + 'cannotDownloadFile' => $translator->trans('Your server cannot download the file. Please upload it first by ftp in your admin/autoupgrade directory', [], $translationDomain), + 'jsonParseErrorForAction' => $translator->trans('Javascript error (parseJSON) detected for action ', [], $translationDomain), + 'manuallyGoToButton' => $translator->trans('Manually go to %s button', [], $translationDomain), + 'endOfProcess' => $translator->trans('End of process', [], $translationDomain), + 'processCancelledCheckForRestore' => $translator->trans('Operation canceled. Checking for restoration...', [], $translationDomain), + 'confirmRestoreBackup' => $translator->trans('Do you want to restore %s?', [$this->backupName], $translationDomain), + 'processCancelledWithError' => $translator->trans('Operation canceled. An error happened.', [], $translationDomain), + 'missingAjaxUpgradeTab' => $translator->trans('[TECHNICAL ERROR] ajax-upgradetab.php is missing. Please reinstall the module.', [], $translationDomain), + 'clickToRefreshAndUseNewConfiguration' => $translator->trans('Click to refresh the page and use the new configuration', [], $translationDomain), + 'errorDetectedDuring' => $translator->trans('Error detected during', [], $translationDomain), + 'downloadTimeout' => $translator->trans('The request exceeded the max_time_limit. Please change your server configuration.', [], $translationDomain), + 'seeOrHideList' => $translator->trans('See or hide the list', [], $translationDomain), + 'coreFiles' => $translator->trans('Core file(s)', [], $translationDomain), + 'mailFiles' => $translator->trans('Mail file(s)', [], $translationDomain), + 'translationFiles' => $translator->trans('Translation file(s)', [], $translationDomain), + 'linkAndMd5CannotBeEmpty' => $translator->trans('Link and MD5 hash cannot be empty', [], $translationDomain), + 'needToEnterArchiveVersionNumber' => $translator->trans('You need to enter the version number associated with the archive.', [], $translationDomain), + 'noArchiveSelected' => $translator->trans('No archive has been selected.', [], $translationDomain), + 'needToEnterDirectoryVersionNumber' => $translator->trans('You need to enter the version number associated with the directory.', [], $translationDomain), + 'confirmSkipBackup' => $translator->trans('Please confirm that you want to skip the backup.', [], $translationDomain), + 'confirmPreserveFileOptions' => $translator->trans('Please confirm that you want to preserve file options.', [], $translationDomain), + 'lessOptions' => $translator->trans('Less options', [], $translationDomain), + 'moreOptions' => $translator->trans('More options (Expert mode)', [], $translationDomain), + 'filesWillBeDeleted' => $translator->trans('These files will be deleted', [], $translationDomain), + 'filesWillBeReplaced' => $translator->trans('These files will be replaced', [], $translationDomain), + ], + ]; return $jsParams; } @@ -369,62 +369,62 @@ private function _getJsErrorMsgs() { $translationDomain = self::TRANSLATION_DOMAIN; $translator = $this->translator; - $ret = array( - 0 => $translator->trans('Required field', array(), $translationDomain), - 1 => $translator->trans('Too long!', array(), $translationDomain), - 2 => $translator->trans('Fields are different!', array(), $translationDomain), - 3 => $translator->trans('This email address is wrong!', array(), $translationDomain), - 4 => $translator->trans('Impossible to send the email!', array(), $translationDomain), - 5 => $translator->trans('Cannot create settings file, if /app/config/parameters.php exists, please give the public write permissions to this file, else please create a file named parameters.php in config directory.', array(), $translationDomain), - 6 => $translator->trans('Cannot write settings file, please create a file named settings.inc.php in the "config" directory.', array(), $translationDomain), - 7 => $translator->trans('Impossible to upload the file!', array(), $translationDomain), - 8 => $translator->trans('Data integrity is not valid. Hack attempt?', array(), $translationDomain), - 9 => $translator->trans('Impossible to read the content of a MySQL content file.', array(), $translationDomain), - 10 => $translator->trans('Cannot access a MySQL content file.', array(), $translationDomain), - 11 => $translator->trans('Error while inserting data in the database:', array(), $translationDomain), - 12 => $translator->trans('The password is incorrect (must be alphanumeric string with at least 8 characters)', array(), 'Install'), - 14 => $translator->trans('At least one table with same prefix was already found, please change your prefix or drop your database', array(), 'Install'), - 15 => $translator->trans('This is not a valid file name.', array(), $translationDomain), - 16 => $translator->trans('This is not a valid image file.', array(), $translationDomain), - 17 => $translator->trans('Error while creating the /app/config/parameters.php file.', array(), $translationDomain), - 18 => $translator->trans('Error:', array(), $translationDomain), - 19 => $translator->trans('This PrestaShop database already exists. Please revalidate your authentication information to the database.', array(), $translationDomain), - 22 => $translator->trans('An error occurred while resizing the picture.', array(), $translationDomain), - 23 => $translator->trans('Database connection is available!', array(), $translationDomain), - 24 => $translator->trans('Database Server is available but database is not found', array(), $translationDomain), - 25 => $translator->trans('Database Server is not found. Please verify the login, password and server fields.', array(), $translationDomain), - 26 => $translator->trans('An error occurred while sending email, please verify your parameters.', array(), $translationDomain), + $ret = [ + 0 => $translator->trans('Required field', [], $translationDomain), + 1 => $translator->trans('Too long!', [], $translationDomain), + 2 => $translator->trans('Fields are different!', [], $translationDomain), + 3 => $translator->trans('This email address is wrong!', [], $translationDomain), + 4 => $translator->trans('Impossible to send the email!', [], $translationDomain), + 5 => $translator->trans('Cannot create settings file, if /app/config/parameters.php exists, please give the public write permissions to this file, else please create a file named parameters.php in config directory.', [], $translationDomain), + 6 => $translator->trans('Cannot write settings file, please create a file named settings.inc.php in the "config" directory.', [], $translationDomain), + 7 => $translator->trans('Impossible to upload the file!', [], $translationDomain), + 8 => $translator->trans('Data integrity is not valid. Hack attempt?', [], $translationDomain), + 9 => $translator->trans('Impossible to read the content of a MySQL content file.', [], $translationDomain), + 10 => $translator->trans('Cannot access a MySQL content file.', [], $translationDomain), + 11 => $translator->trans('Error while inserting data in the database:', [], $translationDomain), + 12 => $translator->trans('The password is incorrect (must be alphanumeric string with at least 8 characters)', [], 'Install'), + 14 => $translator->trans('At least one table with same prefix was already found, please change your prefix or drop your database', [], 'Install'), + 15 => $translator->trans('This is not a valid file name.', [], $translationDomain), + 16 => $translator->trans('This is not a valid image file.', [], $translationDomain), + 17 => $translator->trans('Error while creating the /app/config/parameters.php file.', [], $translationDomain), + 18 => $translator->trans('Error:', [], $translationDomain), + 19 => $translator->trans('This PrestaShop database already exists. Please revalidate your authentication information to the database.', [], $translationDomain), + 22 => $translator->trans('An error occurred while resizing the picture.', [], $translationDomain), + 23 => $translator->trans('Database connection is available!', [], $translationDomain), + 24 => $translator->trans('Database Server is available but database is not found', [], $translationDomain), + 25 => $translator->trans('Database Server is not found. Please verify the login, password and server fields.', [], $translationDomain), + 26 => $translator->trans('An error occurred while sending email, please verify your parameters.', [], $translationDomain), // Upgrader - 27 => $translator->trans('This installer is too old.', array(), $translationDomain), - 28 => $translator->trans('You already have the %s version.', array($this->installVersion), $translationDomain), - 29 => $translator->trans('There is no older version. Did you delete or rename the app/config/parameters.php file?', array(), $translationDomain), - 30 => $translator->trans('The app/config/parameters.php file was not found. Did you delete or rename this file?', array(), $translationDomain), - 31 => $translator->trans('Cannot find the SQL upgrade files. Please verify that the /install/upgrade/sql folder is not empty.', array(), $translationDomain), - 32 => $translator->trans('No upgrade is possible.', array(), $translationDomain), - 33 => $translator->trans('Error while loading SQL upgrade file.', array(), $translationDomain), - 34 => $translator->trans('Error while inserting content into the database', array(), $translationDomain), - 35 => $translator->trans('Unfortunately,', array(), $translationDomain), - 36 => $translator->trans('SQL errors have occurred.', array(), $translationDomain), - 37 => $translator->trans('The config/defines.inc.php file was not found. Where did you move it?', array(), $translationDomain), + 27 => $translator->trans('This installer is too old.', [], $translationDomain), + 28 => $translator->trans('You already have the %s version.', [$this->installVersion], $translationDomain), + 29 => $translator->trans('There is no older version. Did you delete or rename the app/config/parameters.php file?', [], $translationDomain), + 30 => $translator->trans('The app/config/parameters.php file was not found. Did you delete or rename this file?', [], $translationDomain), + 31 => $translator->trans('Cannot find the SQL upgrade files. Please verify that the /install/upgrade/sql folder is not empty.', [], $translationDomain), + 32 => $translator->trans('No upgrade is possible.', [], $translationDomain), + 33 => $translator->trans('Error while loading SQL upgrade file.', [], $translationDomain), + 34 => $translator->trans('Error while inserting content into the database', [], $translationDomain), + 35 => $translator->trans('Unfortunately,', [], $translationDomain), + 36 => $translator->trans('SQL errors have occurred.', [], $translationDomain), + 37 => $translator->trans('The config/defines.inc.php file was not found. Where did you move it?', [], $translationDomain), // End of upgrader - 38 => $translator->trans('Impossible to write the image /img/logo.jpg. If this image already exists, please delete it.', array(), $translationDomain), - 39 => $translator->trans('The uploaded file exceeds the upload_max_filesize directive in php.ini', array(), $translationDomain), - 40 => $translator->trans('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form', array(), $translationDomain), - 41 => $translator->trans('The uploaded file was only partially uploaded', array(), $translationDomain), - 42 => $translator->trans('No file was uploaded.', array(), $translationDomain), - 43 => $translator->trans('Missing a temporary folder', array(), $translationDomain), - 44 => $translator->trans('Failed to write file to disk', array(), $translationDomain), - 45 => $translator->trans('File upload stopped by extension', array(), $translationDomain), - 46 => $translator->trans('Cannot convert your database\'s data to utf-8.', array(), $translationDomain), - 47 => $translator->trans('Invalid shop name', array(), 'Install'), - 48 => $translator->trans('Your firstname contains some invalid characters', array(), 'Install'), - 49 => $translator->trans('Your lastname contains some invalid characters', array(), $translationDomain), - 50 => $translator->trans('Your database server does not support the utf-8 charset.', array(), 'Install'), - 51 => $translator->trans('Your MySQL server does not support this engine, please use another one like MyISAM', array(), $translationDomain), - 52 => $translator->trans('The file /img/logo.jpg is not writable, please CHMOD 755 this file or CHMOD 777', array(), $translationDomain), - 53 => $translator->trans('Invalid catalog mode', array(), $translationDomain), - 999 => $translator->trans('No error code available', array(), $translationDomain), - ); + 38 => $translator->trans('Impossible to write the image /img/logo.jpg. If this image already exists, please delete it.', [], $translationDomain), + 39 => $translator->trans('The uploaded file exceeds the upload_max_filesize directive in php.ini', [], $translationDomain), + 40 => $translator->trans('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form', [], $translationDomain), + 41 => $translator->trans('The uploaded file was only partially uploaded', [], $translationDomain), + 42 => $translator->trans('No file was uploaded.', [], $translationDomain), + 43 => $translator->trans('Missing a temporary folder', [], $translationDomain), + 44 => $translator->trans('Failed to write file to disk', [], $translationDomain), + 45 => $translator->trans('File upload stopped by extension', [], $translationDomain), + 46 => $translator->trans('Cannot convert your database\'s data to utf-8.', [], $translationDomain), + 47 => $translator->trans('Invalid shop name', [], 'Install'), + 48 => $translator->trans('Your firstname contains some invalid characters', [], 'Install'), + 49 => $translator->trans('Your lastname contains some invalid characters', [], $translationDomain), + 50 => $translator->trans('Your database server does not support the utf-8 charset.', [], 'Install'), + 51 => $translator->trans('Your MySQL server does not support this engine, please use another one like MyISAM', [], $translationDomain), + 52 => $translator->trans('The file /img/logo.jpg is not writable, please CHMOD 755 this file or CHMOD 777', [], $translationDomain), + 53 => $translator->trans('Invalid catalog mode', [], $translationDomain), + 999 => $translator->trans('No error code available', [], $translationDomain), + ]; return $ret; } diff --git a/classes/UpgradeSelfCheck.php b/classes/UpgradeSelfCheck.php index f3be2eecc..4b33358b6 100644 --- a/classes/UpgradeSelfCheck.php +++ b/classes/UpgradeSelfCheck.php @@ -359,7 +359,7 @@ public function isOkForUpgrade() private function checkRootWritable() { // Root directory permissions cannot be checked recursively anymore, it takes too much time - return ConfigurationTest::test_dir('/', false, $this->rootWritableReport); + return ConfigurationTest::test_dir('/', false, $this->rootWritableReport); } /** @@ -403,7 +403,7 @@ private function checkShopIsDeactivated() { return !Configuration::get('PS_SHOP_ENABLE') - || (isset($_SERVER['HTTP_HOST']) && in_array($_SERVER['HTTP_HOST'], array('127.0.0.1', 'localhost', '[::1]'))); + || (isset($_SERVER['HTTP_HOST']) && in_array($_SERVER['HTTP_HOST'], ['127.0.0.1', 'localhost', '[::1]'])); } /** @@ -434,7 +434,7 @@ private function checkSafeModeIsDisabled() $safeMode = ''; } - return !in_array(strtolower($safeMode), array(1, 'on')); + return !in_array(strtolower($safeMode), [1, 'on']); } /** diff --git a/classes/UpgradeTools/CacheCleaner.php b/classes/UpgradeTools/CacheCleaner.php index 2afdd06db..97cf2f72b 100644 --- a/classes/UpgradeTools/CacheCleaner.php +++ b/classes/UpgradeTools/CacheCleaner.php @@ -27,8 +27,8 @@ namespace PrestaShop\Module\AutoUpgrade\UpgradeTools; -use PrestaShop\Module\AutoUpgrade\UpgradeContainer; use PrestaShop\Module\AutoUpgrade\Log\LoggerInterface; +use PrestaShop\Module\AutoUpgrade\UpgradeContainer; class CacheCleaner { @@ -50,19 +50,19 @@ public function __construct(UpgradeContainer $container, LoggerInterface $logger public function cleanFolders() { - $dirsToClean = array( + $dirsToClean = [ $this->container->getProperty(UpgradeContainer::PS_ROOT_PATH) . '/app/cache/', $this->container->getProperty(UpgradeContainer::PS_ROOT_PATH) . '/cache/smarty/cache/', $this->container->getProperty(UpgradeContainer::PS_ROOT_PATH) . '/cache/smarty/compile/', $this->container->getProperty(UpgradeContainer::PS_ROOT_PATH) . '/var/cache/', - ); + ]; - $defaultThemeNames = array( + $defaultThemeNames = [ 'default', 'prestashop', 'default-boostrap', 'classic', - ); + ]; if (defined('_THEME_NAME_') && $this->container->getUpgradeConfiguration()->shouldUpdateDefaultTheme() && in_array(_THEME_NAME_, $defaultThemeNames)) { $dirsToClean[] = $this->container->getProperty(UpgradeContainer::PS_ROOT_PATH) . '/themes/' . _THEME_NAME_ . '/cache/'; @@ -70,7 +70,7 @@ public function cleanFolders() foreach ($dirsToClean as $dir) { if (!file_exists($dir)) { - $this->logger->debug($this->container->getTranslator()->trans('[SKIP] directory "%s" does not exist and cannot be emptied.', array(str_replace($this->container->getProperty(UpgradeContainer::PS_ROOT_PATH), '', $dir)), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->container->getTranslator()->trans('[SKIP] directory "%s" does not exist and cannot be emptied.', [str_replace($this->container->getProperty(UpgradeContainer::PS_ROOT_PATH), '', $dir)], 'Modules.Autoupgrade.Admin')); continue; } foreach (scandir($dir) as $file) { @@ -83,7 +83,7 @@ public function cleanFolders() } elseif (is_dir($dir . $file . DIRECTORY_SEPARATOR)) { FilesystemAdapter::deleteDirectory($dir . $file . DIRECTORY_SEPARATOR); } - $this->logger->debug($this->container->getTranslator()->trans('[CLEANING CACHE] File %s removed', array($file), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->container->getTranslator()->trans('[CLEANING CACHE] File %s removed', [$file], 'Modules.Autoupgrade.Admin')); } } } diff --git a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php index 0556b7807..626a2bea3 100644 --- a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php +++ b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php @@ -28,10 +28,10 @@ namespace PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader; use Cache; +use PrestaShop\Module\AutoUpgrade\Log\LoggerInterface; use PrestaShop\Module\AutoUpgrade\UpgradeContainer; use PrestaShop\Module\AutoUpgrade\UpgradeException; use PrestaShop\Module\AutoUpgrade\UpgradeTools\ThemeAdapter; -use PrestaShop\Module\AutoUpgrade\Log\LoggerInterface; /** * Class used to modify the core of PrestaShop, on the files are copied on the filesystem. @@ -92,7 +92,7 @@ public function doUpgrade() error_reporting(E_ALL); $resultDB = \Db::checkConnection(_DB_SERVER_, _DB_USER_, _DB_PASSWD_, _DB_NAME_); if ($resultDB !== 0) { - throw new UpgradeException($this->container->getTranslator()->trans('Invalid database configuration', array(), 'Modules.Autoupgrade.Admin')); + throw new UpgradeException($this->container->getTranslator()->trans('Invalid database configuration', [], 'Modules.Autoupgrade.Admin')); } if ($this->container->getUpgradeConfiguration()->shouldDeactivateCustomModules()) { @@ -105,7 +105,7 @@ public function doUpgrade() // Now we need to add all previous missing settings items, and reset cache and compile directories $this->writeNewSettings(); $this->runRecurrentQueries(); - $this->logger->debug($this->container->getTranslator()->trans('Database upgrade OK', array(), 'Modules.Autoupgrade.Admin')); // no error! + $this->logger->debug($this->container->getTranslator()->trans('Database upgrade OK', [], 'Modules.Autoupgrade.Admin')); // no error! $this->upgradeLanguages(); $this->generateHtaccess(); @@ -120,9 +120,9 @@ public function doUpgrade() $this->runCoreCacheClean(); if ($this->container->getState()->getWarningExists()) { - $this->logger->warning($this->container->getTranslator()->trans('Warning detected during upgrade.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->warning($this->container->getTranslator()->trans('Warning detected during upgrade.', [], 'Modules.Autoupgrade.Admin')); } else { - $this->logger->info($this->container->getTranslator()->trans('Database upgrade completed', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->container->getTranslator()->trans('Database upgrade completed', [], 'Modules.Autoupgrade.Admin')); } } @@ -237,25 +237,15 @@ public function normalizeVersion($version) protected function checkVersionIsNewer($oldVersion) { if (strpos($this->destinationUpgradeVersion, '.') === false) { - throw new UpgradeException($this->container->getTranslator()->trans('%s is not a valid version number.', array($this->destinationUpgradeVersion), 'Modules.Autoupgrade.Admin')); + throw new UpgradeException($this->container->getTranslator()->trans('%s is not a valid version number.', [$this->destinationUpgradeVersion], 'Modules.Autoupgrade.Admin')); } $versionCompare = version_compare($this->destinationUpgradeVersion, $oldVersion); if ($versionCompare === -1) { - throw new UpgradeException( - $this->container->getTranslator()->trans('[ERROR] Version to install is too old.', array(), 'Modules.Autoupgrade.Admin') - . ' ' . - $this->container->getTranslator()->trans( - 'Current version: %oldversion%. Version to install: %newversion%.', - array( - '%oldversion%' => $oldVersion, - '%newversion%' => $this->destinationUpgradeVersion, - ), - 'Modules.Autoupgrade.Admin' - )); + throw new UpgradeException($this->container->getTranslator()->trans('[ERROR] Version to install is too old.', [], 'Modules.Autoupgrade.Admin') . ' ' . $this->container->getTranslator()->trans('Current version: %oldversion%. Version to install: %newversion%.', ['%oldversion%' => $oldVersion, '%newversion%' => $this->destinationUpgradeVersion], 'Modules.Autoupgrade.Admin')); } elseif ($versionCompare === 0) { - throw new UpgradeException($this->container->getTranslator()->trans('You already have the %s version.', array($this->destinationUpgradeVersion), 'Modules.Autoupgrade.Admin')); + throw new UpgradeException($this->container->getTranslator()->trans('You already have the %s version.', [$this->destinationUpgradeVersion], 'Modules.Autoupgrade.Admin')); } } @@ -284,24 +274,24 @@ protected function upgradeDb($oldversion) protected function getUpgradeSqlFilesListToApply($upgrade_dir_sql, $oldversion) { if (!file_exists($upgrade_dir_sql)) { - throw new UpgradeException($this->container->getTranslator()->trans('Unable to find upgrade directory in the installation path.', array(), 'Modules.Autoupgrade.Admin')); + throw new UpgradeException($this->container->getTranslator()->trans('Unable to find upgrade directory in the installation path.', [], 'Modules.Autoupgrade.Admin')); } - $upgradeFiles = $neededUpgradeFiles = array(); + $upgradeFiles = $neededUpgradeFiles = []; if ($handle = opendir($upgrade_dir_sql)) { while (false !== ($file = readdir($handle))) { if ($file[0] === '.') { continue; } if (!is_readable($upgrade_dir_sql . $file)) { - throw new UpgradeException($this->container->getTranslator()->trans('Error while loading SQL upgrade file "%s".', array($file), 'Modules.Autoupgrade.Admin')); + throw new UpgradeException($this->container->getTranslator()->trans('Error while loading SQL upgrade file "%s".', [$file], 'Modules.Autoupgrade.Admin')); } $upgradeFiles[] = str_replace('.sql', '', $file); } closedir($handle); } if (empty($upgradeFiles)) { - throw new UpgradeException($this->container->getTranslator()->trans('Cannot find the SQL upgrade files. Please check that the %s folder is not empty.', array($upgrade_dir_sql), 'Modules.Autoupgrade.Admin')); + throw new UpgradeException($this->container->getTranslator()->trans('Cannot find the SQL upgrade files. Please check that the %s folder is not empty.', [$upgrade_dir_sql], 'Modules.Autoupgrade.Admin')); } natcasesort($upgradeFiles); @@ -323,10 +313,10 @@ protected function getUpgradeSqlFilesListToApply($upgrade_dir_sql, $oldversion) */ protected function applySqlParams(array $sqlFiles) { - $search = array('PREFIX_', 'ENGINE_TYPE', 'DB_NAME'); - $replace = array(_DB_PREFIX_, (defined('_MYSQL_ENGINE_') ? _MYSQL_ENGINE_ : 'MyISAM'), _DB_NAME_); + $search = ['PREFIX_', 'ENGINE_TYPE', 'DB_NAME']; + $replace = [_DB_PREFIX_, (defined('_MYSQL_ENGINE_') ? _MYSQL_ENGINE_ : 'MyISAM'), _DB_NAME_]; - $sqlRequests = array(); + $sqlRequests = []; foreach ($sqlFiles as $version => $file) { $sqlContent = file_get_contents($file) . "\n"; @@ -368,7 +358,7 @@ protected function runPhpQuery($upgrade_file, $query) preg_match_all('/([^,]+),? ?/', $paramsString, $parameters); $parameters = (isset($parameters[1]) && is_array($parameters[1])) ? $parameters[1] : - array(); + []; foreach ($parameters as &$parameter) { $parameter = str_replace('\'', '', $parameter); } @@ -392,7 +382,7 @@ protected function runPhpQuery($upgrade_file, $query) } // Or an object method else { - $func_name = array($php[0], str_replace($pattern[0], '', $php[1])); + $func_name = [$php[0], str_replace($pattern[0], '', $php[1])]; $this->logger->error('[ERROR] ' . $upgrade_file . ' PHP - Object Method call is forbidden (' . $php[0] . '::' . str_replace($pattern[0], '', $php[1]) . ')'); $this->container->getState()->setWarningExists(true); @@ -418,7 +408,7 @@ protected function runSqlQuery($upgrade_file, $query) if (!empty($matches[1])) { $drop = 'DROP TABLE IF EXISTS `' . _DB_PREFIX_ . $matches[1] . '`;'; if ($this->db->execute($drop, false)) { - $this->logger->debug('
' . $this->container->getTranslator()->trans('[DROP] SQL %s table has been dropped.', array('`' . _DB_PREFIX_ . $matches[1] . '`'), 'Modules.Autoupgrade.Admin') . '
'); + $this->logger->debug('
' . $this->container->getTranslator()->trans('[DROP] SQL %s table has been dropped.', ['`' . _DB_PREFIX_ . $matches[1] . '`'], 'Modules.Autoupgrade.Admin') . '
'); } } } @@ -436,7 +426,7 @@ protected function runSqlQuery($upgrade_file, $query) [WARNING] SQL ' . $upgrade_file . ' ' . $error_number . ' in ' . $query . ': ' . $error . ''); - $duplicates = array('1050', '1054', '1060', '1061', '1062', '1091'); + $duplicates = ['1050', '1054', '1060', '1061', '1062', '1091']; if (!in_array($error_number, $duplicates)) { $this->logger->error('SQL ' . $upgrade_file . ' ' . $error_number . ' in ' . $query . ': ' . $error); $this->container->getState()->setWarningExists(true); @@ -625,7 +615,7 @@ protected function loadEntityInterface() protected function cleanXmlFiles() { - $files = array( + $files = [ $this->container->getProperty(UpgradeContainer::PS_ADMIN_PATH) . DIRECTORY_SEPARATOR . 'themes' . DIRECTORY_SEPARATOR . 'default' . DIRECTORY_SEPARATOR . 'template' . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'header.tpl', _PS_ROOT_DIR_ . '/app/cache/dev/class_index.php', _PS_ROOT_DIR_ . '/app/cache/prod/class_index.php', @@ -640,7 +630,7 @@ protected function cleanXmlFiles() _PS_ROOT_DIR_ . '/config/xml/untrusted_modules_list.xml', _PS_ROOT_DIR_ . '/var/cache/dev/class_index.php', _PS_ROOT_DIR_ . '/var/cache/prod/class_index.php', - ); + ]; foreach ($files as $path) { if (file_exists($path)) { unlink($path); @@ -673,7 +663,7 @@ protected function updateTheme() if (!$this->container->getUpgradeConfiguration()->shouldSwitchToDefaultTheme()) { return; } - $this->logger->info($this->container->getTranslator()->trans('Switching to default theme.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->container->getTranslator()->trans('Switching to default theme.', [], 'Modules.Autoupgrade.Admin')); $themeAdapter = new ThemeAdapter($this->db, $this->destinationUpgradeVersion); Cache::clean('*'); diff --git a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader16.php b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader16.php index c2e71a05b..956f3bf11 100644 --- a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader16.php +++ b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader16.php @@ -50,10 +50,10 @@ public function writeNewSettings() if (!defined('_PS_CACHE_ENABLED_')) { define('_PS_CACHE_ENABLED_', '0'); } - $caches = array('CacheMemcache', 'CacheApc', 'CacheFs', 'CacheMemcached', - 'CacheXcache', ); + $caches = ['CacheMemcache', 'CacheApc', 'CacheFs', 'CacheMemcached', + 'CacheXcache', ]; - $datas = array( + $datas = [ '_DB_SERVER_' => _DB_SERVER_, '_DB_NAME_' => _DB_NAME_, '_DB_USER_' => _DB_USER_, @@ -67,7 +67,7 @@ public function writeNewSettings() '_PS_CREATION_DATE_' => defined('_PS_CREATION_DATE_') ? _PS_CREATION_DATE_ : date('Y-m-d'), '_PS_VERSION_' => $this->destinationUpgradeVersion, '_PS_DIRECTORY_' => __PS_BASE_URI__, - ); + ]; if (defined('_RIJNDAEL_KEY_') && defined('_RIJNDAEL_IV_')) { $datas['_RIJNDAEL_KEY_'] = _RIJNDAEL_KEY_; @@ -82,7 +82,7 @@ public function writeNewSettings() $writer = new SettingsFileWriter($this->container->getTranslator()); $writer->writeSettingsFile($this->pathToSettingsFile, $datas); - $this->logger->debug($this->container->getTranslator()->trans('Settings file updated', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->debug($this->container->getTranslator()->trans('Settings file updated', [], 'Modules.Autoupgrade.Admin')); } protected function initConstants() @@ -96,7 +96,7 @@ protected function initConstants() protected function getPreUpgradeVersion() { if (!file_exists($this->pathToSettingsFile)) { - throw new UpgradeException($this->container->getTranslator()->trans('The config/settings.inc.php file was not found.', array(), 'Modules.Autoupgrade.Admin')); + throw new UpgradeException($this->container->getTranslator()->trans('The config/settings.inc.php file was not found.', [], 'Modules.Autoupgrade.Admin')); } include_once $this->pathToSettingsFile; @@ -120,7 +120,7 @@ protected function upgradeLanguage($lang) $gz = new \Archive_Tar($file, 'gz'); $files_list = $gz->listContent(); if (!$this->container->getUpgradeConfiguration()->shouldKeepMails()) { - $files_listing = array(); + $files_listing = []; foreach ($files_list as $i => $file) { if (preg_match('/^mails\/' . $lang['iso_code'] . '\/.*/', $file['filename'])) { unset($files_list[$i]); diff --git a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php index 70bf5e55e..1ab1de474 100644 --- a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php +++ b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php @@ -62,8 +62,7 @@ protected function upgradeDb($oldversion) $commandResult = $this->container->getSymfonyAdapter()->runSchemaUpgradeCommand(); if (0 !== $commandResult['exitCode']) { - throw (new UpgradeException($this->container->getTranslator()->trans('Error upgrading Doctrine schema', array(), 'Modules.Autoupgrade.Admin'))) - ->setQuickInfos(explode("\n", $commandResult['output'])); + throw (new UpgradeException($this->container->getTranslator()->trans('Error upgrading Doctrine schema', [], 'Modules.Autoupgrade.Admin')))->setQuickInfos(explode("\n", $commandResult['output'])); } } @@ -74,19 +73,10 @@ protected function upgradeLanguage($lang) if (!\Validate::isLangIsoCode($isoCode)) { return; } - $errorsLanguage = array(); + $errorsLanguage = []; if (!\Language::downloadLanguagePack($isoCode, _PS_VERSION_, $errorsLanguage)) { - throw new UpgradeException( - $this->container->getTranslator()->trans( - 'Download of the language pack %lang% failed. %details%', - [ - '%lang%' => $isoCode, - '%details%' => implode('; ', $errorsLanguage), - ], - 'Modules.Autoupgrade.Admin' - ) - ); + throw new UpgradeException($this->container->getTranslator()->trans('Download of the language pack %lang% failed. %details%', ['%lang%' => $isoCode, '%details%' => implode('; ', $errorsLanguage)], 'Modules.Autoupgrade.Admin')); } $lang_pack = \Language::getLangDetails($isoCode); @@ -97,16 +87,7 @@ protected function upgradeLanguage($lang) } if (!empty($errorsLanguage)) { - throw new UpgradeException( - $this->container->getTranslator()->trans( - 'Error while updating translations for lang %lang%. %details%', - [ - '%lang%' => $isoCode, - '%details%' => implode('; ', $errorsLanguage), - ], - 'Modules.Autoupgrade.Admin' - ) - ); + throw new UpgradeException($this->container->getTranslator()->trans('Error while updating translations for lang %lang%. %details%', ['%lang%' => $isoCode, '%details%' => implode('; ', $errorsLanguage)], 'Modules.Autoupgrade.Admin')); } \Language::loadLanguages(); @@ -135,14 +116,13 @@ protected function updateRTLFiles() if (!$this->container->getUpgradeConfiguration()->shouldUpdateRTLFiles()) { return; } - $this->logger->info($this->container->getTranslator()->trans('Upgrade the RTL files.', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->info($this->container->getTranslator()->trans('Upgrade the RTL files.', [], 'Modules.Autoupgrade.Admin')); $themeAdapter = new ThemeAdapter($this->db, $this->destinationUpgradeVersion); $themes = $themeAdapter->getListFromDisk(); $this->removeExistingRTLFiles($themes); foreach ($themes as $theme) { - $adaptThemeToTRLLanguages = new AdaptThemeToRTLLanguagesCommand( new ThemeName($theme['name']) ); diff --git a/classes/UpgradeTools/Database.php b/classes/UpgradeTools/Database.php index 1ab500f01..34e6ed3cc 100644 --- a/classes/UpgradeTools/Database.php +++ b/classes/UpgradeTools/Database.php @@ -42,7 +42,7 @@ public function getAllTables() { $tables = $this->db->executeS('SHOW TABLES LIKE "' . _DB_PREFIX_ . '%"', true, false); - $all_tables = array(); + $all_tables = []; foreach ($tables as $v) { $table = reset($v); $all_tables[$table] = $table; diff --git a/classes/UpgradeTools/FileFilter.php b/classes/UpgradeTools/FileFilter.php index 087da28b0..b34952665 100644 --- a/classes/UpgradeTools/FileFilter.php +++ b/classes/UpgradeTools/FileFilter.php @@ -55,7 +55,7 @@ public function __construct(UpgradeConfiguration $configuration, $autoupgradeDir public function getFilesToIgnoreOnBackup() { // during backup, do not save - $backupIgnoreAbsoluteFiles = array( + $backupIgnoreAbsoluteFiles = [ '/app/cache', '/cache/smarty/compile', '/cache/smarty/cache', @@ -66,7 +66,7 @@ public function getFilesToIgnoreOnBackup() // do not care about the two autoupgrade dir we use; '/modules/autoupgrade', '/admin/autoupgrade', - ); + ]; if (!$this->configuration->shouldBackupImages()) { $backupIgnoreAbsoluteFiles[] = '/img'; @@ -84,14 +84,14 @@ public function getFilesToIgnoreOnBackup() */ public function getFilesToIgnoreOnRestore() { - $restoreIgnoreAbsoluteFiles = array( + $restoreIgnoreAbsoluteFiles = [ '/app/config/parameters.php', '/app/config/parameters.yml', '/modules/autoupgrade', '/admin/autoupgrade', '.', '..', - ); + ]; if (!$this->configuration->shouldBackupImages()) { $restoreIgnoreAbsoluteFiles[] = '/img'; @@ -110,12 +110,12 @@ public function getFilesToIgnoreOnRestore() public function getFilesToIgnoreOnUpgrade() { // do not copy install, neither app/config/parameters.php in case it would be present - $excludeAbsoluteFilesFromUpgrade = array( + $excludeAbsoluteFilesFromUpgrade = [ '/app/config/parameters.php', '/app/config/parameters.yml', '/install', '/install-dev', - ); + ]; // this will exclude autoupgrade dir from admin, and autoupgrade from modules // If set to false, we need to preserve the default themes @@ -139,12 +139,12 @@ public function getFilesToIgnoreOnUpgrade() */ public function getExcludeFiles() { - return array( + return [ '.', '..', '.svn', '.git', $this->autoupgradeDir, - ); + ]; } } diff --git a/classes/UpgradeTools/FilesystemAdapter.php b/classes/UpgradeTools/FilesystemAdapter.php index 406ed0e04..a87bc45b2 100644 --- a/classes/UpgradeTools/FilesystemAdapter.php +++ b/classes/UpgradeTools/FilesystemAdapter.php @@ -45,16 +45,16 @@ class FilesystemAdapter * * @var array */ - private $releaseFileChecks = array( - 'files' => array( + private $releaseFileChecks = [ + 'files' => [ 'index.php', 'config/defines.inc.php', - ), - 'folders' => array( + ], + 'folders' => [ 'classes', 'controllers', - ), - ); + ], + ]; public function __construct(FileFilter $fileFilter, $restoreFilesFilename, $autoupgradeDir, $adminSubDir, $prodRootDir) @@ -79,7 +79,7 @@ public static function deleteDirectory($dirname, $delete_self = true) public function listFilesInDir($dir, $way = 'backup', $list_directories = false) { - $list = array(); + $list = []; $dir = rtrim($dir, '/') . DIRECTORY_SEPARATOR; $allFiles = false; if (is_dir($dir) && is_readable($dir)) { @@ -149,7 +149,7 @@ public function listFilesToRemove() */ public function listSampleFilesFromArray(array $directoryList) { - $res = array(); + $res = []; foreach ($directoryList as $directory) { $res = array_merge($res, $this->listSampleFiles($directory['path'], $directory['filter'])); } @@ -168,7 +168,7 @@ public function listSampleFilesFromArray(array $directoryList) */ public function listSampleFiles($dir, $fileext = '.jpg') { - $res = array(); + $res = []; $dir = rtrim($dir, '/') . DIRECTORY_SEPARATOR; $toDel = false; if (is_dir($dir) && is_readable($dir)) { @@ -211,7 +211,7 @@ public function isFileSkipped($file, $fullpath, $way = 'backup', $temporaryWorks return true; } - $ignoreList = array(); + $ignoreList = []; if ('backup' === $way) { $ignoreList = $this->fileFilter->getFilesToIgnoreOnBackup(); } elseif ('restore' === $way) { diff --git a/classes/UpgradeTools/ModuleAdapter.php b/classes/UpgradeTools/ModuleAdapter.php index f15380c1a..7317aa9d2 100644 --- a/classes/UpgradeTools/ModuleAdapter.php +++ b/classes/UpgradeTools/ModuleAdapter.php @@ -85,7 +85,7 @@ public function getModuleDataUpdater() /** * Available only since 1.7.6.0 Can't be called on PS 1.6. * - * @return PrestaShop\PrestaShop\Core\CommandBus\TacticianCommandBusAdapter + * @return \PrestaShop\PrestaShop\Core\CommandBus\TacticianCommandBusAdapter */ public function getCommandBus() { @@ -121,13 +121,11 @@ public function disableNonNativeModules($pathToUpgradeScripts) */ public function listModulesToUpgrade(array $modulesFromAddons) { - $list = array(); + $list = []; $dir = $this->modulesPath; if (!is_dir($dir)) { - throw (new UpgradeException($this->translator->trans('[ERROR] %dir% does not exist or is not a directory.', array('%dir%' => $dir), 'Modules.Autoupgrade.Admin'))) - ->addQuickInfo($this->translator->trans('[ERROR] %s does not exist or is not a directory.', array($dir), 'Modules.Autoupgrade.Admin')) - ->setSeverity(UpgradeException::SEVERITY_ERROR); + throw (new UpgradeException($this->translator->trans('[ERROR] %dir% does not exist or is not a directory.', ['%dir%' => $dir], 'Modules.Autoupgrade.Admin')))->addQuickInfo($this->translator->trans('[ERROR] %s does not exist or is not a directory.', [$dir], 'Modules.Autoupgrade.Admin'))->setSeverity(UpgradeException::SEVERITY_ERROR); } foreach (scandir($dir) as $module_name) { @@ -140,7 +138,7 @@ public function listModulesToUpgrade(array $modulesFromAddons) } $id_addons = array_search($module_name, $modulesFromAddons); if (false !== $id_addons && $module_name !== 'autoupgrade') { - $list[] = array('id' => $id_addons, 'name' => $module_name); + $list[] = ['id' => $id_addons, 'name' => $module_name]; } } @@ -158,7 +156,7 @@ public function upgradeModule($id, $name) $zip_fullpath = $this->tempPath . DIRECTORY_SEPARATOR . $name . '.zip'; $addons_url = 'api.addons.prestashop.com'; - $protocolsList = array('https://' => 443, 'http://' => 80); + $protocolsList = ['https://' => 443, 'http://' => 80]; if (!extension_loaded('openssl')) { unset($protocolsList['https://']); } else { @@ -168,14 +166,14 @@ public function upgradeModule($id, $name) $postData = 'version=' . $this->upgradeVersion . '&method=module&id_module=' . (int) $id; // Make the request - $opts = array( - 'http' => array( + $opts = [ + 'http' => [ 'method' => 'POST', 'content' => $postData, 'header' => 'Content-type: application/x-www-form-urlencoded', 'timeout' => 10, - ), - ); + ], + ]; $context = stream_context_create($opts); foreach ($protocolsList as $protocol => $port) { // file_get_contents can return false if https is not supported (or warning) @@ -185,12 +183,12 @@ public function upgradeModule($id, $name) } if (empty($content)) { - $msg = '' . $this->translator->trans('[ERROR] No response from Addons server.', array(), 'Modules.Autoupgrade.Admin') . ''; + $msg = '' . $this->translator->trans('[ERROR] No response from Addons server.', [], 'Modules.Autoupgrade.Admin') . ''; throw new UpgradeException($msg); } if (false === (bool) file_put_contents($zip_fullpath, $content)) { - $msg = '' . $this->translator->trans('[ERROR] Unable to write module %s\'s zip file in temporary directory.', array($name), 'Modules.Autoupgrade.Admin') . ''; + $msg = '' . $this->translator->trans('[ERROR] Unable to write module %s\'s zip file in temporary directory.', [$name], 'Modules.Autoupgrade.Admin') . ''; throw new UpgradeException($msg); } @@ -199,8 +197,7 @@ public function upgradeModule($id, $name) } // unzip in modules/[mod name] old files will be conserved if (!$this->zipAction->extract($zip_fullpath, $this->modulesPath)) { - throw (new UpgradeException('' . $this->translator->trans('[WARNING] Error when trying to extract module %s.', array($name), 'Modules.Autoupgrade.Admin') . '')) - ->setSeverity(UpgradeException::SEVERITY_WARNING); + throw (new UpgradeException('' . $this->translator->trans('[WARNING] Error when trying to extract module %s.', [$name], 'Modules.Autoupgrade.Admin') . ''))->setSeverity(UpgradeException::SEVERITY_WARNING); } if (file_exists($zip_fullpath)) { unlink($zip_fullpath); @@ -209,9 +206,7 @@ public function upgradeModule($id, $name) // Only 1.7 step if (version_compare($this->upgradeVersion, '1.7.0.0', '>=') && !$this->doUpgradeModule($name)) { - throw (new UpgradeException('' . $this->translator->trans('[WARNING] Error when trying to upgrade module %s.', array($name), 'Modules.Autoupgrade.Admin') . '')) - ->setSeverity(UpgradeException::SEVERITY_WARNING) - ->setQuickInfos(\Module::getInstanceByName($name)->getErrors()); + throw (new UpgradeException('' . $this->translator->trans('[WARNING] Error when trying to upgrade module %s.', [$name], 'Modules.Autoupgrade.Admin') . ''))->setSeverity(UpgradeException::SEVERITY_WARNING)->setQuickInfos(\Module::getInstanceByName($name)->getErrors()); } return; @@ -229,14 +224,16 @@ private function doUpgradeModule($name) 'SELECT version FROM `' . _DB_PREFIX_ . 'module` WHERE name = "' . $name . '"' ); $module = \Module::getInstanceByName($name); - $module->installed = !empty($version); - $module->database_version = $version ?: 0; + if ($module instanceof \Module) { + $module->installed = !empty($version); + $module->database_version = $version ?: 0; - if (\Module::initUpgradeModule($module)) { - $module->runUpgradeModule(); - \Module::upgradeModuleVersion($name, $module->version); + if (\Module::initUpgradeModule($module)) { + $module->runUpgradeModule(); + \Module::upgradeModuleVersion($name, $module->version); - return !count($module->getErrors()); + return !count($module->getErrors()); + } } return true; diff --git a/classes/UpgradeTools/SettingsFileWriter.php b/classes/UpgradeTools/SettingsFileWriter.php index ab665c66c..5fba18c66 100644 --- a/classes/UpgradeTools/SettingsFileWriter.php +++ b/classes/UpgradeTools/SettingsFileWriter.php @@ -27,10 +27,10 @@ namespace PrestaShop\Module\AutoUpgrade\UpgradeTools; -use PrestaShop\Module\AutoUpgrade\UpgradeException; use PrestaShop\Module\AutoUpgrade\Log\LoggerInterface; -use Symfony\Component\Filesystem\Filesystem; use PrestaShop\Module\AutoUpgrade\LoggedEvent; +use PrestaShop\Module\AutoUpgrade\UpgradeException; +use Symfony\Component\Filesystem\Filesystem; class SettingsFileWriter { @@ -57,7 +57,7 @@ public function migrateSettingsFile(LoggerInterface $logger) public function writeSettingsFile($filePath, $data) { if (!is_writable($filePath)) { - throw new UpgradeException($this->translator->trans('Error when opening settings.inc.php file in write mode', array(), 'Modules.Autoupgrade.Admin')); + throw new UpgradeException($this->translator->trans('Error when opening settings.inc.php file in write mode', [], 'Modules.Autoupgrade.Admin')); } // Create backup file @@ -68,7 +68,7 @@ public function writeSettingsFile($filePath, $data) fwrite($fd, ' $value) { if (false === fwrite($fd, "define('$name', '{$this->checkString($value)}');" . PHP_EOL)) { - throw new UpgradeException($this->translator->trans('Error when generating new settings.inc.php file.', array(), 'Modules.Autoupgrade.Admin')); + throw new UpgradeException($this->translator->trans('Error when generating new settings.inc.php file.', [], 'Modules.Autoupgrade.Admin')); } } fclose($fd); @@ -81,7 +81,7 @@ public function checkString($string) } if (!is_numeric($string)) { $string = addslashes($string); - $string = str_replace(array("\n", "\r"), '', $string); + $string = str_replace(["\n", "\r"], '', $string); } return $string; diff --git a/classes/UpgradeTools/Translation.php b/classes/UpgradeTools/Translation.php index 37efcc58f..d8e3295ca 100644 --- a/classes/UpgradeTools/Translation.php +++ b/classes/UpgradeTools/Translation.php @@ -27,8 +27,8 @@ namespace PrestaShop\Module\AutoUpgrade\UpgradeTools; -use PrestaShop\Module\AutoUpgrade\Tools14; use PrestaShop\Module\AutoUpgrade\Log\LoggerInterface; +use PrestaShop\Module\AutoUpgrade\Tools14; class Translation { @@ -120,7 +120,7 @@ public function mergeTranslationFile($orig, $dest, $type) } if (!file_exists($orig)) { - $this->logger->notice($this->translator->trans('[NOTICE] File %s does not exist, merge skipped.', array($orig), 'Modules.Autoupgrade.Admin')); + $this->logger->notice($this->translator->trans('[NOTICE] File %s does not exist, merge skipped.', [$orig], 'Modules.Autoupgrade.Admin')); return true; } @@ -128,10 +128,10 @@ public function mergeTranslationFile($orig, $dest, $type) if (!isset($$var_name)) { $this->logger->warning($this->translator->trans( '[WARNING] %variablename% variable missing in file %filename%. Merge skipped.', - array( + [ '%variablename%' => $var_name, '%filename%' => $orig, - ), + ], 'Modules.Autoupgrade.Admin' )); @@ -140,7 +140,7 @@ public function mergeTranslationFile($orig, $dest, $type) $var_orig = $$var_name; if (!file_exists($dest)) { - $this->logger->notice($this->translator->trans('[NOTICE] File %s does not exist, merge skipped.', array($dest), 'Modules.Autoupgrade.Admin')); + $this->logger->notice($this->translator->trans('[NOTICE] File %s does not exist, merge skipped.', [$dest], 'Modules.Autoupgrade.Admin')); return false; } @@ -153,10 +153,10 @@ public function mergeTranslationFile($orig, $dest, $type) } $this->logger->warning($this->translator->trans( '[WARNING] %variablename% variable missing in file %filename%. File %filename% deleted and merge skipped.', - array( + [ '%variablename%' => $var_name, '%filename%' => $dest, - ), + ], 'Modules.Autoupgrade.Admin' )); @@ -200,8 +200,8 @@ public function mergeTranslationFile($orig, $dest, $type) */ private function escape($str, $html_ok = false) { - $search = array('\\', "\0", "\n", "\r", "\x1a", "'", '"'); - $replace = array('\\\\', '\\0', '\\n', '\\r', "\Z", "\'", '\"'); + $search = ['\\', "\0", "\n", "\r", "\x1a", "'", '"']; + $replace = ['\\\\', '\\0', '\\n', '\\r', "\Z", "\'", '\"']; $str = str_replace($search, $replace, $str); if (!$html_ok) { return strip_tags(Tools14::nl2br($str)); diff --git a/classes/UpgradeTools/Translator.php b/classes/UpgradeTools/Translator.php index 30e84c7ff..138e28642 100644 --- a/classes/UpgradeTools/Translator.php +++ b/classes/UpgradeTools/Translator.php @@ -49,7 +49,7 @@ public function __construct($caller) * * @return string Translated string with parameters applied */ - public function trans($id, array $parameters = array(), $domain = 'Modules.Autoupgrade.Admin', $locale = null) + public function trans($id, array $parameters = [], $domain = 'Modules.Autoupgrade.Admin', $locale = null) { // If PrestaShop core is not instancied properly, do not try to translate if (!method_exists('\Context', 'getContext') || null === \Context::getContext()->language) { @@ -76,7 +76,7 @@ public function trans($id, array $parameters = array(), $domain = 'Modules.Autou * * @internal Public for tests */ - public function applyParameters($id, array $parameters = array()) + public function applyParameters($id, array $parameters = []) { // Replace placeholders for non numeric keys foreach ($parameters as $placeholder => $value) { @@ -87,6 +87,6 @@ public function applyParameters($id, array $parameters = array()) unset($parameters[$placeholder]); } - return call_user_func_array('sprintf', array_merge(array($id), $parameters)); + return call_user_func_array('sprintf', array_merge([$id], $parameters)); } } diff --git a/classes/Upgrader.php b/classes/Upgrader.php index 15d0416d5..6bd8dfd90 100755 --- a/classes/Upgrader.php +++ b/classes/Upgrader.php @@ -27,9 +27,9 @@ namespace PrestaShop\Module\AutoUpgrade; -use Symfony\Component\Filesystem\Filesystem; -use Symfony\Component\Filesystem\Exception\IOException; use Configuration; +use Symfony\Component\Filesystem\Exception\IOException; +use Symfony\Component\Filesystem\Filesystem; class Upgrader { @@ -45,13 +45,13 @@ class Upgrader * @var bool contains true if last version is not installed */ private $need_upgrade = false; - private $changed_files = array(); - private $missing_files = array(); + private $changed_files = []; + private $missing_files = []; public $version_name; public $version_num; public $version_is_modified; - public $version_md5 = array(); + public $version_md5 = []; /** * @var string contains hte url where to download the file */ @@ -74,7 +74,7 @@ public function __construct($version, $autoload = false) { $this->currentPsVersion = $version; if ($autoload) { - $matches = array(); + $matches = []; preg_match('#([0-9]+\.[0-9]+)\.[0-9]+\.[0-9]+#', $this->currentPsVersion, $matches); $this->branch = $matches[1]; if (empty($this->channel)) { @@ -136,7 +136,7 @@ public function isLastVersion() * * @return mixed */ - public function checkPSVersion($refresh = false, $array_no_major = array('minor')) + public function checkPSVersion($refresh = false, $array_no_major = ['minor']) { // if we use the autoupgrade process, we will never refresh it // except if no check has been done before @@ -149,7 +149,7 @@ public function checkPSVersion($refresh = false, $array_no_major = array('minor' // if you follow rc, you also follow stable // if you follow beta, you also follow rc // et caetera - $followed_channels = array(); + $followed_channels = []; $followed_channels[] = $this->channel; switch ($this->channel) { case 'alpha': @@ -228,7 +228,7 @@ public function checkPSVersion($refresh = false, $array_no_major = array('minor' if (version_compare($this->currentPsVersion, $this->version_num, '<')) { $this->need_upgrade = true; - return array('name' => $this->version_name, 'link' => $this->link); + return ['name' => $this->version_name, 'link' => $this->link]; } else { return false; } @@ -266,18 +266,18 @@ public function getApiAddons($xml_localfile, $postData, $refresh = false) mkdir(_PS_ROOT_DIR_ . '/config/xml', 0777); } if ($refresh || !file_exists($xml_localfile) || @filemtime($xml_localfile) < (time() - (3600 * self::DEFAULT_CHECK_VERSION_DELAY_HOURS))) { - $protocolsList = array('https://' => 443, 'http://' => 80); + $protocolsList = ['https://' => 443, 'http://' => 80]; if (!extension_loaded('openssl')) { unset($protocolsList['https://']); } // Make the request - $opts = array( - 'http' => array( + $opts = [ + 'http' => [ 'method' => 'POST', 'content' => $postData, 'header' => 'Content-type: application/x-www-form-urlencoded', 'timeout' => 10, - ), ); + ], ]; $context = stream_context_create($opts); $xml = false; foreach ($protocolsList as $protocol => $port) { @@ -307,7 +307,7 @@ public function getXmlFile($xml_localfile, $xml_remotefile, $refresh = false) mkdir(_PS_ROOT_DIR_ . '/config/xml', 0777); } if ($refresh || !file_exists($xml_localfile) || @filemtime($xml_localfile) < (time() - (3600 * self::DEFAULT_CHECK_VERSION_DELAY_HOURS))) { - $xml_string = Tools14::file_get_contents($xml_remotefile, false, stream_context_create(array('http' => array('timeout' => 10)))); + $xml_string = Tools14::file_get_contents($xml_remotefile, false, stream_context_create(['http' => ['timeout' => 10]])); $xml = @simplexml_load_string($xml_string); if ($xml !== false) { file_put_contents($xml_localfile, $xml_string); @@ -406,7 +406,7 @@ protected function addMissingFile($path) public function md5FileAsArray($node, $dir = '/') { - $array = array(); + $array = []; foreach ($node as $key => $child) { if (is_object($child) && $child->getName() == 'dir') { $dir = (string) $child['name']; @@ -470,9 +470,9 @@ public function getDiffFilesList($version1, $version2, $show_modif = true, $refr public function compareReleases($v1, $v2, $show_modif = true, $path = '/') { // in that array the list of files present in v1 deleted in v2 - static $deletedFiles = array(); + static $deletedFiles = []; // in that array the list of files present in v1 modified in v2 - static $modifiedFiles = array(); + static $modifiedFiles = []; foreach ($v1 as $file => $md5) { if (is_array($md5)) { @@ -494,7 +494,7 @@ public function compareReleases($v1, $v2, $show_modif = true, $path = '/') } } - return array('deleted' => $deletedFiles, 'modified' => $modifiedFiles); + return ['deleted' => $deletedFiles, 'modified' => $modifiedFiles]; } /** @@ -504,7 +504,7 @@ public function compareReleases($v1, $v2, $show_modif = true, $path = '/') * @param array $current_path * @param int $level */ - protected function browseXmlAndCompare($node, &$current_path = array(), $level = 1) + protected function browseXmlAndCompare($node, &$current_path = [], $level = 1) { foreach ($node as $key => $child) { if (is_object($child) && $child->getName() == 'dir') { diff --git a/classes/Workspace.php b/classes/Workspace.php index 983493e45..7d17b88b5 100644 --- a/classes/Workspace.php +++ b/classes/Workspace.php @@ -57,10 +57,10 @@ public function createFolders() { foreach ($this->paths as $path) { if (!file_exists($path) && !mkdir($path)) { - $this->logger->error($this->translator->trans('Unable to create directory %s', array($path), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('Unable to create directory %s', [$path], 'Modules.Autoupgrade.Admin')); } if (!is_writable($path)) { - $this->logger->error($this->translator->trans('Unable to write in the directory "%s"', array($path), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('Unable to write in the directory "%s"', [$path], 'Modules.Autoupgrade.Admin')); } } } diff --git a/classes/ZipAction.php b/classes/ZipAction.php index 8d019bd6b..cba276be3 100644 --- a/classes/ZipAction.php +++ b/classes/ZipAction.php @@ -28,8 +28,8 @@ namespace PrestaShop\Module\AutoUpgrade; use PrestaShop\Module\AutoUpgrade\Log\LoggerInterface; -use Symfony\Component\Filesystem\Filesystem; use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeConfiguration; +use Symfony\Component\Filesystem\Filesystem; class ZipAction { @@ -64,8 +64,8 @@ public function __construct($translator, LoggerInterface $logger, UpgradeConfigu * Add files to an archive. * Note the number of files added can be limited. * - * @var array $filesList List of files to add - * @var string $toFile + * @var array List of files to add + * @var string */ public function compress(&$filesList, $toFile) { @@ -88,10 +88,10 @@ public function compress(&$filesList, $toFile) (new Filesystem())->remove($toFile); $this->logger->error($this->translator->trans( 'Error when trying to add %filename% to archive %archive%.', - array( + [ '%filename%' => $file, '%archive%' => $archiveFilename, - ), + ], 'Modules.Autoupgrade.Admin' )); @@ -100,10 +100,10 @@ public function compress(&$filesList, $toFile) $this->logger->debug($this->translator->trans( '%filename% added to archive. %filescount% files left.', - array( + [ '%filename%' => $archiveFilename, '%filescount%' => count($filesList), - ), + ], 'Modules.Autoupgrade.Admin' )); } @@ -111,7 +111,7 @@ public function compress(&$filesList, $toFile) if (!$zip->close()) { $this->logger->error($this->translator->trans( 'Could not close the Zip file properly. Check you are allowed to write on the disk and there is available space on it.', - array(), + [], 'Modules.Autoupgrade.Admin' )); @@ -130,7 +130,7 @@ public function compress(&$filesList, $toFile) public function extract($from_file, $to_dir) { if (!is_file($from_file)) { - $this->logger->error($this->translator->trans('%s is not a file', array($from_file), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('%s is not a file', [$from_file], 'Modules.Autoupgrade.Admin')); return false; } @@ -138,7 +138,7 @@ public function extract($from_file, $to_dir) if (!file_exists($to_dir)) { // ToDo: Use Filesystem from Symfony if (!mkdir($to_dir)) { - $this->logger->error($this->translator->trans('Unable to create directory %s.', array($to_dir), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('Unable to create directory %s.', [$to_dir], 'Modules.Autoupgrade.Admin')); return false; } @@ -151,7 +151,7 @@ public function extract($from_file, $to_dir) } for ($i = 0; $i < $zip->numFiles; ++$i) { - if (!$zip->extractTo($to_dir, array($zip->getNameIndex($i)))) { + if (!$zip->extractTo($to_dir, [$zip->getNameIndex($i)])) { $this->logger->error( $this->translator->trans( 'Could not extract %file% from backup, the destination might not be writable.', @@ -174,7 +174,7 @@ public function extract($from_file, $to_dir) /** * Lists the files present in the given archive * - * @var string $zipfile Path to the file + * @var string Path to the file * * @return array */ @@ -186,7 +186,7 @@ public function listContent($zipfile) $zip = $this->open($zipfile); if ($zip === false) { - $this->logger->error($this->translator->trans('[ERROR] Unable to list archived files', array(), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('[ERROR] Unable to list archived files', [], 'Modules.Autoupgrade.Admin')); return []; } @@ -202,7 +202,7 @@ public function listContent($zipfile) /** * Get the path of a file from the archive root * - * @var string $filepath Path of the file on the filesystem + * @var string Path of the file on the filesystem * * @return string Path of the file in the backup archive */ @@ -214,7 +214,7 @@ private function getFilepathInArchive($filepath) /** * Checks a file size matches the given limits * - * @var string $filepath Path to a file + * @var string Path to a file * * @return bool Size is inside the maximum limit */ @@ -225,10 +225,10 @@ private function isFileWithinFileSizeLimit($filepath) if (!$pass) { $this->logger->debug($this->translator->trans( 'File %filename% (size: %filesize%) has been skipped during backup.', - array( + [ '%filename%' => $this->getFilepathInArchive($filepath), '%filesize%' => $size, - ), + ], 'Modules.Autoupgrade.Admin' )); } @@ -239,8 +239,8 @@ private function isFileWithinFileSizeLimit($filepath) /** * Open an archive * - * @var string $zipFile Path to the archive - * @var int $flags ZipArchive flags + * @var string Path to the archive + * @var int ZipArchive flags * * @return false|\ZipArchive */ @@ -248,7 +248,7 @@ private function open($zipFile, $flags = null) { $zip = new \ZipArchive(); if ($zip->open($zipFile, $flags) !== true || empty($zip->filename)) { - $this->logger->error($this->translator->trans('Unable to open zipFile %s', array($zipFile), 'Modules.Autoupgrade.Admin')); + $this->logger->error($this->translator->trans('Unable to open zipFile %s', [$zipFile], 'Modules.Autoupgrade.Admin')); return false; } diff --git a/classes/index.php b/classes/index.php index c1ae00449..03d373462 100644 --- a/classes/index.php +++ b/classes/index.php @@ -24,7 +24,6 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) */ - header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); diff --git a/cli-rollback.php b/cli-rollback.php index fef6b99a2..5cc0c65f3 100644 --- a/cli-rollback.php +++ b/cli-rollback.php @@ -34,6 +34,6 @@ $container->setLogger(new PrestaShop\Module\AutoUpgrade\Log\StreamedLogger()); $controller = new \PrestaShop\Module\AutoUpgrade\TaskRunner\Rollback\AllRollbackTasks($container); -$controller->setOptions(getopt('', array('backup::'))); +$controller->setOptions(getopt('', ['backup::'])); $controller->init(); exit($controller->run()); diff --git a/cli-updateconfig.php b/cli-updateconfig.php index ab31693c9..c1657fe43 100644 --- a/cli-updateconfig.php +++ b/cli-updateconfig.php @@ -23,21 +23,20 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) */ - if (PHP_SAPI !== 'cli') { echo 'This script must be called from CLI'; exit(1); } -$inputConfigurationFile = getopt('', array('from::'))['from']; +$inputConfigurationFile = getopt('', ['from::'])['from']; if (!file_exists($inputConfigurationFile)) { - echo sprintf('Invalid input configuation file %s', $inputConfigurationFile).PHP_EOL; + echo sprintf('Invalid input configuation file %s', $inputConfigurationFile) . PHP_EOL; exit(1); } $inputData = json_decode(file_get_contents($inputConfigurationFile), true); -require_once realpath(dirname(__FILE__).'/../../modules/autoupgrade') . '/ajax-upgradetabconfig.php'; +require_once realpath(dirname(__FILE__) . '/../../modules/autoupgrade') . '/ajax-upgradetabconfig.php'; $container = autoupgrade_init_container(dirname(__FILE__)); $container->setLogger(new \PrestaShop\Module\AutoUpgrade\Log\StreamedLogger()); diff --git a/cli-upgrade.php b/cli-upgrade.php index 076b4c2ce..528443a5e 100644 --- a/cli-upgrade.php +++ b/cli-upgrade.php @@ -34,6 +34,6 @@ $container->setLogger(new PrestaShop\Module\AutoUpgrade\Log\StreamedLogger()); $controller = new \PrestaShop\Module\AutoUpgrade\TaskRunner\Upgrade\AllUpgradeTasks($container); -$controller->setOptions(getopt('', array('action::', 'channel::', 'data::'))); +$controller->setOptions(getopt('', ['action::', 'channel::', 'data::'])); $controller->init(); exit($controller->run()); diff --git a/functions.php b/functions.php index fd4317ae9..e700e00bf 100755 --- a/functions.php +++ b/functions.php @@ -33,7 +33,7 @@ */ function rewriteSettingsFile($baseUrls = null, $theme = null, $arrayDB = null) { - $defines = array(); + $defines = []; $defines['__PS_BASE_URI__'] = ($baseUrls && $baseUrls['__PS_BASE_URI__']) ? $baseUrls['__PS_BASE_URI__'] : __PS_BASE_URI__; $defines['_MEDIA_SERVER_1_'] = ($baseUrls && isset($baseUrls['_MEDIA_SERVER_1_'])) ? $baseUrls['_MEDIA_SERVER_1_'] : _MEDIA_SERVER_1_; $defines['_PS_CACHING_SYSTEM_'] = _PS_CACHING_SYSTEM_; @@ -150,7 +150,7 @@ function getPath($urlBase, $id_category, $path = '', $highlight = '', $categoryT function getDirContent($path) { - $content = array(); + $content = []; if (is_dir($path)) { $d = dir($path); while (false !== ($entry = $d->read())) { @@ -215,7 +215,7 @@ function checkingTab($tab) } $adminObj = new $tab(); if (!$adminObj->viewAccess()) { - $adminObj->_errors = array(Tools14::displayError('Access denied')); + $adminObj->_errors = [Tools14::displayError('Access denied')]; echo $adminObj->displayErrors(); return false; @@ -285,7 +285,7 @@ function checkTabRights($id_tab) */ function simpleXMLToArray($xml, $flattenValues = true, $flattenAttributes = true, $flattenChildren = true, $valueKey = '@value', $attributesKey = '@attributes', $childrenKey = '@children') { - $return = array(); + $return = []; if (!($xml instanceof SimpleXMLElement)) { return $return; } @@ -304,7 +304,7 @@ function simpleXMLToArray($xml, $flattenValues = true, $flattenAttributes = true } } - $children = array(); + $children = []; $first = true; foreach ($xml->children() as $elementName => $child) { $value = simpleXMLToArray($child, $flattenValues, $flattenAttributes, $flattenChildren, $valueKey, $attributesKey, $childrenKey); @@ -329,7 +329,7 @@ function simpleXMLToArray($xml, $flattenValues = true, $flattenAttributes = true } } - $attributes = array(); + $attributes = []; foreach ($xml->attributes() as $name => $value) { $attributes[$name] = trim($value); } diff --git a/tests/CoreUpgraderTest.php b/tests/CoreUpgraderTest.php index e99e2ff68..12323f785 100644 --- a/tests/CoreUpgraderTest.php +++ b/tests/CoreUpgraderTest.php @@ -52,11 +52,11 @@ public function testVersionNormalization($source, $expected) public function versionProvider() { - return array( - array('1.7', '1.7.0.0'), - array('1.7.2', '1.7.2.0'), - array('1.6.1.0-beta', '1.6.1.0-beta'), - array('1.6.1-beta', '1.6.1-beta.0'), // Weird, but still a test - ); + return [ + ['1.7', '1.7.0.0'], + ['1.7.2', '1.7.2.0'], + ['1.6.1.0-beta', '1.6.1.0-beta'], + ['1.6.1-beta', '1.6.1-beta.0'], // Weird, but still a test + ]; } } diff --git a/tests/ErrorHandlerTest.php b/tests/ErrorHandlerTest.php index 1b6c5d1fc..14111a770 100644 --- a/tests/ErrorHandlerTest.php +++ b/tests/ErrorHandlerTest.php @@ -80,9 +80,9 @@ public function testGeneratedJsonLog($log) public function logProvider() { - return array( - array("[INTERNAL] /var/www/html/modules/autoupgrade/classes/TaskRunner/Upgrade/BackupFiles.php line 55 - Class 'PrestaShop\Module\AutoUpgrade\TaskRunner\Upgrade\UpgradeContainer' not found"), - array("[INTERNAL] /var/www/html/modules/autoupgrade/classes/TaskRunner/Upgrade/BackupDb.php line 105 - Can't use method return value in write context"), - ); + return [ + ["[INTERNAL] /var/www/html/modules/autoupgrade/classes/TaskRunner/Upgrade/BackupFiles.php line 55 - Class 'PrestaShop\Module\AutoUpgrade\TaskRunner\Upgrade\UpgradeContainer' not found"], + ["[INTERNAL] /var/www/html/modules/autoupgrade/classes/TaskRunner/Upgrade/BackupDb.php line 105 - Can't use method return value in write context"], + ]; } } diff --git a/tests/FilesystemAdapterTest.php b/tests/FilesystemAdapterTest.php index b0d3144c1..3f48cc27a 100644 --- a/tests/FilesystemAdapterTest.php +++ b/tests/FilesystemAdapterTest.php @@ -83,32 +83,32 @@ public function testFileIsNotIgnored($file, $fullpath, $process) public function ignoredFilesProvider() { - return array( - array('.git', '/.git', 'upgrade'), + return [ + ['.git', '/.git', 'upgrade'], - array('autoupgrade', '/admin/autoupgrade', 'upgrade'), - array('autoupgrade', '/admin/autoupgrade', 'restore'), - array('autoupgrade', '/admin/autoupgrade', 'backup'), + ['autoupgrade', '/admin/autoupgrade', 'upgrade'], + ['autoupgrade', '/admin/autoupgrade', 'restore'], + ['autoupgrade', '/admin/autoupgrade', 'backup'], - array('autoupgrade', '/modules/autoupgrade', 'upgrade'), - array('autoupgrade', '/modules/autoupgrade', 'restore'), - array('autoupgrade', '/modules/autoupgrade', 'backup'), + ['autoupgrade', '/modules/autoupgrade', 'upgrade'], + ['autoupgrade', '/modules/autoupgrade', 'restore'], + ['autoupgrade', '/modules/autoupgrade', 'backup'], - array('parameters.yml', '/app/config/parameters.yml', 'upgrade'), + ['parameters.yml', '/app/config/parameters.yml', 'upgrade'], - array('classic', '/themes/classic', 'upgrade'), - ); + ['classic', '/themes/classic', 'upgrade'], + ]; } public function notIgnoredFilesProvider() { - return array( - array('parameters.yml', '/app/config/parameters.yml', 'backup'), + return [ + ['parameters.yml', '/app/config/parameters.yml', 'backup'], - array('doge.txt', '/doge.txt', 'upgrade'), - array('parameters.yml', '/parameters.yml', 'upgrade'), - array('parameters.yml.dist', '/app/config/parameters.yml.dist', 'upgrade'), - ); + ['doge.txt', '/doge.txt', 'upgrade'], + ['parameters.yml', '/parameters.yml', 'upgrade'], + ['parameters.yml.dist', '/app/config/parameters.yml.dist', 'upgrade'], + ]; } public function testRandomFolderIsNotAPrestashopRelease() diff --git a/tests/SettingsFileWriterTest.php b/tests/SettingsFileWriterTest.php index 6048a25cb..df1c6c069 100644 --- a/tests/SettingsFileWriterTest.php +++ b/tests/SettingsFileWriterTest.php @@ -24,8 +24,8 @@ * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) */ use PHPUnit\Framework\TestCase; -use PrestaShop\Module\AutoUpgrade\UpgradeTools\SettingsFileWriter; use PrestaShop\Module\AutoUpgrade\UpgradeContainer; +use PrestaShop\Module\AutoUpgrade\UpgradeTools\SettingsFileWriter; class SettingsFileWriterTest extends TestCase { @@ -57,7 +57,7 @@ public function testSettingsIsProperlyGenerated() define('_RIJNDAEL_IV_', 'QSt/I95YtA=='); "; - $datas = array( + $datas = [ '_DB_SERVER_' => '127.0.0.1:3307', '_DB_NAME_' => 'prestashop16', '_DB_USER_' => 'root', @@ -71,7 +71,7 @@ public function testSettingsIsProperlyGenerated() '_PS_VERSION_' => '1.6.1.18', '_RIJNDAEL_KEY_' => 'zrL1GDp2oqDoXFss', '_RIJNDAEL_IV_' => 'QSt/I95YtA==', - ); + ]; $file = tempnam(sys_get_temp_dir(), 'PSS'); $this->settingsWriter->writeSettingsFile($file, $datas); diff --git a/tests/StreamedLoggerTest.php b/tests/StreamedLoggerTest.php index 840cf1d8c..97a1fbe10 100644 --- a/tests/StreamedLoggerTest.php +++ b/tests/StreamedLoggerTest.php @@ -41,12 +41,12 @@ public function testFiltersProperlyApplied($level, $filterLevel, $expected) public function filtersProvider() { - return array( - array(Logger::EMERGENCY, Logger::INFO, false), - array(Logger::INFO, Logger::EMERGENCY, true), - array(Logger::ERROR, Logger::ERROR, false), - array(Logger::ERROR, Logger::WARNING, false), - array(Logger::ERROR, Logger::CRITICAL, true), - ); + return [ + [Logger::EMERGENCY, Logger::INFO, false], + [Logger::INFO, Logger::EMERGENCY, true], + [Logger::ERROR, Logger::ERROR, false], + [Logger::ERROR, Logger::WARNING, false], + [Logger::ERROR, Logger::CRITICAL, true], + ]; } } diff --git a/tests/TranslatorTest.php b/tests/TranslatorTest.php index 4e10e83b4..fdccd39b8 100644 --- a/tests/TranslatorTest.php +++ b/tests/TranslatorTest.php @@ -49,25 +49,25 @@ public function testTranslationWithoutParams($origin, $parameters, $expected) public function translationsTestCaseProvider() { - return array( + return [ // Test with %s in translated text - array( + [ 'Downloaded archive will come from %s', - array('https://download.prestashop.com/download/releases/prestashop_1.7.3.0.zip'), + ['https://download.prestashop.com/download/releases/prestashop_1.7.3.0.zip'], 'Downloaded archive will come from https://download.prestashop.com/download/releases/prestashop_1.7.3.0.zip', - ), + ], // Text without parameter - array( + [ 'Using class ZipArchive...', - array(), + [], 'Using class ZipArchive...', - ), + ], // Text with placeholders - array( + [ '[TRANSLATION] The translation files have not been merged into file %filename%. Switch to copy %filename%.', - array('%filename%' => 'doge.txt'), + ['%filename%' => 'doge.txt'], '[TRANSLATION] The translation files have not been merged into file doge.txt. Switch to copy doge.txt.', - ), - ); + ], + ]; } } diff --git a/tests/UpgradeContainerTest.php b/tests/UpgradeContainerTest.php index 816d1bc4a..f2c5e4851 100644 --- a/tests/UpgradeContainerTest.php +++ b/tests/UpgradeContainerTest.php @@ -40,34 +40,34 @@ public function testSameResultFormAdminSubDir() public function testObjectInstanciation($functionName, $expectedClass) { $container = $this->getMockBuilder(UpgradeContainer::class) - ->setConstructorArgs(array(__DIR__, __DIR__ . '/..')) - ->setMethods(array('getDb')) + ->setConstructorArgs([__DIR__, __DIR__ . '/..']) + ->setMethods(['getDb']) ->getMock(); - $actualClass = get_class(call_user_func(array($container, $functionName))); + $actualClass = get_class(call_user_func([$container, $functionName])); $this->assertSame($actualClass, $expectedClass); } public function objectsToInstanciateProvider() { // | Function to call | Expected class | - return array( - array('getCacheCleaner', PrestaShop\Module\AutoUpgrade\UpgradeTools\CacheCleaner::class), - array('getCookie', PrestaShop\Module\AutoUpgrade\Cookie::class), - array('getFileConfigurationStorage', PrestaShop\Module\AutoUpgrade\Parameters\FileConfigurationStorage::class), - array('getFileFilter', \PrestaShop\Module\AutoUpgrade\UpgradeTools\FileFilter::class), + return [ + ['getCacheCleaner', PrestaShop\Module\AutoUpgrade\UpgradeTools\CacheCleaner::class], + ['getCookie', PrestaShop\Module\AutoUpgrade\Cookie::class], + ['getFileConfigurationStorage', PrestaShop\Module\AutoUpgrade\Parameters\FileConfigurationStorage::class], + ['getFileFilter', \PrestaShop\Module\AutoUpgrade\UpgradeTools\FileFilter::class], // array('getUpgrader', \PrestaShop\Module\AutoUpgrade\Upgrader::class), - array('getFilesystemAdapter', PrestaShop\Module\AutoUpgrade\UpgradeTools\FilesystemAdapter::class), - array('getLogger', PrestaShop\Module\AutoUpgrade\Log\LegacyLogger::class), - array('getModuleAdapter', PrestaShop\Module\AutoUpgrade\UpgradeTools\ModuleAdapter::class), - array('getState', \PrestaShop\Module\AutoUpgrade\State::class), - array('getSymfonyAdapter', PrestaShop\Module\AutoUpgrade\UpgradeTools\SymfonyAdapter::class), - array('getTranslationAdapter', \PrestaShop\Module\AutoUpgrade\UpgradeTools\Translation::class), - array('getTranslator', \PrestaShop\Module\AutoUpgrade\UpgradeTools\Translator::class), - array('getTwig', \Twig\Environment::class), - array('getPrestaShopConfiguration', PrestaShop\Module\AutoUpgrade\PrestashopConfiguration::class), - array('getUpgradeConfiguration', PrestaShop\Module\AutoUpgrade\Parameters\UpgradeConfiguration::class), - array('getWorkspace', PrestaShop\Module\AutoUpgrade\Workspace::class), - array('getZipAction', PrestaShop\Module\AutoUpgrade\ZipAction::class), - ); + ['getFilesystemAdapter', PrestaShop\Module\AutoUpgrade\UpgradeTools\FilesystemAdapter::class], + ['getLogger', PrestaShop\Module\AutoUpgrade\Log\LegacyLogger::class], + ['getModuleAdapter', PrestaShop\Module\AutoUpgrade\UpgradeTools\ModuleAdapter::class], + ['getState', \PrestaShop\Module\AutoUpgrade\State::class], + ['getSymfonyAdapter', PrestaShop\Module\AutoUpgrade\UpgradeTools\SymfonyAdapter::class], + ['getTranslationAdapter', \PrestaShop\Module\AutoUpgrade\UpgradeTools\Translation::class], + ['getTranslator', \PrestaShop\Module\AutoUpgrade\UpgradeTools\Translator::class], + ['getTwig', \Twig\Environment::class], + ['getPrestaShopConfiguration', PrestaShop\Module\AutoUpgrade\PrestashopConfiguration::class], + ['getUpgradeConfiguration', PrestaShop\Module\AutoUpgrade\Parameters\UpgradeConfiguration::class], + ['getWorkspace', PrestaShop\Module\AutoUpgrade\Workspace::class], + ['getZipAction', PrestaShop\Module\AutoUpgrade\ZipAction::class], + ]; } } diff --git a/tests/phpstan/bootstrap.php b/tests/phpstan/bootstrap.php index 4c9c73a24..354875fc0 100644 --- a/tests/phpstan/bootstrap.php +++ b/tests/phpstan/bootstrap.php @@ -46,7 +46,7 @@ // Make sure loader php-parser is coming from php stan composer $loader = new \Composer\Autoload\ClassLoader(); -$loader->setPsr4('PhpParser\\', array('/composer/vendor/nikic/php-parser/lib/PhpParser')); +$loader->setPsr4('PhpParser\\', ['/composer/vendor/nikic/php-parser/lib/PhpParser']); $loader->register(true); // We must declare these constant in this boostrap script. diff --git a/tests/phpstan/phpstan-1.6.1.18.neon b/tests/phpstan/phpstan-1.6.1.18.neon index 64de9b502..eb0a4a06e 100644 --- a/tests/phpstan/phpstan-1.6.1.18.neon +++ b/tests/phpstan/phpstan-1.6.1.18.neon @@ -8,21 +8,15 @@ parameters: - ./../../functions.php - ./../../classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php - ./../../classes/UpgradeTools/SymfonyAdapter.php - ignoreErrors: - # module specific - - '#Function deactivate_custom_modules not found.#' - - '#Constant MCRYPT_[A-Z0-9_]+ not found.#' - - "#Call to function method_exists#" - - '#Access to an undefined property Module::\$installed\.#' - # CLDR related check - - '#[cC]lass PrestaShop\\PrestaShop\\Core\\Cldr\\Update#' - # AppKernel wasn't properly listed in autoloader - - '#AppKernel#' - - '#Access to offset 0 on an unknown class mysqli_result.#' - - '#Iterating over an object of an unknown class mysqli_result.#' - # Below are messages ignored on PS 1.6 + ignoreErrors: + - '#Access to an undefined property Autoupgrade::\$bootstrap.#' + - '#Access to an undefined property Module::\$installed.#' - '#[cC]lass PrestaShop\\PrestaShop\\Core\\Addon\\Theme\\ThemeManagerBuilder#' - - '#PrestaShop\\Module\\AutoUpgrade\\UpgradeTools\\ModuleAdapter#' - - '#PrestaShop\\PrestaShop\\Adapter\\Module\\ModuleDataUpdater#' - - '#PrestaShopBundle\\Install\\Upgrade#' - '#Call to an undefined static method ConfigurationTest::test_curl\(\).#' + - '#Call to method assign\(\) on an unknown class Smarty.#' + - '#Call to method fetch\(\) on an unknown class Smarty.#' + - '#Call to method getContainer\(\) on an unknown class AppKernel.#' + - '#Function deactivate_custom_modules not found.#' + - '#PrestaShop\\PrestaShop\\Adapter\\Module\\ModuleDataUpdater#' + - '#Property ModuleCore::\$version \(float\) does not accept string.#' + - '#Return typehint of method PrestaShop\\Module\\AutoUpgrade\\UpgradeTools\\ModuleAdapter::getCommandBus\(\) has invalid type PrestaShop\\PrestaShop\\Core\\CommandBus\\TacticianCommandBusAdapter.#' diff --git a/tests/phpstan/phpstan-1.7.1.2.neon b/tests/phpstan/phpstan-1.7.1.2.neon deleted file mode 100644 index 23b71e8d8..000000000 --- a/tests/phpstan/phpstan-1.7.1.2.neon +++ /dev/null @@ -1,5 +0,0 @@ -includes: - - %currentWorkingDirectory%/tests/phpstan/phpstan.neon - -parameters: - ignoreErrors: diff --git a/tests/phpstan/phpstan-1.7.2.5.neon b/tests/phpstan/phpstan-1.7.2.5.neon index 23b71e8d8..5e9a4b90c 100644 --- a/tests/phpstan/phpstan-1.7.2.5.neon +++ b/tests/phpstan/phpstan-1.7.2.5.neon @@ -2,4 +2,20 @@ includes: - %currentWorkingDirectory%/tests/phpstan/phpstan.neon parameters: - ignoreErrors: + ignoreErrors: + - '#Access to an undefined property Autoupgrade::\$bootstrap.#' + - '#Access to an undefined property Module::\$installed.#' + - '#Call to method boot\(\) on an unknown class AppKernel.#' + - '#Call to method getContainer\(\) on an unknown class AppKernel.#' + - '#Call to method getMessage\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Exception\\CoreException.#' + - '#Call to method handle\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\CommandBus\\CommandBusInterface.#' + - '#Call to method loadClassCache\(\) on an unknown class AppKernel.#' + - '#Caught class PrestaShop\\PrestaShop\\Core\\Exception\\CoreException not found.#' + - '#Class AppKernel not found.#' + - '#Function deactivate_custom_modules not found.#' + - '#Instantiated class AppKernel not found.#' + - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Domain\\Theme\\ValueObject\\ThemeName not found.#' + - '#PHPDoc tag @var for variable \$commandBus contains unknown class PrestaShop\\PrestaShop\\Core\\CommandBus\\CommandBusInterface.#' + - '#Property ModuleCore::\$version \(float\) does not accept string.#' + - '#Return typehint of method PrestaShop\\Module\\AutoUpgrade\\UpgradeTools\\ModuleAdapter::getCommandBus\(\) has invalid type PrestaShop\\PrestaShop\\Core\\CommandBus\\TacticianCommandBusAdapter.#' + - '#Return typehint of method PrestaShop\\Module\\AutoUpgrade\\UpgradeTools\\SymfonyAdapter::initAppKernel\(\) has invalid type AppKernel.#' diff --git a/tests/phpstan/phpstan-1.7.3.4.neon b/tests/phpstan/phpstan-1.7.3.4.neon index 23b71e8d8..5e9a4b90c 100644 --- a/tests/phpstan/phpstan-1.7.3.4.neon +++ b/tests/phpstan/phpstan-1.7.3.4.neon @@ -2,4 +2,20 @@ includes: - %currentWorkingDirectory%/tests/phpstan/phpstan.neon parameters: - ignoreErrors: + ignoreErrors: + - '#Access to an undefined property Autoupgrade::\$bootstrap.#' + - '#Access to an undefined property Module::\$installed.#' + - '#Call to method boot\(\) on an unknown class AppKernel.#' + - '#Call to method getContainer\(\) on an unknown class AppKernel.#' + - '#Call to method getMessage\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Exception\\CoreException.#' + - '#Call to method handle\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\CommandBus\\CommandBusInterface.#' + - '#Call to method loadClassCache\(\) on an unknown class AppKernel.#' + - '#Caught class PrestaShop\\PrestaShop\\Core\\Exception\\CoreException not found.#' + - '#Class AppKernel not found.#' + - '#Function deactivate_custom_modules not found.#' + - '#Instantiated class AppKernel not found.#' + - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Domain\\Theme\\ValueObject\\ThemeName not found.#' + - '#PHPDoc tag @var for variable \$commandBus contains unknown class PrestaShop\\PrestaShop\\Core\\CommandBus\\CommandBusInterface.#' + - '#Property ModuleCore::\$version \(float\) does not accept string.#' + - '#Return typehint of method PrestaShop\\Module\\AutoUpgrade\\UpgradeTools\\ModuleAdapter::getCommandBus\(\) has invalid type PrestaShop\\PrestaShop\\Core\\CommandBus\\TacticianCommandBusAdapter.#' + - '#Return typehint of method PrestaShop\\Module\\AutoUpgrade\\UpgradeTools\\SymfonyAdapter::initAppKernel\(\) has invalid type AppKernel.#' diff --git a/tests/phpstan/phpstan-1.7.4.4.neon b/tests/phpstan/phpstan-1.7.4.4.neon index 23b71e8d8..efe9eddfa 100644 --- a/tests/phpstan/phpstan-1.7.4.4.neon +++ b/tests/phpstan/phpstan-1.7.4.4.neon @@ -2,4 +2,14 @@ includes: - %currentWorkingDirectory%/tests/phpstan/phpstan.neon parameters: - ignoreErrors: + ignoreErrors: + - '#Access to an undefined property Autoupgrade::\$bootstrap.#' + - '#Access to an undefined property Module::\$installed.#' + - '#Call to method getMessage\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Exception\\CoreException.#' + - '#Call to method handle\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\CommandBus\\CommandBusInterface.#' + - '#Caught class PrestaShop\\PrestaShop\\Core\\Exception\\CoreException not found.#' + - '#Function deactivate_custom_modules not found.#' + - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Domain\\Theme\\ValueObject\\ThemeName not found.#' + - '#PHPDoc tag @var for variable \$commandBus contains unknown class PrestaShop\\PrestaShop\\Core\\CommandBus\\CommandBusInterface.#' + - '#Property ModuleCore::\$version \(float\) does not accept string.#' + - '#Return typehint of method PrestaShop\\Module\\AutoUpgrade\\UpgradeTools\\ModuleAdapter::getCommandBus\(\) has invalid type PrestaShop\\PrestaShop\\Core\\CommandBus\\TacticianCommandBusAdapter.#' diff --git a/tests/phpstan/phpstan-1.7.5.1.neon b/tests/phpstan/phpstan-1.7.5.1.neon index 23b71e8d8..0436222ff 100644 --- a/tests/phpstan/phpstan-1.7.5.1.neon +++ b/tests/phpstan/phpstan-1.7.5.1.neon @@ -2,4 +2,9 @@ includes: - %currentWorkingDirectory%/tests/phpstan/phpstan.neon parameters: - ignoreErrors: + ignoreErrors: + - '#Access to an undefined property Autoupgrade::\$bootstrap.#' + - '#Access to an undefined property Module::\$installed.#' + - '#Function deactivate_custom_modules not found.#' + - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Domain\\Theme\\ValueObject\\ThemeName not found.#' + - '#Property ModuleCore::\$version \(float\) does not accept string.#' diff --git a/tests/phpstan/phpstan-1.7.6.neon b/tests/phpstan/phpstan-1.7.6.neon index 23b71e8d8..ded546c58 100644 --- a/tests/phpstan/phpstan-1.7.6.neon +++ b/tests/phpstan/phpstan-1.7.6.neon @@ -2,4 +2,12 @@ includes: - %currentWorkingDirectory%/tests/phpstan/phpstan.neon parameters: - ignoreErrors: + ignoreErrors: + - '#Access to an undefined property Autoupgrade::\$bootstrap.#' + - '#Access to an undefined property Module::\$installed.#' + - '#Call to method fetchLocale\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Cldr\\Update.#' + - '#Function deactivate_custom_modules not found.#' + - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Cldr\\Update not found.#' + - '#Parameter \#1 \$id_hook of method ModuleCore::updatePosition\(\) expects bool, int given.#' + - '#Property ModuleCore::\$version \(float\) does not accept string.#' + diff --git a/tests/phpstan/phpstan-1.7.7.neon b/tests/phpstan/phpstan-1.7.7.neon index 23b71e8d8..ebbff783a 100644 --- a/tests/phpstan/phpstan-1.7.7.neon +++ b/tests/phpstan/phpstan-1.7.7.neon @@ -2,4 +2,8 @@ includes: - %currentWorkingDirectory%/tests/phpstan/phpstan.neon parameters: - ignoreErrors: + ignoreErrors: + - '#Access to an undefined property Module::\$installed.#' + - '#Call to method fetchLocale\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Cldr\\Update.#' + - '#Function deactivate_custom_modules not found.#' + - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Cldr\\Update not found.#' diff --git a/tests/phpstan/phpstan-1.7.8.neon b/tests/phpstan/phpstan-1.7.8.neon index 23b71e8d8..509919dd2 100644 --- a/tests/phpstan/phpstan-1.7.8.neon +++ b/tests/phpstan/phpstan-1.7.8.neon @@ -2,4 +2,9 @@ includes: - %currentWorkingDirectory%/tests/phpstan/phpstan.neon parameters: - ignoreErrors: + ignoreErrors: + - '#Access to an undefined property Module::\$installed.#' + - '#Call to method fetchLocale\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Cldr\\Update.#' + - '#Function deactivate_custom_modules not found.#' + - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Cldr\\Update not found.#' + diff --git a/tests/phpstan/phpstan-latest.neon b/tests/phpstan/phpstan-latest.neon index 23b71e8d8..ebbff783a 100644 --- a/tests/phpstan/phpstan-latest.neon +++ b/tests/phpstan/phpstan-latest.neon @@ -2,4 +2,8 @@ includes: - %currentWorkingDirectory%/tests/phpstan/phpstan.neon parameters: - ignoreErrors: + ignoreErrors: + - '#Access to an undefined property Module::\$installed.#' + - '#Call to method fetchLocale\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Cldr\\Update.#' + - '#Function deactivate_custom_modules not found.#' + - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Cldr\\Update not found.#' diff --git a/tests/phpstan/phpstan.neon b/tests/phpstan/phpstan.neon index 1d516bd22..5e9dadfe8 100644 --- a/tests/phpstan/phpstan.neon +++ b/tests/phpstan/phpstan.neon @@ -1,11 +1,18 @@ -includes: - - %currentWorkingDirectory%/vendor/prestashop/php-dev-tools/phpstan/ps-module-extension.neon parameters: - paths: - # From PHPStan 0.12, paths to check are relative to the neon file + bootstrapFiles: + - bootstrap.php + paths: + # From PHPStan 0.12, paths to check are relative to the neon file - ./../../classes + - ./../../AdminSelfUpgrade.php + - ./../../ajax-upgradetab.php + - ./../../ajax-upgradetabconfig.php + - ./../../autoupgrade.php + - ./../../cli-rollback.php + - ./../../cli-updateconfig.php + - ./../../cli-upgrade.php excludes_analyse: - ./../../classes/Tools14.php - ./../../classes/pclzip.lib.php - ./../../functions.php - level: 5 + level: 5 diff --git a/translations/cs.php b/translations/cs.php index 64d98d632..9c3b65be7 100644 --- a/translations/cs.php +++ b/translations/cs.php @@ -23,10 +23,8 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) */ - - global $_MODULE; -$_MODULE = array(); +$_MODULE = []; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_5243e62512552a2cd6369e446bbf10f4'] = 'Výkon serveru'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_87f8a6ab85c9ced3702b4ea641ad4bb5'] = 'Střední'; diff --git a/translations/de.php b/translations/de.php index 1c2ba1584..7a283f9f7 100644 --- a/translations/de.php +++ b/translations/de.php @@ -23,10 +23,8 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) */ - - global $_MODULE; -$_MODULE = array(); +$_MODULE = []; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_5243e62512552a2cd6369e446bbf10f4'] = 'Server-Leistung'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_87f8a6ab85c9ced3702b4ea641ad4bb5'] = 'Mittel'; @@ -324,7 +322,7 @@ $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_70c06c37194d755dd9aef11cf0469981'] = 'Da Nicht-Originalmodule zu Kompatibilitätsprobleme führen können, empfehlen wir diese Module standardmäßig zu deaktivieren.'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_4d572afe04001ea76c1c0f6348e44926'] = 'Wenn Sie Fremdmodule aktiv lassen, kann es passieren, dass Sie nach dem Upgrade das Menü Module nicht mehr öffnen können.'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_27f559516024ba6aee397a5bb36b979e'] = 'Das \"Standard-Template (Theme)\" updaten'; -$_MODULE['<{autoupgrade}prestashop>adminselfupgrade_68984585580d85956e12fc66155adcea'] = 'Aktualisiert das vordefinierte PrestaShop-Template \"Standard\".'; +$_MODULE['<{autoupgrade}prestashop>adminselfupgrade_68984585580d85956e12fc66155adcea'] = 'Aktualisiert das vordefinierte PrestaShop-Template \"Standard\".'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_dc9276fae0b587308ac3020c86090316'] = 'Wenn Sie das aktuelle Template verändert haben, werden alle Veränderungen überschrieben.'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_5a6925648fc1286cae7924e80690d3a7'] = 'Standard-E-Mails aktualisieren'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_9770c64dad08073b1291334767e0f99c'] = 'Aktualisiert die PrestaShos vordefinierte E-Mails.'; @@ -355,7 +353,7 @@ $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_17451496c83f774d3c8b3462ae2e7721'] = 'Über Alpha-, Beta- und Privat-Download-Channels können Sie auf inoffizielle oder noch instabile Versionen upgraden (nur für Testzwecke).'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_7d71d389caebafeecac50e98c8e14dec'] = 'Standardmässig sollten Sie den \"Minor release\"-Kanal benutzen. Dieser Kanal immer bietet die aktuelle stabile Version.'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_e58eae3d7ced672a49b5716587b15f89'] = 'Jetzt aktualisieren'; -$_MODULE['<{autoupgrade}prestashop>adminselfupgrade_89de86aa34494d545d8cbb4fff3a4e59'] = 'Letzte Prüfung :%s'; +$_MODULE['<{autoupgrade}prestashop>adminselfupgrade_89de86aa34494d545d8cbb4fff3a4e59'] = 'Letzte Prüfung :%s'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_96f1fa7f23402c1307c8e2c57c6bccfa'] = '1-Klick Aktualisierung'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_9a843f20677a52ca79af903123147af0'] = 'Wilkommen!'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_054698c9e53fa1c70556b37bdb9fa922'] = 'Mit dem PrestaShop-Modul 1-click Aktualisierung wird die Aktualisierung Ihres Shop auf die letzte verfügbare Version so leicht wie nie.'; @@ -370,14 +368,14 @@ $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_b83d6250bd77f3dbcb7ec1ed51d46914'] = 'Produktbilder werden im Front Office nicht angezeigt? Versuchen Sie, die Vorschaubilder unter \"Voreinstellungen > Bilder\" aufzufrischen'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_e27d0a2f9e5caa433fc14667a1a3a15a'] = 'Nachdem Sie alles überprüft haben, vergessen Sie nicht, Ihren Shop wieder zu reaktivieren.'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_bb64b7cb55bd1db0abc03b6884144113'] = 'Noch zu erledigen:'; -$_MODULE['<{autoupgrade}prestashop>adminselfupgrade_a8192fd08a431bf547ebf9a3eaa9b6bb'] = 'Ein Javascript-Fehler (parseJSON) ist aufgetreten beim'; +$_MODULE['<{autoupgrade}prestashop>adminselfupgrade_a8192fd08a431bf547ebf9a3eaa9b6bb'] = 'Ein Javascript-Fehler (parseJSON) ist aufgetreten beim'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_e47b67bdaa4f2c695e46ce1e5231aa9f'] = 'Fehler aufgetreten während:'; $_MODULE['<{autoupgrade}prestashop>autoupgrade_475431dde197b4c63bda3d2f04ff5b42'] = 'Dieses Modul ermöglicht die automatische Aktualisierung Ihres Shops auf die letzte PrestaShop-Version.'; $_MODULE['<{autoupgrade}prestashop>autoupgrade_f2836d2294e658813d7a5db6ed72b3fe'] = 'Konnte die alte AdminUpgrade-Registerkarte %d nicht löschen'; $_MODULE['<{autoupgrade}prestashop>autoupgrade_cade82f9025d8fb9d2af869af19c72b8'] = 'Konnte den Menüpunkt \"AdminSelfUpgrade\" nicht erstellen'; $_MODULE['<{autoupgrade}prestashop>autoupgrade_5d7ef5c6fd32feb5d482ec1459e86f83'] = 'Konnte das \"AdminSelfUpgrade\"-Menü nicht laden'; -$_MODULE['<{autoupgrade}prestashop>autoupgrade_21dc065f2d8653ebca37ec552d17b37e'] = 'Konnte das Verzeichnis «%s » nicht erstellen'; -$_MODULE['<{autoupgrade}prestashop>autoupgrade_6215d33db0d099fcaae168dd4715135a'] = 'Verzeichnis «%s » hat keine Schreibrechte'; +$_MODULE['<{autoupgrade}prestashop>autoupgrade_21dc065f2d8653ebca37ec552d17b37e'] = 'Konnte das Verzeichnis «%s » nicht erstellen'; +$_MODULE['<{autoupgrade}prestashop>autoupgrade_6215d33db0d099fcaae168dd4715135a'] = 'Verzeichnis «%s » hat keine Schreibrechte'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_9ee6d9a65880879c847de53851b570e3'] = 'Das Hauptverzeichnis Ihres Shops muss beschreibbar sein (entsprechende CHMOD Schreibrechte)'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_9fde89b1673e18374380c4ae84aa661e'] = 'PHP-Option \"safe mod\" muss deaktiviert sein'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_66ba3fab33be88de4a9f0f5f0dbdb58c'] = 'PHP-Option \"allow_url_fopen\" muss deaktiviert sein, oder Sie müssen CURL installieren'; diff --git a/translations/en.php b/translations/en.php index 5e88ef782..bd2881307 100644 --- a/translations/en.php +++ b/translations/en.php @@ -23,10 +23,8 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) */ - - global $_MODULE; -$_MODULE = array(); +$_MODULE = []; $_MODULE['<{autoupgrade}prestashop>adminpreferences_6adf97f83acf6453d4a6a4b1070f3754'] = 'None'; $_MODULE['<{autoupgrade}prestashop>adminpreferences_c035796995e11f000835780bbadbd575'] = 'Standard (5 steps)'; @@ -595,5 +593,4 @@ $_MODULE['<{autoupgrade}prestashop>autoupgrade_6215d33db0d099fcaae168dd4715135a'] = 'Unable to write in the directory "%s"'; $_MODULE['<{autoupgrade}prestashop>autoupgrade_10c008d228c9f35d12ce0437aa3eade9'] = 'Unable to copy ajax-upgradetab.php in %s'; - return $_MODULE; diff --git a/translations/es.php b/translations/es.php index 793b56519..3ebf21c30 100644 --- a/translations/es.php +++ b/translations/es.php @@ -23,10 +23,8 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) */ - - global $_MODULE; -$_MODULE = array(); +$_MODULE = []; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_5243e62512552a2cd6369e446bbf10f4'] = 'Rendimiento del Servidor'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_87f8a6ab85c9ced3702b4ea641ad4bb5'] = 'Media'; @@ -271,7 +269,7 @@ $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_c32184301f3393e46f8357ec3d284938'] = 'Falta ajax-upgradetab.php . Por favor vuelva a instalar o reinicie el modulo'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_017697f698d570dffed5f88a5a933d01'] = 'Opciones de copia de seguridad'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_564b7c9d8683f1a94798e9f7449564e4'] = 'Opciones de Actualización'; -$_MODULE['<{autoupgrade}prestashop>adminselfupgrade_f15547fe5f9f307bd42b2c01657efbcb'] = 'Su servidor no puede descargar el archivo. Por favor, sube por primera vez por ftp en eladmin / directorio AutoUpgrade'; +$_MODULE['<{autoupgrade}prestashop>adminselfupgrade_f15547fe5f9f307bd42b2c01657efbcb'] = 'Su servidor no puede descargar el archivo. Por favor, sube por primera vez por ftp en eladmin / directorio AutoUpgrade'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_f2a6c498fb90ee345d997f888fce3b18'] = 'Eliminar'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_d26e7bb032929396f42d5ec26629acdd'] = '¿Quiere realmente suprimir esta copia de seguridad ?'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_f1a1fb67c8350e8881bc59f09e42d5ab'] = 'Pulsa para actualizar la página y utilizar la nueva configuración'; diff --git a/translations/fr.php b/translations/fr.php index 323330af4..a00f10e4f 100644 --- a/translations/fr.php +++ b/translations/fr.php @@ -23,10 +23,8 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) */ - - global $_MODULE; -$_MODULE = array(); +$_MODULE = []; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_5243e62512552a2cd6369e446bbf10f4'] = 'Puissance du serveur'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_87f8a6ab85c9ced3702b4ea641ad4bb5'] = 'Moyenne'; diff --git a/translations/index.php b/translations/index.php index dedd77e06..45df26c54 100644 --- a/translations/index.php +++ b/translations/index.php @@ -23,13 +23,12 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) */ +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); +header('Location: ../'); exit; diff --git a/translations/it.php b/translations/it.php index 4d9198879..f843c2bcb 100644 --- a/translations/it.php +++ b/translations/it.php @@ -23,10 +23,8 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) */ - - global $_MODULE; -$_MODULE = array(); +$_MODULE = []; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_5243e62512552a2cd6369e446bbf10f4'] = 'Performance del server'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_87f8a6ab85c9ced3702b4ea641ad4bb5'] = 'Medio'; @@ -352,7 +350,7 @@ $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_d0285505fd09db653a4ec0fd3799f357'] = 'modalità esperto'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_89f144934543c527b7b064ee64361d90'] = 'Prego seleziona il tuo canale:'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_456a33b123e0b4831a7ecbe77803f9b8'] = 'I canali vi offrono diversi modi per eseguire un aggiornamento. È possibile caricare la nuova versione manualmente o lasciare che il modulo 1-click upgrade la scarichi per te.'; -$_MODULE['<{autoupgrade}prestashop>adminselfupgrade_17451496c83f774d3c8b3462ae2e7721'] = 'Alpha, Beta e canali privati​​, ti darà la possibilità di effettuare l\'aggiornamento a una versione non ufficiale o instabile (solo a scopo di test).'; +$_MODULE['<{autoupgrade}prestashop>adminselfupgrade_17451496c83f774d3c8b3462ae2e7721'] = 'Alpha, Beta e canali privati, ti darà la possibilità di effettuare l\'aggiornamento a una versione non ufficiale o instabile (solo a scopo di test).'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_7d71d389caebafeecac50e98c8e14dec'] = 'Per impostazione predefinita, è necessario utilizzare la \"Minor release\" canale che offre l\'ultima versione stabile disponibile.'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_e58eae3d7ced672a49b5716587b15f89'] = 'Inizia il tuo aggiornamento'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_89de86aa34494d545d8cbb4fff3a4e59'] = 'Ultimo controllo: %s'; diff --git a/translations/pl.php b/translations/pl.php index c10287dd7..89b3d97d7 100644 --- a/translations/pl.php +++ b/translations/pl.php @@ -23,10 +23,8 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) */ - - global $_MODULE; -$_MODULE = array(); +$_MODULE = []; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_5243e62512552a2cd6369e446bbf10f4'] = 'Wydajność serwera'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_87f8a6ab85c9ced3702b4ea641ad4bb5'] = 'Średnia'; diff --git a/translations/ru.php b/translations/ru.php index 5e2a3433b..d633f1441 100644 --- a/translations/ru.php +++ b/translations/ru.php @@ -23,10 +23,8 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) */ - - global $_MODULE; -$_MODULE = array(); +$_MODULE = []; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_5243e62512552a2cd6369e446bbf10f4'] = 'Rendimiento del Servidor'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_87f8a6ab85c9ced3702b4ea641ad4bb5'] = 'Средний'; @@ -263,7 +261,7 @@ $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_c32184301f3393e46f8357ec3d284938'] = 'Falta ajax-upgradetab.php . Por favor vuelva a instalar o reinicie el modulo'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_017697f698d570dffed5f88a5a933d01'] = 'Opciones de copia de seguridad'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_564b7c9d8683f1a94798e9f7449564e4'] = 'Opciones de Actualización'; -$_MODULE['<{autoupgrade}prestashop>adminselfupgrade_f15547fe5f9f307bd42b2c01657efbcb'] = 'Su servidor no puede descargar el archivo. Por favor, sube por primera vez por ftp en eladmin / directorio AutoUpgrade'; +$_MODULE['<{autoupgrade}prestashop>adminselfupgrade_f15547fe5f9f307bd42b2c01657efbcb'] = 'Su servidor no puede descargar el archivo. Por favor, sube por primera vez por ftp en eladmin / directorio AutoUpgrade'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_f2a6c498fb90ee345d997f888fce3b18'] = 'Eliminar'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_d26e7bb032929396f42d5ec26629acdd'] = '¿Quiere realmente suprimir esta copia de seguridad ?'; $_MODULE['<{autoupgrade}prestashop>adminselfupgrade_f1a1fb67c8350e8881bc59f09e42d5ab'] = 'Pulsa para actualizar la página y utilizar la nueva configuración'; diff --git a/upgrade/classes/ToolsInstall.php b/upgrade/classes/ToolsInstall.php index c4b426922..9cabf9d1d 100644 --- a/upgrade/classes/ToolsInstall.php +++ b/upgrade/classes/ToolsInstall.php @@ -23,7 +23,6 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - class ToolsInstall { /** @@ -49,33 +48,35 @@ class ToolsInstall * $array['parent']['child'][1] = 'b'; * ...And so on. * _____________________________________ + * * @param simpleXMLElement $xml the XML to convert - * @param bool $flattenValues Choose wether to flatten values - * or to set them under a particular index. - * defaults to true; + * @param bool $flattenValues Choose wether to flatten values + * or to set them under a particular index. + * defaults to true; * @param bool $flattenAttributes Choose wether to flatten attributes - * or to set them under a particular index. - * Defaults to true; - * @param bool $flattenChildren Choose wether to flatten children - * or to set them under a particular index. - * Defaults to true; - * @param string $valueKey index for values, in case $flattenValues was set to - * false. Defaults to "@value" - * @param string $attributesKey index for attributes, in case $flattenAttributes was set to - * false. Defaults to "@attributes" - * @param string $childrenKey index for children, in case $flattenChildren was set to + * or to set them under a particular index. + * Defaults to true; + * @param bool $flattenChildren Choose wether to flatten children + * or to set them under a particular index. + * Defaults to true; + * @param string $valueKey index for values, in case $flattenValues was set to + * false. Defaults to "@value" + * @param string $attributesKey index for attributes, in case $flattenAttributes was set to + * false. Defaults to "@attributes" + * @param string $childrenKey index for children, in case $flattenChildren was set to * false. Defaults to "@children" - * @return array the resulting array. + * + * @return array the resulting array */ public static function simpleXMLToArray($xml, $flattenValues = true, $flattenAttributes = true, $flattenChildren = true, $valueKey = '@value', $attributesKey = '@attributes', $childrenKey = '@children') { - $return = array(); + $return = []; if (!($xml instanceof SimpleXMLElement)) { return $return; } $name = $xml->getName(); - $_value = trim((string)$xml); + $_value = trim((string) $xml); if (strlen($_value) == 0) { $_value = null; } @@ -88,7 +89,7 @@ public static function simpleXMLToArray($xml, $flattenValues = true, $flattenAtt } } - $children = array(); + $children = []; $first = true; foreach ($xml->children() as $elementName => $child) { $value = static::simpleXMLToArray($child, $flattenValues, $flattenAttributes, $flattenChildren, $valueKey, $attributesKey, $childrenKey); @@ -97,7 +98,7 @@ public static function simpleXMLToArray($xml, $flattenValues = true, $flattenAtt $temp = $children[$elementName]; unset($children[$elementName]); $children[$elementName][] = $temp; - $first=false; + $first = false; } $children[$elementName][] = $value; } else { @@ -113,7 +114,7 @@ public static function simpleXMLToArray($xml, $flattenValues = true, $flattenAtt } } - $attributes = array(); + $attributes = []; foreach ($xml->attributes() as $name => $value) { $attributes[$name] = trim($value); } diff --git a/upgrade/classes/index.php b/upgrade/classes/index.php index 0798e5b3c..b2e33a490 100644 --- a/upgrade/classes/index.php +++ b/upgrade/classes/index.php @@ -23,9 +23,8 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); -header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); +header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Cache-Control: no-store, no-cache, must-revalidate'); header('Cache-Control: post-check=0, pre-check=0', false); diff --git a/upgrade/index.php b/upgrade/index.php index 76cd9dd33..c7835bc88 100644 --- a/upgrade/index.php +++ b/upgrade/index.php @@ -23,13 +23,12 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); +header('Location: ../'); exit; diff --git a/upgrade/install-4.10.1.php b/upgrade/install-4.10.1.php index ffcee6fd6..4b226f19c 100644 --- a/upgrade/install-4.10.1.php +++ b/upgrade/install-4.10.1.php @@ -60,7 +60,7 @@ function upgrade_module_4_10_1($module) { $path = __DIR__ . '/../vendor/phpunit'; if (file_exists($path)) { - $result = removeAutoupgradePhpUnitFromFsDuringUpgrade(array($path)); + $result = removeAutoupgradePhpUnitFromFsDuringUpgrade([$path]); if ($result !== true) { PrestaShopLogger::addLog('Could not delete PHPUnit from module. ' . $result, 3); diff --git a/upgrade/php/add_accounting_tab.php b/upgrade/php/add_accounting_tab.php index aa95c7de7..bdb33a655 100644 --- a/upgrade/php/add_accounting_tab.php +++ b/upgrade/php/add_accounting_tab.php @@ -23,10 +23,9 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_accounting_tab() { - include_once __DIR__.'/add_new_tab.php'; + include_once __DIR__ . '/add_new_tab.php'; $id_parent = add_new_tab( 'AdminAccounting', 'en:Accounting|fr:Comptabilité|es:Accounting|de:Accounting|it:Accounting', diff --git a/upgrade/php/add_attribute_position.php b/upgrade/php/add_attribute_position.php index 291dfbdb4..d8e3dad0b 100755 --- a/upgrade/php/add_attribute_position.php +++ b/upgrade/php/add_attribute_position.php @@ -23,26 +23,25 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_attribute_position() { $groups = Db::getInstance()->executeS(' SELECT DISTINCT `id_attribute_group` - FROM `'._DB_PREFIX_.'attribute`'); + FROM `' . _DB_PREFIX_ . 'attribute`'); if (is_array($groups) && count($groups)) { foreach ($groups as $group) { $attributes = Db::getInstance()->executeS(' SELECT * - FROM `'._DB_PREFIX_.'attribute` - WHERE `id_attribute_group` = '. (int)($group['id_attribute_group'])); + FROM `' . _DB_PREFIX_ . 'attribute` + WHERE `id_attribute_group` = ' . (int) ($group['id_attribute_group'])); $i = 0; if (is_array($attributes) && count($attributes)) { foreach ($attributes as $attribute) { Db::getInstance()->execute(' - UPDATE `'._DB_PREFIX_.'attribute` - SET `position` = '.$i++.' - WHERE `id_attribute` = '.(int)$attribute['id_attribute'].' - AND `id_attribute_group` = '.(int)$attribute['id_attribute_group']); + UPDATE `' . _DB_PREFIX_ . 'attribute` + SET `position` = ' . $i++ . ' + WHERE `id_attribute` = ' . (int) $attribute['id_attribute'] . ' + AND `id_attribute_group` = ' . (int) $attribute['id_attribute_group']); } } } diff --git a/upgrade/php/add_carrier_position.php b/upgrade/php/add_carrier_position.php index cbf6a3f27..7b3d37c12 100755 --- a/upgrade/php/add_carrier_position.php +++ b/upgrade/php/add_carrier_position.php @@ -23,20 +23,19 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_carrier_position() { $carriers = Db::getInstance()->executeS(' SELECT `id_carrier` - FROM `'._DB_PREFIX_.'carrier` + FROM `' . _DB_PREFIX_ . 'carrier` WHERE `deleted` = 0'); if (is_array($carriers) && count($carriers)) { $i = 0; foreach ($carriers as $carrier) { Db::getInstance()->execute(' - UPDATE `'._DB_PREFIX_.'carrier` - SET `position` = '.$i++.' - WHERE `id_carrier` = '.(int)$carrier['id_carrier']); + UPDATE `' . _DB_PREFIX_ . 'carrier` + SET `position` = ' . $i++ . ' + WHERE `id_carrier` = ' . (int) $carrier['id_carrier']); } } } diff --git a/upgrade/php/add_column_order_state_deleted_if_not_exists.php b/upgrade/php/add_column_order_state_deleted_if_not_exists.php index 53399b684..27b2ce47d 100644 --- a/upgrade/php/add_column_order_state_deleted_if_not_exists.php +++ b/upgrade/php/add_column_order_state_deleted_if_not_exists.php @@ -23,18 +23,17 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_column_order_state_deleted_if_not_exists() { - $res = true; - $column = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'order_state` LIKE "deleted"'); + $res = true; + $column = Db::getInstance()->executeS('SHOW FIELDS FROM `' . _DB_PREFIX_ . 'order_state` LIKE "deleted"'); if (empty($column)) { - $res = Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'order_state` + $res = Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'order_state` ADD COLUMN `deleted` tinyint(1) UNSIGNED NOT NULL default "0" AFTER `paid`'); } if (!$res) { - return array('error' => Db::getInstance()->getNumberError(), 'msg' => Db::getInstance()->getMsgError()); + return ['error' => Db::getInstance()->getNumberError(), 'msg' => Db::getInstance()->getMsgError()]; } return true; diff --git a/upgrade/php/add_column_orders_reference_if_not_exists.php b/upgrade/php/add_column_orders_reference_if_not_exists.php index 2abd7b22d..17901e4ea 100644 --- a/upgrade/php/add_column_orders_reference_if_not_exists.php +++ b/upgrade/php/add_column_orders_reference_if_not_exists.php @@ -23,11 +23,10 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_column_orders_reference_if_not_exists() { - $column = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'orders` LIKE "reference"'); + $column = Db::getInstance()->executeS('SHOW FIELDS FROM `' . _DB_PREFIX_ . 'orders` LIKE "reference"'); if (empty($column)) { - return Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'orders` ADD COLUMN `reference` varchar(10) AFTER `id_order`'); + return Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'orders` ADD COLUMN `reference` varchar(10) AFTER `id_order`'); } } diff --git a/upgrade/php/add_default_restrictions_modules_groups.php b/upgrade/php/add_default_restrictions_modules_groups.php index a333c4518..44cbb4446 100644 --- a/upgrade/php/add_default_restrictions_modules_groups.php +++ b/upgrade/php/add_default_restrictions_modules_groups.php @@ -23,34 +23,33 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_default_restrictions_modules_groups() { $res = true; // Table module_group had another use in previous versions, we need to clean it up. - $res &= Db::getInstance()->execute('TRUNCATE TABLE `'._DB_PREFIX_.'module_group`'); + $res &= Db::getInstance()->execute('TRUNCATE TABLE `' . _DB_PREFIX_ . 'module_group`'); $groups = Db::getInstance()->executeS(' SELECT `id_group` - FROM `'._DB_PREFIX_.'group`'); + FROM `' . _DB_PREFIX_ . 'group`'); $modules = Db::getInstance()->executeS(' SELECT m.* - FROM `'._DB_PREFIX_.'module` m'); + FROM `' . _DB_PREFIX_ . 'module` m'); $shops = Db::getInstance()->executeS(' SELECT `id_shop` - FROM `'._DB_PREFIX_.'shop`'); + FROM `' . _DB_PREFIX_ . 'shop`'); foreach ($groups as $group) { if (!is_array($modules) || !is_array($shops)) { return false; } else { - $sql = 'INSERT INTO `'._DB_PREFIX_.'module_group` (`id_module`, `id_shop`, `id_group`) VALUES '; + $sql = 'INSERT INTO `' . _DB_PREFIX_ . 'module_group` (`id_module`, `id_shop`, `id_group`) VALUES '; foreach ($modules as $mod) { foreach ($shops as $s) { - $sql .= '("'.(int)$mod['id_module'].'", "'.(int)$s.'", "'.(int)$group['id_group'].'"),'; + $sql .= '("' . (int) $mod['id_module'] . '", "' . (int) $s . '", "' . (int) $group['id_group'] . '"),'; } } - // removing last comma to avoid SQL error - $sql = substr($sql, 0, strlen($sql) - 1); + // removing last comma to avoid SQL error + $sql = substr($sql, 0, strlen($sql) - 1); $res &= Db::getInstance()->execute($sql); } } diff --git a/upgrade/php/add_feature_position.php b/upgrade/php/add_feature_position.php index b4f46887f..9c0bd7fa7 100644 --- a/upgrade/php/add_feature_position.php +++ b/upgrade/php/add_feature_position.php @@ -23,19 +23,18 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_feature_position() { $features = Db::getInstance()->executeS(' SELECT `id_feature` - FROM `'._DB_PREFIX_.'feature`'); + FROM `' . _DB_PREFIX_ . 'feature`'); $i = 0; if (is_array($features) && count($features)) { foreach ($features as $feature) { Db::getInstance()->execute(' - UPDATE `'._DB_PREFIX_.'feature` - SET `position` = '.$i++.' - WHERE `id_feature` = '.(int)$feature['id_feature']); + UPDATE `' . _DB_PREFIX_ . 'feature` + SET `position` = ' . $i++ . ' + WHERE `id_feature` = ' . (int) $feature['id_feature']); } } } diff --git a/upgrade/php/add_group_attribute_position.php b/upgrade/php/add_group_attribute_position.php index 401f4b622..9acedaf48 100644 --- a/upgrade/php/add_group_attribute_position.php +++ b/upgrade/php/add_group_attribute_position.php @@ -23,19 +23,18 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_group_attribute_position() { $groups = Db::getInstance()->executeS(' SELECT * - FROM `'._DB_PREFIX_.'attribute_group`'); + FROM `' . _DB_PREFIX_ . 'attribute_group`'); $i = 0; if (is_array($groups) && count($groups)) { foreach ($groups as $group) { Db::getInstance()->execute(' - UPDATE `'._DB_PREFIX_.'attribute_group` - SET `position` = '.$i++.' - WHERE `id_attribute_group` = '.(int)$group['id_attribute_group']); + UPDATE `' . _DB_PREFIX_ . 'attribute_group` + SET `position` = ' . $i++ . ' + WHERE `id_attribute_group` = ' . (int) $group['id_attribute_group']); } } } diff --git a/upgrade/php/add_id_shop_to_shipper_lang_index.php b/upgrade/php/add_id_shop_to_shipper_lang_index.php index 520aa6fd6..40d224783 100644 --- a/upgrade/php/add_id_shop_to_shipper_lang_index.php +++ b/upgrade/php/add_id_shop_to_shipper_lang_index.php @@ -23,19 +23,18 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_id_shop_to_shipper_lang_index() { $res = true; $key_exists = Db::getInstance()->executeS(' SHOW INDEX - FROM `'._DB_PREFIX_.'carrier_lang` + FROM `' . _DB_PREFIX_ . 'carrier_lang` WHERE Key_name = "shipper_lang_index"'); if ($key_exists) { - $res &= Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'carrier_lang` DROP KEY `shipper_lang_index`'); + $res &= Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'carrier_lang` DROP KEY `shipper_lang_index`'); } - $res &= Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'carrier_lang` ADD PRIMARY KEY (`id_carrier`, `id_shop`, `id_lang`)'); + $res &= Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'carrier_lang` ADD PRIMARY KEY (`id_carrier`, `id_shop`, `id_lang`)'); return $res; } diff --git a/upgrade/php/add_missing_columns_customer.php b/upgrade/php/add_missing_columns_customer.php index 0603795aa..7fe53e4db 100644 --- a/upgrade/php/add_missing_columns_customer.php +++ b/upgrade/php/add_missing_columns_customer.php @@ -23,30 +23,29 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_missing_columns_customer() { $db = Db::getInstance(); $res = true; - $current_fields = $db->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'customer`'); + $current_fields = $db->executeS('SHOW FIELDS FROM `' . _DB_PREFIX_ . 'customer`'); foreach ($current_fields as $k => $field) { $current_fields[$k] = $field['Field']; } - $missing_fields = array( - 'id_risk' => 'ALTER TABLE `'._DB_PREFIX_.'customer` + $missing_fields = [ + 'id_risk' => 'ALTER TABLE `' . _DB_PREFIX_ . 'customer` ADD `id_risk` int(10) unsigned NOT NULL DEFAULT "1"', - 'company' => 'ALTER TABLE `'._DB_PREFIX_.'customer` ADD `company` varchar(64)', - 'siret' => 'ALTER TABLE `'._DB_PREFIX_.'customer` ADD `siret` varchar(14)', - 'ape' => 'ALTER TABLE `'._DB_PREFIX_.'customer` ADD `ape` varchar(5)', - 'website' => 'ALTER TABLE `'._DB_PREFIX_.'customer` ADD `website` varchar(128)', - 'outstanding_allow_amount' => 'ALTER TABLE `'._DB_PREFIX_.'customer` + 'company' => 'ALTER TABLE `' . _DB_PREFIX_ . 'customer` ADD `company` varchar(64)', + 'siret' => 'ALTER TABLE `' . _DB_PREFIX_ . 'customer` ADD `siret` varchar(14)', + 'ape' => 'ALTER TABLE `' . _DB_PREFIX_ . 'customer` ADD `ape` varchar(5)', + 'website' => 'ALTER TABLE `' . _DB_PREFIX_ . 'customer` ADD `website` varchar(128)', + 'outstanding_allow_amount' => 'ALTER TABLE `' . _DB_PREFIX_ . 'customer` ADD `outstanding_allow_amount` DECIMAL( 10,6 ) NOT NULL default "0.00"', - 'show_public_prices' => 'ALTER TABLE `'._DB_PREFIX_.'customer` + 'show_public_prices' => 'ALTER TABLE `' . _DB_PREFIX_ . 'customer` ADD `show_public_prices` tinyint(1) unsigned NOT NULL default "0"', - 'max_payment_days' => 'ALTER TABLE `'._DB_PREFIX_.'customer` + 'max_payment_days' => 'ALTER TABLE `' . _DB_PREFIX_ . 'customer` ADD `max_payment_days` int(10) unsigned NOT NULL default "60"', - ); + ]; foreach ($missing_fields as $field => $query) { if (!in_array($field, $current_fields)) { diff --git a/upgrade/php/add_missing_image_key.php b/upgrade/php/add_missing_image_key.php index f40009e54..a4ade7a4d 100644 --- a/upgrade/php/add_missing_image_key.php +++ b/upgrade/php/add_missing_image_key.php @@ -23,20 +23,19 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_missing_image_key() { $res = true; $key_exists = Db::getInstance()->executeS('SHOW INDEX - FROM `'._DB_PREFIX_.'image` + FROM `' . _DB_PREFIX_ . 'image` WHERE Key_name = \'idx_product_image\''); if ($key_exists) { $res &= Db::getInstance()->execute('ALTER TABLE - `'._DB_PREFIX_.'image` + `' . _DB_PREFIX_ . 'image` DROP KEY `idx_product_image`'); } $res &= Db::getInstance()->execute('ALTER TABLE - `'._DB_PREFIX_.'image` + `' . _DB_PREFIX_ . 'image` ADD UNIQUE `idx_product_image` (`id_image`, `id_product`, `cover`)'); return $res; diff --git a/upgrade/php/add_missing_rewrite_value.php b/upgrade/php/add_missing_rewrite_value.php index 76511df8d..cc0904e5e 100644 --- a/upgrade/php/add_missing_rewrite_value.php +++ b/upgrade/php/add_missing_rewrite_value.php @@ -23,23 +23,22 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_missing_rewrite_value() { $pages = Db::getInstance()->executeS(' SELECT * - FROM `'._DB_PREFIX_.'meta` m - LEFT JOIN `'._DB_PREFIX_.'meta_lang` ml ON (m.`id_meta` = ml.`id_meta`) + FROM `' . _DB_PREFIX_ . 'meta` m + LEFT JOIN `' . _DB_PREFIX_ . 'meta_lang` ml ON (m.`id_meta` = ml.`id_meta`) WHERE ml.`url_rewrite` = \'\' AND m.`page` != "index" '); if (is_array($pages) && count($pages)) { foreach ($pages as $page) { Db::getInstance()->execute(' - UPDATE `'._DB_PREFIX_.'meta_lang` - SET `url_rewrite` = "'.pSQL(Tools::str2url($page['title'])).'" - WHERE `id_meta` = '.(int)$page['id_meta'].' - AND `id_lang` = '.(int)$page['id_lang']); + UPDATE `' . _DB_PREFIX_ . 'meta_lang` + SET `url_rewrite` = "' . pSQL(Tools::str2url($page['title'])) . '" + WHERE `id_meta` = ' . (int) $page['id_meta'] . ' + AND `id_lang` = ' . (int) $page['id_lang']); } } } diff --git a/upgrade/php/add_missing_shop_column_pagenotfound.php b/upgrade/php/add_missing_shop_column_pagenotfound.php index 386aedda3..d377e11e6 100644 --- a/upgrade/php/add_missing_shop_column_pagenotfound.php +++ b/upgrade/php/add_missing_shop_column_pagenotfound.php @@ -23,24 +23,23 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_missing_shop_column_pagenotfound() { $res = true; - $exists = Db::getInstance()->executeS('SHOW TABLES LIKE "'._DB_PREFIX_.'pagenotfound"'); + $exists = Db::getInstance()->executeS('SHOW TABLES LIKE "' . _DB_PREFIX_ . 'pagenotfound"'); if (count($exists)) { - $fields = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'pagenotfound`'); + $fields = Db::getInstance()->executeS('SHOW FIELDS FROM `' . _DB_PREFIX_ . 'pagenotfound`'); foreach ($fields as $k => $field) { $fields[$k] = $field['Field']; } if (!in_array('id_shop_group', $fields)) { - $res &= Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'pagenotfound` + $res &= Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'pagenotfound` ADD `id_shop_group` INT(10) AFTER `id_pagenotfound`'); } if (!in_array('id_shop', $fields)) { - $res &= Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'pagenotfound` + $res &= Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'pagenotfound` ADD `id_shop` INT(10) AFTER `id_pagenotfound`'); } } diff --git a/upgrade/php/add_module_to_hook.php b/upgrade/php/add_module_to_hook.php index 8194f87ed..b35b6acf4 100644 --- a/upgrade/php/add_module_to_hook.php +++ b/upgrade/php/add_module_to_hook.php @@ -23,37 +23,36 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_module_to_hook($module_name, $hook_name) { $res = true; $id_module = Db::getInstance()->getValue( ' - SELECT `id_module` FROM `'._DB_PREFIX_.'module` - WHERE `name` = "'.$module_name.'"' + SELECT `id_module` FROM `' . _DB_PREFIX_ . 'module` + WHERE `name` = "' . $module_name . '"' ); - if ((int)$id_module > 0) { - $id_hook = Db::getInstance()->getValue('SELECT `id_hook` FROM `'._DB_PREFIX_.'hook` WHERE `name` = "'.$hook_name.'"'); + if ((int) $id_module > 0) { + $id_hook = Db::getInstance()->getValue('SELECT `id_hook` FROM `' . _DB_PREFIX_ . 'hook` WHERE `name` = "' . $hook_name . '"'); if (!$id_hook) { if (!Db::getInstance()->execute(' - INSERT IGNORE INTO `'._DB_PREFIX_.'hook` (`name`, `title`) - VALUES ("'.pSQL($hook_name).'", "'.pSQL($hook_name).'")')) { + INSERT IGNORE INTO `' . _DB_PREFIX_ . 'hook` (`name`, `title`) + VALUES ("' . pSQL($hook_name) . '", "' . pSQL($hook_name) . '")')) { $res = false; } else { $id_hook = Db::getInstance()->Insert_ID(); } } - if ((int)$id_hook > 0) { + if ((int) $id_hook > 0) { if (!Db::getInstance()->execute(' - INSERT IGNORE INTO `'._DB_PREFIX_.'hook_module` (`id_module`, `id_hook`, `position`) + INSERT IGNORE INTO `' . _DB_PREFIX_ . 'hook_module` (`id_module`, `id_hook`, `position`) VALUES ( - '.(int)$id_module.', - '.(int)$id_hook.', + ' . (int) $id_module . ', + ' . (int) $id_hook . ', (SELECT IFNULL( - (SELECT max_position from (SELECT MAX(position)+1 as max_position FROM `'._DB_PREFIX_.'hook_module` WHERE `id_hook` = '.(int)$id_hook.') AS max_position), 1)) + (SELECT max_position from (SELECT MAX(position)+1 as max_position FROM `' . _DB_PREFIX_ . 'hook_module` WHERE `id_hook` = ' . (int) $id_hook . ') AS max_position), 1)) )')) { $res = false; } diff --git a/upgrade/php/add_new_groups.php b/upgrade/php/add_new_groups.php index 1d206686f..ed8070aff 100644 --- a/upgrade/php/add_new_groups.php +++ b/upgrade/php/add_new_groups.php @@ -23,38 +23,37 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_new_groups($french, $standard) { - $res = Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'group` (`id_group`, `date_add`, `date_upd`) VALUES (NULL, NOW(), NOW())'); + $res = Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'group` (`id_group`, `date_add`, `date_upd`) VALUES (NULL, NOW(), NOW())'); $last_id = Db::getInstance()->Insert_ID(); - $languages = Db::getInstance()->executeS('SELECT id_lang, iso_code FROM `'._DB_PREFIX_.'lang`'); + $languages = Db::getInstance()->executeS('SELECT id_lang, iso_code FROM `' . _DB_PREFIX_ . 'lang`'); $sql = ''; foreach ($languages as $lang) { if (strtolower($lang['iso_code']) == 'fr') { - $sql .= '('.(int)$last_id.', '.(int)$lang['id_lang'].', "'.pSQL($french).'"),'; + $sql .= '(' . (int) $last_id . ', ' . (int) $lang['id_lang'] . ', "' . pSQL($french) . '"),'; } else { - $sql .= '('.(int)$last_id.', '.(int)$lang['id_lang'].', "'.pSQL($standard).'"),'; + $sql .= '(' . (int) $last_id . ', ' . (int) $lang['id_lang'] . ', "' . pSQL($standard) . '"),'; } } $sql = substr($sql, 0, strlen($sql) - 1); - $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'group_lang` (`id_group`, `id_lang`, `name`) VALUES '.$sql); + $res &= Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'group_lang` (`id_group`, `id_lang`, `name`) VALUES ' . $sql); // we add the different id_group in the configuration if (strtolower($standard) == 'visitor') { - $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'configuration` (`id_configuration`, `name`, `value`, `date_add`, `date_upd`) VALUES (NULL, "PS_UNIDENTIFIED_GROUP", "'.(int)$last_id.'", NOW(), NOW())'); + $res &= Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (`id_configuration`, `name`, `value`, `date_add`, `date_upd`) VALUES (NULL, "PS_UNIDENTIFIED_GROUP", "' . (int) $last_id . '", NOW(), NOW())'); } elseif (strtolower($standard) == 'guest') { - $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'configuration` (`id_configuration`, `name`, `value`, `date_add`, `date_upd`) VALUES (NULL, "PS_GUEST_GROUP", "'.(int)$last_id.'", NOW(), NOW())'); + $res &= Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (`id_configuration`, `name`, `value`, `date_add`, `date_upd`) VALUES (NULL, "PS_GUEST_GROUP", "' . (int) $last_id . '", NOW(), NOW())'); } elseif (strtolower($standard) == 'test') { - $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'configuration` (`id_configuration`, `name`, `value`, `date_add`, `date_upd`) VALUES (NULL, "PS_TEST", "'.(int)$last_id.'", NOW(), NOW())'); + $res &= Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (`id_configuration`, `name`, `value`, `date_add`, `date_upd`) VALUES (NULL, "PS_TEST", "' . (int) $last_id . '", NOW(), NOW())'); } // Add shop association - $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'group_shop` (`id_group`, `id_shop`) (SELECT '.(int)$last_id.', `value` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = \'PS_SHOP_DEFAULT\')'); + $res &= Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'group_shop` (`id_group`, `id_shop`) (SELECT ' . (int) $last_id . ', `value` FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` = \'PS_SHOP_DEFAULT\')'); // Copy categories associations from the group of id 1 (default group for both visitors and customers in version 1.4) to the new group - $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'category_group` (`id_category`, `id_group`) (SELECT `id_category`, '.(int)$last_id.' FROM `'._DB_PREFIX_.'category_group` WHERE `id_group` = 1)'); + $res &= Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'category_group` (`id_category`, `id_group`) (SELECT `id_category`, ' . (int) $last_id . ' FROM `' . _DB_PREFIX_ . 'category_group` WHERE `id_group` = 1)'); return $res; } diff --git a/upgrade/php/add_new_status_stock.php b/upgrade/php/add_new_status_stock.php index e2a72e6ae..8a5c19f2f 100644 --- a/upgrade/php/add_new_status_stock.php +++ b/upgrade/php/add_new_status_stock.php @@ -23,15 +23,14 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_new_status_stock() { Language::resetCache(); $translator = Context::getContext()->getTranslator(); - $languages = Language::getLanguages(); + $languages = Language::getLanguages(); // insert ps_tab AdminStockManagement - $count = (int)Db::getInstance()->getValue( + $count = (int) Db::getInstance()->getValue( 'SELECT count(id_tab) FROM `' . _DB_PREFIX_ . 'tab` WHERE `class_name` = \'AdminStockManagement\' AND `id_parent` = 9' @@ -42,24 +41,24 @@ function add_new_status_stock() (`id_tab`, `id_parent`, `position`, `module`, `class_name`, `active`, `hide_host_mode`, `icon`) VALUES (null, 9, 7, NULL, \'AdminStockManagement\', 1, 0, \'\')' ); - $lastIdTab = (int)Db::getInstance()->Insert_ID(); + $lastIdTab = (int) Db::getInstance()->Insert_ID(); // ps_tab_lang foreach ($languages as $lang) { - $idLang = (int)$lang['id_lang']; + $idLang = (int) $lang['id_lang']; $stockName = pSQL( $translator->trans( 'Stock', - array(), + [], 'Admin.Navigation.Menu', $lang['locale'] ) ); Db::getInstance()->execute( - "INSERT INTO `" . _DB_PREFIX_ . "tab_lang` (`id_tab`, `id_lang`, `name`) + 'INSERT INTO `' . _DB_PREFIX_ . 'tab_lang` (`id_tab`, `id_lang`, `name`) VALUES ( - " . $lastIdTab . ", - " . $idLang . ", + ' . $lastIdTab . ', + ' . $idLang . ", '" . $stockName . "' )" ); @@ -67,28 +66,28 @@ function add_new_status_stock() } // Stock movements - $data = array( - array( + $data = [ + [ 'name' => 'Customer Order', 'sign' => 1, 'conf' => 'PS_STOCK_CUSTOMER_ORDER_CANCEL_REASON', - ), - array( + ], + [ 'name' => 'Product Return', 'sign' => 1, 'conf' => 'PS_STOCK_CUSTOMER_RETURN_REASON', - ), - array( + ], + [ 'name' => 'Employee Edition', 'sign' => 1, 'conf' => 'PS_STOCK_MVT_INC_EMPLOYEE_EDITION', - ), - array( + ], + [ 'name' => 'Employee Edition', 'sign' => -1, 'conf' => 'PS_STOCK_MVT_DEC_EMPLOYEE_EDITION', - ), - ); + ], + ]; foreach ($data as $d) { // We don't want duplicated data @@ -106,7 +105,7 @@ function add_new_status_stock() $lastInsertedId = Db::getInstance()->Insert_ID(); Db::getInstance()->execute( 'INSERT INTO `' . _DB_PREFIX_ . 'configuration` (`name`, `value`, `date_add`, `date_upd`) - VALUES ("' . $d['conf'] . '", ' . (int)$lastInsertedId . ', NOW(), NOW())' + VALUES ("' . $d['conf'] . '", ' . (int) $lastInsertedId . ', NOW(), NOW())' ); // ps_stock_mvt_reason_lang @@ -114,14 +113,14 @@ function add_new_status_stock() $mvtName = pSQL( $translator->trans( $d['name'], - array(), + [], 'Admin.Catalog.Feature', $lang['locale'] ) ); Db::getInstance()->execute( 'INSERT INTO `' . _DB_PREFIX_ . 'stock_mvt_reason_lang` (`id_stock_mvt_reason`, `id_lang`, `name`) - VALUES (' . (int)$lastInsertedId . ', ' . (int)$lang['id_lang'] . ', "' . $mvtName . '")' + VALUES (' . (int) $lastInsertedId . ', ' . (int) $lang['id_lang'] . ', "' . $mvtName . '")' ); } } @@ -130,16 +129,16 @@ function add_new_status_stock() $shops = Shop::getShops(); foreach ($shops as $shop) { (new \PrestaShop\PrestaShop\Adapter\StockManager())->updatePhysicalProductQuantity( - (int)$shop['id_shop'], - (int)Configuration::get('PS_OS_ERROR'), - (int)Configuration::get('PS_OS_CANCELED') + (int) $shop['id_shop'], + (int) Configuration::get('PS_OS_ERROR'), + (int) Configuration::get('PS_OS_CANCELED') ); } } function configuration_exists($confName) { - $count = (int)Db::getInstance()->getValue( + $count = (int) Db::getInstance()->getValue( 'SELECT count(id_configuration) FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` = \'' . $confName . '\'' diff --git a/upgrade/php/add_new_tab.php b/upgrade/php/add_new_tab.php index 1888badf3..f6e9ffba0 100644 --- a/upgrade/php/add_new_tab.php +++ b/upgrade/php/add_new_tab.php @@ -28,48 +28,50 @@ /** * Common method to handle the tab registration + * * @internal */ function register_tab($className, $name, $id_parent, $returnId = false, $parentTab = null, $module = '') { if (null !== $parentTab && !empty($parentTab) && strtolower(trim($parentTab)) !== 'null') { - $id_parent = (int)Db::getInstance()->getValue('SELECT `id_tab` FROM `'._DB_PREFIX_.'tab` WHERE `class_name` = \''.pSQL($parentTab).'\''); + $id_parent = (int) Db::getInstance()->getValue('SELECT `id_tab` FROM `' . _DB_PREFIX_ . 'tab` WHERE `class_name` = \'' . pSQL($parentTab) . '\''); } - $array = array(); + $array = []; foreach (explode('|', $name) as $item) { $temp = explode(':', $item); $array[$temp[0]] = $temp[1]; } - if (!(int)Db::getInstance()->getValue('SELECT count(id_tab) FROM `'._DB_PREFIX_.'tab` WHERE `class_name` = \''.pSQL($className).'\' ')) { - Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'tab` (`id_parent`, `class_name`, `module`, `position`) VALUES ('.(int)$id_parent.', \''.pSQL($className).'\', \''.pSQL($module).'\', - (SELECT IFNULL(MAX(t.position),0)+ 1 FROM `'._DB_PREFIX_.'tab` t WHERE t.id_parent = '.(int)$id_parent.'))'); + if (!(int) Db::getInstance()->getValue('SELECT count(id_tab) FROM `' . _DB_PREFIX_ . 'tab` WHERE `class_name` = \'' . pSQL($className) . '\' ')) { + Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'tab` (`id_parent`, `class_name`, `module`, `position`) VALUES (' . (int) $id_parent . ', \'' . pSQL($className) . '\', \'' . pSQL($module) . '\', + (SELECT IFNULL(MAX(t.position),0)+ 1 FROM `' . _DB_PREFIX_ . 'tab` t WHERE t.id_parent = ' . (int) $id_parent . '))'); } - $languages = Db::getInstance()->executeS('SELECT id_lang, iso_code FROM `'._DB_PREFIX_.'lang`'); + $languages = Db::getInstance()->executeS('SELECT id_lang, iso_code FROM `' . _DB_PREFIX_ . 'lang`'); foreach ($languages as $lang) { Db::getInstance()->execute(' - INSERT IGNORE INTO `'._DB_PREFIX_.'tab_lang` (`id_lang`, `id_tab`, `name`) - VALUES ('.(int)$lang['id_lang'].', ( + INSERT IGNORE INTO `' . _DB_PREFIX_ . 'tab_lang` (`id_lang`, `id_tab`, `name`) + VALUES (' . (int) $lang['id_lang'] . ', ( SELECT `id_tab` - FROM `'._DB_PREFIX_.'tab` - WHERE `class_name` = \''.pSQL($className).'\' LIMIT 0,1 - ), \''.pSQL(isset($array[$lang['iso_code']]) ? $array[$lang['iso_code']] : $array['en']).'\') + FROM `' . _DB_PREFIX_ . 'tab` + WHERE `class_name` = \'' . pSQL($className) . '\' LIMIT 0,1 + ), \'' . pSQL(isset($array[$lang['iso_code']]) ? $array[$lang['iso_code']] : $array['en']) . '\') '); } } /** * Common method for getting the new tab ID + * * @internal */ function get_new_tab_id($className, $returnId = false) { if ($returnId && strtolower(trim($returnId)) !== 'false') { - return (int)Db::getInstance()->getValue('SELECT `id_tab` - FROM `'._DB_PREFIX_.'tab` - WHERE `class_name` = \''.pSQL($className).'\''); + return (int) Db::getInstance()->getValue('SELECT `id_tab` + FROM `' . _DB_PREFIX_ . 'tab` + WHERE `class_name` = \'' . pSQL($className) . '\''); } } @@ -89,12 +91,12 @@ function add_new_tab($className, $name, $id_parent, $returnId = false, $parentTa { register_tab($className, $name, $id_parent, $returnId, $parentTab, $module); - Db::getInstance()->execute('INSERT IGNORE INTO `'._DB_PREFIX_.'access` (`id_profile`, `id_tab`, `view`, `add`, `edit`, `delete`) + Db::getInstance()->execute('INSERT IGNORE INTO `' . _DB_PREFIX_ . 'access` (`id_profile`, `id_tab`, `view`, `add`, `edit`, `delete`) (SELECT `id_profile`, ( SELECT `id_tab` - FROM `'._DB_PREFIX_.'tab` - WHERE `class_name` = \''.pSQL($className).'\' LIMIT 0,1 - ), 1, 1, 1, 1 FROM `'._DB_PREFIX_.'profile` )'); + FROM `' . _DB_PREFIX_ . 'tab` + WHERE `class_name` = \'' . pSQL($className) . '\' LIMIT 0,1 + ), 1, 1, 1, 1 FROM `' . _DB_PREFIX_ . 'profile` )'); return get_new_tab_id($className, $returnId); } @@ -120,35 +122,35 @@ function add_new_tab_17($className, $name, $id_parent, $returnId = false, $paren if ($id_parent) { $parentClassName = Db::getInstance()->getValue(' SELECT `class_name` - FROM `'._DB_PREFIX_.'tab` - WHERE `id_tab` = "'.(int) $id_parent.'" + FROM `' . _DB_PREFIX_ . 'tab` + WHERE `id_tab` = "' . (int) $id_parent . '" '); } elseif (!empty($parentTab)) { $parentClassName = $parentTab; } - foreach (array(PageVoter::CREATE, PageVoter::READ, PageVoter::UPDATE, PageVoter::DELETE) as $role) { + foreach ([PageVoter::CREATE, PageVoter::READ, PageVoter::UPDATE, PageVoter::DELETE] as $role) { // 1- Add role - $roleToAdd = strtoupper('ROLE_MOD_TAB_'.$className.'_'.$role); - Db::getInstance()->execute('INSERT IGNORE INTO `'._DB_PREFIX_.'authorization_role` (`slug`) - VALUES ("'.pSQL($roleToAdd).'")'); + $roleToAdd = strtoupper('ROLE_MOD_TAB_' . $className . '_' . $role); + Db::getInstance()->execute('INSERT IGNORE INTO `' . _DB_PREFIX_ . 'authorization_role` (`slug`) + VALUES ("' . pSQL($roleToAdd) . '")'); $newID = Db::getInstance()->Insert_ID(); if (!$newID) { $newID = Db::getInstance()->getValue(' SELECT `id_authorization_role` - FROM `'._DB_PREFIX_.'authorization_role` - WHERE `slug` = "'.pSQL($roleToAdd).'" + FROM `' . _DB_PREFIX_ . 'authorization_role` + WHERE `slug` = "' . pSQL($roleToAdd) . '" '); } // 2- Copy access from the parent if (!empty($parentClassName) && !empty($newID)) { - $parentRole = strtoupper('ROLE_MOD_TAB_'.pSQL($parentClassName).'_'.$role); + $parentRole = strtoupper('ROLE_MOD_TAB_' . pSQL($parentClassName) . '_' . $role); Db::getInstance()->execute( - 'INSERT IGNORE INTO `'._DB_PREFIX_.'access` (`id_profile`, `id_authorization_role`) - SELECT a.`id_profile`, '. (int)$newID .' as `id_authorization_role` - FROM `'._DB_PREFIX_.'access` a join `'._DB_PREFIX_.'authorization_role` ar on a.`id_authorization_role` = ar.`id_authorization_role` - WHERE ar.`slug` = "'.pSQL($parentRole).'"' + 'INSERT IGNORE INTO `' . _DB_PREFIX_ . 'access` (`id_profile`, `id_authorization_role`) + SELECT a.`id_profile`, ' . (int) $newID . ' as `id_authorization_role` + FROM `' . _DB_PREFIX_ . 'access` a join `' . _DB_PREFIX_ . 'authorization_role` ar on a.`id_authorization_role` = ar.`id_authorization_role` + WHERE ar.`slug` = "' . pSQL($parentRole) . '"' ); } } diff --git a/upgrade/php/add_order_reference_in_order_payment.php b/upgrade/php/add_order_reference_in_order_payment.php index c17d26a9d..26bbff837 100644 --- a/upgrade/php/add_order_reference_in_order_payment.php +++ b/upgrade/php/add_order_reference_in_order_payment.php @@ -23,28 +23,27 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_order_reference_in_order_payment() { $res = true; $payments = Db::getInstance()->query(' SELECT op.id_order_payment, o.reference - FROM `'._DB_PREFIX_.'order_payment` op - INNER JOIN `'._DB_PREFIX_.'orders` o + FROM `' . _DB_PREFIX_ . 'order_payment` op + INNER JOIN `' . _DB_PREFIX_ . 'orders` o ON o.id_order = op.id_order'); if (!is_resource($payments) || !$payments) { return true; } - $errors = array(); + $errors = []; // Populate "order_reference" while ($payment = Db::getInstance()->nextRow($payments)) { if (isset($payment['id_order_payment']) && $payment['id_order_payment']) { $res = Db::getInstance()->execute(' - UPDATE `'._DB_PREFIX_.'order_payment` - SET order_reference = \''.pSQL($payment['reference']).'\' - WHERE id_order_payment = '.(int)$payment['id_order_payment']); + UPDATE `' . _DB_PREFIX_ . 'order_payment` + SET order_reference = \'' . pSQL($payment['reference']) . '\' + WHERE id_order_payment = ' . (int) $payment['id_order_payment']); if (!$res) { $errors[] = Db::getInstance()->getMsgError(); } @@ -52,13 +51,13 @@ function add_order_reference_in_order_payment() } if (count($errors)) { - return array('error' => true, 'msg' => implode('
', $errors)); + return ['error' => true, 'msg' => implode('
', $errors)]; } // Get lines to merge (with multishipping on, durring the payment one line was added by order, only one is necessary by cart) $duplicate_lines = Db::getInstance()->query(' SELECT GROUP_CONCAT(id_order_payment) as id_order_payments - FROM `'._DB_PREFIX_.'order_payment` + FROM `' . _DB_PREFIX_ . 'order_payment` GROUP BY order_reference, date_add HAVING COUNT(*) > 1'); @@ -66,9 +65,9 @@ function add_order_reference_in_order_payment() return true; } - $order_payments_to_remove = array(); + $order_payments_to_remove = []; while ($order_payments = Db::getInstance()->nextRow($duplicate_lines)) { - $order_payments_array = array(); + $order_payments_array = []; if (isset($order_payments['id_order_payments'])) { $order_payments_array = explode(',', $order_payments['id_order_payments']); } @@ -76,19 +75,19 @@ function add_order_reference_in_order_payment() $id_order_payment_keep = array_shift($order_payments_array); $res = Db::getInstance()->execute(' - UPDATE `'._DB_PREFIX_.'order_invoice_payment` - SET id_order_payement = '.(int)$id_order_payment_keep.' - WHERE id_order_payment IN ('.implode(',', $order_payments_array).')'); + UPDATE `' . _DB_PREFIX_ . 'order_invoice_payment` + SET id_order_payement = ' . (int) $id_order_payment_keep . ' + WHERE id_order_payment IN (' . implode(',', $order_payments_array) . ')'); $order_payments_to_remove = array_merge($order_payments_to_remove, $order_payments_array); } // Remove the duplicate lines (because of the multishipping) if (count($order_payments_to_remove)) { - $res = Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'order_payment` WHERE id_order_payment IN ('.implode(',', $order_payments_to_remove).')'); + $res = Db::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . 'order_payment` WHERE id_order_payment IN (' . implode(',', $order_payments_to_remove) . ')'); } if (!$res) { - return array('errors' => true, 'msg' => Db::getInstance()->getMsgError()); + return ['errors' => true, 'msg' => Db::getInstance()->getMsgError()]; } return true; diff --git a/upgrade/php/add_order_state.php b/upgrade/php/add_order_state.php index 7e3782f67..462ace62e 100644 --- a/upgrade/php/add_order_state.php +++ b/upgrade/php/add_order_state.php @@ -23,12 +23,11 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_order_state($conf_name, $name, $invoice, $send_email, $color, $unremovable, $logable, $delivery, $template = null) { $res = true; - $name_lang = array(); - $template_lang = array(); + $name_lang = []; + $template_lang = []; foreach (explode('|', $name) as $item) { $temp = explode(':', $item); $name_lang[$temp[0]] = $temp[1]; @@ -42,31 +41,31 @@ function add_order_state($conf_name, $name, $invoice, $send_email, $color, $unre } $res &= Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'order_state` (`invoice`, `send_email`, `color`, `unremovable`, `logable`, `delivery`) - VALUES ('.(int)$invoice.', '.(int)$send_email.', "'.$color.'", '.(int)$unremovable.', '.(int)$logable.', '.(int)$delivery.')'); + INSERT INTO `' . _DB_PREFIX_ . 'order_state` (`invoice`, `send_email`, `color`, `unremovable`, `logable`, `delivery`) + VALUES (' . (int) $invoice . ', ' . (int) $send_email . ', "' . $color . '", ' . (int) $unremovable . ', ' . (int) $logable . ', ' . (int) $delivery . ')'); $id_order_state = Db::getInstance()->getValue(' SELECT MAX(`id_order_state`) - FROM `'._DB_PREFIX_.'order_state`'); + FROM `' . _DB_PREFIX_ . 'order_state`'); - $languages = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'lang`'); + $languages = Db::getInstance()->executeS('SELECT * FROM `' . _DB_PREFIX_ . 'lang`'); foreach ($languages as $lang) { $iso_code = $lang['iso_code']; - $iso_code_name = isset($name_lang[$iso_code])?$iso_code:'en'; - $iso_code_template = isset($template_lang[$iso_code])?$iso_code:'en'; + $iso_code_name = isset($name_lang[$iso_code]) ? $iso_code : 'en'; + $iso_code_template = isset($template_lang[$iso_code]) ? $iso_code : 'en'; $name = isset($name_lang[$iso_code]) ? $name_lang[$iso_code] : $name_lang['en']; $template = isset($template_lang[$iso_code]) ? $template_lang[$iso_code] : ''; $res &= Db::getInstance()->execute(' - INSERT IGNORE INTO `'._DB_PREFIX_.'order_state_lang` (`id_lang`, `id_order_state`, `name`, `template`) - VALUES ('.(int)$lang['id_lang'].', '.(int)$id_order_state.', "'. $name .'", "'. $template .'") + INSERT IGNORE INTO `' . _DB_PREFIX_ . 'order_state_lang` (`id_lang`, `id_order_state`, `name`, `template`) + VALUES (' . (int) $lang['id_lang'] . ', ' . (int) $id_order_state . ', "' . $name . '", "' . $template . '") '); } - $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = \''.pSQL($conf_name).'\''); + $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` = \'' . pSQL($conf_name) . '\''); if ($exist) { - $res &= Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET value = "'.(int)$id_order_state.'" WHERE `name` LIKE \''.pSQL($conf_name).'\''); + $res &= Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'configuration` SET value = "' . (int) $id_order_state . '" WHERE `name` LIKE \'' . pSQL($conf_name) . '\''); } else { - $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'configuration` (name, value) VALUES ("'.pSQL($conf_name).'", "'.(int)$id_order_state.'"'); + $res &= Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (name, value) VALUES ("' . pSQL($conf_name) . '", "' . (int) $id_order_state . '"'); } } diff --git a/upgrade/php/add_quick_access_tab.php b/upgrade/php/add_quick_access_tab.php index e43469bdb..8cede57a2 100644 --- a/upgrade/php/add_quick_access_tab.php +++ b/upgrade/php/add_quick_access_tab.php @@ -23,10 +23,9 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_quick_access_tab() { - include_once __DIR__.'/add_new_tab.php'; + include_once __DIR__ . '/add_new_tab.php'; add_new_tab_17( 'AdminQuickAccesses', 'en:Quick access|fr:Accès rapide|es:Quick access|de:Quick access|it:Quick access', diff --git a/upgrade/php/add_required_customization_field_flag.php b/upgrade/php/add_required_customization_field_flag.php index 1f69f97ce..7e7da0434 100644 --- a/upgrade/php/add_required_customization_field_flag.php +++ b/upgrade/php/add_required_customization_field_flag.php @@ -23,20 +23,19 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - define('_CONTAINS_REQUIRED_FIELD_', 2); function add_required_customization_field_flag() { - if (($result = Db::getInstance()->executeS('SELECT `id_product` FROM `'._DB_PREFIX_.'customization_field` WHERE `required` = 1')) === false) { + if (($result = Db::getInstance()->executeS('SELECT `id_product` FROM `' . _DB_PREFIX_ . 'customization_field` WHERE `required` = 1')) === false) { return false; } if (Db::getInstance()->numRows()) { - $productIds = array(); + $productIds = []; foreach ($result as $row) { - $productIds[] = (int)($row['id_product']); + $productIds[] = (int) ($row['id_product']); } - if (!Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'product` SET `customizable` = '._CONTAINS_REQUIRED_FIELD_.' WHERE `id_product` IN ('.implode(', ', $productIds).')')) { + if (!Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'product` SET `customizable` = ' . _CONTAINS_REQUIRED_FIELD_ . ' WHERE `id_product` IN (' . implode(', ', $productIds) . ')')) { return false; } } diff --git a/upgrade/php/add_stock_tab.php b/upgrade/php/add_stock_tab.php index b27a7035a..f9bdef0b2 100644 --- a/upgrade/php/add_stock_tab.php +++ b/upgrade/php/add_stock_tab.php @@ -23,15 +23,14 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - -require_once __DIR__.'/add_new_tab.php'; +require_once __DIR__ . '/add_new_tab.php'; function add_stock_tab() { // Patch for the 1.0.1 sql update Db::getInstance()->query(' DELETE - FROM `'._DB_PREFIX_.'tab` + FROM `' . _DB_PREFIX_ . 'tab` WHERE id_parent = 1 AND class_name = "AdminStocks"'); diff --git a/upgrade/php/add_supplier_manufacturer_routes.php b/upgrade/php/add_supplier_manufacturer_routes.php index 862581798..5c101bed2 100644 --- a/upgrade/php/add_supplier_manufacturer_routes.php +++ b/upgrade/php/add_supplier_manufacturer_routes.php @@ -38,13 +38,13 @@ function add_supplier_manufacturer_routes() { Configuration::loadConfiguration(); - $legacyRoutes = array( + $legacyRoutes = [ 'supplier_rule' => '{id}__{rewrite}', 'manufacturer_rule' => '{id}_{rewrite}', - ); + ]; foreach ($legacyRoutes as $routeId => $rule) { - if (!Configuration::get('PS_ROUTE_'.$routeId, null, 0, 0)) { - Configuration::updateGlobalValue('PS_ROUTE_'.$routeId, $rule); + if (!Configuration::get('PS_ROUTE_' . $routeId, null, 0, 0)) { + Configuration::updateGlobalValue('PS_ROUTE_' . $routeId, $rule); } } } diff --git a/upgrade/php/add_unknown_gender.php b/upgrade/php/add_unknown_gender.php index 877c135fe..e1380ac4d 100644 --- a/upgrade/php/add_unknown_gender.php +++ b/upgrade/php/add_unknown_gender.php @@ -23,7 +23,6 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function add_unknown_gender() { $res = true; @@ -31,32 +30,32 @@ function add_unknown_gender() // creates the new gender $id_type = 2; $res &= Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'gender` (`type`) - VALUES ('.(int)$id_type.')'); + INSERT INTO `' . _DB_PREFIX_ . 'gender` (`type`) + VALUES (' . (int) $id_type . ')'); // retrieves its id $id_gender = Db::getInstance()->Insert_ID(); // inserts lang values - $languages = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'lang`'); - $lang_names = array( + $languages = Db::getInstance()->executeS('SELECT * FROM `' . _DB_PREFIX_ . 'lang`'); + $lang_names = [ 'en' => 'Unknown', 'de' => 'Unbekannte', 'es' => 'Desconocido', 'fr' => 'Inconnu', 'it' => 'Sconosciuto', - ); + ]; foreach ($languages as $lang) { $name = (isset($lang_names[$lang['iso_code']]) ? $lang_names[$lang['iso_code']] : 'Unknown'); $res &= Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'gender_lang` (`id_gender`, `id_lang`, `name`) VALUES - ('.(int)$id_gender.', '.(int)$lang['id_lang'].', \''.pSQL($name).'\')'); + INSERT INTO `' . _DB_PREFIX_ . 'gender_lang` (`id_gender`, `id_lang`, `name`) VALUES + (' . (int) $id_gender . ', ' . (int) $lang['id_lang'] . ', \'' . pSQL($name) . '\')'); } // for all clients where id gender is 0, sets the new id gender $res &= Db::getInstance()->execute(' - UPDATE `'._DB_PREFIX_.'customers` - SET `id_gender` = '.(int)$id_gender.' + UPDATE `' . _DB_PREFIX_ . 'customers` + SET `id_gender` = ' . (int) $id_gender . ' WHERE `id_gender` = 0'); } diff --git a/upgrade/php/alter_blocklink.php b/upgrade/php/alter_blocklink.php index d2ee149c8..72d3062eb 100644 --- a/upgrade/php/alter_blocklink.php +++ b/upgrade/php/alter_blocklink.php @@ -23,11 +23,10 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function alter_blocklink() { // No one will know if the table does not exist :] Thanks Damien for your solution ;) - Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'blocklink_lang` CHANGE `id_link` `id_blocklink` INT( 10 ) UNSIGNED NOT NULL'); + Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'blocklink_lang` CHANGE `id_link` `id_blocklink` INT( 10 ) UNSIGNED NOT NULL'); - Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'blocklink` CHANGE `id_link` `id_blocklink` INT( 10 ) UNSIGNED NOT NULL'); + Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'blocklink` CHANGE `id_link` `id_blocklink` INT( 10 ) UNSIGNED NOT NULL'); } diff --git a/upgrade/php/alter_cms_block.php b/upgrade/php/alter_cms_block.php index c405a5d2a..403efad05 100644 --- a/upgrade/php/alter_cms_block.php +++ b/upgrade/php/alter_cms_block.php @@ -23,15 +23,14 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function alter_cms_block() { // No one will know if the table does not exist :] Thanks Damien for your solution ;) - Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'cms_block_lang` CHANGE `id_block_cms` `id_cms_block` INT( 10 ) UNSIGNED NOT NULL'); + Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'cms_block_lang` CHANGE `id_block_cms` `id_cms_block` INT( 10 ) UNSIGNED NOT NULL'); - Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'cms_block` CHANGE `id_block_cms` `id_cms_block` INT( 10 ) UNSIGNED NOT NULL'); + Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'cms_block` CHANGE `id_block_cms` `id_cms_block` INT( 10 ) UNSIGNED NOT NULL'); - Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'cms_block_page` CHANGE `id_block_cms` `id_cms_block` INT( 10 ) UNSIGNED NOT NULL'); + Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'cms_block_page` CHANGE `id_block_cms` `id_cms_block` INT( 10 ) UNSIGNED NOT NULL'); - Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'cms_block_page` CHANGE `id_block_cms_page` `id_cms_block_page` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT'); + Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'cms_block_page` CHANGE `id_block_cms_page` `id_cms_block_page` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT'); } diff --git a/upgrade/php/alter_ignore_drop_key.php b/upgrade/php/alter_ignore_drop_key.php index 924fc4840..3ec2f01c1 100644 --- a/upgrade/php/alter_ignore_drop_key.php +++ b/upgrade/php/alter_ignore_drop_key.php @@ -23,16 +23,15 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function alter_ignore_drop_key($table, $key) { $indexes = Db::getInstance()->executeS(' - SHOW INDEX FROM `'._DB_PREFIX_.pSQL($table).'` WHERE Key_name = \''.pSQL($key).'\' + SHOW INDEX FROM `' . _DB_PREFIX_ . pSQL($table) . '` WHERE Key_name = \'' . pSQL($key) . '\' '); if (count($indexes) > 0) { Db::getInstance()->execute(' - ALTER TABLE `'._DB_PREFIX_.pSQL($table).'` DROP KEY `'.pSQL($key).'` + ALTER TABLE `' . _DB_PREFIX_ . pSQL($table) . '` DROP KEY `' . pSQL($key) . '` '); } } diff --git a/upgrade/php/alter_productcomments_guest_index.php b/upgrade/php/alter_productcomments_guest_index.php index fd3707d61..59fd1ab25 100644 --- a/upgrade/php/alter_productcomments_guest_index.php +++ b/upgrade/php/alter_productcomments_guest_index.php @@ -23,17 +23,16 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function alter_productcomments_guest_index() { $id_productcomments = Db::getInstance()->getValue('SELECT id_module - FROM `'._DB_PREFIX_.'module` WHERE name = "productcomments"'); + FROM `' . _DB_PREFIX_ . 'module` WHERE name = "productcomments"'); if (!$id_productcomments) { return; } Db::getInstance()->execute(' - ALTER TABLE `'._DB_PREFIX_.'product_comment` + ALTER TABLE `' . _DB_PREFIX_ . 'product_comment` DROP INDEX `id_guest`, ADD INDEX `id_guest` (`id_guest`);'); } diff --git a/upgrade/php/attribute_group_clean_combinations.php b/upgrade/php/attribute_group_clean_combinations.php index 7caf7b347..e111a0f23 100644 --- a/upgrade/php/attribute_group_clean_combinations.php +++ b/upgrade/php/attribute_group_clean_combinations.php @@ -23,24 +23,23 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function attribute_group_clean_combinations() { $attributeCombinations = Db::getInstance()->executeS('SELECT pac.`id_attribute`, pa.`id_product_attribute` - FROM `'._DB_PREFIX_.'product_attribute` pa - LEFT JOIN `'._DB_PREFIX_.'product_attribute_combination` pac + FROM `' . _DB_PREFIX_ . 'product_attribute` pa + LEFT JOIN `' . _DB_PREFIX_ . 'product_attribute_combination` pac ON (pa.`id_product_attribute` = pac.`id_product_attribute`)'); - $toRemove = array(); + $toRemove = []; foreach ($attributeCombinations as $attributeCombination) { - if ((int)($attributeCombination['id_attribute']) == 0) { - $toRemove[] = (int)($attributeCombination['id_product_attribute']); + if ((int) ($attributeCombination['id_attribute']) == 0) { + $toRemove[] = (int) ($attributeCombination['id_product_attribute']); } } if (!empty($toRemove)) { - $res = Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'product_attribute` - WHERE `id_product_attribute` IN ('.implode(', ', $toRemove).')'); + $res = Db::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . 'product_attribute` + WHERE `id_product_attribute` IN (' . implode(', ', $toRemove) . ')'); return $res; } diff --git a/upgrade/php/block_category_1521.php b/upgrade/php/block_category_1521.php index 9bfc91119..7bf1da008 100644 --- a/upgrade/php/block_category_1521.php +++ b/upgrade/php/block_category_1521.php @@ -23,14 +23,13 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function block_category_1521() { - if (!Db::getInstance()->getValue('SELECT value FROM `'._DB_PREFIX_.'configuration` WHERE `name` = \'BLOCK_CATEG_MAX_DEPTH\' ')) { - Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'configuration` + if (!Db::getInstance()->getValue('SELECT value FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` = \'BLOCK_CATEG_MAX_DEPTH\' ')) { + Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (`id_configuration` ,`id_shop_group` ,`id_shop` ,`name` ,`value` ,`date_add` ,`date_upd`) VALUES (NULL, NULL, NULL, \'BLOCK_CATEG_MAX_DEPTH\', 4, NOW(), NOW())'); - } elseif ($maxdepth = (int)Db::getInstance()->getValue('SELECT value FROM `'._DB_PREFIX_.'configuration` WHERE `value` IS NOT NULL AND `value` <> 0 AND `name` = \'BLOCK_CATEG_MAX_DEPTH\'')) { - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET `value` = '.($maxdepth + 1).' WHERE `name` = \'BLOCK_CATEG_MAX_DEPTH\''); + } elseif ($maxdepth = (int) Db::getInstance()->getValue('SELECT value FROM `' . _DB_PREFIX_ . 'configuration` WHERE `value` IS NOT NULL AND `value` <> 0 AND `name` = \'BLOCK_CATEG_MAX_DEPTH\'')) { + Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'configuration` SET `value` = ' . ($maxdepth + 1) . ' WHERE `name` = \'BLOCK_CATEG_MAX_DEPTH\''); } } diff --git a/upgrade/php/blocknewsletter.php b/upgrade/php/blocknewsletter.php index 8709dd491..1715bad5f 100644 --- a/upgrade/php/blocknewsletter.php +++ b/upgrade/php/blocknewsletter.php @@ -23,9 +23,8 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function blocknewsletter() { // No one will know if the table does not exist :] - Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'newsletter ADD `http_referer` VARCHAR(255) NULL'); + Db::getInstance()->execute('ALTER TABLE ' . _DB_PREFIX_ . 'newsletter ADD `http_referer` VARCHAR(255) NULL'); } diff --git a/upgrade/php/blocknewsletter1530.php b/upgrade/php/blocknewsletter1530.php index d2f8541a3..8b7301635 100644 --- a/upgrade/php/blocknewsletter1530.php +++ b/upgrade/php/blocknewsletter1530.php @@ -23,16 +23,15 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function blocknewsletter1530() { - include_once __DIR__.'/generic_add_missing_column.php'; + include_once __DIR__ . '/generic_add_missing_column.php'; - $column_to_add = array( + $column_to_add = [ 'id_shop' => 'INTEGER UNSIGNED NOT NULL DEFAULT \'1\' after `id`', 'id_shop_group' => 'INTEGER UNSIGNED NOT NULL DEFAULT \'1\' after `id_shop`', 'active' => 'TINYINT(1) NOT NULL DEFAULT \'0\' after http_referer', - ); + ]; return generic_add_missing_column('newsletter', $column_to_add); } diff --git a/upgrade/php/category_product_index_unique.php b/upgrade/php/category_product_index_unique.php index f59bc4e0b..64f5651d9 100644 --- a/upgrade/php/category_product_index_unique.php +++ b/upgrade/php/category_product_index_unique.php @@ -23,20 +23,19 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function category_product_index_unique() { $res = true; $key_exists = Db::getInstance()->executeS('SHOW INDEX - FROM `'._DB_PREFIX_.'category_product` + FROM `' . _DB_PREFIX_ . 'category_product` WHERE Key_name = "category_product_index"'); if ($key_exists) { $res &= Db::getInstance()->execute('ALTER TABLE - `'._DB_PREFIX_.'category_product` + `' . _DB_PREFIX_ . 'category_product` DROP INDEX `category_product_index`'); } $res &= Db::getInstance()->execute('ALTER TABLE - `'._DB_PREFIX_.'category_product` + `' . _DB_PREFIX_ . 'category_product` ADD UNIQUE `category_product_index` (`id_category`, `id_product`)'); return $res; diff --git a/upgrade/php/check_webservice_account_table.php b/upgrade/php/check_webservice_account_table.php index d43d6ad50..6b655d387 100644 --- a/upgrade/php/check_webservice_account_table.php +++ b/upgrade/php/check_webservice_account_table.php @@ -32,10 +32,10 @@ */ function check_webservice_account_table() { - $sql = 'SHOW COLUMNS FROM '._DB_PREFIX_.'webservice_account'; + $sql = 'SHOW COLUMNS FROM ' . _DB_PREFIX_ . 'webservice_account'; $return = Db::getInstance()->executeS($sql); if (count($return) < 7) { - $sql = 'ALTER TABLE `'._DB_PREFIX_.'webservice_account` ADD `is_module` TINYINT( 2 ) NOT NULL DEFAULT \'0\' AFTER `class_name` , + $sql = 'ALTER TABLE `' . _DB_PREFIX_ . 'webservice_account` ADD `is_module` TINYINT( 2 ) NOT NULL DEFAULT \'0\' AFTER `class_name` , ADD `module_name` VARCHAR( 50 ) NULL DEFAULT NULL AFTER `is_module`'; Db::getInstance()->executeS($sql); } diff --git a/upgrade/php/clean_category_product.php b/upgrade/php/clean_category_product.php index 8c4742930..32c65c6b0 100644 --- a/upgrade/php/clean_category_product.php +++ b/upgrade/php/clean_category_product.php @@ -29,15 +29,15 @@ function clean_category_product() { $list = Db::getInstance()->executeS(' SELECT id_category, id_product, COUNT(*) n - FROM '._DB_PREFIX_.'category_product + FROM ' . _DB_PREFIX_ . 'category_product GROUP BY CONCAT(id_category,\'|\',id_product) HAVING n > 1'); $result = true; if ($list) { foreach ($list as $l) { - $result &= Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'category_product - WHERE id_product = '.(int)$l['id_product'].' AND id_category = '.(int)$l['id_category'].' LIMIT '.(int)($l['n'] - 1)); + $result &= Db::getInstance()->execute('DELETE FROM ' . _DB_PREFIX_ . 'category_product + WHERE id_product = ' . (int) $l['id_product'] . ' AND id_category = ' . (int) $l['id_category'] . ' LIMIT ' . (int) ($l['n'] - 1)); } } diff --git a/upgrade/php/clean_tabs_15.php b/upgrade/php/clean_tabs_15.php index d07e2d7ba..b3bd5a92e 100644 --- a/upgrade/php/clean_tabs_15.php +++ b/upgrade/php/clean_tabs_15.php @@ -23,268 +23,267 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function clean_tabs_15() { - include_once __DIR__.'/migrate_tabs_15.php'; + include_once __DIR__ . '/migrate_tabs_15.php'; - $clean_tabs_15 = array( - 9 => array( + $clean_tabs_15 = [ + 9 => [ 'class_name' => 'AdminCatalog', 'position' => 0, 'active' => 1, - 'children' => array( - 21 => array('class_name' => 'AdminProducts', 'position' => 0, 'active' => 1, - ), - 22 => array('class_name' => 'AdminCategories', 'position' => 1, 'active' => 1, - ), - 23 => array('class_name' => 'AdminTracking', 'position' => 2, 'active' => 1, - ), - 24 => array('class_name' => 'AdminAttributesGroups', 'position' => 3, 'active' => 1, - ), - 25 => array('class_name' => 'AdminFeatures', 'position' => 4, 'active' => 1, - ), - 26 => array('class_name' => 'AdminManufacturers', 'position' => 5, 'active' => 1, - ), - 27 => array('class_name' => 'AdminSuppliers', 'position' => 6, 'active' => 1, - ), - 28 => array('class_name' => 'AdminScenes', 'position' => 7, 'active' => 1, - ), - 29 => array('class_name' => 'AdminTags', 'position' => 8, 'active' => 1, - ), - 30 => array('class_name' => 'AdminAttachments', 'position' => 9, 'active' => 1, - ), - ), - ), - 10 => array( + 'children' => [ + 21 => ['class_name' => 'AdminProducts', 'position' => 0, 'active' => 1, + ], + 22 => ['class_name' => 'AdminCategories', 'position' => 1, 'active' => 1, + ], + 23 => ['class_name' => 'AdminTracking', 'position' => 2, 'active' => 1, + ], + 24 => ['class_name' => 'AdminAttributesGroups', 'position' => 3, 'active' => 1, + ], + 25 => ['class_name' => 'AdminFeatures', 'position' => 4, 'active' => 1, + ], + 26 => ['class_name' => 'AdminManufacturers', 'position' => 5, 'active' => 1, + ], + 27 => ['class_name' => 'AdminSuppliers', 'position' => 6, 'active' => 1, + ], + 28 => ['class_name' => 'AdminScenes', 'position' => 7, 'active' => 1, + ], + 29 => ['class_name' => 'AdminTags', 'position' => 8, 'active' => 1, + ], + 30 => ['class_name' => 'AdminAttachments', 'position' => 9, 'active' => 1, + ], + ], + ], + 10 => [ 'class_name' => 'AdminParentOrders', 'position' => 1, 'active' => 1, - 'children' => array( - 31 => array('class_name' => 'AdminOrders', 'position' => 0, 'active' => 1, - ), - 32 => array('class_name' => 'AdminInvoices', 'position' => 1, 'active' => 1, - ), - 33 => array('class_name' => 'AdminReturn', 'position' => 2, 'active' => 1, - ), - 34 => array('class_name' => 'AdminDeliverySlip', 'position' => 3, 'active' => 1, - ), - 35 => array('class_name' => 'AdminSlip', 'position' => 4, 'active' => 1, - ), - 36 => array('class_name' => 'AdminStatuses', 'position' => 5, 'active' => 1, - ), - 37 => array('class_name' => 'AdminOrderMessage', 'position' => 6, 'active' => 1, - ), - ), - ), - 11 => array( + 'children' => [ + 31 => ['class_name' => 'AdminOrders', 'position' => 0, 'active' => 1, + ], + 32 => ['class_name' => 'AdminInvoices', 'position' => 1, 'active' => 1, + ], + 33 => ['class_name' => 'AdminReturn', 'position' => 2, 'active' => 1, + ], + 34 => ['class_name' => 'AdminDeliverySlip', 'position' => 3, 'active' => 1, + ], + 35 => ['class_name' => 'AdminSlip', 'position' => 4, 'active' => 1, + ], + 36 => ['class_name' => 'AdminStatuses', 'position' => 5, 'active' => 1, + ], + 37 => ['class_name' => 'AdminOrderMessage', 'position' => 6, 'active' => 1, + ], + ], + ], + 11 => [ 'class_name' => 'AdminParentCustomer', 'position' => 2, 'active' => 1, - 'children' => array( - 38 => array('class_name' => 'AdminCustomers', 'position' => 0, 'active' => 1, - ), - 39 => array('class_name' => 'AdminAddresses', 'position' => 1, 'active' => 1, - ), - 40 => array('class_name' => 'AdminGroups', 'position' => 2, 'active' => 1, - ), - 41 => array('class_name' => 'AdminCarts', 'position' => 3, 'active' => 1, - ), - 42 => array('class_name' => 'AdminCustomerThreads', 'position' => 4, 'active' => 1, - ), - 43 => array('class_name' => 'AdminContacts', 'position' => 5, 'active' => 1, - ), - 44 => array('class_name' => 'AdminGenders', 'position' => 6, 'active' => 1, - ), - 45 => array('class_name' => 'AdminOutstanding', 'position' => 7, 'active' => 0, - ), - ), - ), - 12 => array( + 'children' => [ + 38 => ['class_name' => 'AdminCustomers', 'position' => 0, 'active' => 1, + ], + 39 => ['class_name' => 'AdminAddresses', 'position' => 1, 'active' => 1, + ], + 40 => ['class_name' => 'AdminGroups', 'position' => 2, 'active' => 1, + ], + 41 => ['class_name' => 'AdminCarts', 'position' => 3, 'active' => 1, + ], + 42 => ['class_name' => 'AdminCustomerThreads', 'position' => 4, 'active' => 1, + ], + 43 => ['class_name' => 'AdminContacts', 'position' => 5, 'active' => 1, + ], + 44 => ['class_name' => 'AdminGenders', 'position' => 6, 'active' => 1, + ], + 45 => ['class_name' => 'AdminOutstanding', 'position' => 7, 'active' => 0, + ], + ], + ], + 12 => [ 'class_name' => 'AdminPriceRule', 'position' => 3, 'active' => 1, - 'children' => array( - 46 => array('class_name' => 'AdminCartRules', 'position' => 0, 'active' => 1, - ), - 47 => array('class_name' => 'AdminSpecificPriceRule', 'position' => 1, 'active' => 1, - ), - ), - ), - 13 => array( + 'children' => [ + 46 => ['class_name' => 'AdminCartRules', 'position' => 0, 'active' => 1, + ], + 47 => ['class_name' => 'AdminSpecificPriceRule', 'position' => 1, 'active' => 1, + ], + ], + ], + 13 => [ 'class_name' => 'AdminParentShipping', 'position' => 4, 'active' => 1, - 'children' => array( - 48 => array('class_name' => 'AdminShipping', 'position' => 0, 'active' => 1, - ), - 49 => array('class_name' => 'AdminCarriers', 'position' => 1, 'active' => 1, - ), - 50 => array('class_name' => 'AdminRangePrice', 'position' => 2, 'active' => 1, - ), - 51 => array('class_name' => 'AdminRangeWeight', 'position' => 3, 'active' => 1, - ), - ), - ), - 14 => array( + 'children' => [ + 48 => ['class_name' => 'AdminShipping', 'position' => 0, 'active' => 1, + ], + 49 => ['class_name' => 'AdminCarriers', 'position' => 1, 'active' => 1, + ], + 50 => ['class_name' => 'AdminRangePrice', 'position' => 2, 'active' => 1, + ], + 51 => ['class_name' => 'AdminRangeWeight', 'position' => 3, 'active' => 1, + ], + ], + ], + 14 => [ 'class_name' => 'AdminParentLocalization', 'position' => 5, 'active' => 1, - 'children' => array( - 52 => array('class_name' => 'AdminLocalization', 'position' => 0, 'active' => 1, - ), - 53 => array('class_name' => 'AdminLanguages', 'position' => 1, 'active' => 1, - ), - 54 => array('class_name' => 'AdminZones', 'position' => 2, 'active' => 1, - ), - 55 => array('class_name' => 'AdminCountries', 'position' => 3, 'active' => 1, - ), - 56 => array('class_name' => 'AdminStates', 'position' => 4, 'active' => 1, - ), - 57 => array('class_name' => 'AdminCurrencies', 'position' => 5, 'active' => 1, - ), - 58 => array('class_name' => 'AdminTaxes', 'position' => 6, 'active' => 1, - ), - 59 => array('class_name' => 'AdminTaxRulesGroup', 'position' => 7, 'active' => 1, - ), - 60 => array('class_name' => 'AdminTranslations', 'position' => 8, 'active' => 1, - ), - ), - ), - 15 => array( + 'children' => [ + 52 => ['class_name' => 'AdminLocalization', 'position' => 0, 'active' => 1, + ], + 53 => ['class_name' => 'AdminLanguages', 'position' => 1, 'active' => 1, + ], + 54 => ['class_name' => 'AdminZones', 'position' => 2, 'active' => 1, + ], + 55 => ['class_name' => 'AdminCountries', 'position' => 3, 'active' => 1, + ], + 56 => ['class_name' => 'AdminStates', 'position' => 4, 'active' => 1, + ], + 57 => ['class_name' => 'AdminCurrencies', 'position' => 5, 'active' => 1, + ], + 58 => ['class_name' => 'AdminTaxes', 'position' => 6, 'active' => 1, + ], + 59 => ['class_name' => 'AdminTaxRulesGroup', 'position' => 7, 'active' => 1, + ], + 60 => ['class_name' => 'AdminTranslations', 'position' => 8, 'active' => 1, + ], + ], + ], + 15 => [ 'class_name' => 'AdminParentModules', 'position' => 6, 'active' => 1, - 'children' => array( - 61 => array('class_name' => 'AdminModules', 'position' => 0, 'active' => 1, - ), - 62 => array('class_name' => 'AdminAddonsCatalog', 'position' => 1, 'active' => 1, - ), - 63 => array('class_name' => 'AdminModulesPositions', 'position' => 2, 'active' => 1, - ), - 64 => array('class_name' => 'AdminPayment', 'position' => 3, 'active' => 1, - ), - ), - ), - 16 => array( + 'children' => [ + 61 => ['class_name' => 'AdminModules', 'position' => 0, 'active' => 1, + ], + 62 => ['class_name' => 'AdminAddonsCatalog', 'position' => 1, 'active' => 1, + ], + 63 => ['class_name' => 'AdminModulesPositions', 'position' => 2, 'active' => 1, + ], + 64 => ['class_name' => 'AdminPayment', 'position' => 3, 'active' => 1, + ], + ], + ], + 16 => [ 'class_name' => 'AdminParentPreferences', 'position' => 7, 'active' => 1, - 'children' => array( - 65 => array('class_name' => 'AdminPreferences', 'position' => 0, 'active' => 1, - ), - 66 => array('class_name' => 'AdminOrderPreferences', 'position' => 1, 'active' => 1, - ), - 67 => array('class_name' => 'AdminPPreferences', 'position' => 2, 'active' => 1, - ), - 68 => array('class_name' => 'AdminCustomerPreferences', 'position' => 3, 'active' => 1, - ), - 69 => array('class_name' => 'AdminThemes', 'position' => 4, 'active' => 1, - ), - 70 => array('class_name' => 'AdminMeta', 'position' => 5, 'active' => 1, - ), - 71 => array('class_name' => 'AdminCmsContent', 'position' => 6, 'active' => 1, - ), - 72 => array('class_name' => 'AdminImages', 'position' => 7, 'active' => 1, - ), - 73 => array('class_name' => 'AdminStores', 'position' => 8, 'active' => 1, - ), - 74 => array('class_name' => 'AdminSearchConf', 'position' => 9, 'active' => 1, - ), - 75 => array('class_name' => 'AdminMaintenance', 'position' => 10, 'active' => 1, - ), - 76 => array('class_name' => 'AdminGeolocation', 'position' => 11, 'active' => 1, - ), - ), - ), - 17 => array( + 'children' => [ + 65 => ['class_name' => 'AdminPreferences', 'position' => 0, 'active' => 1, + ], + 66 => ['class_name' => 'AdminOrderPreferences', 'position' => 1, 'active' => 1, + ], + 67 => ['class_name' => 'AdminPPreferences', 'position' => 2, 'active' => 1, + ], + 68 => ['class_name' => 'AdminCustomerPreferences', 'position' => 3, 'active' => 1, + ], + 69 => ['class_name' => 'AdminThemes', 'position' => 4, 'active' => 1, + ], + 70 => ['class_name' => 'AdminMeta', 'position' => 5, 'active' => 1, + ], + 71 => ['class_name' => 'AdminCmsContent', 'position' => 6, 'active' => 1, + ], + 72 => ['class_name' => 'AdminImages', 'position' => 7, 'active' => 1, + ], + 73 => ['class_name' => 'AdminStores', 'position' => 8, 'active' => 1, + ], + 74 => ['class_name' => 'AdminSearchConf', 'position' => 9, 'active' => 1, + ], + 75 => ['class_name' => 'AdminMaintenance', 'position' => 10, 'active' => 1, + ], + 76 => ['class_name' => 'AdminGeolocation', 'position' => 11, 'active' => 1, + ], + ], + ], + 17 => [ 'class_name' => 'AdminTools', 'position' => 8, 'active' => 1, - 'children' => array( - 77 => array('class_name' => 'AdminInformation', 'position' => 0, 'active' => 1, - ), - 78 => array('class_name' => 'AdminPerformance', 'position' => 1, 'active' => 1, - ), - 79 => array('class_name' => 'AdminEmails', 'position' => 2, 'active' => 1, - ), - 80 => array('class_name' => 'AdminShopGroup', 'position' => 3, 'active' => 0, - ), - 81 => array('class_name' => 'AdminImport', 'position' => 4, 'active' => 1, - ), - 82 => array('class_name' => 'AdminBackup', 'position' => 5, 'active' => 1, - ), - 83 => array('class_name' => 'AdminRequestSql', 'position' => 6, 'active' => 1, - ), - 84 => array('class_name' => 'AdminLogs', 'position' => 7, 'active' => 1, - ), - 85 => array('class_name' => 'AdminWebservice', 'position' => 8, 'active' => 1, - ), - ), - ), - 18 => array( + 'children' => [ + 77 => ['class_name' => 'AdminInformation', 'position' => 0, 'active' => 1, + ], + 78 => ['class_name' => 'AdminPerformance', 'position' => 1, 'active' => 1, + ], + 79 => ['class_name' => 'AdminEmails', 'position' => 2, 'active' => 1, + ], + 80 => ['class_name' => 'AdminShopGroup', 'position' => 3, 'active' => 0, + ], + 81 => ['class_name' => 'AdminImport', 'position' => 4, 'active' => 1, + ], + 82 => ['class_name' => 'AdminBackup', 'position' => 5, 'active' => 1, + ], + 83 => ['class_name' => 'AdminRequestSql', 'position' => 6, 'active' => 1, + ], + 84 => ['class_name' => 'AdminLogs', 'position' => 7, 'active' => 1, + ], + 85 => ['class_name' => 'AdminWebservice', 'position' => 8, 'active' => 1, + ], + ], + ], + 18 => [ 'class_name' => 'AdminAdmin', 'position' => 9, 'active' => 1, - 'children' => array( - 86 => array('class_name' => 'AdminAdminPreferences', 'position' => 0, 'active' => 1, - ), - 87 => array('class_name' => 'AdminQuickAccesses', 'position' => 1, 'active' => 1, - ), - 88 => array('class_name' => 'AdminEmployees', 'position' => 2, 'active' => 1, - ), - 89 => array('class_name' => 'AdminProfiles', 'position' => 3, 'active' => 1, - ), - 90 => array('class_name' => 'AdminAccess', 'position' => 4, 'active' => 1, - ), - 91 => array('class_name' => 'AdminTabs', 'position' => 5, 'active' => 1, - ), - ), - ), - 19 => array( + 'children' => [ + 86 => ['class_name' => 'AdminAdminPreferences', 'position' => 0, 'active' => 1, + ], + 87 => ['class_name' => 'AdminQuickAccesses', 'position' => 1, 'active' => 1, + ], + 88 => ['class_name' => 'AdminEmployees', 'position' => 2, 'active' => 1, + ], + 89 => ['class_name' => 'AdminProfiles', 'position' => 3, 'active' => 1, + ], + 90 => ['class_name' => 'AdminAccess', 'position' => 4, 'active' => 1, + ], + 91 => ['class_name' => 'AdminTabs', 'position' => 5, 'active' => 1, + ], + ], + ], + 19 => [ 'class_name' => 'AdminParentStats', 'position' => 10, 'active' => 1, - 'children' => array( - 92 => array('class_name' => 'AdminStats', 'position' => 0, 'active' => 1, - ), - 93 => array('class_name' => 'AdminSearchEngines', 'position' => 1, 'active' => 1, - ), - 94 => array('class_name' => 'AdminReferrers', 'position' => 2, 'active' => 1, - ), - ), - ), - 20 => array( + 'children' => [ + 92 => ['class_name' => 'AdminStats', 'position' => 0, 'active' => 1, + ], + 93 => ['class_name' => 'AdminSearchEngines', 'position' => 1, 'active' => 1, + ], + 94 => ['class_name' => 'AdminReferrers', 'position' => 2, 'active' => 1, + ], + ], + ], + 20 => [ 'class_name' => 'AdminStock', 'position' => 11, 'active' => 1, - 'children' => array( - 95 => array('class_name' => 'AdminWarehouses', 'position' => 0, 'active' => 1, - ), - 96 => array('class_name' => 'AdminStockManagement', 'position' => 1, 'active' => 1, - ), - 97 => array('class_name' => 'AdminStockMvt', 'position' => 2, 'active' => 1, - ), - 98 => array('class_name' => 'AdminStockInstantState', 'position' => 3, 'active' => 1, - ), - 99 => array('class_name' => 'AdminStockCover', 'position' => 4, 'active' => 1, - ), - 100 => array('class_name' => 'AdminSupplyOrders', 'position' => 5, 'active' => 1, - ), - 101 => array('class_name' => 'AdminStockConfiguration', 'position' => 6, 'active' => 1, - ), - ), - ), - ); + 'children' => [ + 95 => ['class_name' => 'AdminWarehouses', 'position' => 0, 'active' => 1, + ], + 96 => ['class_name' => 'AdminStockManagement', 'position' => 1, 'active' => 1, + ], + 97 => ['class_name' => 'AdminStockMvt', 'position' => 2, 'active' => 1, + ], + 98 => ['class_name' => 'AdminStockInstantState', 'position' => 3, 'active' => 1, + ], + 99 => ['class_name' => 'AdminStockCover', 'position' => 4, 'active' => 1, + ], + 100 => ['class_name' => 'AdminSupplyOrders', 'position' => 5, 'active' => 1, + ], + 101 => ['class_name' => 'AdminStockConfiguration', 'position' => 6, 'active' => 1, + ], + ], + ], + ]; //===== step 1 disabled all useless native tabs in 1.5 =====/ - $remove_tabs = array( + $remove_tabs = [ 2 => 'AdminAddonsMyAccount', 4 => 'AdminAliases', 5 => 'AdminAppearance', 12 => 'AdminCMSContent', 13 => 'AdminContact', 16 => 'AdminCounty', 20 => 'AdminDb', 22 => 'AdminDiscounts', 26 => 'AdminGenerator', 38 => 'AdminMessages', 45 => 'AdminPDF', 63 => 'AdminStatsConf', 67 => 'AdminSubDomains', - ); - $ids = array(); + ]; + $ids = []; foreach ($remove_tabs as $tab) { if ($id = get_tab_id($tab)) { $ids[] = $id; @@ -292,7 +291,7 @@ function clean_tabs_15() } if ($ids) { - Db::getInstance()->update('tab', array('active' => 0), 'id_tab IN ('.implode(', ', $ids).')'); + Db::getInstance()->update('tab', ['active' => 0], 'id_tab IN (' . implode(', ', $ids) . ')'); } //=====================================/ @@ -303,7 +302,7 @@ function clean_tabs_15() $tab_to_move = get_simple_clean_tab15($clean_tabs_15); - $ids = array(); + $ids = []; foreach ($tab_to_move as $tab) { if ($id = get_tab_id($tab)) { $ids[] = $id; @@ -311,7 +310,7 @@ function clean_tabs_15() } if ($ids) { - Db::getInstance()->update('tab', array('id_parent' => $id_admin_tools), 'id_tab NOT IN ('.implode(', ', $ids).') AND `id_parent` <> -1'); + Db::getInstance()->update('tab', ['id_parent' => $id_admin_tools], 'id_tab NOT IN (' . implode(', ', $ids) . ') AND `id_parent` <> -1'); } //=====================================/ @@ -326,29 +325,29 @@ function clean_tabs_15() $id_AdminStockMvt = get_tab_id('AdminStockMvt'); $id_AdminStock = get_tab_id('AdminStock'); - Db::getInstance()->update('tab', array('id_parent' => $id_AdminStock), 'id_tab ='.$id_AdminStockMvt); + Db::getInstance()->update('tab', ['id_parent' => $id_AdminStock], 'id_tab =' . $id_AdminStockMvt); //rename some tabs - renameTab(get_tab_id('AdminCartRules'), array('fr' => 'Règles paniers', 'es' => 'Reglas de cesta', 'en' => 'Cart Rules', 'de' => 'Warenkorb Preisregein', 'it' => 'Regole Carrello')); + renameTab(get_tab_id('AdminCartRules'), ['fr' => 'Règles paniers', 'es' => 'Reglas de cesta', 'en' => 'Cart Rules', 'de' => 'Warenkorb Preisregein', 'it' => 'Regole Carrello']); - renameTab(get_tab_id('AdminPreferences'), array('fr' => 'Générales', 'es' => 'General', 'en' => 'General', 'de' => 'Allgemein', 'it' => 'Generale')); + renameTab(get_tab_id('AdminPreferences'), ['fr' => 'Générales', 'es' => 'General', 'en' => 'General', 'de' => 'Allgemein', 'it' => 'Generale']); - renameTab(get_tab_id('AdminThemes'), array('fr' => 'Thèmes', 'es' => 'Temas', 'en' => 'Themes', 'de' => 'Themen', 'it' => 'Temi')); + renameTab(get_tab_id('AdminThemes'), ['fr' => 'Thèmes', 'es' => 'Temas', 'en' => 'Themes', 'de' => 'Themen', 'it' => 'Temi']); - renameTab(get_tab_id('AdminStores'), array('fr' => 'Coordonnées & magasins', 'es' => 'Contacto y tiendas', 'en' => 'Store Contacts', 'de' => 'Shopadressen', 'it' => 'Contatti e Negozi')); + renameTab(get_tab_id('AdminStores'), ['fr' => 'Coordonnées & magasins', 'es' => 'Contacto y tiendas', 'en' => 'Store Contacts', 'de' => 'Shopadressen', 'it' => 'Contatti e Negozi']); - renameTab(get_tab_id('AdminTools'), array('fr' => 'Paramètres avancés', 'es' => 'Parametros avanzados', 'en' => 'Advanced Parameters', 'de' => 'Erweiterte Parameter', 'it' => 'Parametri Avanzati')); + renameTab(get_tab_id('AdminTools'), ['fr' => 'Paramètres avancés', 'es' => 'Parametros avanzados', 'en' => 'Advanced Parameters', 'de' => 'Erweiterte Parameter', 'it' => 'Parametri Avanzati']); - renameTab(get_tab_id('AdminTools'), array('fr' => 'Paramètres avancés', 'es' => 'Parametros avanzados', 'en' => 'Advanced Parameters', 'de' => 'Erweiterte Parameter', 'it' => 'Parametri Avanzati')); + renameTab(get_tab_id('AdminTools'), ['fr' => 'Paramètres avancés', 'es' => 'Parametros avanzados', 'en' => 'Advanced Parameters', 'de' => 'Erweiterte Parameter', 'it' => 'Parametri Avanzati']); - renameTab(get_tab_id('AdminTabs'), array('fr' => 'Menus', 'es' => 'Pestañas', 'en' => 'Menus', 'de' => 'Tabs', 'it' => 'Tabs')); + renameTab(get_tab_id('AdminTabs'), ['fr' => 'Menus', 'es' => 'Pestañas', 'en' => 'Menus', 'de' => 'Tabs', 'it' => 'Tabs']); } //==== functions =====/ function get_simple_clean_tab15($clean_tabs_15) { - $light_tab = array(); + $light_tab = []; foreach ($clean_tabs_15 as $tab) { $light_tab[] = $tab['class_name']; if (isset($tab['children'])) { @@ -362,7 +361,7 @@ function get_simple_clean_tab15($clean_tabs_15) function updatePositionAndActive15($clean_tabs_15) { foreach ($clean_tabs_15 as $id => $tab) { - Db::getInstance()->update('tab', array('position' => $tab['position'], 'active' => $tab['active']), '`id_tab`= '.get_tab_id($tab['class_name'])); + Db::getInstance()->update('tab', ['position' => $tab['position'], 'active' => $tab['active']], '`id_tab`= ' . get_tab_id($tab['class_name'])); if (isset($tab['children'])) { updatePositionAndActive15($tab['children']); } @@ -374,11 +373,11 @@ function renameTab($id_tab, $names) if (!$id_tab) { return; } - $langues = Db::getInstance()->executeS('SELECT * FROM '._DB_PREFIX_.'lang'); + $langues = Db::getInstance()->executeS('SELECT * FROM ' . _DB_PREFIX_ . 'lang'); foreach ($langues as $lang) { if (array_key_exists($lang['iso_code'], $names)) { - Db::getInstance()->update('tab_lang', array('name' => $names[$lang['iso_code']]), '`id_tab`= '.$id_tab.' AND `id_lang` ='.$lang['id_lang']); + Db::getInstance()->update('tab_lang', ['name' => $names[$lang['iso_code']]], '`id_tab`= ' . $id_tab . ' AND `id_lang` =' . $lang['id_lang']); } } } diff --git a/upgrade/php/cms_block.php b/upgrade/php/cms_block.php index a9784794d..a0e466608 100644 --- a/upgrade/php/cms_block.php +++ b/upgrade/php/cms_block.php @@ -23,11 +23,10 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function cms_block() { - if (!Db::getInstance()->execute('SELECT `display_store` FROM `'._DB_PREFIX_.'cms_block` LIMIT 1')) { - return Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'cms_block` ADD `display_store` TINYINT NOT NULL DEFAULT \'1\''); + if (!Db::getInstance()->execute('SELECT `display_store` FROM `' . _DB_PREFIX_ . 'cms_block` LIMIT 1')) { + return Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'cms_block` ADD `display_store` TINYINT NOT NULL DEFAULT \'1\''); } return true; diff --git a/upgrade/php/cms_multishop.php b/upgrade/php/cms_multishop.php index f2168367f..2cc2d461f 100644 --- a/upgrade/php/cms_multishop.php +++ b/upgrade/php/cms_multishop.php @@ -23,21 +23,20 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function cms_multishop() { $shops = Db::getInstance()->executeS(' SELECT `id_shop` - FROM `'._DB_PREFIX_.'shop` + FROM `' . _DB_PREFIX_ . 'shop` '); $cms_lang = Db::getInstance()->executeS(' SELECT * - FROM `'._DB_PREFIX_.'cms_lang` + FROM `' . _DB_PREFIX_ . 'cms_lang` '); foreach ($cms_lang as $value) { - $data = array(); - $cms = array( + $data = []; + $cms = [ 'id_cms' => $value['id_cms'], 'id_lang' => $value['id_lang'], 'content' => pSQL($value['content'], true), @@ -45,7 +44,7 @@ function cms_multishop() 'meta_title' => pSQL($value['meta_title']), 'meta_keywords' => pSQL($value['meta_keywords']), 'meta_description' => pSQL($value['meta_description']), - ); + ]; foreach ($shops as $shop) { if ($shop['id_shop'] != 1) { $cms['id_shop'] = $shop['id_shop']; @@ -57,16 +56,16 @@ function cms_multishop() $cms_category_lang = Db::getInstance()->executeS(' SELECT * - FROM `'._DB_PREFIX_.'cms_category_lang` + FROM `' . _DB_PREFIX_ . 'cms_category_lang` '); foreach ($cms_category_lang as $value) { - $data = array(); - $data_bis = array(); + $data = []; + $data_bis = []; - $cms_category_shop = array( + $cms_category_shop = [ 'id_cms_category' => $value['id_cms_category'], - ); - $cms_category = array( + ]; + $cms_category = [ 'id_cms_category' => $value['id_cms_category'], 'id_lang' => $value['id_lang'], 'name' => pSQL($value['name']), @@ -75,7 +74,7 @@ function cms_multishop() 'meta_title' => pSQL($value['meta_title']), 'meta_keywords' => pSQL($value['meta_keywords']), 'meta_description' => pSQL($value['meta_description']), - ); + ]; foreach ($shops as $shop) { if ($shop['id_shop'] != 1) { $cms_category['id_shop'] = $shop['id_shop']; diff --git a/upgrade/php/configuration_double_cleaner.php b/upgrade/php/configuration_double_cleaner.php index 5e79162d2..44110c485 100644 --- a/upgrade/php/configuration_double_cleaner.php +++ b/upgrade/php/configuration_double_cleaner.php @@ -23,23 +23,22 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function configuration_double_cleaner() { $result = Db::getInstance()->executeS(' SELECT name, MIN(id_configuration) AS minid - FROM '._DB_PREFIX_.'configuration + FROM ' . _DB_PREFIX_ . 'configuration GROUP BY name HAVING count(name) > 1'); foreach ($result as $row) { Db::getInstance()->execute(' - DELETE FROM '._DB_PREFIX_.'configuration - WHERE name = \''.addslashes($row['name']).'\' - AND id_configuration != '.(int)($row['minid'])); + DELETE FROM ' . _DB_PREFIX_ . 'configuration + WHERE name = \'' . addslashes($row['name']) . '\' + AND id_configuration != ' . (int) ($row['minid'])); } Db::getInstance()->execute(' - DELETE FROM '._DB_PREFIX_.'configuration_lang + DELETE FROM ' . _DB_PREFIX_ . 'configuration_lang WHERE id_configuration NOT IN ( SELECT id_configuration - FROM '._DB_PREFIX_.'configuration)'); + FROM ' . _DB_PREFIX_ . 'configuration)'); } diff --git a/upgrade/php/convert_product_price.php b/upgrade/php/convert_product_price.php index 73eff1e2f..03e24dce4 100644 --- a/upgrade/php/convert_product_price.php +++ b/upgrade/php/convert_product_price.php @@ -27,25 +27,25 @@ /* Convert product prices from the PS < 1.3 wrong rounding system to the new 1.3 one */ function convert_product_price() { - $taxes = Db::getInstance()->executeS('SELECT * FROM '._DB_PREFIX_.'tax'); - $taxRates = array(); + $taxes = Db::getInstance()->executeS('SELECT * FROM ' . _DB_PREFIX_ . 'tax'); + $taxRates = []; foreach ($taxes as $data) { - $taxRates[$data['id_tax']] = (float)($data['rate']) / 100; + $taxRates[$data['id_tax']] = (float) ($data['rate']) / 100; } $resource = Db::getInstance()->executeS('SELECT `id_product`, `price`, `id_tax` - FROM `'._DB_PREFIX_.'product`', false); + FROM `' . _DB_PREFIX_ . 'product`', false); if (!$resource) { - return array('error' => 1, 'msg' => Db::getInstance()->getMsgError()); + return ['error' => 1, 'msg' => Db::getInstance()->getMsgError()]; } // was previously die(mysql_error()) while ($row = Db::getInstance()->nextRow($resource)) { if ($row['id_tax']) { $price = $row['price'] * (1 + $taxRates[$row['id_tax']]); - $decimalPart = $price - (int)$price; + $decimalPart = $price - (int) $price; if ($decimalPart < 0.000001) { - $newPrice = (float)(number_format($price, 6, '.', '')); + $newPrice = (float) (number_format($price, 6, '.', '')); $newPrice = Tools::floorf($newPrice / (1 + $taxRates[$row['id_tax']]), 6); - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'product` SET `price` = '.$newPrice.' WHERE `id_product` = '.(int)$row['id_product']); + Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'product` SET `price` = ' . $newPrice . ' WHERE `id_product` = ' . (int) $row['id_product']); } } } diff --git a/upgrade/php/copy_tab_rights.php b/upgrade/php/copy_tab_rights.php index cac701112..c218818a1 100644 --- a/upgrade/php/copy_tab_rights.php +++ b/upgrade/php/copy_tab_rights.php @@ -31,7 +31,7 @@ function copy_tab_rights($fromTabName, $toTabName) if (empty($fromTabName) || empty($toTabName)) { return; } - foreach (array(PageVoter::CREATE, PageVoter::READ, PageVoter::UPDATE, PageVoter::DELETE) as $role) { + foreach ([PageVoter::CREATE, PageVoter::READ, PageVoter::UPDATE, PageVoter::DELETE] as $role) { // 1- Add role $roleToAdd = strtoupper('ROLE_MOD_TAB_' . $toTabName . '_' . $role); Db::getInstance()->execute('INSERT IGNORE INTO `' . _DB_PREFIX_ . 'authorization_role` (`slug`) diff --git a/upgrade/php/country_to_timezone.php b/upgrade/php/country_to_timezone.php index 42543349a..0624fd99c 100644 --- a/upgrade/php/country_to_timezone.php +++ b/upgrade/php/country_to_timezone.php @@ -23,8 +23,7 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - -$timezones = array( +$timezones = [ 'AD' => 'Europe/Andorra', 'AE' => 'Asia/Dubai', 'AF' => 'Asia/Kabul', @@ -269,9 +268,9 @@ 'ZA' => 'Africa/Johannesburg', 'ZM' => 'Africa/Lusaka', 'ZW' => 'Africa/Harare', -); +]; if (isset($timezones[$_GET['country']]) && $timezones[$_GET['country']]) { - die($timezones[$_GET['country']]); + exit($timezones[$_GET['country']]); } -die(''); +exit(''); diff --git a/upgrade/php/create_multistore.php b/upgrade/php/create_multistore.php index b611cc056..93d10413d 100755 --- a/upgrade/php/create_multistore.php +++ b/upgrade/php/create_multistore.php @@ -23,8 +23,7 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - -require_once __DIR__.'/add_new_tab.php'; +require_once __DIR__ . '/add_new_tab.php'; function create_multistore() { @@ -41,21 +40,21 @@ function create_multistore() // @todo generate __PS_BASE_URI__ using $_SERVER['REQUEST_URI'], just in case return false; } - $all_themes_dir = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'themes'; + $all_themes_dir = _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'themes'; $themes = scandir($all_themes_dir, SCANDIR_SORT_NONE); foreach ($themes as $theme) { - if (!is_file($all_themes_dir.DIRECTORY_SEPARATOR.$theme) && is_dir($all_themes_dir.DIRECTORY_SEPARATOR.$theme.DIRECTORY_SEPARATOR) && $theme[0] != '.' && $theme != 'prestashop' && $theme != 'default-bootstrap' && $theme != _THEME_NAME_) { - $res &= Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'theme (name) VALUES("'.Db::getInstance()->escape($theme).'")'); + if (!is_file($all_themes_dir . DIRECTORY_SEPARATOR . $theme) && is_dir($all_themes_dir . DIRECTORY_SEPARATOR . $theme . DIRECTORY_SEPARATOR) && $theme[0] != '.' && $theme != 'prestashop' && $theme != 'default-bootstrap' && $theme != _THEME_NAME_) { + $res &= Db::getInstance()->execute('INSERT INTO ' . _DB_PREFIX_ . 'theme (name) VALUES("' . Db::getInstance()->escape($theme) . '")'); } } $res &= Db::getInstance()->execute(' - UPDATE '._DB_PREFIX_.'shop + UPDATE ' . _DB_PREFIX_ . 'shop SET - name = (SELECT value FROM '._DB_PREFIX_.'configuration WHERE name = "PS_SHOP_NAME"), - id_theme = (SELECT id_theme FROM '._DB_PREFIX_.'theme WHERE name = "'.Db::getInstance()->escape(_THEME_NAME_).'") + name = (SELECT value FROM ' . _DB_PREFIX_ . 'configuration WHERE name = "PS_SHOP_NAME"), + id_theme = (SELECT id_theme FROM ' . _DB_PREFIX_ . 'theme WHERE name = "' . Db::getInstance()->escape(_THEME_NAME_) . '") WHERE id_shop = 1'); - $shop_domain = Db::getInstance()->getValue('SELECT `value` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = "PS_SHOP_DOMAIN"'); - $shop_domain_ssl = Db::getInstance()->getValue('SELECT `value` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = "PS_SHOP_DOMAIN_SSL"'); + $shop_domain = Db::getInstance()->getValue('SELECT `value` FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` = "PS_SHOP_DOMAIN"'); + $shop_domain_ssl = Db::getInstance()->getValue('SELECT `value` FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` = "PS_SHOP_DOMAIN_SSL"'); if (empty($shop_domain)) { $shop_domain = $shop_domain_ssl = create_multistore_getHttpHost(); } @@ -65,18 +64,18 @@ function create_multistore() $physical_uri = str_replace(' ', '%20', $INSTALLER__PS_BASE_URI); $physical_uri = trim($physical_uri, '/\\'); - $physical_uri = ($physical_uri ? '/'.$physical_uri.'/' : '/'); + $physical_uri = ($physical_uri ? '/' . $physical_uri . '/' : '/'); $res &= Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'shop_url` (`id_shop`, `domain`, `domain_ssl`, `physical_uri`, `virtual_uri`, `main`, `active`) - VALUES(1, \''.pSQL($shop_domain).'\', \''.pSQL($shop_domain_ssl).'\', \''.pSQL($physical_uri).'\', \'\', 1, 1)'); + INSERT INTO `' . _DB_PREFIX_ . 'shop_url` (`id_shop`, `domain`, `domain_ssl`, `physical_uri`, `virtual_uri`, `main`, `active`) + VALUES(1, \'' . pSQL($shop_domain) . '\', \'' . pSQL($shop_domain_ssl) . '\', \'' . pSQL($physical_uri) . '\', \'\', 1, 1)'); // Stock conversion - $sql = 'INSERT INTO `'._DB_PREFIX_.'stock` (`id_product`, `id_product_attribute`, `id_group_shop`, `id_shop`, `quantity`) - VALUES (SELECT p.`id_product`, 0, 1, 1, p.`quantity` FROM `'._DB_PREFIX_.'product` p);'; + $sql = 'INSERT INTO `' . _DB_PREFIX_ . 'stock` (`id_product`, `id_product_attribute`, `id_group_shop`, `id_shop`, `quantity`) + VALUES (SELECT p.`id_product`, 0, 1, 1, p.`quantity` FROM `' . _DB_PREFIX_ . 'product` p);'; $res &= Db::getInstance()->execute($sql); - $sql = 'INSERT INTO `'._DB_PREFIX_.'stock` (`id_product`, `id_product_attribute`, `id_group_shop`, `id_shop`, `quantity`) - VALUES (SELECT `id_product`, `id_product_attribute`, 1, 1, `quantity` FROM `'._DB_PREFIX_.'product_attribute` p);'; + $sql = 'INSERT INTO `' . _DB_PREFIX_ . 'stock` (`id_product`, `id_product_attribute`, `id_group_shop`, `id_shop`, `quantity`) + VALUES (SELECT `id_product`, `id_product_attribute`, 1, 1, `quantity` FROM `' . _DB_PREFIX_ . 'product_attribute` p);'; $res &= Db::getInstance()->execute($sql); // Add admin tabs diff --git a/upgrade/php/customization_field_multishop_lang.php b/upgrade/php/customization_field_multishop_lang.php index cc127179a..052c7a680 100644 --- a/upgrade/php/customization_field_multishop_lang.php +++ b/upgrade/php/customization_field_multishop_lang.php @@ -23,27 +23,26 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function customization_field_multishop_lang() { $shops = Db::getInstance()->executeS(' SELECT `id_shop` - FROM `'._DB_PREFIX_.'shop` + FROM `' . _DB_PREFIX_ . 'shop` WHERE `id_shop` != 1 '); $customization_field_lang = Db::getInstance()->executeS(' SELECT * - FROM `'._DB_PREFIX_.'customization_field_lang` + FROM `' . _DB_PREFIX_ . 'customization_field_lang` '); foreach ($customization_field_lang as $value) { - $data = array(); - $customization_lang = array( + $data = []; + $customization_lang = [ 'id_customization_field' => $value['id_customization_field'], 'id_lang' => $value['id_lang'], 'name' => pSQL($value['name']), - ); + ]; foreach ($shops as $shop) { $customization_lang['id_shop'] = $shop['id_shop']; $data[] = $customization_lang; diff --git a/upgrade/php/deactivate_custom_modules.php b/upgrade/php/deactivate_custom_modules.php index 53efed07c..1a7230ae1 100644 --- a/upgrade/php/deactivate_custom_modules.php +++ b/upgrade/php/deactivate_custom_modules.php @@ -23,25 +23,24 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function deactivate_custom_modules() { $db = Db::getInstance(); - $modulesDirOnDisk = array(); + $modulesDirOnDisk = []; $modules = scandir(_PS_MODULE_DIR_, SCANDIR_SORT_NONE); foreach ($modules as $name) { - if (!in_array($name, array('.', '..', 'index.php', '.htaccess')) && @is_dir(_PS_MODULE_DIR_.$name.DIRECTORY_SEPARATOR) && @file_exists(_PS_MODULE_DIR_.$name.DIRECTORY_SEPARATOR.$name.'.php')) { + if (!in_array($name, ['.', '..', 'index.php', '.htaccess']) && @is_dir(_PS_MODULE_DIR_ . $name . DIRECTORY_SEPARATOR) && @file_exists(_PS_MODULE_DIR_ . $name . DIRECTORY_SEPARATOR . $name . '.php')) { if (!preg_match('/^[a-zA-Z0-9_-]+$/', $name)) { - die(Tools::displayError().' (Module '.$name.')'); + exit(Tools::displayError() . ' (Module ' . $name . ')'); } $modulesDirOnDisk[] = $name; } } - $module_list_xml = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'xml'.DIRECTORY_SEPARATOR.'modules_list.xml'; + $module_list_xml = _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'modules_list.xml'; if (!file_exists($module_list_xml)) { - $module_list_xml = _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR.'modules_list.xml'; + $module_list_xml = _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'modules_list.xml'; if (!file_exists($module_list_xml)) { return false; } @@ -51,46 +50,46 @@ function deactivate_custom_modules() if ($nativeModules) { $nativeModules = $nativeModules->modules; } - $arrNativeModules = array(); + $arrNativeModules = []; if (is_array($nativeModules)) { foreach ($nativeModules as $nativeModulesType) { - if (in_array($nativeModulesType['type'], array('native', 'partner'))) { + if (in_array($nativeModulesType['type'], ['native', 'partner'])) { $arrNativeModules[] = '""'; foreach ($nativeModulesType->module as $module) { - $arrNativeModules[] = '"'.pSQL($module['name']).'"'; + $arrNativeModules[] = '"' . pSQL($module['name']) . '"'; } } } } - $arrNonNative = array(); + $arrNonNative = []; if ($arrNativeModules) { $arrNonNative = $db->executeS(' SELECT * - FROM `'._DB_PREFIX_.'module` m - WHERE name NOT IN ('.implode(',', $arrNativeModules).') '); + FROM `' . _DB_PREFIX_ . 'module` m + WHERE name NOT IN (' . implode(',', $arrNativeModules) . ') '); } - $uninstallMe = array("undefined-modules"); + $uninstallMe = ['undefined-modules']; if (is_array($arrNonNative)) { foreach ($arrNonNative as $k => $aModule) { - $uninstallMe[(int)$aModule['id_module']] = $aModule['name']; + $uninstallMe[(int) $aModule['id_module']] = $aModule['name']; } } if (!is_array($uninstallMe)) { - $uninstallMe = array($uninstallMe); + $uninstallMe = [$uninstallMe]; } foreach ($uninstallMe as $k => $v) { - $uninstallMe[$k] = '"'.pSQL($v).'"'; + $uninstallMe[$k] = '"' . pSQL($v) . '"'; } $return = Db::getInstance()->execute(' - UPDATE `'._DB_PREFIX_.'module` SET `active` = 0 WHERE `name` IN ('.implode(',', $uninstallMe).')'); + UPDATE `' . _DB_PREFIX_ . 'module` SET `active` = 0 WHERE `name` IN (' . implode(',', $uninstallMe) . ')'); - if (count(Db::getInstance()->executeS('SHOW TABLES LIKE \''._DB_PREFIX_.'module_shop\''))> 0) { + if (count(Db::getInstance()->executeS('SHOW TABLES LIKE \'' . _DB_PREFIX_ . 'module_shop\'')) > 0) { foreach ($uninstallMe as $k => $uninstall) { - $return &= Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'module_shop` WHERE `id_module` = '.(int)$k); + $return &= Db::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . 'module_shop` WHERE `id_module` = ' . (int) $k); } } diff --git a/upgrade/php/delete_hook.php b/upgrade/php/delete_hook.php index 66bfd83f1..8bdaa34fc 100644 --- a/upgrade/php/delete_hook.php +++ b/upgrade/php/delete_hook.php @@ -23,7 +23,6 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function delete_hook($hook) { $modules = Hook::getHookModuleExecList($hook); diff --git a/upgrade/php/delivery_number_set.php b/upgrade/php/delivery_number_set.php index 139cbedd5..e9f166ba7 100644 --- a/upgrade/php/delivery_number_set.php +++ b/upgrade/php/delivery_number_set.php @@ -23,7 +23,6 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function delivery_number_set() { Configuration::loadConfiguration(); @@ -32,20 +31,20 @@ function delivery_number_set() // Update each order with a number $result = Db::getInstance()->executeS(' SELECT id_order - FROM '._DB_PREFIX_.'orders + FROM ' . _DB_PREFIX_ . 'orders ORDER BY id_order'); foreach ($result as $row) { - $order = new Order((int)($row['id_order'])); + $order = new Order((int) ($row['id_order'])); $history = $order->getHistory(false); foreach ($history as $row2) { - $oS = new OrderState((int)($row2['id_order_state']), Configuration::get('PS_LANG_DEFAULT')); + $oS = new OrderState((int) ($row2['id_order_state']), Configuration::get('PS_LANG_DEFAULT')); if ($oS->delivery) { - Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'orders SET delivery_number = '.(int)($number++).', `delivery_date` = `date_add` WHERE id_order = '.(int)($order->id)); + Db::getInstance()->execute('UPDATE ' . _DB_PREFIX_ . 'orders SET delivery_number = ' . (int) ($number++) . ', `delivery_date` = `date_add` WHERE id_order = ' . (int) ($order->id)); - break ; + break; } } } // Add configuration var - Configuration::updateValue('PS_DELIVERY_NUMBER', (int)($number)); + Configuration::updateValue('PS_DELIVERY_NUMBER', (int) ($number)); } diff --git a/upgrade/php/drop_column_from_product_lang_if_exists.php b/upgrade/php/drop_column_from_product_lang_if_exists.php index bbd68eaf0..03f618d61 100644 --- a/upgrade/php/drop_column_from_product_lang_if_exists.php +++ b/upgrade/php/drop_column_from_product_lang_if_exists.php @@ -23,7 +23,6 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function drop_column_from_product_lang_if_exists() { $columns = Db::getInstance()->executeS('SHOW COLUMNS FROM `' . _DB_PREFIX_ . 'product_lang` diff --git a/upgrade/php/drop_image_type_non_unique_index.php b/upgrade/php/drop_image_type_non_unique_index.php index 05ede2dc1..255b46df3 100644 --- a/upgrade/php/drop_image_type_non_unique_index.php +++ b/upgrade/php/drop_image_type_non_unique_index.php @@ -23,13 +23,12 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function drop_image_type_non_unique_index() { - $index = Db::getInstance()->executeS('SHOW INDEX FROM `'._DB_PREFIX_.'image_type` WHERE column_name="name" AND non_unique=1'); + $index = Db::getInstance()->executeS('SHOW INDEX FROM `' . _DB_PREFIX_ . 'image_type` WHERE column_name="name" AND non_unique=1'); if (is_array($index) && count($index)) { foreach ($index as $ind) { - Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'image_type` DROP INDEX `'.pSQL($ind['Key_name']).'`'); + Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'image_type` DROP INDEX `' . pSQL($ind['Key_name']) . '`'); } } } diff --git a/upgrade/php/drop_module_non_unique_index.php b/upgrade/php/drop_module_non_unique_index.php index 757c7169c..504362a16 100644 --- a/upgrade/php/drop_module_non_unique_index.php +++ b/upgrade/php/drop_module_non_unique_index.php @@ -25,15 +25,15 @@ */ function drop_module_non_unique_index() { - $index = Db::getInstance()->executeS('SHOW INDEX FROM `'._DB_PREFIX_.'module` WHERE Key_name = "name"'); + $index = Db::getInstance()->executeS('SHOW INDEX FROM `' . _DB_PREFIX_ . 'module` WHERE Key_name = "name"'); if (is_array($index) && count($index)) { - Db::getInstance()->execute('ALTER IGNORE TABLE `'._DB_PREFIX_.'module` DROP INDEX `name`'); + Db::getInstance()->execute('ALTER IGNORE TABLE `' . _DB_PREFIX_ . 'module` DROP INDEX `name`'); } $tmp = Db::getInstance()->executeS('SHOW SESSION VARIABLES WHERE Variable_Name LIKE "old_alter_table" AND Value like "OFF"'); if (is_array($tmp) && $tmp) { Db::getInstance()->execute('SET SESSION old_alter_table="ON"'); } - Db::getInstance()->execute('ALTER IGNORE TABLE `'._DB_PREFIX_.'module` ADD UNIQUE `name` (`name`)'); + Db::getInstance()->execute('ALTER IGNORE TABLE `' . _DB_PREFIX_ . 'module` ADD UNIQUE `name` (`name`)'); if (is_array($tmp) && $tmp) { Db::getInstance()->execute('SET SESSION old_alter_table="OFF"'); } diff --git a/upgrade/php/ecotax_tax_application_fix.php b/upgrade/php/ecotax_tax_application_fix.php index aa796b62b..f0584e5ee 100644 --- a/upgrade/php/ecotax_tax_application_fix.php +++ b/upgrade/php/ecotax_tax_application_fix.php @@ -23,11 +23,10 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function ecotax_tax_application_fix() { - if (!Db::getInstance()->execute('SELECT `ecotax_tax_rate` FROM `'._DB_PREFIX_.'order_detail` LIMIT 1')) { - return Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'order_detail` ADD `ecotax_tax_rate` DECIMAL(5, 3) NOT NULL AFTER `ecotax`'); + if (!Db::getInstance()->execute('SELECT `ecotax_tax_rate` FROM `' . _DB_PREFIX_ . 'order_detail` LIMIT 1')) { + return Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'order_detail` ADD `ecotax_tax_rate` DECIMAL(5, 3) NOT NULL AFTER `ecotax`'); } return true; diff --git a/upgrade/php/editorial_update.php b/upgrade/php/editorial_update.php index 4e9d48d38..184ec79d4 100644 --- a/upgrade/php/editorial_update.php +++ b/upgrade/php/editorial_update.php @@ -23,21 +23,20 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function editorial_update() { /*Table creation*/ - if (Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name`="editorial"')) { + if (Db::getInstance()->getValue('SELECT `id_module` FROM `' . _DB_PREFIX_ . 'module` WHERE `name`="editorial"')) { Db::getInstance()->execute(' - CREATE TABLE `'._DB_PREFIX_.'editorial` ( + CREATE TABLE `' . _DB_PREFIX_ . 'editorial` ( `id_editorial` int(10) unsigned NOT NULL auto_increment, `body_home_logo_link` varchar(255) NOT NULL, PRIMARY KEY (`id_editorial`)) - ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); + ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'); Db::getInstance()->execute(' - CREATE TABLE `'._DB_PREFIX_.'editorial_lang` ( + CREATE TABLE `' . _DB_PREFIX_ . 'editorial_lang` ( `id_editorial` int(10) unsigned NOT NULL, `id_lang` int(10) unsigned NOT NULL, `body_title` varchar(255) NOT NULL, @@ -45,28 +44,28 @@ function editorial_update() `body_paragraph` text NOT NULL, `body_logo_subheading` varchar(255) NOT NULL, PRIMARY KEY (`id_editorial`, `id_lang`)) - ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); + ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'); - if (file_exists(dirname(__FILE__).'/../../../modules/editorial/editorial.xml')) { - $xml = @simplexml_load_file(dirname(__FILE__).'/../../../modules/editorial/editorial.xml'); + if (file_exists(dirname(__FILE__) . '/../../../modules/editorial/editorial.xml')) { + $xml = @simplexml_load_file(dirname(__FILE__) . '/../../../modules/editorial/editorial.xml'); if (!$xml) { return false; } Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'editorial`(`id_editorial`, `body_home_logo_link`) VALUES(1, "'.(isset($xml->body->home_logo_link) ? pSQL($xml->body->home_logo_link) : '').'")'); + INSERT INTO `' . _DB_PREFIX_ . 'editorial`(`id_editorial`, `body_home_logo_link`) VALUES(1, "' . (isset($xml->body->home_logo_link) ? pSQL($xml->body->home_logo_link) : '') . '")'); - $languages = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'lang`'); + $languages = Db::getInstance()->executeS('SELECT * FROM `' . _DB_PREFIX_ . 'lang`'); foreach ($languages as $language) { Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'editorial_lang` (`id_editorial`, `id_lang`, `body_title`, `body_subheading`, `body_paragraph`, `body_logo_subheading`) - VALUES (1, '.(int)($language['id_lang']).', - "'.(isset($xml->body->{'title_'.$language['id_lang']}) ? pSQL($xml->body->{'title_'.$language['id_lang']}) : '').'", - "'.(isset($xml->body->{'subheading_'.$language['id_lang']}) ? pSQL($xml->body->{'subheading_'.$language['id_lang']}) : '').'", - "'.(isset($xml->body->{'paragraph_'.$language['id_lang']}) ? pSQL($xml->body->{'paragraph_'.$language['id_lang']}, true) : '').'", - "'.(isset($xml->body->{'logo_subheading_'.$language['id_lang']}) ? pSQL($xml->body->{'logo_subheading_'.$language['id_lang']}) : '').'")'); + INSERT INTO `' . _DB_PREFIX_ . 'editorial_lang` (`id_editorial`, `id_lang`, `body_title`, `body_subheading`, `body_paragraph`, `body_logo_subheading`) + VALUES (1, ' . (int) ($language['id_lang']) . ', + "' . (isset($xml->body->{'title_' . $language['id_lang']}) ? pSQL($xml->body->{'title_' . $language['id_lang']}) : '') . '", + "' . (isset($xml->body->{'subheading_' . $language['id_lang']}) ? pSQL($xml->body->{'subheading_' . $language['id_lang']}) : '') . '", + "' . (isset($xml->body->{'paragraph_' . $language['id_lang']}) ? pSQL($xml->body->{'paragraph_' . $language['id_lang']}, true) : '') . '", + "' . (isset($xml->body->{'logo_subheading_' . $language['id_lang']}) ? pSQL($xml->body->{'logo_subheading_' . $language['id_lang']}) : '') . '")'); } - unlink(dirname(__FILE__).'/../../../modules/editorial/editorial.xml'); + unlink(dirname(__FILE__) . '/../../../modules/editorial/editorial.xml'); } } } diff --git a/upgrade/php/editorial_update_multishop.php b/upgrade/php/editorial_update_multishop.php index 6758b5d8e..6779ffa31 100644 --- a/upgrade/php/editorial_update_multishop.php +++ b/upgrade/php/editorial_update_multishop.php @@ -23,13 +23,12 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function editorial_update_multishop() { $res = true; - if (Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name`="editorial"')) { - $res = Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'editorial` ADD `id_shop` INT(10) UNSIGNED NOT NULL AFTER `id_editorial`'); - $res &= Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'editorial` SET `id_shop` = 1'); + if (Db::getInstance()->getValue('SELECT `id_module` FROM `' . _DB_PREFIX_ . 'module` WHERE `name`="editorial"')) { + $res = Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'editorial` ADD `id_shop` INT(10) UNSIGNED NOT NULL AFTER `id_editorial`'); + $res &= Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'editorial` SET `id_shop` = 1'); } return $res; diff --git a/upgrade/php/fix_cms_shop_1520.php b/upgrade/php/fix_cms_shop_1520.php index 04cc56ef5..93de71230 100755 --- a/upgrade/php/fix_cms_shop_1520.php +++ b/upgrade/php/fix_cms_shop_1520.php @@ -23,13 +23,12 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function fix_cms_shop_1520() { $res = true; $db = Db::getInstance(); //test if cms_shop with 2 underscore is present to rename it. - $result = $db->executeS('SHOW TABLES LIKE "'._DB_PREFIX_.'_cms_shop"'); + $result = $db->executeS('SHOW TABLES LIKE "' . _DB_PREFIX_ . '_cms_shop"'); if (!is_array($result) || !count($result) || !$result) { $res &= create_table_cms_shop(); if ($res) { @@ -37,7 +36,7 @@ function fix_cms_shop_1520() } } //test if cms_shop with 1 underscore is present and create if not. - $result = $db->executeS('SHOW TABLES LIKE "'._DB_PREFIX_.'cms_shop"'); + $result = $db->executeS('SHOW TABLES LIKE "' . _DB_PREFIX_ . 'cms_shop"'); if (!is_array($result) || !count($result) || !$result) { $res &= create_table_cms_shop(); if ($res) { @@ -50,19 +49,19 @@ function insert_table_cms_to_cms_shop() { // /!\ : _cms_shop and _cms are wrong tables name (fixed in 1.5.0.12.sql : upgrade_cms_15_rename() ) $res &= Db::getInstance()->execute( - 'INSERT INTO `'._DB_PREFIX_.'cms_shop` (id_shop, id_cms) - (SELECT 1, id_cms FROM '._DB_PREFIX_.'_cms)' + 'INSERT INTO `' . _DB_PREFIX_ . 'cms_shop` (id_shop, id_cms) + (SELECT 1, id_cms FROM ' . _DB_PREFIX_ . '_cms)' ); } function create_table_cms_shop() { return Db::getInstance()->execute( - 'CREATE TABLE `'._DB_PREFIX_.'cms_shop` ( + 'CREATE TABLE `' . _DB_PREFIX_ . 'cms_shop` ( `id_cms` INT( 11 ) UNSIGNED NOT NULL, `id_shop` INT( 11 ) UNSIGNED NOT NULL , PRIMARY KEY (`id_cms`, `id_shop`), KEY `id_shop` (`id_shop`) - ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;' + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;' ); } diff --git a/upgrade/php/fix_download_product_feature_active.php b/upgrade/php/fix_download_product_feature_active.php index 5d24e7f80..2b5e6f04f 100644 --- a/upgrade/php/fix_download_product_feature_active.php +++ b/upgrade/php/fix_download_product_feature_active.php @@ -23,10 +23,9 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function fix_download_product_feature_active() { - if (Db::getInstance()->getValue('SELECT COUNT(id_product_download) FROM `'._DB_PREFIX_.'product_download` WHERE `active` = 1') > 0) { - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET `value` = 1 WHERE `name` = \'PS_VIRTUAL_PROD_FEATURE_ACTIVE\''); + if (Db::getInstance()->getValue('SELECT COUNT(id_product_download) FROM `' . _DB_PREFIX_ . 'product_download` WHERE `active` = 1') > 0) { + Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'configuration` SET `value` = 1 WHERE `name` = \'PS_VIRTUAL_PROD_FEATURE_ACTIVE\''); } } diff --git a/upgrade/php/fix_unique_specific_price.php b/upgrade/php/fix_unique_specific_price.php index 32c1e5ed7..ecadd2edb 100644 --- a/upgrade/php/fix_unique_specific_price.php +++ b/upgrade/php/fix_unique_specific_price.php @@ -23,12 +23,11 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function fix_unique_specific_price() { $result = Db::getInstance()->executeS(' SELECT MIN(id_specific_price) id_specific_price - FROM '._DB_PREFIX_.'specific_price + FROM ' . _DB_PREFIX_ . 'specific_price GROUP BY `id_product`, `id_shop`, `id_currency`, `id_country`, `id_group`, `from_quantity`, `from`, `to`'); if (!$result || !count($result)) { return true; @@ -36,11 +35,11 @@ function fix_unique_specific_price() $sql = ''; foreach ($result as $row) { - $sql .= (int)$row['id_specific_price'].','; + $sql .= (int) $row['id_specific_price'] . ','; } $sql = rtrim($sql, ','); return Db::getInstance()->execute(' - DELETE FROM '._DB_PREFIX_.'specific_price - WHERE id_specific_price NOT IN ('.$sql.')'); + DELETE FROM ' . _DB_PREFIX_ . 'specific_price + WHERE id_specific_price NOT IN (' . $sql . ')'); } diff --git a/upgrade/php/generate_ntree.php b/upgrade/php/generate_ntree.php index 35a76b2d4..2319687ed 100644 --- a/upgrade/php/generate_ntree.php +++ b/upgrade/php/generate_ntree.php @@ -23,14 +23,13 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function generate_ntree() { - $categories = Db::getInstance()->executeS('SELECT id_category, id_parent FROM '._DB_PREFIX_.'category ORDER BY id_parent ASC, position ASC'); - $categoriesArray = array(); + $categories = Db::getInstance()->executeS('SELECT id_category, id_parent FROM ' . _DB_PREFIX_ . 'category ORDER BY id_parent ASC, position ASC'); + $categoriesArray = []; if (is_array($categories)) { foreach ($categories as $category) { - $categoriesArray[(int)$category['id_parent']]['subcategories'][(int)$category['id_category']] = 1; + $categoriesArray[(int) $category['id_parent']]['subcategories'][(int) $category['id_category']] = 1; } } $n = 1; @@ -39,15 +38,15 @@ function generate_ntree() function generate_ntree_subTree(&$categories, $id_category, &$n) { - $left = (int)$n++; - if (isset($categories[(int)$id_category]['subcategories'])) { - foreach (array_keys($categories[(int)$id_category]['subcategories']) as $id_subcategory) { - generate_ntree_subTree($categories, (int)$id_subcategory, $n); + $left = (int) $n++; + if (isset($categories[(int) $id_category]['subcategories'])) { + foreach (array_keys($categories[(int) $id_category]['subcategories']) as $id_subcategory) { + generate_ntree_subTree($categories, (int) $id_subcategory, $n); } } - $right = (int)$n++; + $right = (int) $n++; - Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'category - SET nleft = '.(int)$left.', nright = '.(int)$right.' - WHERE id_category = '.(int)$id_category.' LIMIT 1'); + Db::getInstance()->execute('UPDATE ' . _DB_PREFIX_ . 'category + SET nleft = ' . (int) $left . ', nright = ' . (int) $right . ' + WHERE id_category = ' . (int) $id_category . ' LIMIT 1'); } diff --git a/upgrade/php/generate_root_category_for_multishop.php b/upgrade/php/generate_root_category_for_multishop.php index 875751e35..cf7e49e81 100644 --- a/upgrade/php/generate_root_category_for_multishop.php +++ b/upgrade/php/generate_root_category_for_multishop.php @@ -23,47 +23,46 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - require_once 'generate_ntree.php'; function generate_root_category_for_multishop() { Db::getInstance()->execute(' - UPDATE `'._DB_PREFIX_.'category` SET `level_depth`=`level_depth`+1 + UPDATE `' . _DB_PREFIX_ . 'category` SET `level_depth`=`level_depth`+1 '); Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'category` (`id_parent`, `level_depth`, `active`, `date_add`, `date_upd`, `is_root_category`) VALUES + INSERT INTO `' . _DB_PREFIX_ . 'category` (`id_parent`, `level_depth`, `active`, `date_add`, `date_upd`, `is_root_category`) VALUES (0, 0, 1, NOW(), NOW(), 0) '); $id = Db::getInstance()->Insert_ID(); // set vars config - Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES - (\'PS_ROOT_CATEGORY\', '.(int)$id.', NOW(), NOW()), + Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES + (\'PS_ROOT_CATEGORY\', ' . (int) $id . ', NOW(), NOW()), (\'PS_HOME_CATEGORY\', 1, NOW(), NOW()) '); $langs = Db::getInstance()->executeS(' SELECT `id_lang` - FROM `'._DB_PREFIX_.'lang` + FROM `' . _DB_PREFIX_ . 'lang` '); $shops = Db::getInstance()->executeS(' SELECT `id_shop` - FROM `'._DB_PREFIX_.'shop` + FROM `' . _DB_PREFIX_ . 'shop` '); - $data = array(); + $data = []; if (is_array($shops) && is_array($langs)) { foreach ($langs as $lang) { foreach ($shops as $shop) { - $data[] = array( + $data[] = [ 'id_lang' => $lang['id_lang'], 'id_shop' => $shop['id_shop'], 'id_category' => $id, 'name' => 'Root', 'link_rewrite' => '', - ); + ]; } } Db::getInstance()->insert('category_lang', $data); @@ -71,28 +70,28 @@ function generate_root_category_for_multishop() $categories = Db::getInstance()->executeS(' SELECT `id_category` - FROM `'._DB_PREFIX_.'category` + FROM `' . _DB_PREFIX_ . 'category` '); - $data = array(); + $data = []; if (is_array($shops) && is_array($categories)) { foreach ($categories as $category) { foreach ($shops as $shop) { - $data[] = array( + $data[] = [ 'id_category' => $category['id_category'], 'id_shop' => $shop['id_shop'], - ); + ]; } } Db::getInstance()->insert('category_shop', $data); } Db::getInstance()->execute(' - UPDATE `'._DB_PREFIX_.'category` - SET `id_parent` = '.(int)$id.' - WHERE `id_parent` = 0 AND `id_category` <> '.(int)$id.' + UPDATE `' . _DB_PREFIX_ . 'category` + SET `id_parent` = ' . (int) $id . ' + WHERE `id_parent` = 0 AND `id_category` <> ' . (int) $id . ' '); Db::getInstance()->execute(' - UPDATE `'._DB_PREFIX_.'shop` + UPDATE `' . _DB_PREFIX_ . 'shop` SET `id_category` = 1 WHERE `id_shop` = 1 '); diff --git a/upgrade/php/generate_tax_rules.php b/upgrade/php/generate_tax_rules.php index e2ec5da99..4db5e34fa 100644 --- a/upgrade/php/generate_tax_rules.php +++ b/upgrade/php/generate_tax_rules.php @@ -23,11 +23,10 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function generate_tax_rules() { $res = true; - $taxes = Db::getInstance()->executeS('SELECT * from `'._DB_PREFIX_.'tax` WHERE active = 1'); + $taxes = Db::getInstance()->executeS('SELECT * from `' . _DB_PREFIX_ . 'tax` WHERE active = 1'); // if no tax found, nothing to do, return true if (!is_array($taxes)) { @@ -36,75 +35,75 @@ function generate_tax_rules() foreach ($taxes as $tax) { $id_tax = $tax['id_tax']; - $row = array( + $row = [ 'active' => 1, 'id_tax_rules_group' => $id_tax, - 'name' => 'Rule '.$tax['rate'].'%', - ); + 'name' => 'Rule ' . $tax['rate'] . '%', + ]; $res &= Db::getInstance()->insert('tax_rules_group', $row); $id_tax_rules_group = Db::getInstance()->Insert_ID(); $countries = Db::getInstance()->executeS( ' - SELECT * FROM `'._DB_PREFIX_.'country` c - LEFT JOIN `'._DB_PREFIX_.'zone` z ON (c.`id_zone` = z.`id_zone`) - LEFT JOIN `'._DB_PREFIX_.'tax_zone` tz ON (tz.`id_zone` = z.`id_zone`) - WHERE `id_tax` = '.(int)$id_tax + SELECT * FROM `' . _DB_PREFIX_ . 'country` c + LEFT JOIN `' . _DB_PREFIX_ . 'zone` z ON (c.`id_zone` = z.`id_zone`) + LEFT JOIN `' . _DB_PREFIX_ . 'tax_zone` tz ON (tz.`id_zone` = z.`id_zone`) + WHERE `id_tax` = ' . (int) $id_tax ); if ($countries) { foreach ($countries as $country) { - $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'tax_rule` + $res &= Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'tax_rule` (`id_tax_rules_group`, `id_country`, `id_state`, `state_behavior`, `id_tax`) VALUES - ('.$id_tax_rules_group.', '.(int)$country['id_country'].', 0, 0, '.(int)$id_tax. ')'); + (' . $id_tax_rules_group . ', ' . (int) $country['id_country'] . ', 0, 0, ' . (int) $id_tax . ')'); } } $states = Db::getInstance()->executeS(' - SELECT * FROM `'._DB_PREFIX_.'states` s - LEFT JOIN `'._DB_PREFIX_.'tax_state` ts ON (ts.`id_state` = s.`id_state`) - WHERE `id_tax` = '.(int)$id_tax); + SELECT * FROM `' . _DB_PREFIX_ . 'states` s + LEFT JOIN `' . _DB_PREFIX_ . 'tax_state` ts ON (ts.`id_state` = s.`id_state`) + WHERE `id_tax` = ' . (int) $id_tax); if ($states) { foreach ($states as $state) { - if (!in_array($state['tax_behavior'], array(PS_PRODUCT_TAX, PS_STATE_TAX, PS_BOTH_TAX))) { + if (!in_array($state['tax_behavior'], [PS_PRODUCT_TAX, PS_STATE_TAX, PS_BOTH_TAX])) { $tax_behavior = PS_PRODUCT_TAX; } else { $tax_behavior = $state['tax_behavior']; } $res &= Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'tax_rule` + INSERT INTO `' . _DB_PREFIX_ . 'tax_rule` (`id_tax_rules_group`, `id_country`, `id_state`, `state_behavior`, `id_tax`) VALUES ( - '.$id_tax_rules_group.', - '.(int)$state['id_country'].', - '.(int)$state['id_state'].', - '.(int)$tax_behavior.', - '.(int)$id_tax. + ' . $id_tax_rules_group . ', + ' . (int) $state['id_country'] . ', + ' . (int) $state['id_state'] . ', + ' . (int) $tax_behavior . ', + ' . (int) $id_tax . ')'); } } $res &= Db::getInstance()->execute( ' - UPDATE `'._DB_PREFIX_.'product` - SET `id_tax_rules_group` = '.$id_tax_rules_group.' - WHERE `id_tax` = '.(int)$id_tax + UPDATE `' . _DB_PREFIX_ . 'product` + SET `id_tax_rules_group` = ' . $id_tax_rules_group . ' + WHERE `id_tax` = ' . (int) $id_tax ); $res &= Db::getInstance()->execute( ' - UPDATE `'._DB_PREFIX_.'carrier` - SET `id_tax_rules_group` = '.$id_tax_rules_group.' - WHERE `id_tax` = '.(int)$id_tax + UPDATE `' . _DB_PREFIX_ . 'carrier` + SET `id_tax_rules_group` = ' . $id_tax_rules_group . ' + WHERE `id_tax` = ' . (int) $id_tax ); $socolissimo_overcost_tax = Db::getInstance()->getValue('SELECT value - FROM `'._DB_PREFIX_.'configuration` + FROM `' . _DB_PREFIX_ . 'configuration` WHERE name="SOCOLISSIMO_OVERCOST_TAX"'); if ($socolissimo_overcost_tax == $id_tax) { - $res &= Db::getInstance()->getValue('UPDATE `'._DB_PREFIX_.'configuration` - set value="'.$id_tax_rules_group.'" WHERE name="SOCOLISSIMO_OVERCOST_TAX"'); + $res &= Db::getInstance()->getValue('UPDATE `' . _DB_PREFIX_ . 'configuration` + set value="' . $id_tax_rules_group . '" WHERE name="SOCOLISSIMO_OVERCOST_TAX"'); } } diff --git a/upgrade/php/generic_add_missing_column.php b/upgrade/php/generic_add_missing_column.php index 609606cb4..058bef1df 100644 --- a/upgrade/php/generic_add_missing_column.php +++ b/upgrade/php/generic_add_missing_column.php @@ -23,20 +23,19 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function generic_add_missing_column($table, $column_to_add) { - $column_exist = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.$table.'`'); - $column_formated = array(); + $column_exist = Db::getInstance()->executeS('SHOW FIELDS FROM `' . _DB_PREFIX_ . $table . '`'); + $column_formated = []; $res = true; if ($column_exist) { foreach ($column_exist as $c) { - $column_formated[] = $c['Field'] ; + $column_formated[] = $c['Field']; } foreach ($column_to_add as $name => $details) { if (!in_array($name, $column_formated)) { - $res &= Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.$table.'` ADD COLUMN `'.$name.'` '.$details); + $res &= Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . $table . '` ADD COLUMN `' . $name . '` ' . $details); } } } diff --git a/upgrade/php/gridextjs_deprecated.php b/upgrade/php/gridextjs_deprecated.php index 8c0ce916d..fe50b11ff 100644 --- a/upgrade/php/gridextjs_deprecated.php +++ b/upgrade/php/gridextjs_deprecated.php @@ -35,7 +35,7 @@ function gridextjs_deprecated() } elseif (defined('_PS_ROOT_DIR_')) { $gridextjs_path = _PS_ROOT_DIR_ . '/modules/gridextjs'; } else { - $gridextjs_path = dirname(__FILE__).'/../../../modules/gridextjs'; + $gridextjs_path = dirname(__FILE__) . '/../../../modules/gridextjs'; } if (file_exists($gridextjs_path)) { diff --git a/upgrade/php/group_reduction_column_fix.php b/upgrade/php/group_reduction_column_fix.php index 9434cd1e9..59d46d2f4 100644 --- a/upgrade/php/group_reduction_column_fix.php +++ b/upgrade/php/group_reduction_column_fix.php @@ -23,11 +23,10 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function group_reduction_column_fix() { - if (!Db::getInstance()->execute('SELECT `group_reduction` FROM `'._DB_PREFIX_.'order_detail` LIMIT 1')) { - return Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'order_detail` ADD `group_reduction` DECIMAL(10, 2) NOT NULL AFTER `reduction_amount`'); + if (!Db::getInstance()->execute('SELECT `group_reduction` FROM `' . _DB_PREFIX_ . 'order_detail` LIMIT 1')) { + return Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'order_detail` ADD `group_reduction` DECIMAL(10, 2) NOT NULL AFTER `reduction_amount`'); } return true; diff --git a/upgrade/php/hook_blocksearch_on_header.php b/upgrade/php/hook_blocksearch_on_header.php index 469aeedde..0ce4f7a66 100644 --- a/upgrade/php/hook_blocksearch_on_header.php +++ b/upgrade/php/hook_blocksearch_on_header.php @@ -23,25 +23,24 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function hook_blocksearch_on_header() { - if ($id_module = Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name` = \'blocksearch\'')) { + if ($id_module = Db::getInstance()->getValue('SELECT `id_module` FROM `' . _DB_PREFIX_ . 'module` WHERE `name` = \'blocksearch\'')) { $id_hook = Db::getInstance()->getValue(' SELECT `id_hook` - FROM `'._DB_PREFIX_.'hook` + FROM `' . _DB_PREFIX_ . 'hook` WHERE `name` = \'header\' '); $position = Db::getInstance()->getValue(' SELECT MAX(`position`) - FROM `'._DB_PREFIX_.'hook_module` - WHERE `id_hook` = '.(int)$id_hook.' + FROM `' . _DB_PREFIX_ . 'hook_module` + WHERE `id_hook` = ' . (int) $id_hook . ' '); Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'hook_module` (`id_module`, `id_hook`, `position`) - VALUES ('.(int)$id_module.', '.(int)$id_hook.', '.($position+1).') + INSERT INTO `' . _DB_PREFIX_ . 'hook_module` (`id_module`, `id_hook`, `position`) + VALUES (' . (int) $id_module . ', ' . (int) $id_hook . ', ' . ($position + 1) . ') '); } } diff --git a/upgrade/php/id_currency_country_fix.php b/upgrade/php/id_currency_country_fix.php index 513227f07..724b94ac2 100644 --- a/upgrade/php/id_currency_country_fix.php +++ b/upgrade/php/id_currency_country_fix.php @@ -23,11 +23,10 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function id_currency_country_fix() { - if (!Db::getInstance()->execute('SELECT `id_currency` FROM `'._DB_PREFIX_.'country` LIMIT 1')) { - return Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'country` ADD `id_currency` INT NOT NULL DEFAULT \'0\' AFTER `id_zone`'); + if (!Db::getInstance()->execute('SELECT `id_currency` FROM `' . _DB_PREFIX_ . 'country` LIMIT 1')) { + return Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'country` ADD `id_currency` INT NOT NULL DEFAULT \'0\' AFTER `id_zone`'); } return true; diff --git a/upgrade/php/image_shop1510.php b/upgrade/php/image_shop1510.php index 22e38dce1..ae71f3d78 100644 --- a/upgrade/php/image_shop1510.php +++ b/upgrade/php/image_shop1510.php @@ -23,15 +23,13 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function image_shop1510() { + include_once __DIR__ . '/generic_add_missing_column.php'; - include_once __DIR__.'/generic_add_missing_column.php'; - - $column_to_add = array( + $column_to_add = [ 'cover' => 'TINYINT(1) UNSIGNED NOT NULL AFTER `id_shop`', - ); + ]; return generic_add_missing_column('image_shop', $column_to_add); } diff --git a/upgrade/php/index.php b/upgrade/php/index.php index 76cd9dd33..c7835bc88 100644 --- a/upgrade/php/index.php +++ b/upgrade/php/index.php @@ -23,13 +23,12 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); +header('Location: ../'); exit; diff --git a/upgrade/php/invoice_number_set.php b/upgrade/php/invoice_number_set.php index ea13d7387..788c3c385 100644 --- a/upgrade/php/invoice_number_set.php +++ b/upgrade/php/invoice_number_set.php @@ -23,7 +23,6 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function invoice_number_set() { Configuration::loadConfiguration(); @@ -32,20 +31,20 @@ function invoice_number_set() // Update each order with a number $result = Db::getInstance()->executeS(' SELECT id_order - FROM '._DB_PREFIX_.'orders + FROM ' . _DB_PREFIX_ . 'orders ORDER BY id_order'); foreach ($result as $row) { - $order = new Order((int)($row['id_order'])); + $order = new Order((int) ($row['id_order'])); $history = $order->getHistory(false); foreach ($history as $row2) { - $oS = new OrderState((int)($row2['id_order_state']), Configuration::get('PS_LANG_DEFAULT')); + $oS = new OrderState((int) ($row2['id_order_state']), Configuration::get('PS_LANG_DEFAULT')); if ($oS->invoice) { - Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'orders SET invoice_number = '.(int)($number++).', `invoice_date` = `date_add` WHERE id_order = '.(int)($order->id)); + Db::getInstance()->execute('UPDATE ' . _DB_PREFIX_ . 'orders SET invoice_number = ' . (int) ($number++) . ', `invoice_date` = `date_add` WHERE id_order = ' . (int) ($order->id)); - break ; + break; } } } // Add configuration var - Configuration::updateValue('PS_INVOICE_NUMBER', (int)($number)); + Configuration::updateValue('PS_INVOICE_NUMBER', (int) ($number)); } diff --git a/upgrade/php/latin1_database_to_utf8.php b/upgrade/php/latin1_database_to_utf8.php index 1865501e5..3633d993a 100644 --- a/upgrade/php/latin1_database_to_utf8.php +++ b/upgrade/php/latin1_database_to_utf8.php @@ -23,7 +23,6 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - if (!defined('_PS_MYSQL_REAL_ESCAPE_STRING_')) { define('_PS_MYSQL_REAL_ESCAPE_STRING_', function_exists('mysql_real_escape_string')); } @@ -32,79 +31,79 @@ function latin1_database_to_utf8() { global $requests, $warningExist; - $tables = array( - array('name' => 'address', 'id' => 'id_address', 'fields' => array('alias', 'company', 'name', 'surname', 'address1', 'address2', 'postcode', 'city', 'other', 'phone', 'phone_mobile')), - array('name' => 'alias', 'id' => 'id_alias', 'fields' => array('alias', 'search')), - array('name' => 'attribute_group_lang', 'id' => 'id_attribute_group', 'lang' => true, 'fields' => array('name', 'public_name')), - array('name' => 'attribute_lang', 'id' => 'id_attribute', 'lang' => true, 'fields' => array('name')), - array('name' => 'carrier', 'id' => 'id_carrier', 'fields' => array('name', 'url')), - array('name' => 'carrier_lang', 'id' => 'id_carrier', 'lang' => true, 'fields' => array('delay')), - array('name' => 'cart', 'id' => 'id_cart', 'fields' => array('gift_message')), - array('name' => 'category_lang', 'id' => 'id_category', 'lang' => true, 'fields' => array('name', 'description', 'link_rewrite', 'meta_title', 'meta_keywords', 'meta_description')), - array('name' => 'configuration', 'id' => 'id_configuration', 'fields' => array('name', 'value')), - array('name' => 'configuration_lang', 'id' => 'id_configuration', 'lang' => true, 'fields' => array('value')), - array('name' => 'contact', 'id' => 'id_contact', 'fields' => array('email')), - array('name' => 'contact_lang', 'id' => 'id_contact', 'lang' => true, 'fields' => array('name', 'description')), - array('name' => 'country', 'id' => 'id_country', 'fields' => array('iso_code')), - array('name' => 'country_lang', 'id' => 'id_country', 'lang' => true, 'fields' => array('name')), - array('name' => 'currency', 'id' => 'id_currency', 'fields' => array('name', 'iso_code', 'sign')), - array('name' => 'customer', 'id' => 'id_customer', 'fields' => array('email', 'passwd', 'name', 'surname')), - array('name' => 'discount', 'id' => 'id_discount', 'fields' => array('name')), - array('name' => 'discount_lang', 'id' => 'id_discount', 'lang' => true, 'fields' => array('description')), - array('name' => 'discount_type_lang', 'id' => 'id_discount_type', 'lang' => true, 'fields' => array('name')), - array('name' => 'employee', 'id' => 'id_employee', 'fields' => array('name', 'surname', 'email', 'passwd')), - array('name' => 'feature_lang', 'id' => 'id_feature', 'lang' => true, 'fields' => array('name')), - array('name' => 'feature_value_lang', 'id' => 'id_feature_value', 'lang' => true, 'fields' => array('value')), - array('name' => 'hook', 'id' => 'id_hook', 'fields' => array('name', 'title', 'description')), - array('name' => 'hook_module_exceptions', 'id' => 'id_hook_module_exceptions', 'fields' => array('file_name')), - array('name' => 'image_lang', 'id' => 'id_image', 'lang' => true, 'fields' => array('legend')), - array('name' => 'image_type', 'id' => 'id_image_type', 'fields' => array('name')), - array('name' => 'lang', 'id' => 'id_lang', 'fields' => array('name', 'iso_code')), - array('name' => 'manufacturer', 'id' => 'id_manufacturer', 'fields' => array('name')), - array('name' => 'message', 'id' => 'id_message', 'fields' => array('message')), - array('name' => 'module', 'id' => 'id_module', 'fields' => array('name')), - array('name' => 'orders', 'id' => 'id_order', 'fields' => array('payment', 'module', 'gift_message', 'shipping_number')), - array('name' => 'order_detail', 'id' => 'id_order_detail', 'fields' => array('product_name', 'product_reference', 'tax_name', 'download_hash')), - array('name' => 'order_discount', 'id' => 'id_order_discount', 'fields' => array('name')), - array('name' => 'order_state', 'id' => 'id_order_state', 'fields' => array('color')), - array('name' => 'order_state_lang', 'id' => 'id_order_state', 'lang' => true, 'fields' => array('name', 'template')), - array('name' => 'product', 'id' => 'id_product', 'fields' => array('ean13', 'reference')), - array('name' => 'product_attribute', 'id' => 'id_product_attribute', 'fields' => array('reference', 'ean13')), - array('name' => 'product_download', 'id' => 'id_product_download', 'fields' => array('display_filename', 'physically_filename')), - array('name' => 'product_lang', 'id' => 'id_product', 'lang' => true, 'fields' => array('description', 'description_short', 'link_rewrite', 'meta_description', 'meta_keywords', 'meta_title', 'name', 'availability')), - array('name' => 'profile_lang', 'id' => 'id_profile', 'lang' => true, 'fields' => array('name')), - array('name' => 'quick_access', 'id' => 'id_quick_access', 'fields' => array('link')), - array('name' => 'quick_access_lang', 'id' => 'id_quick_access', 'lang' => true, 'fields' => array('name')), - array('name' => 'supplier', 'id' => 'id_supplier', 'fields' => array('name')), - array('name' => 'tab', 'id' => 'id_tab', 'fields' => array('class_name')), - array('name' => 'tab_lang', 'id' => 'id_tab', 'lang' => true, 'fields' => array('name')), - array('name' => 'tag', 'id' => 'id_tag', 'fields' => array('name')), - array('name' => 'tax_lang', 'id' => 'id_tax', 'lang' => true, 'fields' => array('name')), - array('name' => 'zone', 'id' => 'id_zone', 'fields' => array('name')), - ); + $tables = [ + ['name' => 'address', 'id' => 'id_address', 'fields' => ['alias', 'company', 'name', 'surname', 'address1', 'address2', 'postcode', 'city', 'other', 'phone', 'phone_mobile']], + ['name' => 'alias', 'id' => 'id_alias', 'fields' => ['alias', 'search']], + ['name' => 'attribute_group_lang', 'id' => 'id_attribute_group', 'lang' => true, 'fields' => ['name', 'public_name']], + ['name' => 'attribute_lang', 'id' => 'id_attribute', 'lang' => true, 'fields' => ['name']], + ['name' => 'carrier', 'id' => 'id_carrier', 'fields' => ['name', 'url']], + ['name' => 'carrier_lang', 'id' => 'id_carrier', 'lang' => true, 'fields' => ['delay']], + ['name' => 'cart', 'id' => 'id_cart', 'fields' => ['gift_message']], + ['name' => 'category_lang', 'id' => 'id_category', 'lang' => true, 'fields' => ['name', 'description', 'link_rewrite', 'meta_title', 'meta_keywords', 'meta_description']], + ['name' => 'configuration', 'id' => 'id_configuration', 'fields' => ['name', 'value']], + ['name' => 'configuration_lang', 'id' => 'id_configuration', 'lang' => true, 'fields' => ['value']], + ['name' => 'contact', 'id' => 'id_contact', 'fields' => ['email']], + ['name' => 'contact_lang', 'id' => 'id_contact', 'lang' => true, 'fields' => ['name', 'description']], + ['name' => 'country', 'id' => 'id_country', 'fields' => ['iso_code']], + ['name' => 'country_lang', 'id' => 'id_country', 'lang' => true, 'fields' => ['name']], + ['name' => 'currency', 'id' => 'id_currency', 'fields' => ['name', 'iso_code', 'sign']], + ['name' => 'customer', 'id' => 'id_customer', 'fields' => ['email', 'passwd', 'name', 'surname']], + ['name' => 'discount', 'id' => 'id_discount', 'fields' => ['name']], + ['name' => 'discount_lang', 'id' => 'id_discount', 'lang' => true, 'fields' => ['description']], + ['name' => 'discount_type_lang', 'id' => 'id_discount_type', 'lang' => true, 'fields' => ['name']], + ['name' => 'employee', 'id' => 'id_employee', 'fields' => ['name', 'surname', 'email', 'passwd']], + ['name' => 'feature_lang', 'id' => 'id_feature', 'lang' => true, 'fields' => ['name']], + ['name' => 'feature_value_lang', 'id' => 'id_feature_value', 'lang' => true, 'fields' => ['value']], + ['name' => 'hook', 'id' => 'id_hook', 'fields' => ['name', 'title', 'description']], + ['name' => 'hook_module_exceptions', 'id' => 'id_hook_module_exceptions', 'fields' => ['file_name']], + ['name' => 'image_lang', 'id' => 'id_image', 'lang' => true, 'fields' => ['legend']], + ['name' => 'image_type', 'id' => 'id_image_type', 'fields' => ['name']], + ['name' => 'lang', 'id' => 'id_lang', 'fields' => ['name', 'iso_code']], + ['name' => 'manufacturer', 'id' => 'id_manufacturer', 'fields' => ['name']], + ['name' => 'message', 'id' => 'id_message', 'fields' => ['message']], + ['name' => 'module', 'id' => 'id_module', 'fields' => ['name']], + ['name' => 'orders', 'id' => 'id_order', 'fields' => ['payment', 'module', 'gift_message', 'shipping_number']], + ['name' => 'order_detail', 'id' => 'id_order_detail', 'fields' => ['product_name', 'product_reference', 'tax_name', 'download_hash']], + ['name' => 'order_discount', 'id' => 'id_order_discount', 'fields' => ['name']], + ['name' => 'order_state', 'id' => 'id_order_state', 'fields' => ['color']], + ['name' => 'order_state_lang', 'id' => 'id_order_state', 'lang' => true, 'fields' => ['name', 'template']], + ['name' => 'product', 'id' => 'id_product', 'fields' => ['ean13', 'reference']], + ['name' => 'product_attribute', 'id' => 'id_product_attribute', 'fields' => ['reference', 'ean13']], + ['name' => 'product_download', 'id' => 'id_product_download', 'fields' => ['display_filename', 'physically_filename']], + ['name' => 'product_lang', 'id' => 'id_product', 'lang' => true, 'fields' => ['description', 'description_short', 'link_rewrite', 'meta_description', 'meta_keywords', 'meta_title', 'name', 'availability']], + ['name' => 'profile_lang', 'id' => 'id_profile', 'lang' => true, 'fields' => ['name']], + ['name' => 'quick_access', 'id' => 'id_quick_access', 'fields' => ['link']], + ['name' => 'quick_access_lang', 'id' => 'id_quick_access', 'lang' => true, 'fields' => ['name']], + ['name' => 'supplier', 'id' => 'id_supplier', 'fields' => ['name']], + ['name' => 'tab', 'id' => 'id_tab', 'fields' => ['class_name']], + ['name' => 'tab_lang', 'id' => 'id_tab', 'lang' => true, 'fields' => ['name']], + ['name' => 'tag', 'id' => 'id_tag', 'fields' => ['name']], + ['name' => 'tax_lang', 'id' => 'id_tax', 'lang' => true, 'fields' => ['name']], + ['name' => 'zone', 'id' => 'id_zone', 'fields' => ['name']], + ]; foreach ($tables as $table) { /* Latin1 datas' selection */ if (!Db::getInstance()->execute('SET NAMES latin1')) { echo 'Cannot change the sql encoding to latin1!'; } - $query = 'SELECT `'.$table['id'].'`'; + $query = 'SELECT `' . $table['id'] . '`'; foreach ($table['fields'] as $field) { - $query .= ', `'.$field.'`'; + $query .= ', `' . $field . '`'; } if (isset($table['lang']) && $table['lang']) { $query .= ', `id_lang`'; } - $query .= ' FROM `'._DB_PREFIX_.$table['name'].'`'; + $query .= ' FROM `' . _DB_PREFIX_ . $table['name'] . '`'; $latin1Datas = Db::getInstance()->executeS($query); if ($latin1Datas === false) { $warningExist = true; $requests .= ' - - getMsgError()).']]> - getNumberError()).']]> - '."\n"; + + getMsgError()) . ']]> + getNumberError()) . ']]> + ' . "\n"; } if (Db::getInstance()->numRows()) { @@ -113,23 +112,23 @@ function latin1_database_to_utf8() echo 'Cannot change the sql encoding to utf8!'; } foreach ($latin1Datas as $latin1Data) { - $query = 'UPDATE `'._DB_PREFIX_.$table['name'].'` SET'; + $query = 'UPDATE `' . _DB_PREFIX_ . $table['name'] . '` SET'; foreach ($table['fields'] as $field) { - $query .= ' `'.$field.'` = \''.pSQL($latin1Data[$field]).'\','; + $query .= ' `' . $field . '` = \'' . pSQL($latin1Data[$field]) . '\','; } $query = rtrim($query, ','); - $query .= ' WHERE `'.$table['id'].'` = '.(int)($latin1Data[$table['id']]); + $query .= ' WHERE `' . $table['id'] . '` = ' . (int) ($latin1Data[$table['id']]); if (isset($table['lang']) && $table['lang']) { - $query .= ' AND `id_lang` = '.(int)($latin1Data['id_lang']); + $query .= ' AND `id_lang` = ' . (int) ($latin1Data['id_lang']); } if (!Db::getInstance()->execute($query)) { $warningExist = true; $requests .= ' - - getMsgError()).']]> - getNumberError()).']]> - '."\n"; + + getMsgError()) . ']]> + getNumberError()) . ']]> + ' . "\n"; } } } diff --git a/upgrade/php/migrate_block_info_to_cms_block.php b/upgrade/php/migrate_block_info_to_cms_block.php index 37e563b73..997df7138 100644 --- a/upgrade/php/migrate_block_info_to_cms_block.php +++ b/upgrade/php/migrate_block_info_to_cms_block.php @@ -23,112 +23,111 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function migrate_block_info_to_cms_block() { $res = true; - $languages = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'lang`'); + $languages = Db::getInstance()->executeS('SELECT * FROM `' . _DB_PREFIX_ . 'lang`'); //get ids cms of block information - $id_blockinfos = Db::getInstance()->getValue('SELECT id_module FROM `'._DB_PREFIX_.'module` WHERE name = \'blockinfos\''); + $id_blockinfos = Db::getInstance()->getValue('SELECT id_module FROM `' . _DB_PREFIX_ . 'module` WHERE name = \'blockinfos\''); //get ids cms of block information - $ids_cms = Db::getInstance()->executeS('SELECT id_cms FROM `'._DB_PREFIX_.'block_cms` WHERE `id_block` = '.(int)$id_blockinfos); + $ids_cms = Db::getInstance()->executeS('SELECT id_cms FROM `' . _DB_PREFIX_ . 'block_cms` WHERE `id_block` = ' . (int) $id_blockinfos); //check if block info is installed and active if (is_array($ids_cms)) { //install module blockcms // Module::getInstanceByName('blockcms')->install() // 1) from module $ps_lang_default = Db::getInstance()->getValue('SELECT value - FROM `'._DB_PREFIX_.'configuration` + FROM `' . _DB_PREFIX_ . 'configuration` WHERE name="PS_LANG_DEFAULT"'); // 2) parent::install() $result = Db::getInstance()->insert( 'module', - array('name' => 'blockcms', 'active' => 1) + ['name' => 'blockcms', 'active' => 1] ); $id_module = Db::getInstance()->Insert_ID(); // 3) hooks - $hooks = array('leftColumn', 'rightColumn', 'footer', 'header'); + $hooks = ['leftColumn', 'rightColumn', 'footer', 'header']; foreach ($hooks as $hook_name) { // do not pSql hook_name - $row = Db::getInstance()->getRow('SELECT h.id_hook, '.$id_module.' as id_module, MAX(hm.position)+1 as position - FROM `'._DB_PREFIX_.'hook_module` hm - LEFT JOIN `'._DB_PREFIX_.'hook` h on hm.id_hook=h.id_hook - WHERE h.name = "'.$hook_name.'" group by id_hook'); + $row = Db::getInstance()->getRow('SELECT h.id_hook, ' . $id_module . ' as id_module, MAX(hm.position)+1 as position + FROM `' . _DB_PREFIX_ . 'hook_module` hm + LEFT JOIN `' . _DB_PREFIX_ . 'hook` h on hm.id_hook=h.id_hook + WHERE h.name = "' . $hook_name . '" group by id_hook'); $res &= Db::getInstance()->insert('hook_module', $row); } // module install $res &= Db::getInstance()->execute(' - CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'cms_block`( + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'cms_block`( `id_cms_block` int(10) unsigned NOT NULL auto_increment, `id_cms_category` int(10) unsigned NOT NULL, `location` tinyint(1) unsigned NOT NULL, `position` int(10) unsigned NOT NULL default \'0\', `display_store` tinyint(1) unsigned NOT NULL default \'1\', PRIMARY KEY (`id_cms_block`) - ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'); $res &= Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'cms_block` (`id_cms_category`, `location`, `position`) VALUES(1, 0, 0)'); + INSERT INTO `' . _DB_PREFIX_ . 'cms_block` (`id_cms_category`, `location`, `position`) VALUES(1, 0, 0)'); $res &= Db::getInstance()->execute(' - CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'cms_block_lang`( + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'cms_block_lang`( `id_cms_block` int(10) unsigned NOT NULL, `id_lang` int(10) unsigned NOT NULL, `name` varchar(40) NOT NULL default \'\', PRIMARY KEY (`id_cms_block`, `id_lang`) - ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'); - $query_lang = 'INSERT INTO `'._DB_PREFIX_.'cms_block_lang` (`id_cms_block`, `id_lang`) VALUES'; + $query_lang = 'INSERT INTO `' . _DB_PREFIX_ . 'cms_block_lang` (`id_cms_block`, `id_lang`) VALUES'; foreach ($languages as $language) { - $query_lang .= '(1, '.(int)($language['id_lang']).'),'; + $query_lang .= '(1, ' . (int) ($language['id_lang']) . '),'; } $query_lang = rtrim($query_lang, ','); $res &= Db::getInstance()->execute($query_lang); $res &= Db::getInstance()->execute(' - CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'cms_block_page`( + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'cms_block_page`( `id_cms_block_page` int(10) unsigned NOT NULL auto_increment, `id_cms_block` int(10) unsigned NOT NULL, `id_cms` int(10) unsigned NOT NULL, `is_category` tinyint(1) unsigned NOT NULL, PRIMARY KEY (`id_cms_block_page`) - ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'); - $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = \'FOOTER_CMS\''); + $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` = \'FOOTER_CMS\''); if ($exist) { - $res &= Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET value = "" WHERE `name` = \'FOOTER_CMS\''); + $res &= Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'configuration` SET value = "" WHERE `name` = \'FOOTER_CMS\''); } else { - $res &= Db::getInstance()->getValue('INSERT INTO `'._DB_PREFIX_.'configuration` (name, value) VALUES ("FOOTER_CMS", "")'); + $res &= Db::getInstance()->getValue('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (name, value) VALUES ("FOOTER_CMS", "")'); } - $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = \'FOOTER_BLOCK_ACTIVATION\''); + $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` = \'FOOTER_BLOCK_ACTIVATION\''); if ($exist) { - $res &= Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET value = "1" WHERE `name` = \'FOOTER_BLOCK_ACTIVATION\''); + $res &= Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'configuration` SET value = "1" WHERE `name` = \'FOOTER_BLOCK_ACTIVATION\''); } else { - $res &= Db::getInstance()->getValue('INSERT INTO `'._DB_PREFIX_.'configuration` (name, value) VALUES ("FOOTER_BLOCK_ACTIVATION", "1")'); + $res &= Db::getInstance()->getValue('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (name, value) VALUES ("FOOTER_BLOCK_ACTIVATION", "1")'); } - $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = \'FOOTER_POWEREDBY\''); + $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` = \'FOOTER_POWEREDBY\''); if ($exist) { - $res &= Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET value = "1" WHERE `name` = \'FOOTER_POWEREDBY\''); + $res &= Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'configuration` SET value = "1" WHERE `name` = \'FOOTER_POWEREDBY\''); } else { - $res &= Db::getInstance()->getValue('INSERT INTO `'._DB_PREFIX_.'configuration` (name, value) VALUES ("FOOTER_POWEREDBY", "1")'); + $res &= Db::getInstance()->getValue('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (name, value) VALUES ("FOOTER_POWEREDBY", "1")'); } - //add new block in new cms block - $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'cms_block` + //add new block in new cms block + $res &= Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'cms_block` (`id_cms_category`, `name`, `location`, `position`) VALUES( 1, "", 0, 0)'); $id_block = Db::getInstance()->Insert_ID(); foreach ($languages as $language) { - Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'cms_block_lang` (`id_cms_block`, `id_lang`, `name`) VALUES ('.(int)$id_block.', '.(int)$language['id_lang'].', \'Information\')'); + Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'cms_block_lang` (`id_cms_block`, `id_lang`, `name`) VALUES (' . (int) $id_block . ', ' . (int) $language['id_lang'] . ', \'Information\')'); } - //save ids cms of block information in new module cms bloc - foreach ($ids_cms as $id_cms) { - Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'cms_block_page` (`id_cms_block`, `id_cms`, `is_category`) VALUES ('.(int)$id_block.', '.(int)$id_cms['id_cms'].', 0)'); - } + //save ids cms of block information in new module cms bloc + foreach ($ids_cms as $id_cms) { + Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'cms_block_page` (`id_cms_block`, `id_cms`, `is_category`) VALUES (' . (int) $id_block . ', ' . (int) $id_cms['id_cms'] . ', 0)'); + } } else { return true; } diff --git a/upgrade/php/migrate_orders.php b/upgrade/php/migrate_orders.php index b6a0a53ca..ad928fcd6 100644 --- a/upgrade/php/migrate_orders.php +++ b/upgrade/php/migrate_orders.php @@ -23,10 +23,9 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function migrate_orders() { - $array_errors = array(); + $array_errors = []; $res = true; if (!defined('PS_TAX_EXC')) { define('PS_TAX_EXC', 1); @@ -36,7 +35,7 @@ function migrate_orders() define('PS_TAX_INC', 0); } - $col_order_detail_old = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'order_detail`'); + $col_order_detail_old = Db::getInstance()->executeS('SHOW FIELDS FROM `' . _DB_PREFIX_ . 'order_detail`'); foreach ($col_order_detail_old as $k => $field) { if ($field['Field'] != 'id_order_invoice') { $col_order_detail[$k] = $field['Field']; @@ -44,23 +43,23 @@ function migrate_orders() } if (!$col_order_detail_old) { - return array('error' => 1, 'msg' => 'unable to get fields list from order_detail table'); + return ['error' => 1, 'msg' => 'unable to get fields list from order_detail table']; } - $insert_order_detail = 'INSERT INTO `'._DB_PREFIX_.'order_detail_2` (`'.implode('`, `', $col_order_detail).'`) VALUES '; + $insert_order_detail = 'INSERT INTO `' . _DB_PREFIX_ . 'order_detail_2` (`' . implode('`, `', $col_order_detail) . '`) VALUES '; - $col_orders = array(); - $col_orders_old = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'orders`'); + $col_orders = []; + $col_orders_old = Db::getInstance()->executeS('SHOW FIELDS FROM `' . _DB_PREFIX_ . 'orders`'); if (!$col_orders_old) { - return array('error' => 1, 'msg' => 'unable to get fields list from orders table'); + return ['error' => 1, 'msg' => 'unable to get fields list from orders table']; } foreach ($col_orders_old as $k => $field) { $col_orders[$k] = $field['Field']; } - $insert_order = 'INSERT INTO `'._DB_PREFIX_.'orders_2` (`'.implode('`, `', $col_orders).'`) VALUES '; + $insert_order = 'INSERT INTO `' . _DB_PREFIX_ . 'orders_2` (`' . implode('`, `', $col_orders) . '`) VALUES '; // create temporary tables $res = mo_duplicateTables(); @@ -69,36 +68,36 @@ function migrate_orders() } // this was done like that previously - $wrapping_tax_rate = 1 + ((float)Db::getInstance()->getValue('SELECT value - FROM `'._DB_PREFIX_.'configuration` + $wrapping_tax_rate = 1 + ((float) Db::getInstance()->getValue('SELECT value + FROM `' . _DB_PREFIX_ . 'configuration` WHERE name = "PS_GIFT_WRAPPING_TAX"') / 100); $step = 3000; - $count_orders = Db::getInstance()->getValue('SELECT count(id_order) FROM '._DB_PREFIX_.'orders'); + $count_orders = Db::getInstance()->getValue('SELECT count(id_order) FROM ' . _DB_PREFIX_ . 'orders'); $nb_loop = $start = 0; if ($count_orders > 0) { $nb_loop = ceil($count_orders / $step); } - for ($i = 0; $i < $nb_loop; $i++) { - $order_res = Db::getInstance()->query('SELECT * FROM `'._DB_PREFIX_.'orders` LIMIT '.(int)$start.', '.(int)$step); - $start = (int) (($i+1) * $step); + for ($i = 0; $i < $nb_loop; ++$i) { + $order_res = Db::getInstance()->query('SELECT * FROM `' . _DB_PREFIX_ . 'orders` LIMIT ' . (int) $start . ', ' . (int) $step); + $start = (int) (($i + 1) * $step); $cpt = 0; $flush_limit = 200; while ($order = Db::getInstance()->nextRow($order_res)) { $sum_total_products = 0; $sum_tax_amount = 0; - $default_group_id = mo_getCustomerDefaultGroup((int)$order['id_customer']); - $price_display_method = mo_getPriceDisplayMethod((int)$default_group_id); + $default_group_id = mo_getCustomerDefaultGroup((int) $order['id_customer']); + $price_display_method = mo_getPriceDisplayMethod((int) $default_group_id); $order_details_list = Db::getInstance()->query(' SELECT od.* - FROM `'._DB_PREFIX_.'order_detail` od - WHERE od.`id_order` = '.(int)$order['id_order']); + FROM `' . _DB_PREFIX_ . 'order_detail` od + WHERE od.`id_order` = ' . (int) $order['id_order']); while ($order_details = Db::getInstance()->nextRow($order_details_list)) { // we don't want to erase order_details data in order to create the insert query $products = mo_setProductPrices($order_details, $price_display_method); - $tax_rate = 1 + ((float)$products['tax_rate'] / 100); - $reduction_amount_tax_incl = (float)$products['reduction_amount']; + $tax_rate = 1 + ((float) $products['tax_rate'] / 100); + $reduction_amount_tax_incl = (float) $products['reduction_amount']; // cart::getTaxesAverageUsed equivalent $sum_total_products += $products['total_price']; @@ -106,74 +105,74 @@ function migrate_orders() $sum_tax_amount += $products['total_wt'] - $products['total_price']; $order_details['reduction_amount_tax_incl'] = $reduction_amount_tax_incl; - $order_details['reduction_amount_tax_excl'] = (float)mo_ps_round($reduction_amount_tax_incl / $tax_rate); - $order_details['total_price_tax_incl'] = (float)$products['total_wt']; - $order_details['total_price_tax_excl'] = (float)$products['total_price']; - $order_details['unit_price_tax_incl'] = (float)$products['product_price_wt']; - $order_details['unit_price_tax_excl'] = (float)$products['product_price']; + $order_details['reduction_amount_tax_excl'] = (float) mo_ps_round($reduction_amount_tax_incl / $tax_rate); + $order_details['total_price_tax_incl'] = (float) $products['total_wt']; + $order_details['total_price_tax_excl'] = (float) $products['total_price']; + $order_details['unit_price_tax_incl'] = (float) $products['product_price_wt']; + $order_details['unit_price_tax_excl'] = (float) $products['product_price']; foreach (array_keys($order_details) as $k) { if (!in_array($k, $col_order_detail)) { unset($order_details[$k]); } else { - if (in_array($order_details[$k], array('product_price', 'reduction_percent', 'reduction_amount', 'group_reduction', 'product_quantity_discount', 'tax_rate', 'ecotax', 'ecotax_tax_rate'))) { - $order_details[$k] = (float)$order_details[$k]; + if (in_array($order_details[$k], ['product_price', 'reduction_percent', 'reduction_amount', 'group_reduction', 'product_quantity_discount', 'tax_rate', 'ecotax', 'ecotax_tax_rate'])) { + $order_details[$k] = (float) $order_details[$k]; } else { $order_details[$k] = Db::getInstance()->escape($order_details[$k]); } } } if (count($order_details)) { - $values_order_detail[] = '(\''.implode('\', \'', $order_details).'\')'; + $values_order_detail[] = '(\'' . implode('\', \'', $order_details) . '\')'; } unset($order_details); } $average_tax_used = 1; if ($sum_total_products > 0) { - $average_tax_used += $sum_tax_amount / $sum_total_products; + $average_tax_used += $sum_tax_amount / $sum_total_products; } $average_tax_used = round($average_tax_used, 4); $carrier_tax_rate = 1; if (isset($order['carrier_tax_rate'])) { - $carrier_tax_rate + ((float)$order['carrier_tax_rate'] / 100); + $carrier_tax_rate + ((float) $order['carrier_tax_rate'] / 100); } $total_discount_tax_excl = $order['total_discounts'] / $average_tax_used; - $order['total_discounts_tax_incl'] = (float)$order['total_discounts']; - $order['total_discounts_tax_excl'] = (float)$total_discount_tax_excl; + $order['total_discounts_tax_incl'] = (float) $order['total_discounts']; + $order['total_discounts_tax_excl'] = (float) $total_discount_tax_excl; - $order['total_shipping_tax_incl'] = (float)$order['total_shipping']; - $order['total_shipping_tax_excl'] = (float)($order['total_shipping'] / $carrier_tax_rate); + $order['total_shipping_tax_incl'] = (float) $order['total_shipping']; + $order['total_shipping_tax_excl'] = (float) ($order['total_shipping'] / $carrier_tax_rate); $shipping_taxes = $order['total_shipping_tax_incl'] - $order['total_shipping_tax_excl']; - $order['total_wrapping_tax_incl'] = (float)$order['total_wrapping']; - $order['total_wrapping_tax_excl'] = ((float)$order['total_wrapping'] / $wrapping_tax_rate); + $order['total_wrapping_tax_incl'] = (float) $order['total_wrapping']; + $order['total_wrapping_tax_excl'] = ((float) $order['total_wrapping'] / $wrapping_tax_rate); $wrapping_taxes = $order['total_wrapping_tax_incl'] - $order['total_wrapping_tax_excl']; $product_taxes = $order['total_products_wt'] - $order['total_products']; - $order['total_paid_tax_incl'] = (float)$order['total_paid']; - $order['total_paid_tax_excl'] = (float)$order['total_paid'] - $shipping_taxes - $wrapping_taxes - $product_taxes; + $order['total_paid_tax_incl'] = (float) $order['total_paid']; + $order['total_paid_tax_excl'] = (float) $order['total_paid'] - $shipping_taxes - $wrapping_taxes - $product_taxes; // protect text and varchar fields $order['gift_message'] = Db::getInstance()->escape($order['gift_message']); $order['payment'] = Db::getInstance()->escape($order['payment']); $order['module'] = Db::getInstance()->escape($order['module']); - $values_order[] = '(\''.implode('\', \'', $order).'\')'; + $values_order[] = '(\'' . implode('\', \'', $order) . '\')'; unset($order); - $cpt++; + ++$cpt; // limit to $cpt if ($cpt >= $flush_limit) { $cpt = 0; - if (isset($values_order_detail) && count($values_order_detail) && !Db::getInstance()->execute($insert_order_detail. implode(',', $values_order_detail))) { + if (isset($values_order_detail) && count($values_order_detail) && !Db::getInstance()->execute($insert_order_detail . implode(',', $values_order_detail))) { $res = false; - $array_errors[] = '[insert order detail 1] - '.Db::getInstance()->getMsgError(); + $array_errors[] = '[insert order detail 1] - ' . Db::getInstance()->getMsgError(); } - if (isset($values_order) && count($values_order) && !Db::getInstance()->execute($insert_order. implode(',', $values_order))) { + if (isset($values_order) && count($values_order) && !Db::getInstance()->execute($insert_order . implode(',', $values_order))) { $res = false; - $array_errors[] = '[insert order 2] - '.Db::getInstance()->getMsgError(); + $array_errors[] = '[insert order 2] - ' . Db::getInstance()->getMsgError(); } if (isset($values_order)) { unset($values_order); @@ -185,13 +184,13 @@ function migrate_orders() } } - if (isset($values_order_detail) && count($values_order_detail) && !Db::getInstance()->execute($insert_order_detail. implode(',', $values_order_detail))) { + if (isset($values_order_detail) && count($values_order_detail) && !Db::getInstance()->execute($insert_order_detail . implode(',', $values_order_detail))) { $res = false; - $array_errors[] = '[insert order detail 3] - '.Db::getInstance()->getMsgError(); + $array_errors[] = '[insert order detail 3] - ' . Db::getInstance()->getMsgError(); } - if (isset($values_order) && count($values_order) && !Db::getInstance()->execute($insert_order. implode(',', $values_order))) { + if (isset($values_order) && count($values_order) && !Db::getInstance()->execute($insert_order . implode(',', $values_order))) { $res = false; - $array_errors[] = '[insert order 4] - '.Db::getInstance()->getMsgError(); + $array_errors[] = '[insert order 4] - ' . Db::getInstance()->getMsgError(); } if (isset($values_order)) { unset($values_order); @@ -205,7 +204,7 @@ function migrate_orders() } if (!$res) { - return array('error' => 1, 'msg' => count($array_errors).' error(s) :
'.implode('
', $array_errors)); + return ['error' => 1, 'msg' => count($array_errors) . ' error(s) :
' . implode('
', $array_errors)]; } } @@ -215,6 +214,7 @@ function migrate_orders() * - no call to Configuration class * * @param mixed $val + * * @return void */ function mo_ps_round($val) @@ -222,15 +222,15 @@ function mo_ps_round($val) static $ps_price_round_mode; if (empty($ps_price_round_mode)) { $ps_price_round_mode = Db::getInstance()->getValue('SELECT value - FROM `'._DB_PREFIX_.'configuration` + FROM `' . _DB_PREFIX_ . 'configuration` WHERE name = "PS_PRICE_ROUND_MODE"'); } switch ($ps_price_round_mode) { case 0: - return ceil($val * 100)/100; + return ceil($val * 100) / 100; case 1: - return floor($val * 100)/100; + return floor($val * 100) / 100; default: return round($val, 2); } @@ -240,9 +240,9 @@ function mo_duplicateTables() { $res = true; $res &= Db::getInstance()->execute('CREATE TABLE - `'._DB_PREFIX_.'orders_2` LIKE `'._DB_PREFIX_.'orders`'); + `' . _DB_PREFIX_ . 'orders_2` LIKE `' . _DB_PREFIX_ . 'orders`'); $res &= Db::getInstance()->execute('CREATE TABLE - `'._DB_PREFIX_.'order_detail_2` LIKE `'._DB_PREFIX_.'order_detail`'); + `' . _DB_PREFIX_ . 'order_detail_2` LIKE `' . _DB_PREFIX_ . 'order_detail`'); return $res; } @@ -250,11 +250,11 @@ function mo_duplicateTables() function mo_renameTables() { $res = true; - $res &= Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'orders`'); - $res &= Db::getInstance()->execute('DROP TABLE `'._DB_PREFIX_.'order_detail`'); + $res &= Db::getInstance()->execute('DROP TABLE `' . _DB_PREFIX_ . 'orders`'); + $res &= Db::getInstance()->execute('DROP TABLE `' . _DB_PREFIX_ . 'order_detail`'); - $res &= Db::getInstance()->execute('RENAME TABLE `'._DB_PREFIX_.'orders_2` TO `'._DB_PREFIX_.'orders`'); - $res &= Db::getInstance()->execute('RENAME TABLE `'._DB_PREFIX_.'order_detail_2` TO `'._DB_PREFIX_.'order_detail`'); + $res &= Db::getInstance()->execute('RENAME TABLE `' . _DB_PREFIX_ . 'orders_2` TO `' . _DB_PREFIX_ . 'orders`'); + $res &= Db::getInstance()->execute('RENAME TABLE `' . _DB_PREFIX_ . 'order_detail_2` TO `' . _DB_PREFIX_ . 'order_detail`'); return $res; } @@ -263,7 +263,7 @@ function mo_getCustomerDefaultGroup($id_customer) { static $cache; if (!isset($cache[$id_customer])) { - $cache[$id_customer] = Db::getInstance()->getValue('SELECT `id_default_group` FROM `'._DB_PREFIX_.'customer` WHERE `id_customer` = '.(int)$id_customer); + $cache[$id_customer] = Db::getInstance()->getValue('SELECT `id_default_group` FROM `' . _DB_PREFIX_ . 'customer` WHERE `id_customer` = ' . (int) $id_customer); } return $cache[$id_customer]; @@ -276,8 +276,8 @@ function mo_getPriceDisplayMethod($id_group) if (!isset($cache[$id_group])) { $cache[$id_group] = Db::getInstance()->getValue(' SELECT `price_display_method` - FROM `'._DB_PREFIX_.'group` - WHERE `id_group` = '.(int)$id_group); + FROM `' . _DB_PREFIX_ . 'group` + WHERE `id_group` = ' . (int) $id_group); } return $cache[$id_group]; @@ -293,7 +293,7 @@ function mo_setProductPrices($row, $tax_calculation_method) $group_reduction = 1; if ($row['group_reduction'] > 0) { - $group_reduction = 1 - $row['group_reduction'] / 100; + $group_reduction = 1 - $row['group_reduction'] / 100; } if ($row['reduction_percent'] != 0) { diff --git a/upgrade/php/migrate_tabs_15.php b/upgrade/php/migrate_tabs_15.php index db3bb9710..602578897 100644 --- a/upgrade/php/migrate_tabs_15.php +++ b/upgrade/php/migrate_tabs_15.php @@ -29,10 +29,10 @@ */ function migrate_tabs_15() { - include_once __DIR__.'/add_new_tab.php'; + include_once __DIR__ . '/add_new_tab.php'; // ===== Remove deleted tabs ===== - $remove_tabs = array( + $remove_tabs = [ 'AdminAliases', 'AdminContact', 'AdminDb', @@ -40,9 +40,9 @@ function migrate_tabs_15() 'AdminPdf', 'AdminSubDomains', 'AdminStatsConf', - ); + ]; - $ids = array(); + $ids = []; foreach ($remove_tabs as $tab) { if ($id = get_tab_id($tab)) { $ids[] = $id; @@ -50,29 +50,29 @@ function migrate_tabs_15() } if ($ids) { - Db::getInstance()->delete('tab', 'id_tab IN ('.implode(', ', $ids).')'); - Db::getInstance()->delete('tab_lang', 'id_tab IN ('.implode(', ', $ids).')'); + Db::getInstance()->delete('tab', 'id_tab IN (' . implode(', ', $ids) . ')'); + Db::getInstance()->delete('tab_lang', 'id_tab IN (' . implode(', ', $ids) . ')'); } // ===== Create new parent tabs ===== - $parent = array( - 'AdminCatalog' => get_tab_id('AdminCatalog'), - 'AdminParentOrders' => add_new_tab('AdminParentOrders', 'en:Orders|fr:Commandes|es:Pedidos|de:Bestellungen|it:Ordini', 0, true), - 'AdminParentCustomer' => add_new_tab('AdminParentCustomer', 'en:Customers|fr:Clients|es:Clientes|de:Kunden|it:Clienti', 0, true), - 'AdminPriceRule' => add_new_tab('AdminPriceRule', 'en:Price rules|fr:Promotions|es:Price rules|de:Price rules|it:Price rules', 0, true), - 'AdminParentShipping' => add_new_tab('AdminParentShipping', 'en:Shipping|fr:Transport|es:Transporte|de:Versandkosten|it:Spedizione', 0, true), - 'AdminParentLocalization' =>add_new_tab('AdminParentLocalization', 'en:Localization|fr:Localisation|es:Ubicación|de:Lokalisierung|it:Localizzazione', 0, true), - 'AdminParentModules' => add_new_tab('AdminParentModules', 'en:Modules|fr:Modules|es:Módulos|de:Module|it:Moduli', 0, true), + $parent = [ + 'AdminCatalog' => get_tab_id('AdminCatalog'), + 'AdminParentOrders' => add_new_tab('AdminParentOrders', 'en:Orders|fr:Commandes|es:Pedidos|de:Bestellungen|it:Ordini', 0, true), + 'AdminParentCustomer' => add_new_tab('AdminParentCustomer', 'en:Customers|fr:Clients|es:Clientes|de:Kunden|it:Clienti', 0, true), + 'AdminPriceRule' => add_new_tab('AdminPriceRule', 'en:Price rules|fr:Promotions|es:Price rules|de:Price rules|it:Price rules', 0, true), + 'AdminParentShipping' => add_new_tab('AdminParentShipping', 'en:Shipping|fr:Transport|es:Transporte|de:Versandkosten|it:Spedizione', 0, true), + 'AdminParentLocalization' => add_new_tab('AdminParentLocalization', 'en:Localization|fr:Localisation|es:Ubicación|de:Lokalisierung|it:Localizzazione', 0, true), + 'AdminParentModules' => add_new_tab('AdminParentModules', 'en:Modules|fr:Modules|es:Módulos|de:Module|it:Moduli', 0, true), 'AdminParentPreferences' => add_new_tab('AdminParentPreferences', 'en:Preferences|fr:Préférences|es:Preferencias|de:Voreinstellungen|it:Preferenze', 0, true), - 'AdminTools' => get_tab_id('AdminTools'), - 'AdminAdmin' => add_new_tab('AdminAdmin', 'en:Administration|fr:Administration|es:Administration|de:Administration|it:Administration', 0, true), - 'AdminParentStats' => add_new_tab('AdminParentStats', 'en:Stats|fr:Stats|es:Estadísticas|de:Statistik|it:Stat', 0, true), - 'AdminParentShop' => add_new_tab('AdminParentShop', 'en:Shops|fr:Boutiques|es:Shops|de:Shops|it:Shops', 0, true), - 'AdminStock' => get_tab_id('AdminStock'), - ); + 'AdminTools' => get_tab_id('AdminTools'), + 'AdminAdmin' => add_new_tab('AdminAdmin', 'en:Administration|fr:Administration|es:Administration|de:Administration|it:Administration', 0, true), + 'AdminParentStats' => add_new_tab('AdminParentStats', 'en:Stats|fr:Stats|es:Estadísticas|de:Statistik|it:Stat', 0, true), + 'AdminParentShop' => add_new_tab('AdminParentShop', 'en:Shops|fr:Boutiques|es:Shops|de:Shops|it:Shops', 0, true), + 'AdminStock' => get_tab_id('AdminStock'), + ]; // ===== Move tabs from old parents to new parents ===== - $move_association = array( + $move_association = [ 'AdminParentOrders' => 'AdminOrders', 'AdminParentCustomer' => 'AdminCustomers', 'AdminParentShipping' => 'AdminShipping', @@ -82,7 +82,7 @@ function migrate_tabs_15() 'AdminAdmin' => 'AdminEmployees', 'AdminParentStats' => 'AdminStats', 'AdminParentShop' => 'AdminShop', - ); + ]; foreach ($move_association as $to => $from) { if (empty($parent[$to])) { @@ -92,16 +92,16 @@ function migrate_tabs_15() $id_parent = get_tab_id($from); if ($id_parent) { Db::getInstance()->execute(' - UPDATE '._DB_PREFIX_.'tab - SET id_parent = '.$parent[$to].' - WHERE id_parent = '.$id_parent.' - OR id_tab = '.$id_parent.' + UPDATE ' . _DB_PREFIX_ . 'tab + SET id_parent = ' . $parent[$to] . ' + WHERE id_parent = ' . $id_parent . ' + OR id_tab = ' . $id_parent . ' '); } } // ===== Move tabs to their new parents ===== - $move_to = array( + $move_to = [ 'AdminContacts' => 'AdminParentCustomer', 'AdminCustomerThreads' => 'AdminParentCustomer', 'AdminCurrencies' => 'AdminParentLocalization', @@ -123,7 +123,7 @@ function migrate_tabs_15() 'AdminAccountingConfiguration' => 'AdminTools', 'AdminAccountingRegisteredNumber' => 'AdminTools', 'AdminAccountingExport' => 'AdminStats', - ); + ]; foreach ($move_to as $from => $to) { if (empty($parent[$to])) { @@ -133,23 +133,23 @@ function migrate_tabs_15() $id_tab = get_tab_id($from); if ($id_tab) { Db::getInstance()->execute(' - UPDATE '._DB_PREFIX_.'tab - SET id_parent = '.$parent[$to].' - WHERE id_tab = '.$id_tab.' + UPDATE ' . _DB_PREFIX_ . 'tab + SET id_parent = ' . $parent[$to] . ' + WHERE id_tab = ' . $id_tab . ' '); } } // ===== Remove AdminThemes from Modules parent ===== $id_tab_theme = Db::getInstance()->getValue( - 'SELECT id_tab FROM '._DB_PREFIX_.'tab + 'SELECT id_tab FROM ' . _DB_PREFIX_ . 'tab WHERE class_name = \'AdminThemes\' - AND id_parent = '.$parent['AdminParentModules'].' + AND id_parent = ' . $parent['AdminParentModules'] . ' ' ); if ($id_tab_theme) { - Db::getInstance()->delete('tab', 'id_tab = '.$id_tab_theme); + Db::getInstance()->delete('tab', 'id_tab = ' . $id_tab_theme); } // ===== Create new tabs (but not parents this time) ===== @@ -161,27 +161,27 @@ function migrate_tabs_15() // ===== Sort parent tabs ===== $position = 0; foreach ($parent as $id) { - Db::getInstance()->update('tab', array('position' => $position++), 'id_tab = '.(int)$id); + Db::getInstance()->update('tab', ['position' => $position++], 'id_tab = ' . (int) $id); } - $sql = 'SELECT id_tab FROM '._DB_PREFIX_.'tab - WHERE id_tab NOT IN ('.implode(', ', $parent).') + $sql = 'SELECT id_tab FROM ' . _DB_PREFIX_ . 'tab + WHERE id_tab NOT IN (' . implode(', ', $parent) . ') AND id_parent = 0'; $id_tabs = Db::getInstance()->executeS($sql); if (is_array($id_tabs) && count($id_tabs)) { foreach (Db::getInstance()->executeS($sql) as $row) { - Db::getInstance()->update('tab', array('position' => $position++), 'id_tab = '.$row['id_tab']); + Db::getInstance()->update('tab', ['position' => $position++], 'id_tab = ' . $row['id_tab']); } } } function get_tab_id($class_name) { - static $cache = array(); + static $cache = []; if (!isset($cache[$class_name])) { - $cache[$class_name] = Db::getInstance()->getValue('SELECT id_tab FROM '._DB_PREFIX_.'tab WHERE class_name = \''.pSQL($class_name).'\''); + $cache[$class_name] = Db::getInstance()->getValue('SELECT id_tab FROM ' . _DB_PREFIX_ . 'tab WHERE class_name = \'' . pSQL($class_name) . '\''); } return $cache[$class_name]; diff --git a/upgrade/php/migrate_tabs_17.php b/upgrade/php/migrate_tabs_17.php index 560987820..141b71b9e 100644 --- a/upgrade/php/migrate_tabs_17.php +++ b/upgrade/php/migrate_tabs_17.php @@ -33,26 +33,26 @@ */ function migrate_tabs_17() { - include_once __DIR__.'/add_new_tab.php'; + include_once __DIR__ . '/add_new_tab.php'; /* first make some room for new tabs */ $moduleTabs = Db::getInstance()->executeS( - 'SELECT id_parent FROM '._DB_PREFIX_.'tab WHERE module IS NOT NULL AND module != "" ORDER BY id_tab ASC' + 'SELECT id_parent FROM ' . _DB_PREFIX_ . 'tab WHERE module IS NOT NULL AND module != "" ORDER BY id_tab ASC' ); - $moduleParents = array(); + $moduleParents = []; foreach ($moduleTabs as $tab) { $idParent = $tab['id_parent']; - $moduleParents[$idParent] = Db::getInstance()->getValue('SELECT class_name FROM '._DB_PREFIX_.'tab WHERE id_tab='.$idParent); + $moduleParents[$idParent] = Db::getInstance()->getValue('SELECT class_name FROM ' . _DB_PREFIX_ . 'tab WHERE id_tab=' . $idParent); } /* delete the old structure */ Db::getInstance()->execute( - 'DELETE t, tl FROM '._DB_PREFIX_.'tab t JOIN '._DB_PREFIX_.'tab_lang tl ON (t.id_tab=tl.id_tab) WHERE module IS NULL OR module = ""' + 'DELETE t, tl FROM ' . _DB_PREFIX_ . 'tab t JOIN ' . _DB_PREFIX_ . 'tab_lang tl ON (t.id_tab=tl.id_tab) WHERE module IS NULL OR module = ""' ); - $defaultLanguage = new Language((int)Configuration::get('PS_LANG_DEFAULT')); + $defaultLanguage = new Language((int) Configuration::get('PS_LANG_DEFAULT')); $languageList = LanguageList::getInstance(); $languageList->setLanguage($defaultLanguage->iso_code); @@ -65,10 +65,10 @@ function migrate_tabs_17() } /* update remaining idParent */ - foreach($moduleParents as $idParent => $className) { + foreach ($moduleParents as $idParent => $className) { if (!empty($className)) { - $idTab = Db::getInstance()->getValue('SELECT id_tab FROM '._DB_PREFIX_.'tab WHERE class_name="'.pSQL($className).'"'); - Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'tab SET id_parent='.(int)$idTab.' WHERE id_parent='.(int)$idParent); + $idTab = Db::getInstance()->getValue('SELECT id_tab FROM ' . _DB_PREFIX_ . 'tab WHERE class_name="' . pSQL($className) . '"'); + Db::getInstance()->execute('UPDATE ' . _DB_PREFIX_ . 'tab SET id_parent=' . (int) $idTab . ' WHERE id_parent=' . (int) $idParent); } } @@ -99,7 +99,7 @@ function populateTab() class XmlLoader1700 extends XmlLoader { - public function createEntityTab($identifier, array $data, array $data_lang): void + public function createEntityTab($identifier, array $data, array $data_lang) { if (isset($data['enabled'])) { unset($data['enabled']); diff --git a/upgrade/php/migrate_tabs_multi_shop.php b/upgrade/php/migrate_tabs_multi_shop.php index c5021b7bd..2e9b38f05 100755 --- a/upgrade/php/migrate_tabs_multi_shop.php +++ b/upgrade/php/migrate_tabs_multi_shop.php @@ -29,28 +29,28 @@ */ function migrate_tabs_multi_shop() { - include_once __DIR__.'/add_new_tab.php'; - include_once __DIR__.'/migrate_tabs_15.php'; + include_once __DIR__ . '/add_new_tab.php'; + include_once __DIR__ . '/migrate_tabs_15.php'; - $nbr_shop = Db::getInstance()->getValue('SELECT count(id_shop) FROM '._DB_PREFIX_.'shop'); + $nbr_shop = Db::getInstance()->getValue('SELECT count(id_shop) FROM ' . _DB_PREFIX_ . 'shop'); $tab_shop_group_active = false; //check if current configuration has more than one shop if ($nbr_shop > 1) { - Db::getInstance()->update('configuration', array('value' => true), 'name = \'PS_MULTISHOP_FEATURE_ACTIVE\''); + Db::getInstance()->update('configuration', ['value' => true], 'name = \'PS_MULTISHOP_FEATURE_ACTIVE\''); $tab_shop_group_active = true; } // ===== remove AdminParentShop from BO menu ===== $admin_parent_shop_id = get_tab_id('AdminParentShop'); $admin_shop_group_id = get_tab_id('AdminShopGroup'); - Db::getInstance()->delete('tab', 'id_tab IN ('.(int)$admin_shop_group_id.', '.(int)$admin_parent_shop_id.')'); - Db::getInstance()->delete('tab_lang', 'id_tab IN ('.(int)$admin_shop_group_id.', '.(int)$admin_parent_shop_id.')'); + Db::getInstance()->delete('tab', 'id_tab IN (' . (int) $admin_shop_group_id . ', ' . (int) $admin_parent_shop_id . ')'); + Db::getInstance()->delete('tab_lang', 'id_tab IN (' . (int) $admin_shop_group_id . ', ' . (int) $admin_parent_shop_id . ')'); // ===== add AdminShopGroup to parent AdminTools ===== $admin_shop_group_id = add_new_tab('AdminShopGroup', 'en:Multi-shop|fr:Multiboutique|es:Multi-tienda|de:Multi-shop|it:Multi-shop', get_tab_id('AdminTools'), true); - Db::getInstance()->update('tab', array('active' => $tab_shop_group_active), 'id_tab = '.(int)$admin_shop_group_id); + Db::getInstance()->update('tab', ['active' => $tab_shop_group_active], 'id_tab = ' . (int) $admin_shop_group_id); // ===== hide AdminShopUrl and AdminShop ===== - Db::getInstance()->update('tab', array('id_parent' => '-1'), 'id_tab IN ('.get_tab_id('AdminShop').', '.get_tab_id('AdminShopUrl').')'); + Db::getInstance()->update('tab', ['id_parent' => '-1'], 'id_tab IN (' . get_tab_id('AdminShop') . ', ' . get_tab_id('AdminShopUrl') . ')'); } diff --git a/upgrade/php/module_blockwishlist_multishop.php b/upgrade/php/module_blockwishlist_multishop.php index 68376e560..bca673be0 100644 --- a/upgrade/php/module_blockwishlist_multishop.php +++ b/upgrade/php/module_blockwishlist_multishop.php @@ -23,12 +23,11 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function module_blockwishlist_multishop() { - $id_module = Db::getInstance()->getValue('SELECT id_module FROM '._DB_PREFIX_.'module where name="blockwishlist"'); + $id_module = Db::getInstance()->getValue('SELECT id_module FROM ' . _DB_PREFIX_ . 'module where name="blockwishlist"'); if ($id_module) { - $res = Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'wishlist` + $res = Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'wishlist` ADD `id_shop` INTEGER NOT NULL default \'1\' AFTER `counter`, ADD `id_group_shop` INTEGER NOT NULL default \'1\' AFTER `id_shop`'); diff --git a/upgrade/php/module_reinstall_blockmyaccount.php b/upgrade/php/module_reinstall_blockmyaccount.php index 52637ceb0..90b9f385f 100644 --- a/upgrade/php/module_reinstall_blockmyaccount.php +++ b/upgrade/php/module_reinstall_blockmyaccount.php @@ -23,23 +23,22 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function module_reinstall_blockmyaccount() { $res = true; - $id_module = Db::getInstance()->getValue('SELECT id_module FROM '._DB_PREFIX_.'module where name="blockmyaccount"'); + $id_module = Db::getInstance()->getValue('SELECT id_module FROM ' . _DB_PREFIX_ . 'module where name="blockmyaccount"'); if ($id_module) { - $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'hook` + $res &= Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'hook` (`name`, `title`, `description`, `position`) VALUES ("displayMyAccountBlock", "My account block", "Display extra informations inside the \"my account\" block", 1)'); // register left column, and header, and addmyaccountblockhook - $hooks = array('leftColumn', 'header'); + $hooks = ['leftColumn', 'header']; foreach ($hooks as $hook_name) { // do not pSql hook_name - $row = Db::getInstance()->getRow('SELECT h.id_hook, '.$id_module.' as id_module, MAX(hm.position)+1 as position - FROM `'._DB_PREFIX_.'hook_module` hm - LEFT JOIN `'._DB_PREFIX_.'hook` h on hm.id_hook=h.id_hook - WHERE h.name = "'.$hook_name.'" group by id_hook'); + $row = Db::getInstance()->getRow('SELECT h.id_hook, ' . $id_module . ' as id_module, MAX(hm.position)+1 as position + FROM `' . _DB_PREFIX_ . 'hook_module` hm + LEFT JOIN `' . _DB_PREFIX_ . 'hook` h on hm.id_hook=h.id_hook + WHERE h.name = "' . $hook_name . '" group by id_hook'); $res &= Db::getInstance()->insert('hook_module', $row); } diff --git a/upgrade/php/module_reinstall_blocksearch.php b/upgrade/php/module_reinstall_blocksearch.php index 317c8537e..cade51814 100644 --- a/upgrade/php/module_reinstall_blocksearch.php +++ b/upgrade/php/module_reinstall_blocksearch.php @@ -23,23 +23,22 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function module_reinstall_blocksearch() { $res = true; - $id_module = Db::getInstance()->getValue('SELECT id_module FROM '._DB_PREFIX_.'module where name="blocksearch"'); + $id_module = Db::getInstance()->getValue('SELECT id_module FROM ' . _DB_PREFIX_ . 'module where name="blocksearch"'); if ($id_module) { - $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'hook` + $res &= Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'hook` (`name`, `title`, `description`, `position`) VALUES ("displayMyAccountBlock", "My account block", "Display extra informations inside the \"my account\" block", 1)'); // register left column, and header, and addmyaccountblockhook - $hooks = array('top', 'header'); + $hooks = ['top', 'header']; foreach ($hooks as $hook_name) { // do not pSql hook_name - $row = Db::getInstance()->getRow('SELECT h.id_hook, '.$id_module.' as id_module, MAX(hm.position)+1 as position - FROM `'._DB_PREFIX_.'hook_module` hm - LEFT JOIN `'._DB_PREFIX_.'hook` h on hm.id_hook=h.id_hook - WHERE h.name = "'.$hook_name.'" group by id_hook'); + $row = Db::getInstance()->getRow('SELECT h.id_hook, ' . $id_module . ' as id_module, MAX(hm.position)+1 as position + FROM `' . _DB_PREFIX_ . 'hook_module` hm + LEFT JOIN `' . _DB_PREFIX_ . 'hook` h on hm.id_hook=h.id_hook + WHERE h.name = "' . $hook_name . '" group by id_hook'); $res &= Db::getInstance()->insert('hook_module', $row); } diff --git a/upgrade/php/move_crossselling.php b/upgrade/php/move_crossselling.php index 3203f55f7..5a48c6e34 100644 --- a/upgrade/php/move_crossselling.php +++ b/upgrade/php/move_crossselling.php @@ -23,12 +23,11 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function move_crossselling() { - if (Db::getInstance()->executeS('SELECT FROM `'._DB_PREFIX_.'module` WHERE `name` = \'crossselling\'')) { + if (Db::getInstance()->executeS('SELECT FROM `' . _DB_PREFIX_ . 'module` WHERE `name` = \'crossselling\'')) { Db::getInstance()->execute(' -INSERT INTO `'._DB_PREFIX_.'hook_module` (`id_module`, `id_hook`, `position`) -VALUES ((SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name` = \'crossselling\'), 9, (SELECT max_position FROM (SELECT MAX(position)+1 as max_position FROM `'._DB_PREFIX_.'hook_module` WHERE `id_hook` = 9) tmp))'); +INSERT INTO `' . _DB_PREFIX_ . 'hook_module` (`id_module`, `id_hook`, `position`) +VALUES ((SELECT `id_module` FROM `' . _DB_PREFIX_ . 'module` WHERE `name` = \'crossselling\'), 9, (SELECT max_position FROM (SELECT MAX(position)+1 as max_position FROM `' . _DB_PREFIX_ . 'hook_module` WHERE `id_hook` = 9) tmp))'); } } diff --git a/upgrade/php/move_translations_module_file.php b/upgrade/php/move_translations_module_file.php index e6ae5b52b..cb70f7ea9 100644 --- a/upgrade/php/move_translations_module_file.php +++ b/upgrade/php/move_translations_module_file.php @@ -33,29 +33,29 @@ function move_translations_module_file() // Get all languages $languages = Db::getInstance()->executeS(' SELECT * - FROM `'._DB_PREFIX_.'lang` + FROM `' . _DB_PREFIX_ . 'lang` '); // Get the list of modules $modules = scandir(_PS_MODULE_DIR_, SCANDIR_SORT_NONE); - $error_list = array(); + $error_list = []; // Scan all modules and check if translation file exists foreach ($modules as $module_name) { // Check if is a good module - if (in_array($module_name, array('.', '..', '.svn', '.htaccess', 'index.php', 'autoupgrade')) || !is_dir(_PS_MODULE_DIR_.'/'.$module_name)) { + if (in_array($module_name, ['.', '..', '.svn', '.htaccess', 'index.php', 'autoupgrade']) || !is_dir(_PS_MODULE_DIR_ . '/' . $module_name)) { continue; } foreach ($languages as $lang) { // Name for the old file and the new file - $old_file = _PS_MODULE_DIR_.$module_name.'/'.$lang['iso_code'].'.php'; + $old_file = _PS_MODULE_DIR_ . $module_name . '/' . $lang['iso_code'] . '.php'; if (!@file_exists($old_file)) { continue; } - $dir_translations = _PS_MODULE_DIR_.$module_name.'/translations/'; - $new_file = $dir_translations.$lang['iso_code'].'.php'; + $dir_translations = _PS_MODULE_DIR_ . $module_name . '/translations/'; + $new_file = $dir_translations . $lang['iso_code'] . '.php'; // Create folder if no exist if (!is_dir($dir_translations)) { @@ -63,14 +63,14 @@ function move_translations_module_file() } if (!@rename($old_file, $new_file)) { - $error_list[] = $module_name.' - '.$lang['iso_code']."
\r\n"; + $error_list[] = $module_name . ' - ' . $lang['iso_code'] . "
\r\n"; $res &= false; } } } - if (!$res||(count($error_list)>0)) { - return array('error' => 1, 'msg' => implode("\r\n
", $error_list)); + if (!$res || (count($error_list) > 0)) { + return ['error' => 1, 'msg' => implode("\r\n
", $error_list)]; } else { return true; } diff --git a/upgrade/php/outstanding_allow_amount1530.php b/upgrade/php/outstanding_allow_amount1530.php index be67c7415..472c40db3 100644 --- a/upgrade/php/outstanding_allow_amount1530.php +++ b/upgrade/php/outstanding_allow_amount1530.php @@ -23,19 +23,18 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function outstanding_allow_amount1530() { - $column_exist = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'address`'); - $column_formated = array(); + $column_exist = Db::getInstance()->executeS('SHOW FIELDS FROM `' . _DB_PREFIX_ . 'address`'); + $column_formated = []; $res = true; if ($column_exist) { foreach ($column_exist as $c) { - $column_formated[] = $c['Field'] ; + $column_formated[] = $c['Field']; } if (in_array('outstanding_allow_amount', $column_formated)) { - Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'address` CHANGE `outstanding_allow_amount` `outstanding_allow_amount` DECIMAL(20, 6) NOT NULL DEFAULT 0.000000'); + Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'address` CHANGE `outstanding_allow_amount` `outstanding_allow_amount` DECIMAL(20, 6) NOT NULL DEFAULT 0.000000'); } } diff --git a/upgrade/php/p15010_drop_column_id_address_if_exists.php b/upgrade/php/p15010_drop_column_id_address_if_exists.php index 0af99d9d9..ada3e2a4c 100644 --- a/upgrade/php/p15010_drop_column_id_address_if_exists.php +++ b/upgrade/php/p15010_drop_column_id_address_if_exists.php @@ -23,19 +23,18 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function p15010_drop_column_id_address_if_exists() { $res = true; - $exists = Db::getInstance()->executeS('SHOW TABLES LIKE "'._DB_PREFIX_.'supplier"'); + $exists = Db::getInstance()->executeS('SHOW TABLES LIKE "' . _DB_PREFIX_ . 'supplier"'); if (count($exists)) { - $fields = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'supplier`'); + $fields = Db::getInstance()->executeS('SHOW FIELDS FROM `' . _DB_PREFIX_ . 'supplier`'); foreach ($fields as $k => $field) { $fields[$k] = $field['Field']; } if (in_array('id_address', $fields)) { - $res &= Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'supplier` + $res &= Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'supplier` DROP `id_address`'); } } diff --git a/upgrade/php/p15012_add_missing_columns.php b/upgrade/php/p15012_add_missing_columns.php index 685d807a7..39fabc7f5 100755 --- a/upgrade/php/p15012_add_missing_columns.php +++ b/upgrade/php/p15012_add_missing_columns.php @@ -23,142 +23,141 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function p15012_add_missing_columns() { - $errors = array(); + $errors = []; $db = Db::getInstance(); - $q_list = array(); + $q_list = []; // columns must exists - $q_list['carrier']['id_reference']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'carrier` + $q_list['carrier']['id_reference']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'carrier` CHANGE `id_reference` `id_reference` int(10) unsigned NOT NULL'; - $q_list['carrier']['id_reference']['add'] = 'ALTER TABLE `'._DB_PREFIX_.'carrier` + $q_list['carrier']['id_reference']['add'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'carrier` ADD `id_reference` int(10) unsigned NOT NULL'; - $q_list['carrier']['id_tax_rules_group']['add'] = 'ALTER TABLE `'._DB_PREFIX_.'carrier` + $q_list['carrier']['id_tax_rules_group']['add'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'carrier` ADD `id_tax_rules_group` INT(10) unsigned DEFAULT "0" AFTER `id_reference`'; - $q_list['cart']['order_reference']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'cart` + $q_list['cart']['order_reference']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'cart` DROP COLUMN `order_reference`'; - $q_list['cart']['id_shop_group']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'cart` + $q_list['cart']['id_shop_group']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'cart` CHANGE `id_shop_group` `id_shop_group` int(11) unsigned NOT NULL DEFAULT "1"'; - $q_list['cart']['id_shop_group']['add'] = 'ALTER TABLE `'._DB_PREFIX_.'cart` + $q_list['cart']['id_shop_group']['add'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'cart` ADD `id_shop_group` int(11) unsigned NOT NULL DEFAULT "1"'; - $q_list['cart_product']['id_shop']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'cart_product` + $q_list['cart_product']['id_shop']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'cart_product` CHANGE `id_shop` `id_shop` int(10) unsigned NOT NULL DEFAULT "1" AFTER `id_address_delivery`'; - $q_list['cart_product']['id_shop']['add'] = 'ALTER TABLE `'._DB_PREFIX_.'cart_product` + $q_list['cart_product']['id_shop']['add'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'cart_product` ADD `id_shop` int(10) unsigned NOT NULL DEFAULT "1" AFTER `id_address_delivery`'; - $q_list['cart_product']['id_product_attribute']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'cart_product` + $q_list['cart_product']['id_product_attribute']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'cart_product` CHANGE `id_product_attribute` `id_product_attribute` int(10) unsigned DEFAULT NULL AFTER `id_shop`'; - $q_list['cart_product']['id_product_attribute']['add'] = 'ALTER TABLE `'._DB_PREFIX_.'cart_product` + $q_list['cart_product']['id_product_attribute']['add'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'cart_product` ADD `id_product_attribute` int(10) unsigned DEFAULT NULL AFTER `id_shop`'; - $q_list['cart_rule_product_rule']['quantity']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'cart_rule_product_rule` + $q_list['cart_rule_product_rule']['quantity']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'cart_rule_product_rule` DROP COLUMN `quantity`'; - $q_list['connections']['id_shop_group']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'connections` + $q_list['connections']['id_shop_group']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'connections` CHANGE id_shop_group `id_shop_group` int(11) unsigned NOT NULL DEFAULT "1" AFTER id_connections'; - $q_list['country']['display_tax_label']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'country` + $q_list['country']['display_tax_label']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'country` CHANGE display_tax_label `display_tax_label` tinyint(1) NOT NULL AFTER zip_code_format'; - $q_list['currency']['active']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'currency` + $q_list['currency']['active']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'currency` CHANGE active active tinyint(1) unsigned NOT NULL DEFAULT "1"'; - $q_list['customer']['id_shop_group']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'customer` + $q_list['customer']['id_shop_group']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'customer` CHANGE id_shop_group id_shop_group int(11) unsigned NOT NULL DEFAULT "1"'; - $q_list['employee']['bo_uimode']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'employee` + $q_list['employee']['bo_uimode']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'employee` DROP `bo_uimode`'; - $q_list['meta_lang']['url_rewrite']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'meta_lang` + $q_list['meta_lang']['url_rewrite']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'meta_lang` CHANGE url_rewrite url_rewrite varchar(254) NOT NULL'; - $q_list['order_detail']['id_warehouse']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_detail` + $q_list['order_detail']['id_warehouse']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'order_detail` CHANGE `id_warehouse` id_warehouse int(10) unsigned DEFAULT "0"'; - $q_list['order_detail']['reduction_amount_tax_incl']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_detail` + $q_list['order_detail']['reduction_amount_tax_incl']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'order_detail` CHANGE `reduction_amount_tax_incl` reduction_amount_tax_incl DEC(20,6) NOT NULL DEFAULT "0.000000"'; - $q_list['order_detail']['reduction_amount_tax_excl']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_detail` + $q_list['order_detail']['reduction_amount_tax_excl']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'order_detail` CHANGE `reduction_amount_tax_excl` reduction_amount_tax_excl DEC(20,6) NOT NULL DEFAULT "0.000000"'; - $q_list['order_detail']['ecotax_tax_rate']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_detail` + $q_list['order_detail']['ecotax_tax_rate']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'order_detail` CHANGE `ecotax_tax_rate` ecotax_tax_rate DEC(5,3) NOT NULL DEFAULT "0.000"'; - $q_list['order_detail']['total_price_tax_incl']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_detail` + $q_list['order_detail']['total_price_tax_incl']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'order_detail` CHANGE `total_price_tax_incl` total_price_tax_incl DEC(20,6) NOT NULL DEFAULT "0.000000"'; - $q_list['order_detail']['total_price_tax_excl']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_detail` + $q_list['order_detail']['total_price_tax_excl']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'order_detail` CHANGE `total_price_tax_excl` total_price_tax_excl DEC(20,6) NOT NULL DEFAULT "0.000000"'; - $q_list['order_detail']['unit_price_tax_incl']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_detail` + $q_list['order_detail']['unit_price_tax_incl']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'order_detail` CHANGE `unit_price_tax_incl` unit_price_tax_incl DEC(20,6) NOT NULL DEFAULT "0.000000"'; - $q_list['order_detail']['unit_price_tax_excl']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_detail` + $q_list['order_detail']['unit_price_tax_excl']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'order_detail` CHANGE `unit_price_tax_excl` unit_price_tax_excl DEC(20,6) NOT NULL DEFAULT "0.000000"'; - $q_list['order_detail']['total_shipping_price_tax_incl']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_detail` + $q_list['order_detail']['total_shipping_price_tax_incl']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'order_detail` CHANGE `total_shipping_price_tax_incl` total_shipping_price_tax_incl DEC(20,6) NOT NULL DEFAULT "0.000000"'; - $q_list['order_detail']['total_shipping_price_tax_excl']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_detail` + $q_list['order_detail']['total_shipping_price_tax_excl']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'order_detail` CHANGE `total_shipping_price_tax_excl` total_shipping_price_tax_excl DEC(20,6) NOT NULL DEFAULT "0.000000"'; - $q_list['order_detail']['purchase_supplier_price']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_detail` + $q_list['order_detail']['purchase_supplier_price']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'order_detail` CHANGE `purchase_supplier_price` purchase_supplier_price DEC(20,6) NOT NULL DEFAULT "0.000000"'; - $q_list['order_detail']['original_product_price']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_detail` + $q_list['order_detail']['original_product_price']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'order_detail` CHANGE `original_product_price` original_product_price DEC(20,6) NOT NULL DEFAULT "0.000000"'; - $q_list['order_detail_tax']['unit_amount']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_detail_tax` + $q_list['order_detail_tax']['unit_amount']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'order_detail_tax` CHANGE `unit_amount` unit_amount DEC(10,6) NOT NULL DEFAULT "0.000000"'; - $q_list['order_detail_tax']['total_amount']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_detail_tax` + $q_list['order_detail_tax']['total_amount']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'order_detail_tax` CHANGE `total_amount` total_amount DEC(10,6) NOT NULL DEFAULT "0.000000"'; - $q_list['order_invoice']['note']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_invoice` + $q_list['order_invoice']['note']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'order_invoice` CHANGE `note` note text'; - $q_list['order_payment']['id_order_invoice']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'order_payment` + $q_list['order_payment']['id_order_invoice']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'order_payment` CHANGE `id_order_invoice` id_order_invoice int(10) unsigned NOT NULL DEFAULT 0'; - $q_list['orders']['reference']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'orders` + $q_list['orders']['reference']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'orders` CHANGE `reference` reference varchar(9) DEFAULT NULL'; - $q_list['orders']['id_shop_group']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'orders` + $q_list['orders']['id_shop_group']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'orders` CHANGE `id_shop_group` id_shop_group int(11) unsigned NOT NULL DEFAULT "1"'; - $q_list['product']['unity']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'product` + $q_list['product']['unity']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'product` CHANGE `unity` unity varchar(255) DEFAULT NULL'; - $q_list['product']['width']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'product` + $q_list['product']['width']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'product` CHANGE `width` `width` float NOT NULL DEFAULT "0"'; - $q_list['product']['height']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'product` + $q_list['product']['height']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'product` CHANGE `height` `height` float NOT NULL DEFAULT "0"'; - $q_list['product']['depth']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'product` + $q_list['product']['depth']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'product` CHANGE `depth` `depth` float NOT NULL DEFAULT "0"'; - $q_list['product']['minimal_quantity']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'product` + $q_list['product']['minimal_quantity']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'product` CHANGE `minimal_quantity` `minimal_quantity` int(10) unsigned NOT NULL DEFAULT "1"'; - $q_list['product_attribute']['ecotax']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'product_attribute` + $q_list['product_attribute']['ecotax']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'product_attribute` CHANGE `ecotax` ecotax decimal(17,6) NOT NULL DEFAULT "0.000000"'; - $q_list['stock_mvt_reason']['id_stock_mvt_reason']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'stock_mvt_reason` + $q_list['stock_mvt_reason']['id_stock_mvt_reason']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'stock_mvt_reason` CHANGE `id_stock_mvt_reason` id_stock_mvt_reason int(11) unsigned NOT NULL'; - $q_list['stock_mvt_reason_lang']['id_stock_mvt_reason']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'stock_mvt_reason_lang` + $q_list['stock_mvt_reason_lang']['id_stock_mvt_reason']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'stock_mvt_reason_lang` CHANGE `id_stock_mvt_reason` id_stock_mvt_reason int(11) unsigned NOT NULL'; - $q_list['stock_mvt_reason_lang']['id_lang']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'stock_mvt_reason_lang` + $q_list['stock_mvt_reason_lang']['id_lang']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'stock_mvt_reason_lang` CHANGE `id_lang` id_lang int(11) unsigned NOT NULL'; - $q_list['supply_order']['reference']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'supply_order` + $q_list['supply_order']['reference']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'supply_order` CHANGE `reference` reference varchar(64) NOT NULL'; - $q_list['tax']['deleted']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'tax` + $q_list['tax']['deleted']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'tax` CHANGE `deleted` deleted tinyint(1) unsigned NOT NULL DEFAULT "0"'; - $q_list['carrier']['need_range']['mod'] = 'ALTER TABLE `'._DB_PREFIX_.'carrier` + $q_list['carrier']['need_range']['mod'] = 'ALTER TABLE `' . _DB_PREFIX_ . 'carrier` CHANGE `need_range` need_range tinyint(1) unsigned NOT NULL DEFAULT "0" AFTER shipping_external'; foreach ($q_list as $table => $cols) { if (empty($table)) { continue; } - $list_fields = $db->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.$table.'`'); + $list_fields = $db->executeS('SHOW FIELDS FROM `' . _DB_PREFIX_ . $table . '`'); if (is_array($list_fields)) { foreach ($list_fields as $k => $field) { $list_fields[$k] = $field['Field']; @@ -175,7 +174,7 @@ function p15012_add_missing_columns() if (!empty($q[$do])) { if (!$db->execute($q[$do])) { - $errors[] = ''.$q[$do].''.$db->getMsgError().''; + $errors[] = '' . $q[$do] . '' . $db->getMsgError() . ''; } } } @@ -185,7 +184,7 @@ function p15012_add_missing_columns() if (count($errors) > 0) { $msg = implode("\r", $errors); - return array('error' => 1, 'msg' => $msg); + return ['error' => 1, 'msg' => $msg]; } else { return true; } diff --git a/upgrade/php/p15013_add_missing_columns.php b/upgrade/php/p15013_add_missing_columns.php index f51769cf4..84dea0d7d 100644 --- a/upgrade/php/p15013_add_missing_columns.php +++ b/upgrade/php/p15013_add_missing_columns.php @@ -23,33 +23,32 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function p15013_add_missing_columns() { - $errors = array(); + $errors = []; $db = Db::getInstance(); - $id_module = $db->getValue('SELECT id_module FROM `'._DB_PREFIX_.'module` WHERE name="statssearch"'); + $id_module = $db->getValue('SELECT id_module FROM `' . _DB_PREFIX_ . 'module` WHERE name="statssearch"'); if ($id_module) { - $list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'statssearch`'); + $list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `' . _DB_PREFIX_ . 'statssearch`'); foreach ($list_fields as $k => $field) { $list_fields[$k] = $field['Field']; } if (!in_array('id_group_shop', $list_fields)) { - if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'statssearch` + if (!Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'statssearch` ADD `id_group_shop` INT(10) NOT NULL default "1" AFTER id_statssearch')) { $errors[] = $db->getMsgError(); } } if (!in_array('id_shop', $list_fields)) { - if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'statssearch` + if (!Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'statssearch` ADD `id_shop` INT(10) NOT NULL default "1" AFTER id_statssearch')) { $errors[] = $db->getMsgError(); } } } if (count($errors)) { - return array('error' => 1, 'msg' => implode(',', $errors)) ; + return ['error' => 1, 'msg' => implode(',', $errors)]; } } diff --git a/upgrade/php/p15014_add_missing_columns.php b/upgrade/php/p15014_add_missing_columns.php index 66692e820..2bd79824e 100644 --- a/upgrade/php/p15014_add_missing_columns.php +++ b/upgrade/php/p15014_add_missing_columns.php @@ -23,22 +23,21 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function p15014_add_missing_columns() { - $errors = array(); + $errors = []; $db = Db::getInstance(); // for module statssearch - $id_module = $db->getValue('SELECT id_module FROM `'._DB_PREFIX_.'module` WHERE name="statssearch"'); + $id_module = $db->getValue('SELECT id_module FROM `' . _DB_PREFIX_ . 'module` WHERE name="statssearch"'); if ($id_module) { - $list_fields = $db->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'statssearch`'); + $list_fields = $db->executeS('SHOW FIELDS FROM `' . _DB_PREFIX_ . 'statssearch`'); foreach ($list_fields as $k => $field) { $list_fields[$k] = $field['Field']; } if (in_array('id_group_shop', $list_fields)) { - if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'statssearch` + if (!Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'statssearch` CHANGE `id_group_shop` `id_shop_group` INT(10) NOT NULL default "1"')) { $errors[] = $db->getMsgError(); } @@ -46,6 +45,6 @@ function p15014_add_missing_columns() } if (count($errors)) { - return array('error' => 1, 'msg' => implode(',', $errors)) ; + return ['error' => 1, 'msg' => implode(',', $errors)]; } } diff --git a/upgrade/php/p15014_copy_missing_images_tab_from_installer.php b/upgrade/php/p15014_copy_missing_images_tab_from_installer.php index ea40c7320..0f7126fd3 100644 --- a/upgrade/php/p15014_copy_missing_images_tab_from_installer.php +++ b/upgrade/php/p15014_copy_missing_images_tab_from_installer.php @@ -27,20 +27,19 @@ /** * This function copy all images located in /install/data/img/* that are missing in previous upgrade * in the matching img dir. This does not modify images that are already present. - * */ function p15014_copy_missing_images_tab_from_installer() { $res = true; $DIR_SEP = DIRECTORY_SEPARATOR; if (!defined('_PS_ROOT_DIR_')) { - define('_PS_ROOT_DIR_', realpath(INSTALL_PATH.'/../')); + define('_PS_ROOT_DIR_', realpath(INSTALL_PATH . '/../')); } - $install_dir_path = INSTALL_PATH.$DIR_SEP.'data'.$DIR_SEP.'img'; + $install_dir_path = INSTALL_PATH . $DIR_SEP . 'data' . $DIR_SEP . 'img'; $img_dir = scandir($install_dir_path, SCANDIR_SORT_NONE); foreach ($img_dir as $dir) { - if ($dir[0] == '.' || !is_dir($install_dir_path.$DIR_SEP.$dir)) { + if ($dir[0] == '.' || !is_dir($install_dir_path . $DIR_SEP . $dir)) { continue; } @@ -49,8 +48,8 @@ function p15014_copy_missing_images_tab_from_installer() if ($img[0] == '.') { continue; } - if (!file_exists(_PS_ROOT_DIR_.$DIR_SEP.'img'.$DIR_SEP.$dir.$DIR_SEP.$img) && file_exists($install_dir_path.$DIR_SEP.$dir.$DIR_SEP.$img)) { - $res &= copy($install_dir_path.$DIR_SEP.$dir.$DIR_SEP.$img, _PS_ROOT_DIR_.$DIR_SEP.'img'.$DIR_SEP.$dir.$DIR_SEP.$img); + if (!file_exists(_PS_ROOT_DIR_ . $DIR_SEP . 'img' . $DIR_SEP . $dir . $DIR_SEP . $img) && file_exists($install_dir_path . $DIR_SEP . $dir . $DIR_SEP . $img)) { + $res &= copy($install_dir_path . $DIR_SEP . $dir . $DIR_SEP . $img, _PS_ROOT_DIR_ . $DIR_SEP . 'img' . $DIR_SEP . $dir . $DIR_SEP . $img); } } } diff --git a/upgrade/php/p15014_upgrade_sekeywords.php b/upgrade/php/p15014_upgrade_sekeywords.php index 37bc6ea45..9b3a20348 100644 --- a/upgrade/php/p15014_upgrade_sekeywords.php +++ b/upgrade/php/p15014_upgrade_sekeywords.php @@ -23,11 +23,10 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function p15014_upgrade_sekeywords() { - Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'sekeyword` ADD id_shop INTEGER UNSIGNED NOT NULL DEFAULT 1 AFTER id_sekeyword'); - Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'sekeyword` ADD id_shop_group INTEGER UNSIGNED NOT NULL DEFAULT 1 AFTER id_shop'); + Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'sekeyword` ADD id_shop INTEGER UNSIGNED NOT NULL DEFAULT 1 AFTER id_sekeyword'); + Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'sekeyword` ADD id_shop_group INTEGER UNSIGNED NOT NULL DEFAULT 1 AFTER id_shop'); return true; } diff --git a/upgrade/php/p15015_blockadvertising_extension.php b/upgrade/php/p15015_blockadvertising_extension.php index 1628d07cf..d8eee1181 100644 --- a/upgrade/php/p15015_blockadvertising_extension.php +++ b/upgrade/php/p15015_blockadvertising_extension.php @@ -23,22 +23,21 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function p15015_blockadvertising_extension() { if (!defined('_PS_ROOT_DIR_')) { - define('_PS_ROOT_DIR_', realpath(INSTALL_PATH.'/../')); + define('_PS_ROOT_DIR_', realpath(INSTALL_PATH . '/../')); } // Try to update with the extension of the image that exists in the module directory - if (@file_exists(_PS_ROOT_DIR_.'/modules/blockadvertising')) { + if (@file_exists(_PS_ROOT_DIR_ . '/modules/blockadvertising')) { foreach (@scandir(_PS_ROOT_DIR_ . '/modules/blockadvertising', SCANDIR_SORT_NONE) as $file) { - if (in_array($file, array('advertising.jpg', 'advertising.gif', 'advertising.png'))) { - $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = \'BLOCKADVERT_IMG_EXT\''); + if (in_array($file, ['advertising.jpg', 'advertising.gif', 'advertising.png'])) { + $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` = \'BLOCKADVERT_IMG_EXT\''); if ($exist) { - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET value = "'.pSQL(substr($file, strrpos($file, '.') + 1)).'" WHERE `name` = \'BLOCKADVERT_IMG_EXT\''); + Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'configuration` SET value = "' . pSQL(substr($file, strrpos($file, '.') + 1)) . '" WHERE `name` = \'BLOCKADVERT_IMG_EXT\''); } else { - Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'configuration` (name, value) VALUES ("BLOCKADVERT_IMG_EXT", "'.pSQL(substr($file, strrpos($file, '.') + 1)).'"'); + Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (name, value) VALUES ("BLOCKADVERT_IMG_EXT", "' . pSQL(substr($file, strrpos($file, '.') + 1)) . '"'); } } } diff --git a/upgrade/php/p15016_add_missing_columns.php b/upgrade/php/p15016_add_missing_columns.php index 270c178a3..b0439639b 100644 --- a/upgrade/php/p15016_add_missing_columns.php +++ b/upgrade/php/p15016_add_missing_columns.php @@ -23,76 +23,75 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function p15016_add_missing_columns() { - $errors = array(); + $errors = []; - $id_module = Db::getInstance()->getValue('SELECT id_module FROM `'._DB_PREFIX_.'module` WHERE name="blockreinsurance"'); + $id_module = Db::getInstance()->getValue('SELECT id_module FROM `' . _DB_PREFIX_ . 'module` WHERE name="blockreinsurance"'); if ($id_module) { - $list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'reinsurance`'); + $list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `' . _DB_PREFIX_ . 'reinsurance`'); foreach ($list_fields as $k => $field) { $list_fields[$k] = $field['Field']; } if (in_array('id_contactinfos', $list_fields)) { - if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'reinsurance` CHANGE `id_contactinfos` `id_reinsurance` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT')) { + if (!Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'reinsurance` CHANGE `id_contactinfos` `id_reinsurance` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT')) { $errors[] = Db::getInstance()->getMsgError(); } } if (!in_array('id_shop', $list_fields)) { - if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'reinsurance` ADD `id_shop` INT(10) NOT NULL default "1" AFTER id_reinsurance')) { + if (!Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'reinsurance` ADD `id_shop` INT(10) NOT NULL default "1" AFTER id_reinsurance')) { $errors[] = Db::getInstance()->getMsgError(); } } if (in_array('filename', $list_fields)) { - if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'reinsurance` CHANGE `filename` `file_name` VARCHAR(100) NOT NULL')) { + if (!Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'reinsurance` CHANGE `filename` `file_name` VARCHAR(100) NOT NULL')) { $errors[] = Db::getInstance()->getMsgError(); } } - $list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'reinsurance_lang`'); + $list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `' . _DB_PREFIX_ . 'reinsurance_lang`'); if (!is_array($list_fields) || $list_fields == false) { $return = Db::getInstance()->execute(' - CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'reinsurance_lang` ( + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'reinsurance_lang` ( `id_reinsurance` INT UNSIGNED NOT NULL AUTO_INCREMENT, `id_lang` int(10) unsigned NOT NULL , `text` VARCHAR(300) NOT NULL, PRIMARY KEY (`id_reinsurance`, `id_lang`) - ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8 ;'); + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8 ;'); if (!$return) { $errors[] = Db::getInstance()->getMsgError(); } } } - $id_module = Db::getInstance()->getValue('SELECT id_module FROM `'._DB_PREFIX_.'module` WHERE name="blocktopmenu"'); + $id_module = Db::getInstance()->getValue('SELECT id_module FROM `' . _DB_PREFIX_ . 'module` WHERE name="blocktopmenu"'); if ($id_module) { - $list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'linksmenutop`'); + $list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `' . _DB_PREFIX_ . 'linksmenutop`'); foreach ($list_fields as $k => $field) { $list_fields[$k] = $field['Field']; } if (in_array('id_link', $list_fields) && !in_array('id_linksmenutop', $list_fields)) { - if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'linksmenutop` CHANGE `id_link` `id_linksmenutop` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT')) { + if (!Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'linksmenutop` CHANGE `id_link` `id_linksmenutop` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT')) { $errors[] = Db::getInstance()->getMsgError(); } } - $list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'linksmenutop_lang`'); + $list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `' . _DB_PREFIX_ . 'linksmenutop_lang`'); foreach ($list_fields as $k => $field) { $list_fields[$k] = $field['Field']; } if (in_array('id_link', $list_fields) && !in_array('id_linksmenutop', $list_fields)) { - if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'linksmenutop_lang` CHANGE `id_link` `id_linksmenutop` INT(10) UNSIGNED NOT NULL')) { + if (!Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'linksmenutop_lang` CHANGE `id_link` `id_linksmenutop` INT(10) UNSIGNED NOT NULL')) { $errors[] = Db::getInstance()->getMsgError(); } } } if (count($errors)) { - return array('error' => 1, 'msg' => implode(',', $errors)) ; + return ['error' => 1, 'msg' => implode(',', $errors)]; } } diff --git a/upgrade/php/p15017_add_id_shop_to_primary_key.php b/upgrade/php/p15017_add_id_shop_to_primary_key.php index 9129c8be2..9aea319d8 100644 --- a/upgrade/php/p15017_add_id_shop_to_primary_key.php +++ b/upgrade/php/p15017_add_id_shop_to_primary_key.php @@ -23,28 +23,27 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function p15017_add_id_shop_to_primary_key() { // Drop old indexes - $old_indexes = array( + $old_indexes = [ 'category_lang_index' => 'category_lang', 'shipper_lang_index' => 'carrier_lang', 'product_lang_index' => 'product_lang', 'id_category_shop' => 'category_shop', - ); + ]; foreach ($old_indexes as $index => $table) { - if (Db::getInstance()->executeS('SHOW INDEX FROM `'._DB_PREFIX_.$table.'` WHERE Key_name = "'.$index.'"')) { - Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.$table.'` DROP KEY `'.$index.'`'); + if (Db::getInstance()->executeS('SHOW INDEX FROM `' . _DB_PREFIX_ . $table . '` WHERE Key_name = "' . $index . '"')) { + Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . $table . '` DROP KEY `' . $index . '`'); } } // The former primary keys where set on id_object and id_lang. They must now be set on id_shop too. - foreach (array('product', 'category', 'meta', 'carrier') as $table) { - if (Db::getInstance()->executeS('SHOW INDEX FROM `'._DB_PREFIX_.$table.'` WHERE Key_name = "PRIMARY"')) { - Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.$table.'_lang` DROP PRIMARY KEY'); + foreach (['product', 'category', 'meta', 'carrier'] as $table) { + if (Db::getInstance()->executeS('SHOW INDEX FROM `' . _DB_PREFIX_ . $table . '` WHERE Key_name = "PRIMARY"')) { + Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . $table . '_lang` DROP PRIMARY KEY'); } - Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.$table.'_lang` ADD PRIMARY KEY (`id_'.$table.'`, `id_shop`, `id_lang`)'); + Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . $table . '_lang` ADD PRIMARY KEY (`id_' . $table . '`, `id_shop`, `id_lang`)'); } return true; diff --git a/upgrade/php/p15018_change_image_types.php b/upgrade/php/p15018_change_image_types.php index 2dd704a25..bc56edb00 100644 --- a/upgrade/php/p15018_change_image_types.php +++ b/upgrade/php/p15018_change_image_types.php @@ -23,90 +23,89 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function p15018_change_image_types() { - $replace_types = array( - 'products' => array( - 'small' => array('small_default', '98', '98'), - 'medium' => array('medium_default', '125', '125'), - 'large' => array('large_default', '458', '458'), - 'thickbox' => array('thickbox_default', '800', '800'), - 'home' => array('home_default', '270', '270'), - ), - 'others' => array( - 'category' => array('category_default', '870', '217'), - 'large_scene' => array('scene_default', '520', '189'), - 'thumb_scene' => array('m_scene_default', '161', '58'), - ), - ); + $replace_types = [ + 'products' => [ + 'small' => ['small_default', '98', '98'], + 'medium' => ['medium_default', '125', '125'], + 'large' => ['large_default', '458', '458'], + 'thickbox' => ['thickbox_default', '800', '800'], + 'home' => ['home_default', '270', '270'], + ], + 'others' => [ + 'category' => ['category_default', '870', '217'], + 'large_scene' => ['scene_default', '520', '189'], + 'thumb_scene' => ['m_scene_default', '161', '58'], + ], + ]; - $new_types = array( - 'products' => array( - 'small' => array('cart_default', '80', '80'), - ), - ); + $new_types = [ + 'products' => [ + 'small' => ['cart_default', '80', '80'], + ], + ]; foreach ($new_types as $type => $type_array) { foreach ($type_array as $old_type => $new_type) { if (is_array($new_type) && count($new_type)) { - Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'image_type` ( - SELECT NULL, "'.$new_type[0].'", "'.$new_type[1].'", "'.$new_type[2].'", products, categories, manufacturers, suppliers, scenes, stores - FROM `'._DB_PREFIX_.'image_type` WHERE name = "'.$old_type.'" LIMIT 1)'); + Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'image_type` ( + SELECT NULL, "' . $new_type[0] . '", "' . $new_type[1] . '", "' . $new_type[2] . '", products, categories, manufacturers, suppliers, scenes, stores + FROM `' . _DB_PREFIX_ . 'image_type` WHERE name = "' . $old_type . '" LIMIT 1)'); } } } - $option = (bool)Db::getInstance()->getValue('SELECT id_theme FROM `'._DB_PREFIX_.'theme` WHERE directory != "default" AND directory != "prestashop"'); + $option = (bool) Db::getInstance()->getValue('SELECT id_theme FROM `' . _DB_PREFIX_ . 'theme` WHERE directory != "default" AND directory != "prestashop"'); // If there is another theme than the default one, duplicate if ($option) { foreach ($replace_types as $type => $type_array) { foreach ($type_array as $old_type => $new_type) { if (is_array($new_type) && count($new_type)) { - Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'image_type` ( - SELECT NULL, "'.$new_type[0].'", "'.$new_type[1].'", "'.$new_type[2].'", products, categories, manufacturers, suppliers, scenes, stores - FROM `'._DB_PREFIX_.'image_type` WHERE name = "'.$old_type.'" LIMIT 1)'); + Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'image_type` ( + SELECT NULL, "' . $new_type[0] . '", "' . $new_type[1] . '", "' . $new_type[2] . '", products, categories, manufacturers, suppliers, scenes, stores + FROM `' . _DB_PREFIX_ . 'image_type` WHERE name = "' . $old_type . '" LIMIT 1)'); } - // But if there is only the default one, we can update de names - else { - foreach ($replace_types as $type => $type_array) { - foreach ($type_array as $old_type => $new_type) { - if (is_array($new_type) && count($new_type)) { - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'image_type` SET name = "'.$new_type[0].'" WHERE name = "'.$old_type.'"'); + // But if there is only the default one, we can update de names + else { + foreach ($replace_types as $type => $type_array) { + foreach ($type_array as $old_type => $new_type) { + if (is_array($new_type) && count($new_type)) { + Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'image_type` SET name = "' . $new_type[0] . '" WHERE name = "' . $old_type . '"'); + } + } + } } } } } - } - } - } // If there is less than 500 images, copy to the new format (if there is more, the merchant will have to click "regenerate thumbnails") - $result = Db::getInstance()->executeS('SELECT id_image, id_product FROM `'._DB_PREFIX_.'image`'); + $result = Db::getInstance()->executeS('SELECT id_image, id_product FROM `' . _DB_PREFIX_ . 'image`'); if (Db::getInstance()->numRows() < 500) { if (!defined('_PS_ROOT_DIR_')) { - define('_PS_ROOT_DIR_', realpath(INSTALL_PATH.'/../')); + define('_PS_ROOT_DIR_', realpath(INSTALL_PATH . '/../')); } foreach ($result as $row) { - if (file_exists(_PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.'p'.DIRECTORY_SEPARATOR.$row['id_product'].'-'.$row['id_image'].'.jpg')) { + if (file_exists(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'img' . DIRECTORY_SEPARATOR . 'p' . DIRECTORY_SEPARATOR . $row['id_product'] . '-' . $row['id_image'] . '.jpg')) { foreach ($replace_types['products'] as $old_type => $new_type) { if (is_array($new_type) && count($new_type)) { p15018_copy_or_rename( - _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.'p'.DIRECTORY_SEPARATOR.$row['id_product'].'-'.$row['id_image'].'-'.$old_type.'.jpg', - _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.'p'.DIRECTORY_SEPARATOR.$row['id_product'].'-'.$row['id_image'].'-'.$new_type[0].'.jpg', + _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'img' . DIRECTORY_SEPARATOR . 'p' . DIRECTORY_SEPARATOR . $row['id_product'] . '-' . $row['id_image'] . '-' . $old_type . '.jpg', + _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'img' . DIRECTORY_SEPARATOR . 'p' . DIRECTORY_SEPARATOR . $row['id_product'] . '-' . $row['id_image'] . '-' . $new_type[0] . '.jpg', $option ); } } } - $folder = implode(DIRECTORY_SEPARATOR, str_split((string)$row['id_image'])).DIRECTORY_SEPARATOR; - if (file_exists(_PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.'p'.DIRECTORY_SEPARATOR.$folder.$row['id_image'].'.jpg')) { + $folder = implode(DIRECTORY_SEPARATOR, str_split((string) $row['id_image'])) . DIRECTORY_SEPARATOR; + if (file_exists(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'img' . DIRECTORY_SEPARATOR . 'p' . DIRECTORY_SEPARATOR . $folder . $row['id_image'] . '.jpg')) { foreach ($replace_types['products'] as $old_type => $new_type) { if (is_array($new_type) && count($new_type)) { p15018_copy_or_rename( - _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.'p'.DIRECTORY_SEPARATOR.$folder.$row['id_image'].'-'.$old_type.'.jpg', - _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.'p'.DIRECTORY_SEPARATOR.$folder.$row['id_image'].'-'.$new_type[0].'.jpg', + _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'img' . DIRECTORY_SEPARATOR . 'p' . DIRECTORY_SEPARATOR . $folder . $row['id_image'] . '-' . $old_type . '.jpg', + _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'img' . DIRECTORY_SEPARATOR . 'p' . DIRECTORY_SEPARATOR . $folder . $row['id_image'] . '-' . $new_type[0] . '.jpg', $option ); } @@ -115,7 +114,7 @@ function p15018_change_image_types() } // Then the other entities (if there is less than 500 products, that should not be a problem) - $directories = array('p', 'c', 'm', 's', 'su', 'scenes', 'scenes'.DIRECTORY_SEPARATOR.'thumbs', 'st'); + $directories = ['p', 'c', 'm', 's', 'su', 'scenes', 'scenes' . DIRECTORY_SEPARATOR . 'thumbs', 'st']; foreach ($directories as $directory) { foreach (scandir(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'img' . DIRECTORY_SEPARATOR . $directory, SCANDIR_SORT_NONE) as $file) { if (!preg_match('/^([0-9]+|[a-z]{2}-default)\-[a-z_-]+\.jpg$/i', $file)) { @@ -123,10 +122,10 @@ function p15018_change_image_types() } foreach ($replace_types as $type => $type_array) { foreach ($type_array as $old_type => $new_type) { - if (preg_match('/^([0-9]+|[a-z]{2}-default)\-'.$old_type.'\.jpg$/i', $file, $matches) && is_array($new_type) && count($new_type)) { + if (preg_match('/^([0-9]+|[a-z]{2}-default)\-' . $old_type . '\.jpg$/i', $file, $matches) && is_array($new_type) && count($new_type)) { p15018_copy_or_rename( - _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.$directory.DIRECTORY_SEPARATOR.$matches[1].'-'.$old_type.'.jpg', - _PS_ROOT_DIR_.DIRECTORY_SEPARATOR.'img'.DIRECTORY_SEPARATOR.$directory.DIRECTORY_SEPARATOR.$matches[1].'-'.$new_type[0].'.jpg', + _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'img' . DIRECTORY_SEPARATOR . $directory . DIRECTORY_SEPARATOR . $matches[1] . '-' . $old_type . '.jpg', + _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'img' . DIRECTORY_SEPARATOR . $directory . DIRECTORY_SEPARATOR . $matches[1] . '-' . $new_type[0] . '.jpg', $option ); } diff --git a/upgrade/php/p1531_redirect_type.php b/upgrade/php/p1531_redirect_type.php index 811078d65..e948e0e3f 100644 --- a/upgrade/php/p1531_redirect_type.php +++ b/upgrade/php/p1531_redirect_type.php @@ -23,13 +23,12 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function p1531_redirect_type() { - include_once __DIR__.'/generic_add_missing_column.php'; + include_once __DIR__ . '/generic_add_missing_column.php'; - $result = generic_add_missing_column('product', array('redirect_type' => 'ENUM(\'\', \'404\', \'301\', \'302\') NOT NULL DEFAULT \'404\' AFTER `active`')); - $result &= generic_add_missing_column('product_shop', array('redirect_type' => 'ENUM(\'\', \'404\', \'301\', \'302\') NOT NULL DEFAULT \'404\' AFTER `active`')); + $result = generic_add_missing_column('product', ['redirect_type' => 'ENUM(\'\', \'404\', \'301\', \'302\') NOT NULL DEFAULT \'404\' AFTER `active`']); + $result &= generic_add_missing_column('product_shop', ['redirect_type' => 'ENUM(\'\', \'404\', \'301\', \'302\') NOT NULL DEFAULT \'404\' AFTER `active`']); return $result; } diff --git a/upgrade/php/p1540_add_missing_columns.php b/upgrade/php/p1540_add_missing_columns.php index df573addb..a1cc45c5e 100644 --- a/upgrade/php/p1540_add_missing_columns.php +++ b/upgrade/php/p1540_add_missing_columns.php @@ -23,56 +23,55 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function p1540_add_missing_columns() { - $errors = array(); - $id_module = Db::getInstance()->getValue('SELECT id_module FROM `'._DB_PREFIX_.'module` WHERE name = "loyalty"'); + $errors = []; + $id_module = Db::getInstance()->getValue('SELECT id_module FROM `' . _DB_PREFIX_ . 'module` WHERE name = "loyalty"'); if ($id_module) { - $list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'loyalty`'); + $list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `' . _DB_PREFIX_ . 'loyalty`'); foreach ($list_fields as $k => $field) { $list_fields[$k] = $field['Field']; } if (in_array('id_discount', $list_fields)) { - if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'loyalty` CHANGE `id_discount` `id_cart_rule` INT( 10 ) UNSIGNED NULL DEFAULT NULL')) { + if (!Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'loyalty` CHANGE `id_discount` `id_cart_rule` INT( 10 ) UNSIGNED NULL DEFAULT NULL')) { $errors[] = Db::getInstance()->getMsgError(); } } } - $id_module = Db::getInstance()->getValue('SELECT id_module FROM `'._DB_PREFIX_.'module` WHERE name = "blocklayered"'); + $id_module = Db::getInstance()->getValue('SELECT id_module FROM `' . _DB_PREFIX_ . 'module` WHERE name = "blocklayered"'); if ($id_module) { - $list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `'._DB_PREFIX_.'layered_product_attribute`'); + $list_fields = Db::getInstance()->executeS('SHOW FIELDS FROM `' . _DB_PREFIX_ . 'layered_product_attribute`'); if (is_array($list_fields)) { foreach ($list_fields as $k => $field) { $list_fields[$k] = $field['Field']; } if (!in_array('id_shop', $list_fields)) { - if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'layered_product_attribute` ADD `id_shop` INT( 10 ) UNSIGNED NOT NULL DEFAULT "1" AFTER `id_attribute_group`')) { + if (!Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'layered_product_attribute` ADD `id_shop` INT( 10 ) UNSIGNED NOT NULL DEFAULT "1" AFTER `id_attribute_group`')) { $errors[] = Db::getInstance()->getMsgError(); } } } } - $key_exists = Db::getInstance()->executeS('SHOW INDEX FROM `'._DB_PREFIX_.'stock_available` WHERE KEY_NAME = "product_sqlstock"'); + $key_exists = Db::getInstance()->executeS('SHOW INDEX FROM `' . _DB_PREFIX_ . 'stock_available` WHERE KEY_NAME = "product_sqlstock"'); if (is_array($key_exists) && count($key_exists)) { - if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'stock_available` DROP INDEX `product_sqlstock`')) { + if (!Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'stock_available` DROP INDEX `product_sqlstock`')) { $errors[] = Db::getInstance()->getMsgError(); } } - $key_exists = Db::getInstance()->executeS('SHOW INDEX FROM `'._DB_PREFIX_.'stock_available` WHERE KEY_NAME = "id_product_2"'); + $key_exists = Db::getInstance()->executeS('SHOW INDEX FROM `' . _DB_PREFIX_ . 'stock_available` WHERE KEY_NAME = "id_product_2"'); if (is_array($key_exists) && count($key_exists)) { - if (!Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'stock_available` DROP INDEX `id_product_2`')) { + if (!Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'stock_available` DROP INDEX `id_product_2`')) { $errors[] = Db::getInstance()->getMsgError(); } } if (count($errors)) { - return array('error' => 1, 'msg' => implode(',', $errors)) ; + return ['error' => 1, 'msg' => implode(',', $errors)]; } } diff --git a/upgrade/php/p16011_media_server.php b/upgrade/php/p16011_media_server.php index 1a22681f3..05f1659c2 100644 --- a/upgrade/php/p16011_media_server.php +++ b/upgrade/php/p16011_media_server.php @@ -23,23 +23,22 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function p16011_media_server() { - $new_settings = $prev_settings = file_get_contents(_PS_ROOT_DIR_.'/config/settings.inc.php'); + $new_settings = $prev_settings = file_get_contents(_PS_ROOT_DIR_ . '/config/settings.inc.php'); if (preg_match_all('/define\(\'_MEDIA_SERVER_([1-3])_\',\s*?\'(.*?)\'\s*?\)/ism', $new_settings, $matches)) { $total = (count($matches[1])); for ($i = 0; $i < $total; ++$i) { - Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'configuration (`name`, `value`, `date_add`, `date_upd`) VALUES (\'PS_MEDIA_SERVER_'.$matches[1][$i].'\', \''.$matches[2][$i].'\', NOW(), NOW())'); + Db::getInstance()->execute('INSERT INTO ' . _DB_PREFIX_ . 'configuration (`name`, `value`, `date_add`, `date_upd`) VALUES (\'PS_MEDIA_SERVER_' . $matches[1][$i] . '\', \'' . $matches[2][$i] . '\', NOW(), NOW())'); } } $new_settings = preg_replace('/define\(\'_MEDIA_SERVER_[1-3]_\',\s*?\'.*?\'\s*?\);/ism', '', $new_settings); if ($new_settings == $prev_settings || ( - copy(_PS_ROOT_DIR_.'/config/settings.inc.php', _PS_ROOT_DIR_.'/config/settings.old.php') - && (bool)file_put_contents(_PS_ROOT_DIR_.'/config/settings.inc.php', $new_settings) + copy(_PS_ROOT_DIR_ . '/config/settings.inc.php', _PS_ROOT_DIR_ . '/config/settings.old.php') + && (bool) file_put_contents(_PS_ROOT_DIR_ . '/config/settings.inc.php', $new_settings) )) { return true; } diff --git a/upgrade/php/p16012_pack_rework.php b/upgrade/php/p16012_pack_rework.php index fca4c673c..1ac2d1d98 100644 --- a/upgrade/php/p16012_pack_rework.php +++ b/upgrade/php/p16012_pack_rework.php @@ -23,21 +23,20 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function p16012_pack_rework() { - Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'configuration` (`id_configuration`, `name`, `value`, `date_add`, `date_upd`) VALUES (NULL, "PS_PACK_STOCK_TYPE", "0", NOW(), NOW())'); - $all_product_in_pack = Db::getInstance()->executeS('SELECT `id_product_item` FROM '._DB_PREFIX_.'pack GROUP BY `id_product_item`'); + Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (`id_configuration`, `name`, `value`, `date_add`, `date_upd`) VALUES (NULL, "PS_PACK_STOCK_TYPE", "0", NOW(), NOW())'); + $all_product_in_pack = Db::getInstance()->executeS('SELECT `id_product_item` FROM ' . _DB_PREFIX_ . 'pack GROUP BY `id_product_item`'); foreach ($all_product_in_pack as $value) { - Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'pack - SET `id_product_attribute_item` = '.(getDefaultAttribute($value['id_product_item']) ? getDefaultAttribute($value['id_product_item']).' ' : '0 ').' - WHERE `id_product_item` = '.$value['id_product_item']); + Db::getInstance()->execute('UPDATE ' . _DB_PREFIX_ . 'pack + SET `id_product_attribute_item` = ' . (getDefaultAttribute($value['id_product_item']) ? getDefaultAttribute($value['id_product_item']) . ' ' : '0 ') . ' + WHERE `id_product_item` = ' . $value['id_product_item']); } - $all_product_pack = Db::getInstance()->executeS('SELECT `id_product_pack` FROM '._DB_PREFIX_.'pack GROUP BY `id_product_pack`'); + $all_product_pack = Db::getInstance()->executeS('SELECT `id_product_pack` FROM ' . _DB_PREFIX_ . 'pack GROUP BY `id_product_pack`'); foreach ($all_product_pack as $value) { $work_with_stock = 1; - $lang = Db::getInstance()->executeS('SELECT value FROM '._DB_PREFIX_.'configuration WHERE `id_shop` = NULL AND `id_shop_group` = NULL AND `name` = "PS_LANG_DEFAULT"'); + $lang = Db::getInstance()->executeS('SELECT value FROM ' . _DB_PREFIX_ . 'configuration WHERE `id_shop` = NULL AND `id_shop_group` = NULL AND `name` = "PS_LANG_DEFAULT"'); $products = getItems($value['id_product_pack']); foreach ($products as $product) { if ($product != 1) { @@ -47,40 +46,40 @@ function p16012_pack_rework() } } if ($work_with_stock) { - Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'product SET `pack_stock_type` = 1 WHERE `id_product` = '.(int)$value['id_product_pack']); + Db::getInstance()->execute('UPDATE ' . _DB_PREFIX_ . 'product SET `pack_stock_type` = 1 WHERE `id_product` = ' . (int) $value['id_product_pack']); } } } function getDefaultAttribute($id_product) { - static $combinations = array(); + static $combinations = []; if (!isset($combinations[$id_product])) { - $combinations[$id_product] = array(); + $combinations[$id_product] = []; } if (isset($combinations[$id_product]['default'])) { return $combinations[$id_product]['default']; } $sql = 'SELECT id_product_attribute - FROM '._DB_PREFIX_.'product_attribute - WHERE default_on = 1 AND id_product = '.(int)$id_product; + FROM ' . _DB_PREFIX_ . 'product_attribute + WHERE default_on = 1 AND id_product = ' . (int) $id_product; $result = Db::getInstance()->getValue($sql); $combinations[$id_product]['default'] = $result ? $result : ($result = Db::getInstance()->getValue('SELECT id_product_attribute - FROM '._DB_PREFIX_.'product_attribute - WHERE id_product = '.(int)$id_product)); + FROM ' . _DB_PREFIX_ . 'product_attribute + WHERE id_product = ' . (int) $id_product)); return $result; } function getItems($id_product) { - $result = Db::getInstance()->executeS('SELECT id_product_item, quantity FROM '._DB_PREFIX_.'pack where id_product_pack = '.(int)$id_product); - $array_result = array(); + $result = Db::getInstance()->executeS('SELECT id_product_item, quantity FROM ' . _DB_PREFIX_ . 'pack where id_product_pack = ' . (int) $id_product); + $array_result = []; foreach ($result as $row) { - $p = Db::getInstance()->executeS('SELECT `advanced_stock_management` FROM '._DB_PREFIX_.'product WHERE `id_product` = '.(int)$row['id_product_item']); + $p = Db::getInstance()->executeS('SELECT `advanced_stock_management` FROM ' . _DB_PREFIX_ . 'product WHERE `id_product` = ' . (int) $row['id_product_item']); $array_result[] = $p[0]['advanced_stock_management']; } diff --git a/upgrade/php/p1603_add_attachment_size.php b/upgrade/php/p1603_add_attachment_size.php index 8e5dbe05f..e7cfc8a6c 100644 --- a/upgrade/php/p1603_add_attachment_size.php +++ b/upgrade/php/p1603_add_attachment_size.php @@ -23,12 +23,11 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function p1603_add_attachment_size() { - $attachments = Db::getInstance()->executeS('SELECT id_attachment, file FROM '._DB_PREFIX_.'attachment'); + $attachments = Db::getInstance()->executeS('SELECT id_attachment, file FROM ' . _DB_PREFIX_ . 'attachment'); foreach ($attachments as $attachment) { - $file_size = @filesize(_PS_DOWNLOAD_DIR_.$attachment['file']); - Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'attachment SET file_size = '.(int)$file_size.' WHERE id_attachement = '.(int)$attachment['id_attachment']); + $file_size = @filesize(_PS_DOWNLOAD_DIR_ . $attachment['file']); + Db::getInstance()->execute('UPDATE ' . _DB_PREFIX_ . 'attachment SET file_size = ' . (int) $file_size . ' WHERE id_attachement = ' . (int) $attachment['id_attachment']); } } diff --git a/upgrade/php/p1606module_exceptions.php b/upgrade/php/p1606module_exceptions.php index 811c07b9c..004c8d9ac 100644 --- a/upgrade/php/p1606module_exceptions.php +++ b/upgrade/php/p1606module_exceptions.php @@ -23,22 +23,21 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function p1606module_exceptions() { $modules_dir = scandir(_PS_MODULE_DIR_, SCANDIR_SORT_NONE); - $modules_controllers = $core_controllers = array(); - $core_controllers = array(); + $modules_controllers = $core_controllers = []; + $core_controllers = []; foreach ($modules_dir as $module_dir) { - $module_path = _PS_MODULE_DIR_.$module_dir; + $module_path = _PS_MODULE_DIR_ . $module_dir; if ($module_dir[0] == '.' || $module_dir == 'index.php') { continue; } - if (file_exists($module_path.'/controllers/') && is_dir($module_path.'/controllers/')) { - $module_path_admin = $module_path.'/controllers/admin/'; + if (file_exists($module_path . '/controllers/') && is_dir($module_path . '/controllers/')) { + $module_path_admin = $module_path . '/controllers/admin/'; if (file_exists($module_path_admin) && is_dir($module_path_admin)) { $admin = scandir($module_path_admin, SCANDIR_SORT_NONE); foreach ($admin as $a_controller) { @@ -48,12 +47,12 @@ function p1606module_exceptions() if (isset($modules_controllers[$module_dir])) { $modules_controllers[$module_dir][] = str_replace('.php', '', $a_controller); } else { - $modules_controllers[$module_dir] = array(str_replace('.php', '', $a_controller)); + $modules_controllers[$module_dir] = [str_replace('.php', '', $a_controller)]; } } } - $module_path_front = $module_path.'/controllers/front/'; + $module_path_front = $module_path . '/controllers/front/'; if (file_exists($module_path_front) && is_dir($module_path_front)) { $front = scandir($module_path_front, SCANDIR_SORT_NONE); foreach ($front as $f_controller) { @@ -63,14 +62,14 @@ function p1606module_exceptions() if (isset($modules_controllers[$module_dir])) { $modules_controllers[$module_dir][] = str_replace('.php', '', $f_controller); } else { - $modules_controllers[$module_dir] = array(str_replace('.php', '', $f_controller)); + $modules_controllers[$module_dir] = [str_replace('.php', '', $f_controller)]; } } } } } - $controller_dir = _PS_ROOT_DIR_.'/controllers/front/'; + $controller_dir = _PS_ROOT_DIR_ . '/controllers/front/'; if (file_exists($controller_dir) && is_dir($controller_dir)) { $front_controllers = scandir($controller_dir, SCANDIR_SORT_NONE); @@ -83,17 +82,17 @@ function p1606module_exceptions() } } - $hook_module_exceptions = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'hook_module_exceptions`'); - $sql_insert = 'INSERT INTO `'._DB_PREFIX_.'hook_module_exceptions` (`id_hook_module_exceptions`, `id_shop`, `id_module`, `id_hook`, `file_name`) VALUES '; - $sql_delete = 'DELETE FROM `'._DB_PREFIX_.'hook_module_exceptions` WHERE '; + $hook_module_exceptions = Db::getInstance()->executeS('SELECT * FROM `' . _DB_PREFIX_ . 'hook_module_exceptions`'); + $sql_insert = 'INSERT INTO `' . _DB_PREFIX_ . 'hook_module_exceptions` (`id_hook_module_exceptions`, `id_shop`, `id_module`, `id_hook`, `file_name`) VALUES '; + $sql_delete = 'DELETE FROM `' . _DB_PREFIX_ . 'hook_module_exceptions` WHERE '; foreach ($hook_module_exceptions as $exception) { foreach ($modules_controllers as $module => $controllers) { if (in_array($exception['file_name'], $controllers) && !in_array($exception['file_name'], $core_controllers)) { - $sql_delete .= ' `id_hook_module_exceptions` = '.(int)$exception['id_hook_module_exceptions'].' AND'; + $sql_delete .= ' `id_hook_module_exceptions` = ' . (int) $exception['id_hook_module_exceptions'] . ' AND'; foreach ($controllers as $cont) { if ($exception['file_name'] == $cont) { - $sql_insert .= '(null, '.(int)$exception['id_shop'].', '.(int)$exception['id_module'].', '.(int)$exception['id_hook'].', \'module-'.pSQL($module).'-'.pSQL($exception['file_name']).'\'),'; + $sql_insert .= '(null, ' . (int) $exception['id_shop'] . ', ' . (int) $exception['id_module'] . ', ' . (int) $exception['id_hook'] . ', \'module-' . pSQL($module) . '-' . pSQL($exception['file_name']) . '\'),'; } } } diff --git a/upgrade/php/p1607_drop_primary_key_if_exists.php b/upgrade/php/p1607_drop_primary_key_if_exists.php index 972f368d1..21bebb34f 100644 --- a/upgrade/php/p1607_drop_primary_key_if_exists.php +++ b/upgrade/php/p1607_drop_primary_key_if_exists.php @@ -23,11 +23,10 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function p1607_drop_primary_key_if_exists() { - if (Db::getInstance()->executeS('SHOW INDEX FROM `'._DB_PREFIX_.'order_detail_tax` WHERE Key_name = "PRIMARY"')) { - Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'order_detail_tax` DROP PRIMARY KEY'); + if (Db::getInstance()->executeS('SHOW INDEX FROM `' . _DB_PREFIX_ . 'order_detail_tax` WHERE Key_name = "PRIMARY"')) { + Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'order_detail_tax` DROP PRIMARY KEY'); } return true; diff --git a/upgrade/php/ps1600_add_missing_index.php b/upgrade/php/ps1600_add_missing_index.php index 243096b51..004465158 100644 --- a/upgrade/php/ps1600_add_missing_index.php +++ b/upgrade/php/ps1600_add_missing_index.php @@ -23,15 +23,14 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function ps1600_add_missing_index() { $key_exists = Db::getInstance()->executeS(' SHOW INDEX - FROM `'._DB_PREFIX_.'connections` + FROM `' . _DB_PREFIX_ . 'connections` WHERE Key_name = "id_guest"'); if (!$key_exists) { - Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'connections` ADD INDEX (`id_guest`)'); + Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'connections` ADD INDEX (`id_guest`)'); } return true; diff --git a/upgrade/php/ps16012_update_alias.php b/upgrade/php/ps16012_update_alias.php index a2ebec081..e7c8443e1 100644 --- a/upgrade/php/ps16012_update_alias.php +++ b/upgrade/php/ps16012_update_alias.php @@ -23,27 +23,26 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function ps16012_update_alias() { $step = 3000; - $count_alias = Db::getInstance()->getValue('SELECT count(id_alias) FROM '._DB_PREFIX_.'alias'); + $count_alias = Db::getInstance()->getValue('SELECT count(id_alias) FROM ' . _DB_PREFIX_ . 'alias'); $nb_loop = $start = 0; if ($count_alias > 0) { $nb_loop = ceil($count_alias / $step); } - for ($i = 0; $i < $nb_loop; $i++) { - $sql = 'SELECT id_alias, alias, search FROM `'._DB_PREFIX_.'alias`'; - $start = (int) (($i+1) * $step); + for ($i = 0; $i < $nb_loop; ++$i) { + $sql = 'SELECT id_alias, alias, search FROM `' . _DB_PREFIX_ . 'alias`'; + $start = (int) (($i + 1) * $step); if ($aliass = Db::getInstance()->query($sql)) { while ($alias = Db::getInstance()->nextRow($aliass)) { if (is_array($alias)) { Db::getInstance()->execute(' - UPDATE `'._DB_PREFIX_.'alias` - SET alias = \''.pSQL(Tools::replaceAccentedChars($alias['alias'])).'\', - search = \''.pSQL(Tools::replaceAccentedChars($alias['search'])).'\' - WHERE id_alias = '.(int)$alias['id_alias']); + UPDATE `' . _DB_PREFIX_ . 'alias` + SET alias = \'' . pSQL(Tools::replaceAccentedChars($alias['alias'])) . '\', + search = \'' . pSQL(Tools::replaceAccentedChars($alias['search'])) . '\' + WHERE id_alias = ' . (int) $alias['id_alias']); } } } diff --git a/upgrade/php/ps1604_update_employee_date.php b/upgrade/php/ps1604_update_employee_date.php index c76c723d4..fd93f4c3d 100644 --- a/upgrade/php/ps1604_update_employee_date.php +++ b/upgrade/php/ps1604_update_employee_date.php @@ -26,7 +26,7 @@ function ps1604_update_employee_date() { if (defined('_PS_CREATION_DATE_')) { - return Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'employee` SET stats_date_from = \''.addslashes(_PS_CREATION_DATE_).'\' WHERE `stats_date_from` < \''.addslashes(_PS_CREATION_DATE_).'\''); + return Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'employee` SET stats_date_from = \'' . addslashes(_PS_CREATION_DATE_) . '\' WHERE `stats_date_from` < \'' . addslashes(_PS_CREATION_DATE_) . '\''); } return true; diff --git a/upgrade/php/ps1605_change_index.php b/upgrade/php/ps1605_change_index.php index e41fea68a..5b37fe4fe 100644 --- a/upgrade/php/ps1605_change_index.php +++ b/upgrade/php/ps1605_change_index.php @@ -23,12 +23,11 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function ps1605_change_index() { - $index = Db::getInstance()->executeS('SHOW INDEX FROM `'._DB_PREFIX_.'order_detail_tax` WHERE Key_name = "id_tax"'); + $index = Db::getInstance()->executeS('SHOW INDEX FROM `' . _DB_PREFIX_ . 'order_detail_tax` WHERE Key_name = "id_tax"'); if (is_array($index) && count($index)) { - Db::getInstance()->execute('ALTER IGNORE TABLE `'._DB_PREFIX_.'order_detail_tax` DROP INDEX `id_tax`'); + Db::getInstance()->execute('ALTER IGNORE TABLE `' . _DB_PREFIX_ . 'order_detail_tax` DROP INDEX `id_tax`'); } - Db::getInstance()->execute('ALTER IGNORE TABLE `'._DB_PREFIX_.'order_detail_tax` ADD INDEX (`id_tax`)'); + Db::getInstance()->execute('ALTER IGNORE TABLE `' . _DB_PREFIX_ . 'order_detail_tax` ADD INDEX (`id_tax`)'); } diff --git a/upgrade/php/ps1607_language_code_update.php b/upgrade/php/ps1607_language_code_update.php index 1ef7a975b..d042759d2 100644 --- a/upgrade/php/ps1607_language_code_update.php +++ b/upgrade/php/ps1607_language_code_update.php @@ -23,17 +23,16 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function ps1607_language_code_update() { if (defined('_PS_VERSION_')) { - $langs = Db::getInstance()->executeS('SELECT `id_lang`, `iso_code`, `language_code` FROM `'._DB_PREFIX_.'lang`'); + $langs = Db::getInstance()->executeS('SELECT `id_lang`, `iso_code`, `language_code` FROM `' . _DB_PREFIX_ . 'lang`'); if (is_array($langs) && $langs) { foreach ($langs as $lang) { if (Tools::strlen($lang['language_code']) == 2) { - $result = json_decode(Tools::file_get_contents('https://www.prestashop.com/download/lang_packs/get_language_pack.php?version='._PS_VERSION_.'&iso_lang='.Tools::strtolower($lang['iso_code']))); + $result = json_decode(Tools::file_get_contents('https://www.prestashop.com/download/lang_packs/get_language_pack.php?version=' . _PS_VERSION_ . '&iso_lang=' . Tools::strtolower($lang['iso_code']))); if ($result && !isset($result->error) && Tools::strlen($result->language_code) > 2) { - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'lang` SET `language_code` = \''.pSQL($result->language_code).'\' WHERE `id_lang` = '.(int)$lang['id_lang']).' LIMIT 1'; + Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'lang` SET `language_code` = \'' . pSQL($result->language_code) . '\' WHERE `id_lang` = ' . (int) $lang['id_lang']) . ' LIMIT 1'; } } } diff --git a/upgrade/php/ps1700_stores.php b/upgrade/php/ps1700_stores.php index 77e204b47..86a2145c0 100644 --- a/upgrade/php/ps1700_stores.php +++ b/upgrade/php/ps1700_stores.php @@ -23,12 +23,11 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function ps1700_stores() { $stores = Db::getInstance()->executeS(' SELECT `id_store`, `hours` - FROM `'._DB_PREFIX_.'store` + FROM `' . _DB_PREFIX_ . 'store` '); $result = true; @@ -39,15 +38,15 @@ function ps1700_stores() $hours[$key] = [$h]; } } else { - $hours = array(); + $hours = []; } $hours = json_encode($hours); $result &= Db::getInstance()->execute( ' - UPDATE `'._DB_PREFIX_.'store` - SET `hours` = \''.$hours.'\' - WHERE `id_store` = '.$store['id_store'] + UPDATE `' . _DB_PREFIX_ . 'store` + SET `hours` = \'' . $hours . '\' + WHERE `id_store` = ' . $store['id_store'] ); } diff --git a/upgrade/php/ps_1700_add_locale.php b/upgrade/php/ps_1700_add_locale.php index 991017508..f05c0f2f7 100644 --- a/upgrade/php/ps_1700_add_locale.php +++ b/upgrade/php/ps_1700_add_locale.php @@ -23,18 +23,17 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function ps_1700_add_locale() { - $locale = file_get_contents(__DIR__.'/../legacy-to-standard-locales.json'); + $locale = file_get_contents(__DIR__ . '/../legacy-to-standard-locales.json'); $locale_mapping = json_decode($locale, true); - $results = Db::getInstance()->executeS('SELECT id_lang, iso_code FROM '._DB_PREFIX_.'lang'); - foreach($results as $result) { + $results = Db::getInstance()->executeS('SELECT id_lang, iso_code FROM ' . _DB_PREFIX_ . 'lang'); + foreach ($results as $result) { $id_lang = $result['id_lang']; $iso_code = $result['iso_code']; if (array_key_exists($iso_code, $locale_mapping)) { $locale = $locale_mapping[$iso_code]; - Db::getInstance()->execute('UPDATE '._DB_PREFIX_.'lang SET locale="'.$locale.'" WHERE id_lang="'.$id_lang.'"'); + Db::getInstance()->execute('UPDATE ' . _DB_PREFIX_ . 'lang SET locale="' . $locale . '" WHERE id_lang="' . $id_lang . '"'); } } diff --git a/upgrade/php/ps_1700_add_payment_preferences_tab.php b/upgrade/php/ps_1700_add_payment_preferences_tab.php index 01fd21c05..743e721a9 100644 --- a/upgrade/php/ps_1700_add_payment_preferences_tab.php +++ b/upgrade/php/ps_1700_add_payment_preferences_tab.php @@ -23,7 +23,6 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function ps_1700_add_payment_preferences_tab() { include_once 'add_new_tab.php'; diff --git a/upgrade/php/ps_1700_right_management.php b/upgrade/php/ps_1700_right_management.php index c0a1ca877..5e41e425e 100644 --- a/upgrade/php/ps_1700_right_management.php +++ b/upgrade/php/ps_1700_right_management.php @@ -23,21 +23,20 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function ps_1700_right_management() { - $actions = array('CREATE', 'READ', 'UPDATE', 'DELETE'); + $actions = ['CREATE', 'READ', 'UPDATE', 'DELETE']; - /** + /* * Add roles */ - foreach (array('TAB' => 'class_name', 'MODULE' => 'name') as $element => $nameColumn) { + foreach (['TAB' => 'class_name', 'MODULE' => 'name'] as $element => $nameColumn) { foreach ($actions as $action) { Db::getInstance()->execute(' - INSERT IGNORE INTO `'._DB_PREFIX_.'authorization_role` + INSERT IGNORE INTO `' . _DB_PREFIX_ . 'authorization_role` (`slug`) - SELECT CONCAT("ROLE_MOD_'.$element.'_", UCASE(`'.$nameColumn.'`), "_'.$action.'") - FROM `'._DB_PREFIX_.strtolower($element).'` + SELECT CONCAT("ROLE_MOD_' . $element . '_", UCASE(`' . $nameColumn . '`), "_' . $action . '") + FROM `' . _DB_PREFIX_ . strtolower($element) . '` '); } } @@ -48,17 +47,17 @@ function ps_1700_right_management() $accessObject = new Access(); // Tabs - $oldAccess = Db::getInstance()->executeS('SELECT t.id_tab, a.id_profile, a.view, a.add, a.edit, a.delete FROM `'._DB_PREFIX_.'tab` t LEFT JOIN `'._DB_PREFIX_.'access_old` a USING (id_tab)'); + $oldAccess = Db::getInstance()->executeS('SELECT t.id_tab, a.id_profile, a.view, a.add, a.edit, a.delete FROM `' . _DB_PREFIX_ . 'tab` t LEFT JOIN `' . _DB_PREFIX_ . 'access_old` a USING (id_tab)'); if (empty($oldAccess)) { - $oldAccess = array(); + $oldAccess = []; } foreach ($oldAccess as $currOldAccess) { - foreach (array('view', 'add', 'edit', 'delete') as $action) { + foreach (['view', 'add', 'edit', 'delete'] as $action) { if (array_key_exists($action, $currOldAccess) && ($currOldAccess[$action] == '1' || $currOldAccess['id_profile'] == _PS_ADMIN_PROFILE_ || empty($currOldAccess['id_profile']))) { $accessObject->updateLgcAccess( - !empty($currOldAccess['id_profile'])?$currOldAccess['id_profile']:_PS_ADMIN_PROFILE_, + !empty($currOldAccess['id_profile']) ? $currOldAccess['id_profile'] : _PS_ADMIN_PROFILE_, $currOldAccess['id_tab'], $action, true @@ -68,18 +67,18 @@ function ps_1700_right_management() } // Modules - $oldAccess = Db::getInstance()->executeS('SELECT mo.id_module, m.id_profile, m.configure, m.view, m.uninstall FROM `'._DB_PREFIX_.'module` mo LEFT JOIN `'._DB_PREFIX_.'module_access_old` m USING (id_module)'); + $oldAccess = Db::getInstance()->executeS('SELECT mo.id_module, m.id_profile, m.configure, m.view, m.uninstall FROM `' . _DB_PREFIX_ . 'module` mo LEFT JOIN `' . _DB_PREFIX_ . 'module_access_old` m USING (id_module)'); if (empty($oldAccess)) { - $oldAccess = array(); + $oldAccess = []; } foreach ($oldAccess as $currOldAccess) { - foreach (array('configure', 'view', 'uninstall') as $action) { + foreach (['configure', 'view', 'uninstall'] as $action) { if (array_key_exists($action, $currOldAccess) && ($currOldAccess[$action] == '1' || $currOldAccess['id_profile'] == _PS_ADMIN_PROFILE_ || empty($currOldAccess['id_profile']))) { $accessObject->updateLgcModuleAccess( - !empty($currOldAccess['id_profile'])?$currOldAccess['id_profile']:_PS_ADMIN_PROFILE_, + !empty($currOldAccess['id_profile']) ? $currOldAccess['id_profile'] : _PS_ADMIN_PROFILE_, $currOldAccess['id_module'], $action, true diff --git a/upgrade/php/ps_1730_add_quick_access_evaluation_catalog.php b/upgrade/php/ps_1730_add_quick_access_evaluation_catalog.php index 714585cc8..f93da61b4 100644 --- a/upgrade/php/ps_1730_add_quick_access_evaluation_catalog.php +++ b/upgrade/php/ps_1730_add_quick_access_evaluation_catalog.php @@ -23,7 +23,6 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function ps_1730_add_quick_access_evaluation_catalog() { $moduleManagerBuilder = \PrestaShop\PrestaShop\Core\Addon\Module\ModuleManagerBuilder::getInstance(); @@ -36,13 +35,13 @@ function ps_1730_add_quick_access_evaluation_catalog() Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'quick_access` SET link = "index.php?controller=AdminStats&module=statscheckup" '); - $idQuickAccess = (int)Db::getInstance()->Insert_ID(); + $idQuickAccess = (int) Db::getInstance()->Insert_ID(); foreach (Language::getLanguages() as $language) { Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'quick_access_lang` SET `id_quick_access` = ' . $idQuickAccess . ', - `id_lang` = ' . (int)$language['id_lang'] . ', - `name` = "' . pSQL($translator->trans('Catalog evaluation', array(), 'Admin.Navigation.Header')) . '" '); + `id_lang` = ' . (int) $language['id_lang'] . ', + `name` = "' . pSQL($translator->trans('Catalog evaluation', [], 'Admin.Navigation.Header')) . '" '); } } } diff --git a/upgrade/php/ps_1730_migrate_data_from_store_to_store_lang_and_clean_store.php b/upgrade/php/ps_1730_migrate_data_from_store_to_store_lang_and_clean_store.php index 4d2b46fc7..a5b0f3ab5 100755 --- a/upgrade/php/ps_1730_migrate_data_from_store_to_store_lang_and_clean_store.php +++ b/upgrade/php/ps_1730_migrate_data_from_store_to_store_lang_and_clean_store.php @@ -23,15 +23,14 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function ps_1730_migrate_data_from_store_to_store_lang_and_clean_store() { $langs = Language::getLanguages(); foreach ($langs as $lang) { Db::getInstance()->execute( - "INSERT INTO `" . _DB_PREFIX_ . "store_lang` - SELECT `id_store`, " . $lang['id_lang'] . " as id_lang , `name`, `address1`, `address2`, `hours`, `note` - FROM `" . _DB_PREFIX_ . "store`" + 'INSERT INTO `' . _DB_PREFIX_ . 'store_lang` + SELECT `id_store`, ' . $lang['id_lang'] . ' as id_lang , `name`, `address1`, `address2`, `hours`, `note` + FROM `' . _DB_PREFIX_ . 'store`' ); } } diff --git a/upgrade/php/ps_1730_move_some_aeuc_configuration_to_core.php b/upgrade/php/ps_1730_move_some_aeuc_configuration_to_core.php index bd44c1ad1..6338b42b3 100644 --- a/upgrade/php/ps_1730_move_some_aeuc_configuration_to_core.php +++ b/upgrade/php/ps_1730_move_some_aeuc_configuration_to_core.php @@ -23,21 +23,20 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function ps_1730_move_some_aeuc_configuration_to_core() { $translator = Context::getContext()->getTranslator(); - $labelInStock = array(); - $labelOOSProductsBOA = array(); - $labelOOSProductsBOD = array(); - $deliveryTimeAvailable = array(); - $deliveryTimeOutOfStockBackorderAllowed = array(); + $labelInStock = []; + $labelOOSProductsBOA = []; + $labelOOSProductsBOD = []; + $deliveryTimeAvailable = []; + $deliveryTimeOutOfStockBackorderAllowed = []; foreach (Language::getLanguages() as $language) { - $labelInStock[$language['id_lang']] = $translator->trans('In Stock', array(), 'Admin.Shopparameters.Feature', $language['locale']); - $labelOOSProductsBOA[$language['id_lang']] = $translator->trans('Product available for orders', array(), 'Admin.Shopparameters.Feature', $language['locale']); - $labelOOSProductsBOD[$language['id_lang']] = $translator->trans('Out-of-Stock', array(), 'Admin.Shopparameters.Feature', $language['locale']); + $labelInStock[$language['id_lang']] = $translator->trans('In Stock', [], 'Admin.Shopparameters.Feature', $language['locale']); + $labelOOSProductsBOA[$language['id_lang']] = $translator->trans('Product available for orders', [], 'Admin.Shopparameters.Feature', $language['locale']); + $labelOOSProductsBOD[$language['id_lang']] = $translator->trans('Out-of-Stock', [], 'Admin.Shopparameters.Feature', $language['locale']); if ($value = Configuration::get('AEUC_LABEL_DELIVERY_TIME_AVAILABLE', $language['id_lang'])) { $deliveryTimeAvailable[$language['id_lang']] = $value; diff --git a/upgrade/php/ps_1740_update_module_tabs.php b/upgrade/php/ps_1740_update_module_tabs.php index 51cf3a0b4..ab7b8eeee 100644 --- a/upgrade/php/ps_1740_update_module_tabs.php +++ b/upgrade/php/ps_1740_update_module_tabs.php @@ -30,17 +30,16 @@ function ps_1740_update_module_tabs() { // Add new sub menus for modules - $moduleTabsToBeAdded = array( + $moduleTabsToBeAdded = [ 'AdminModulesManage' => 'en:Installed modules|fr:Modules installés|es:Módulos instalados|de:Installierte Module|it:Moduli installati', 'AdminModulesCatalog' => 'en:Selection|fr:Selection|es:Selección|de:Auswahl|it:Selezione', 'AdminModulesNotifications' => 'en:Notifications|fr:Notifications|es:Notificaciones|de:Nachrichten|it:Notifiche', - ); + ]; include_once 'add_new_tab.php'; foreach ($moduleTabsToBeAdded as $className => $translations) { add_new_tab_17($className, $translations, 0, false, 'AdminModulesSf'); } - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'tab` SET `active`=1 WHERE `class_name` IN ("AdminModulesManage", "AdminModulesCatalog", "AdminModulesNotifications")'); - + Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'tab` SET `active`=1 WHERE `class_name` IN ("AdminModulesManage", "AdminModulesCatalog", "AdminModulesNotifications")'); } diff --git a/upgrade/php/ps_1750_update_module_tabs.php b/upgrade/php/ps_1750_update_module_tabs.php index df53ab6d6..755e07a14 100644 --- a/upgrade/php/ps_1750_update_module_tabs.php +++ b/upgrade/php/ps_1750_update_module_tabs.php @@ -30,29 +30,29 @@ function ps_1750_update_module_tabs() { // STEP 1: Add new sub menus for modules - $moduleTabsToBeAdded = array( - 'AdminModulesUpdates' => array( + $moduleTabsToBeAdded = [ + 'AdminModulesUpdates' => [ 'translations' => 'en:Updates|fr:Mises à jour|es:Actualizaciones|de:Aktualisierung|it:Aggiornamenti', 'parent' => 'AdminModulesSf', - ), - 'AdminParentModulesCatalog' => array( + ], + 'AdminParentModulesCatalog' => [ 'translations' => 'en:Module Catalog|fr:Catalogue de modules|es:Catálogo de módulos|de:Modulkatalog|it:Catalogo dei moduli', 'parent' => 'AdminParentModulesSf', - ), - ); + ], + ]; include_once 'add_new_tab.php'; foreach ($moduleTabsToBeAdded as $className => $tabDetails) { add_new_tab_17($className, $tabDetails['translations'], 0, false, $tabDetails['parent']); Db::getInstance()->execute( - 'UPDATE `'._DB_PREFIX_.'tab` SET `active`= 1 WHERE `class_name` = "' . $className . '"' + 'UPDATE `' . _DB_PREFIX_ . 'tab` SET `active`= 1 WHERE `class_name` = "' . $className . '"' ); } // STEP 2: Rename module tabs (Notifications as Alerts, Module selection as Module Catalog, Module Catalog as Module Selections) include_once 'clean_tabs_15.php'; $adminModulesNotificationsTabId = Db::getInstance()->getValue( - 'SELECT id_tab FROM '._DB_PREFIX_.'tab WHERE class_name = "AdminModulesNotifications"' + 'SELECT id_tab FROM ' . _DB_PREFIX_ . 'tab WHERE class_name = "AdminModulesNotifications"' ); if (!empty($adminModulesNotificationsTabId)) { renameTab( @@ -69,7 +69,7 @@ function ps_1750_update_module_tabs() } $adminModulesCatalogTabId = Db::getInstance()->getValue( - 'SELECT id_tab FROM '._DB_PREFIX_.'tab WHERE class_name = "AdminModulesCatalog"' + 'SELECT id_tab FROM ' . _DB_PREFIX_ . 'tab WHERE class_name = "AdminModulesCatalog"' ); if (!empty($adminModulesCatalogTabId)) { renameTab( @@ -86,7 +86,7 @@ function ps_1750_update_module_tabs() } $adminModulesManageTabId = Db::getInstance()->getValue( - 'SELECT id_tab FROM '._DB_PREFIX_.'tab WHERE class_name = "AdminModulesManage"' + 'SELECT id_tab FROM ' . _DB_PREFIX_ . 'tab WHERE class_name = "AdminModulesManage"' ); if (!empty($adminModulesManageTabId)) { renameTab( @@ -103,7 +103,7 @@ function ps_1750_update_module_tabs() } $adminModulesAddonsSelectionsTabId = Db::getInstance()->getValue( - 'SELECT id_tab FROM '._DB_PREFIX_.'tab WHERE class_name = "AdminAddonsCatalog"' + 'SELECT id_tab FROM ' . _DB_PREFIX_ . 'tab WHERE class_name = "AdminAddonsCatalog"' ); if (!empty($adminModulesAddonsSelectionsTabId)) { renameTab( @@ -122,11 +122,11 @@ function ps_1750_update_module_tabs() // STEP 3: Move the 2 module catalog controllers in the parent one // Get The ID of the parent $adminParentModuleCatalogTabId = Db::getInstance()->getValue( - 'SELECT id_tab FROM '._DB_PREFIX_.'tab WHERE class_name = "AdminParentModulesCatalog"' + 'SELECT id_tab FROM ' . _DB_PREFIX_ . 'tab WHERE class_name = "AdminParentModulesCatalog"' ); - foreach (array('AdminModulesCatalog', 'AdminAddonsCatalog') as $key => $className) { + foreach (['AdminModulesCatalog', 'AdminAddonsCatalog'] as $key => $className) { Db::getInstance()->execute( - 'UPDATE `'._DB_PREFIX_.'tab` SET `id_parent`= ' . (int) $adminParentModuleCatalogTabId . ', position = '. $key . ' WHERE `class_name` = "' . $className . '"' + 'UPDATE `' . _DB_PREFIX_ . 'tab` SET `id_parent`= ' . (int) $adminParentModuleCatalogTabId . ', position = ' . $key . ' WHERE `class_name` = "' . $className . '"' ); } } diff --git a/upgrade/php/ps_1751_update_module_sf_tab.php b/upgrade/php/ps_1751_update_module_sf_tab.php index 03b62c606..53df45b10 100644 --- a/upgrade/php/ps_1751_update_module_sf_tab.php +++ b/upgrade/php/ps_1751_update_module_sf_tab.php @@ -32,7 +32,7 @@ function ps_1751_update_module_sf_tab() // Rename parent module tab (= Module manager) include_once 'clean_tabs_15.php'; $adminModulesParentTabId = Db::getInstance()->getValue( - 'SELECT id_tab FROM '._DB_PREFIX_.'tab WHERE class_name = "AdminModulesSf"' + 'SELECT id_tab FROM ' . _DB_PREFIX_ . 'tab WHERE class_name = "AdminModulesSf"' ); if (!empty($adminModulesParentTabId)) { renameTab( diff --git a/upgrade/php/ps_1760_copy_data_from_currency_to_currency_lang.php b/upgrade/php/ps_1760_copy_data_from_currency_to_currency_lang.php index b6a055fac..55027ad92 100755 --- a/upgrade/php/ps_1760_copy_data_from_currency_to_currency_lang.php +++ b/upgrade/php/ps_1760_copy_data_from_currency_to_currency_lang.php @@ -35,12 +35,12 @@ function ps_1760_copy_data_from_currency_to_currency_lang() $languages = Language::getLanguages(); foreach ($languages as $language) { Db::getInstance()->execute( - "INSERT INTO `" . _DB_PREFIX_ . "currency_lang` (`id_currency`, `id_lang`, `name`) - SELECT `id_currency`, " . (int) $language['id_lang'] . " as id_lang , `name` - FROM `" . _DB_PREFIX_ . "currency` + 'INSERT INTO `' . _DB_PREFIX_ . 'currency_lang` (`id_currency`, `id_lang`, `name`) + SELECT `id_currency`, ' . (int) $language['id_lang'] . ' as id_lang , `name` + FROM `' . _DB_PREFIX_ . 'currency` ON DUPLICATE KEY UPDATE - `name` = `" . _DB_PREFIX_ . "currency`.`name` - " + `name` = `' . _DB_PREFIX_ . 'currency`.`name` + ' ); } /** @var Currency[] $currencies */ @@ -92,7 +92,7 @@ function refreshLocalizedCurrencyData(Currency $currency, array $languages, Loca $fields = [ 'name' => $cldrCurrency->getDisplayName(), - 'symbol' => (string) $cldrCurrency->getSymbol() ?: $currency->iso_code + 'symbol' => (string) $cldrCurrency->getSymbol() ?: $currency->iso_code, ]; $where = 'id_currency = ' . (int) $currency->id diff --git a/upgrade/php/ps_1760_update_tabs.php b/upgrade/php/ps_1760_update_tabs.php index de073d949..e36f67d9b 100644 --- a/upgrade/php/ps_1760_update_tabs.php +++ b/upgrade/php/ps_1760_update_tabs.php @@ -30,7 +30,7 @@ function ps_1760_update_tabs() { // STEP 1: Add new sub menus for modules (tab may exist but we need authorization roles to be added as well) - $moduleTabsToBeAdded = array( + $moduleTabsToBeAdded = [ 'AdminMailThemeParent' => [ 'translations' => 'en:Email Themes', 'parent' => 'AdminParentThemes', @@ -39,21 +39,21 @@ function ps_1760_update_tabs() 'translations' => 'en:Email Themes', 'parent' => 'AdminMailThemeParent', ], - 'AdminModulesUpdates' => array( + 'AdminModulesUpdates' => [ 'translations' => 'en:Updates|fr:Mises à jour|es:Actualizaciones|de:Aktualisierung|it:Aggiornamenti', 'parent' => 'AdminModulesSf', - ), - 'AdminModulesNotifications' => array( + ], + 'AdminModulesNotifications' => [ 'translations' => 'en:Updates|fr:Mises à jour|es:Actualizaciones|de:Aktualisierung|it:Aggiornamenti', 'parent' => 'AdminModulesSf', - ), - ); + ], + ]; include_once 'add_new_tab.php'; foreach ($moduleTabsToBeAdded as $className => $tabDetails) { add_new_tab_17($className, $tabDetails['translations'], 0, false, $tabDetails['parent']); Db::getInstance()->execute( - 'UPDATE `'._DB_PREFIX_.'tab` SET `active`= 1 WHERE `class_name` = "' . pSQL($className) . '"' + 'UPDATE `' . _DB_PREFIX_ . 'tab` SET `active`= 1 WHERE `class_name` = "' . pSQL($className) . '"' ); } } diff --git a/upgrade/php/ps_1770_preset_tab_enabled.php b/upgrade/php/ps_1770_preset_tab_enabled.php index 29d7a35c9..2188d9fb0 100644 --- a/upgrade/php/ps_1770_preset_tab_enabled.php +++ b/upgrade/php/ps_1770_preset_tab_enabled.php @@ -27,15 +27,16 @@ /** * Preset enabled new column in tabs to true for all (except for disabled modules) */ -function ps_1770_preset_tab_enabled() { +function ps_1770_preset_tab_enabled() +{ //First set all tabs enabled $result = Db::getInstance()->execute( - 'UPDATE `'._DB_PREFIX_.'tab` SET `enabled` = 1' + 'UPDATE `' . _DB_PREFIX_ . 'tab` SET `enabled` = 1' ); //Then search for inactive modules and disable their tabs $inactiveModules = Db::getInstance()->executeS( - 'SELECT `name` FROM `'._DB_PREFIX_.'module` WHERE `active` != 1' + 'SELECT `name` FROM `' . _DB_PREFIX_ . 'module` WHERE `active` != 1' ); $moduleNames = []; foreach ($inactiveModules as $inactiveModule) { @@ -43,7 +44,7 @@ function ps_1770_preset_tab_enabled() { } if (count($moduleNames) > 0) { $result &= Db::getInstance()->execute( - 'UPDATE `'._DB_PREFIX_.'tab` SET `enabled` = 0 WHERE `module` IN (' . implode(',', $moduleNames) . ')' + 'UPDATE `' . _DB_PREFIX_ . 'tab` SET `enabled` = 0 WHERE `module` IN (' . implode(',', $moduleNames) . ')' ); } diff --git a/upgrade/php/ps_1770_update_charset.php b/upgrade/php/ps_1770_update_charset.php index b71a14a56..33123aeb3 100644 --- a/upgrade/php/ps_1770_update_charset.php +++ b/upgrade/php/ps_1770_update_charset.php @@ -23,7 +23,6 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function ps_1770_update_charset() { $adminFilterTableExists = $adminFilterFilterIdExists = $moduleHistoryTableExists = $translationTableExists = false; @@ -38,7 +37,6 @@ function ps_1770_update_charset() ); } } catch (Exception $e) { - } try { @@ -46,16 +44,13 @@ function ps_1770_update_charset() 'SELECT count(*) FROM ' . _DB_PREFIX_ . 'module_history' ); } catch (Exception $e) { - } try { $translationTableExists = (bool) Db::getInstance()->executeS( 'SELECT count(*) FROM ' . _DB_PREFIX_ . 'translation' ); - } catch (Exception $e) { - } $result = true; @@ -80,7 +75,6 @@ function ps_1770_update_charset() ); } - if ($translationTableExists) { $result &= Db::getInstance()->execute( 'ALTER TABLE `PREFIX_translation` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci' diff --git a/upgrade/php/ps_1770_update_order_status_colors.php b/upgrade/php/ps_1770_update_order_status_colors.php index 4c5ea3501..06c5d815d 100644 --- a/upgrade/php/ps_1770_update_order_status_colors.php +++ b/upgrade/php/ps_1770_update_order_status_colors.php @@ -29,7 +29,8 @@ /** * Updates order status colors according to new color schema */ -function ps_1770_update_order_status_colors() { +function ps_1770_update_order_status_colors() +{ $statusColorMap = [ OrderStatusColor::AWAITING_PAYMENT => Configuration::getMultiple([ 'PS_OS_CHEQUE', @@ -59,7 +60,7 @@ function ps_1770_update_order_status_colors() { foreach ($statusColorMap as $color => $statuses) { foreach ($statuses as $statusId) { Db::getInstance()->execute( - 'UPDATE `'._DB_PREFIX_.'order_state` SET `color` = "' . pSQL($color) . '" WHERE `id_order_state` = ' . (int) $statusId + 'UPDATE `' . _DB_PREFIX_ . 'order_state` SET `color` = "' . pSQL($color) . '" WHERE `id_order_state` = ' . (int) $statusId ); } } @@ -76,7 +77,7 @@ function ps_1770_update_order_status_colors() { $whereCondition .= ' AND `' . $field . '` = "' . pSQL($expectedValue) . '"'; } Db::getInstance()->execute( - 'UPDATE `'._DB_PREFIX_.'order_state` SET `color` = "' . pSQL($color) . '"' . $whereCondition + 'UPDATE `' . _DB_PREFIX_ . 'order_state` SET `color` = "' . pSQL($color) . '"' . $whereCondition ); } } diff --git a/upgrade/php/ps_1780_add_feature_flag_tab.php b/upgrade/php/ps_1780_add_feature_flag_tab.php index 36cba7c5f..fa34d9257 100644 --- a/upgrade/php/ps_1780_add_feature_flag_tab.php +++ b/upgrade/php/ps_1780_add_feature_flag_tab.php @@ -23,13 +23,12 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function ps_1780_add_feature_flag_tab() { $className = 'AdminFeatureFlag'; $result = Db::getInstance()->executeS( - 'SELECT id_tab FROM `'._DB_PREFIX_.'tab` WHERE `class_name` = \'AdminAdvancedParameters\'' + 'SELECT id_tab FROM `' . _DB_PREFIX_ . 'tab` WHERE `class_name` = \'AdminAdvancedParameters\'' ); if (empty($result)) { @@ -40,7 +39,7 @@ function ps_1780_add_feature_flag_tab() } $advancedParametersTabId = (int) $result[0]['id_tab']; - include_once __DIR__.'/add_new_tab.php'; + include_once __DIR__ . '/add_new_tab.php'; add_new_tab_17( $className, 'en:Experimental Feature|fr:Fonctionnalités expérimentales', @@ -48,6 +47,6 @@ function ps_1780_add_feature_flag_tab() ); Db::getInstance()->execute( - 'UPDATE `'._DB_PREFIX_.'tab` SET `active`= 1, `enabled` = 1 WHERE `class_name` = \'' . $className . '\'' + 'UPDATE `' . _DB_PREFIX_ . 'tab` SET `active`= 1, `enabled` = 1 WHERE `class_name` = \'' . $className . '\'' ); } diff --git a/upgrade/php/ps_update_tabs.php b/upgrade/php/ps_update_tabs.php index f8366c163..7b3ed83d6 100644 --- a/upgrade/php/ps_update_tabs.php +++ b/upgrade/php/ps_update_tabs.php @@ -1,4 +1,4 @@ -entities->tab as $tab) { - $tab = (array)$tab; - $tab_class_name[$tab['class_name']] = $tab['@attributes']['id']; +function ps_update_tabs() +{ + if (file_exists(__DIR__ . '/../../data/xml/tab.xml')) { + $tab_xml = simplexml_load_file(__DIR__ . '/../../data/xml/tab.xml'); + if (!empty($tab_xml)) { + $tab_class_name = []; + $tab_ids = []; + + foreach ($tab_xml->entities->tab as $tab) { + $tab = (array) $tab; + $tab_class_name[$tab['class_name']] = $tab['@attributes']['id']; } - $tabs = Db::getInstance()->executeS('SELECT * FROM `' . _DB_PREFIX_ . 'tab`', true, false); - if (!empty($tabs)) { - foreach ($tabs as $tab) { - if (isset($tab_class_name[$tab['class_name']])) { - $tab_ids[$tab['class_name']] = $tab['id_tab']; - } - } + $tabs = Db::getInstance()->executeS('SELECT * FROM `' . _DB_PREFIX_ . 'tab`', true, false); + if (!empty($tabs)) { + foreach ($tabs as $tab) { + if (isset($tab_class_name[$tab['class_name']])) { + $tab_ids[$tab['class_name']] = $tab['id_tab']; + } + } } - - } else { - return; + } else { + return; } if (!empty($tab_class_name)) { - $langs = Db::getInstance()->executeS('SELECT * FROM `' . _DB_PREFIX_ . 'lang` WHERE `iso_code` != "en" ', true, false); - if (!empty($langs)) { - foreach ($langs as $lang) { + if (!empty($langs)) { + foreach ($langs as $lang) { if (file_exists(__DIR__ . '/../../langs/' . $lang['iso_code'] . '/data/tab.xml')) { - - // store XML data - $tab_xml_data = array(); - $tab_xml_lang = simplexml_load_file(__DIR__ . '/../../langs/' . $lang['iso_code'] . '/data/tab.xml'); - if (!empty($tab_xml_lang)) { - foreach ($tab_xml_lang->tab as $tab) { - $tab = (array)$tab; - $tab_xml_data[$tab['@attributes']['id']] = $tab['@attributes']['name']; - } + // store XML data + $tab_xml_data = []; + $tab_xml_lang = simplexml_load_file(__DIR__ . '/../../langs/' . $lang['iso_code'] . '/data/tab.xml'); + if (!empty($tab_xml_lang)) { + foreach ($tab_xml_lang->tab as $tab) { + $tab = (array) $tab; + $tab_xml_data[$tab['@attributes']['id']] = $tab['@attributes']['name']; + } } - // store DB data - $tab_db_data = array(); + // store DB data + $tab_db_data = []; $results = Db::getInstance()->executeS(' SELECT t.`id_tab`, tl.`id_lang`, t.`class_name`, tl.`name` FROM `' . _DB_PREFIX_ . 'tab` t INNER JOIN `' . _DB_PREFIX_ . 'tab_lang` tl ON tl.`id_tab` = t.`id_tab` - WHERE tl.`id_lang` = ' . (int)$lang['id_lang'], true, false); + WHERE tl.`id_lang` = ' . (int) $lang['id_lang'], true, false); - if (!empty($results)) { - foreach ($results as $res) { - $tab_db_data[$res['class_name']] = $res['name']; - } + if (!empty($results)) { + foreach ($results as $res) { + $tab_db_data[$res['class_name']] = $res['name']; + } } - if (!empty($tab_xml_data)) { - foreach ($tab_xml_data as $k => $tab) { - if (in_array($k, $tab_class_name)) { + if (!empty($tab_xml_data)) { + foreach ($tab_xml_data as $k => $tab) { + if (in_array($k, $tab_class_name)) { $tmp_class_name = array_keys($tab_class_name, $k)[0]; - if (array_key_exists($tmp_class_name, $tab_ids)) { + if (array_key_exists($tmp_class_name, $tab_ids)) { $tmp_class_id = $tab_ids[$tmp_class_name]; - // if data XML is not in DB => insert + // if data XML is not in DB => insert if (!array_key_exists($tmp_class_name, $tab_db_data)) { - $sql = 'INSERT INTO `' . _DB_PREFIX_ . 'tab_lang` (`id_tab`, `id_lang`, `name`) - VALUES (' . (int)$tmp_class_id . ',' . (int)$lang['id_lang'] . ',"' . pSQL($tab) . '")'; + VALUES (' . (int) $tmp_class_id . ',' . (int) $lang['id_lang'] . ',"' . pSQL($tab) . '")'; Db::getInstance()->execute($sql); - - } else { - // if DB is != XML - if ($tab_db_data[$tmp_class_name] != $tab) { + } else { + // if DB is != XML + if ($tab_db_data[$tmp_class_name] != $tab) { $sql = 'UPDATE `' . _DB_PREFIX_ . 'tab_lang` SET `name` = "' . pSQL($tab) . '" - WHERE `id_tab` = ' . (int)$tmp_class_id . ' AND - `id_lang` = ' . (int)$lang['id_lang'] . ' AND + WHERE `id_tab` = ' . (int) $tmp_class_id . ' AND + `id_lang` = ' . (int) $lang['id_lang'] . ' AND `name` = "' . pSQL($tab_db_data[$tmp_class_name]) . '" '; - Db::getInstance()->execute($sql); - } - } - } - } - } - } - } - } - } - } - } + Db::getInstance()->execute($sql); + } + } + } + } + } + } + } + } + } + } + } } diff --git a/upgrade/php/regenerate_level_depth.php b/upgrade/php/regenerate_level_depth.php index 60f3db9d6..b5985cc20 100644 --- a/upgrade/php/regenerate_level_depth.php +++ b/upgrade/php/regenerate_level_depth.php @@ -29,7 +29,7 @@ */ function regenerate_level_depth() { - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'category` SET `level_depth` = 0 WHERE `id_category` = 1'); + Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'category` SET `level_depth` = 0 WHERE `id_category` = 1'); regenerate_children_categories(1, 0); } @@ -41,17 +41,17 @@ function regenerate_level_depth() */ function regenerate_children_categories($id_category, $level_depth) { - $categories = Db::getInstance()->executeS('SELECT `id_category` FROM `'._DB_PREFIX_.'category` WHERE `id_parent` = '.(int)$id_category); + $categories = Db::getInstance()->executeS('SELECT `id_category` FROM `' . _DB_PREFIX_ . 'category` WHERE `id_parent` = ' . (int) $id_category); if (!$categories) { return; } - $new_depth = (int)$level_depth + 1; - $cat_ids = ""; + $new_depth = (int) $level_depth + 1; + $cat_ids = ''; foreach ($categories as $category) { - $cat_ids .= (string)$category['id_category'].','; + $cat_ids .= (string) $category['id_category'] . ','; regenerate_children_categories($category['id_category'], $new_depth); } $cat_ids = substr($cat_ids, 0, -1); - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'category` SET `level_depth` = '.(int)$new_depth.' WHERE `id_category` IN ('.$cat_ids.')'); + Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'category` SET `level_depth` = ' . (int) $new_depth . ' WHERE `id_category` IN (' . $cat_ids . ')'); } diff --git a/upgrade/php/remove_duplicate_category_groups.php b/upgrade/php/remove_duplicate_category_groups.php index f9a8bb7b3..fbcc16c31 100644 --- a/upgrade/php/remove_duplicate_category_groups.php +++ b/upgrade/php/remove_duplicate_category_groups.php @@ -31,17 +31,17 @@ function remove_duplicate_category_groups() { $result = Db::getInstance()->executeS(' SELECT `id_category`, `id_group`, COUNT(*) as `count` - FROM `'._DB_PREFIX_.'category_group` + FROM `' . _DB_PREFIX_ . 'category_group` GROUP BY `id_category`, `id_group` ORDER BY `count` DESC'); foreach ($result as $row) { - if ((int)$row['count'] > 1) { - $limit = (int)$row['count'] - 1; + if ((int) $row['count'] > 1) { + $limit = (int) $row['count'] - 1; $result = Db::getInstance()->execute(' - DELETE FROM `'._DB_PREFIX_.'category_group` - WHERE `id_category` = '.$row['id_category'].' AND `id_group` = '.$row['id_group'].' - LIMIT '.$limit); + DELETE FROM `' . _DB_PREFIX_ . 'category_group` + WHERE `id_category` = ' . $row['id_category'] . ' AND `id_group` = ' . $row['id_group'] . ' + LIMIT ' . $limit); } else { return; } diff --git a/upgrade/php/remove_module_from_hook.php b/upgrade/php/remove_module_from_hook.php index a19551474..dcf2e7c98 100644 --- a/upgrade/php/remove_module_from_hook.php +++ b/upgrade/php/remove_module_from_hook.php @@ -23,26 +23,25 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function remove_module_from_hook($module_name, $hook_name) { $result = true; $id_module = Db::getInstance()->getValue( ' - SELECT `id_module` FROM `'._DB_PREFIX_.'module` - WHERE `name` = \''.pSQL($module_name).'\'' + SELECT `id_module` FROM `' . _DB_PREFIX_ . 'module` + WHERE `name` = \'' . pSQL($module_name) . '\'' ); - if ((int)$id_module > 0) { + if ((int) $id_module > 0) { $id_hook = Db::getInstance()->getValue(' - SELECT `id_hook` FROM `'._DB_PREFIX_.'hook` WHERE `name` = \''.pSQL($hook_name).'\' + SELECT `id_hook` FROM `' . _DB_PREFIX_ . 'hook` WHERE `name` = \'' . pSQL($hook_name) . '\' '); - if ((int)$id_hook > 0) { + if ((int) $id_hook > 0) { $result &= Db::getInstance()->execute(' - DELETE FROM `'._DB_PREFIX_.'hook_module` - WHERE `id_module` = '.(int)$id_module.' AND `id_hook` = '.(int)$id_hook); + DELETE FROM `' . _DB_PREFIX_ . 'hook_module` + WHERE `id_module` = ' . (int) $id_module . ' AND `id_hook` = ' . (int) $id_hook); } } diff --git a/upgrade/php/remove_tab.php b/upgrade/php/remove_tab.php index a89a90cb2..c7efe0de2 100644 --- a/upgrade/php/remove_tab.php +++ b/upgrade/php/remove_tab.php @@ -23,11 +23,10 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function remove_tab($tabname) { Db::getInstance()->execute(' DELETE t, l - FROM `'._DB_PREFIX_.'tab` t LEFT JOIN `'._DB_PREFIX_.'tab_lang` l ON (t.id_tab = l.id_tab) - WHERE t.`class_name` = "'.pSQL($tabname).'"'); + FROM `' . _DB_PREFIX_ . 'tab` t LEFT JOIN `' . _DB_PREFIX_ . 'tab_lang` l ON (t.id_tab = l.id_tab) + WHERE t.`class_name` = "' . pSQL($tabname) . '"'); } diff --git a/upgrade/php/reorderpositions.php b/upgrade/php/reorderpositions.php index 943546ffa..e7a33aae8 100644 --- a/upgrade/php/reorderpositions.php +++ b/upgrade/php/reorderpositions.php @@ -23,82 +23,81 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function reorderpositions() { $res = true; $ps_lang_default = Db::getInstance()->getValue('SELECT value - FROM `'._DB_PREFIX_.'configuration` + FROM `' . _DB_PREFIX_ . 'configuration` WHERE name="PS_LANG_DEFAULT"'); /* Clean products positions */ - $cat = Db::getInstance()->executeS('SELECT id_category FROM `'._DB_PREFIX_.'category`'); + $cat = Db::getInstance()->executeS('SELECT id_category FROM `' . _DB_PREFIX_ . 'category`'); if ($cat) { foreach ($cat as $categ) { $id_category = $categ['id_category']; $result = Db::getInstance()->executeS(' SELECT `id_product` - FROM `'._DB_PREFIX_.'category_product` - WHERE `id_category` = '.$id_category.' + FROM `' . _DB_PREFIX_ . 'category_product` + WHERE `id_category` = ' . $id_category . ' ORDER BY `position`'); $sizeof = count($result); - for ($i = 0; $i < $sizeof; $i++) { + for ($i = 0; $i < $sizeof; ++$i) { $res &= Db::getInstance()->execute(' - UPDATE `'._DB_PREFIX_.'category_product` - SET `position` = '.$i.' - WHERE `id_category` = '.$id_category.' - AND `id_product` = '.(int)($result[$i]['id_product'])); + UPDATE `' . _DB_PREFIX_ . 'category_product` + SET `position` = ' . $i . ' + WHERE `id_category` = ' . $id_category . ' + AND `id_product` = ' . (int) ($result[$i]['id_product'])); } } } - $cat_parent = Db::getInstance()->executeS('SELECT DISTINCT c.id_parent FROM `'._DB_PREFIX_.'category` c WHERE id_category != 1'); + $cat_parent = Db::getInstance()->executeS('SELECT DISTINCT c.id_parent FROM `' . _DB_PREFIX_ . 'category` c WHERE id_category != 1'); foreach ($cat_parent as $parent) { $result = Db::getInstance()->executeS(' SELECT DISTINCT c.*, cl.* - FROM `'._DB_PREFIX_.'category` c - LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = '.$ps_lang_default.') - WHERE c.id_parent = '.(int)($parent['id_parent']).' + FROM `' . _DB_PREFIX_ . 'category` c + LEFT JOIN `' . _DB_PREFIX_ . 'category_lang` cl ON (c.`id_category` = cl.`id_category` AND `id_lang` = ' . $ps_lang_default . ') + WHERE c.id_parent = ' . (int) ($parent['id_parent']) . ' ORDER BY name ASC'); foreach ($result as $i => $categ) { Db::getInstance()->execute(' - UPDATE `'._DB_PREFIX_.'category` - SET `position` = '.(int)($i).' - WHERE `id_parent` = '.(int)($categ['id_parent']).' - AND `id_category` = '.(int)($categ['id_category'])); + UPDATE `' . _DB_PREFIX_ . 'category` + SET `position` = ' . (int) ($i) . ' + WHERE `id_parent` = ' . (int) ($categ['id_parent']) . ' + AND `id_category` = ' . (int) ($categ['id_category'])); } $result = Db::getInstance()->executeS(' SELECT DISTINCT c.*, cl.* - FROM `'._DB_PREFIX_.'category` c - LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category`) - WHERE c.id_parent = '.(int)($parent['id_parent']).' + FROM `' . _DB_PREFIX_ . 'category` c + LEFT JOIN `' . _DB_PREFIX_ . 'category_lang` cl ON (c.`id_category` = cl.`id_category`) + WHERE c.id_parent = ' . (int) ($parent['id_parent']) . ' ORDER BY name ASC'); // Remove number from category name foreach ($result as $i => $categ) { - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'category` c - LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (c.`id_category` = cl.`id_category`) - SET `name` = \''.preg_replace('/^[0-9]+\./', '', $categ['name']).'\' - WHERE c.id_category = '.(int)($categ['id_category']).' AND id_lang = \''.(int)($categ['id_lang']).'\''); + Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'category` c + LEFT JOIN `' . _DB_PREFIX_ . 'category_lang` cl ON (c.`id_category` = cl.`id_category`) + SET `name` = \'' . preg_replace('/^[0-9]+\./', '', $categ['name']) . '\' + WHERE c.id_category = ' . (int) ($categ['id_category']) . ' AND id_lang = \'' . (int) ($categ['id_lang']) . '\''); } } /* Clean CMS positions */ - $cms_cat = Db::getInstance()->executeS('SELECT id_cms_category FROM `'._DB_PREFIX_.'cms_category` WHERE active=1'); + $cms_cat = Db::getInstance()->executeS('SELECT id_cms_category FROM `' . _DB_PREFIX_ . 'cms_category` WHERE active=1'); if ($cms_cat) { foreach ($cms_cat as $i => $categ) { $id_category_parent = $categ['id_cms_category']; $result &= Db::getInstance()->executeS(' SELECT `id_cms_category` - FROM `'._DB_PREFIX_.'cms_category` - WHERE `id_parent` = '.(int)$id_category_parent.' + FROM `' . _DB_PREFIX_ . 'cms_category` + WHERE `id_parent` = ' . (int) $id_category_parent . ' ORDER BY `position`'); $sizeof = count($result); for ($i = 0; $i < $sizeof; ++$i) { - $sql = 'UPDATE `'._DB_PREFIX_.'cms_category` - SET `position` = '.(int)$i.' - WHERE `id_parent` = '.(int)$id_category_parent.' - AND `id_cms_category` = '.(int)$result[$i]['id_cms_category']; + $sql = 'UPDATE `' . _DB_PREFIX_ . 'cms_category` + SET `position` = ' . (int) $i . ' + WHERE `id_parent` = ' . (int) $id_category_parent . ' + AND `id_cms_category` = ' . (int) $result[$i]['id_cms_category']; $res &= Db::getInstance()->execute($sql); } } diff --git a/upgrade/php/select_current_payment_modules.php b/upgrade/php/select_current_payment_modules.php index bc3f15129..f826f881d 100644 --- a/upgrade/php/select_current_payment_modules.php +++ b/upgrade/php/select_current_payment_modules.php @@ -32,21 +32,21 @@ function select_current_payment_modules() $shops = Db::getInstance()->executeS( ' SELECT `id_shop` - FROM `'._DB_PREFIX_.'shop`' + FROM `' . _DB_PREFIX_ . 'shop`' ); $carriers = Db::getInstance()->executeS( ' SELECT DISTINCT `id_reference` - FROM `'._DB_PREFIX_.'carrier` + FROM `' . _DB_PREFIX_ . 'carrier` WHERE `active` = 1 AND `deleted` = 0' ); $modules = Db::getInstance()->executeS( ' SELECT m.`id_module` - FROM `'._DB_PREFIX_.'module` m - LEFT JOIN `'._DB_PREFIX_.'hook_module` hm ON hm.`id_module` = m.`id_module` - LEFT JOIN `'._DB_PREFIX_.'hook` h ON hm.`id_hook` = h.`id_hook` + FROM `' . _DB_PREFIX_ . 'module` m + LEFT JOIN `' . _DB_PREFIX_ . 'hook_module` hm ON hm.`id_module` = m.`id_module` + LEFT JOIN `' . _DB_PREFIX_ . 'hook` h ON hm.`id_hook` = h.`id_hook` WHERE h.`name` = \'displayPayment\' OR h.`name` = \'displayPaymentEU\' OR h.`name` = \'paymentOptions\'' ); @@ -55,11 +55,11 @@ function select_current_payment_modules() foreach ($modules as $module) { Db::getInstance()->insert( 'module_carrier', - array( - 'id_reference' => (int)$carrier['id_reference'], - 'id_module' => (int)$module['id_module'], - 'id_shop' => (int)$shop['id_shop'], - ), + [ + 'id_reference' => (int) $carrier['id_reference'], + 'id_module' => (int) $module['id_module'], + 'id_shop' => (int) $shop['id_shop'], + ], false, false, Db::INSERT_IGNORE diff --git a/upgrade/php/set_discount_category.php b/upgrade/php/set_discount_category.php index 4ddabe162..54dd7e8ce 100644 --- a/upgrade/php/set_discount_category.php +++ b/upgrade/php/set_discount_category.php @@ -23,14 +23,13 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function set_discount_category() { - $discounts = Db::getInstance()->executeS('SELECT `id_discount` FROM `'._DB_PREFIX_.'discount`'); - $categories = Db::getInstance()->executeS('SELECT `id_category` FROM `'._DB_PREFIX_.'category`'); + $discounts = Db::getInstance()->executeS('SELECT `id_discount` FROM `' . _DB_PREFIX_ . 'discount`'); + $categories = Db::getInstance()->executeS('SELECT `id_category` FROM `' . _DB_PREFIX_ . 'category`'); foreach ($discounts as $discount) { foreach ($categories as $category) { - Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'discount_category` (`id_discount`,`id_category`) VALUES ('.(int)($discount['id_discount']).','.(int)($category['id_category']).')'); + Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'discount_category` (`id_discount`,`id_category`) VALUES (' . (int) ($discount['id_discount']) . ',' . (int) ($category['id_category']) . ')'); } } } diff --git a/upgrade/php/set_payment_module.php b/upgrade/php/set_payment_module.php index ba7b73372..ef3cfee49 100644 --- a/upgrade/php/set_payment_module.php +++ b/upgrade/php/set_payment_module.php @@ -23,28 +23,27 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function set_payment_module() { // Get all modules then select only payment ones $modules = Module::getModulesInstalled(); foreach ($modules as $module) { - $file = _PS_MODULE_DIR_.$module['name'].'/'.$module['name'].'.php'; + $file = _PS_MODULE_DIR_ . $module['name'] . '/' . $module['name'] . '.php'; if (!file_exists($file)) { continue; } $fd = fopen($file, 'rb'); if (!$fd) { - continue ; + continue; } $content = fread($fd, filesize($file)); if (preg_match_all('/extends PaymentModule/U', $content, $matches)) { Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'module_country` (id_module, id_country) - SELECT '.(int)($module['id_module']).', id_country FROM `'._DB_PREFIX_.'country` WHERE active = 1'); + INSERT INTO `' . _DB_PREFIX_ . 'module_country` (id_module, id_country) + SELECT ' . (int) ($module['id_module']) . ', id_country FROM `' . _DB_PREFIX_ . 'country` WHERE active = 1'); Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'module_currency` (id_module, id_currency) - SELECT '.(int)($module['id_module']).', id_currency FROM `'._DB_PREFIX_.'currency` WHERE deleted = 0'); + INSERT INTO `' . _DB_PREFIX_ . 'module_currency` (id_module, id_currency) + SELECT ' . (int) ($module['id_module']) . ', id_currency FROM `' . _DB_PREFIX_ . 'currency` WHERE deleted = 0'); } fclose($fd); } diff --git a/upgrade/php/set_payment_module_group.php b/upgrade/php/set_payment_module_group.php index 839ba703c..c16792ed2 100644 --- a/upgrade/php/set_payment_module_group.php +++ b/upgrade/php/set_payment_module_group.php @@ -23,25 +23,24 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function set_payment_module_group() { // Get all modules then select only payment ones - $modules = Db::getInstance()->executeS('SELECT * FROM `'._DB_PREFIX_.'module`'); + $modules = Db::getInstance()->executeS('SELECT * FROM `' . _DB_PREFIX_ . 'module`'); foreach ($modules as $module) { - $file = _PS_MODULE_DIR_.$module['name'].'/'.$module['name'].'.php'; + $file = _PS_MODULE_DIR_ . $module['name'] . '/' . $module['name'] . '.php'; if (!file_exists($file)) { continue; } $fd = @fopen($file, 'rb'); if (!$fd) { - continue ; + continue; } $content = fread($fd, filesize($file)); if (preg_match_all('/extends PaymentModule/U', $content, $matches)) { Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'module_group` (id_module, id_group) - SELECT '.(int)($module['id_module']).', id_group FROM `'._DB_PREFIX_.'group`'); + INSERT INTO `' . _DB_PREFIX_ . 'module_group` (id_module, id_group) + SELECT ' . (int) ($module['id_module']) . ', id_group FROM `' . _DB_PREFIX_ . 'group`'); } fclose($fd); } diff --git a/upgrade/php/set_product_suppliers.php b/upgrade/php/set_product_suppliers.php index 50fe8bd2f..e2b4a3712 100644 --- a/upgrade/php/set_product_suppliers.php +++ b/upgrade/php/set_product_suppliers.php @@ -23,52 +23,51 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function set_product_suppliers() { $ps_currency_default = Db::getInstance()->getValue('SELECT value - FROM `'._DB_PREFIX_.'configuration` WHERE name="PS_CURRENCY_DEFAULT"'); + FROM `' . _DB_PREFIX_ . 'configuration` WHERE name="PS_CURRENCY_DEFAULT"'); //Get all products with positive quantity $resource = Db::getInstance()->query(' SELECT id_supplier, id_product, supplier_reference, wholesale_price - FROM `'._DB_PREFIX_.'product` + FROM `' . _DB_PREFIX_ . 'product` WHERE `id_supplier` > 0 '); while ($row = Db::getInstance()->nextRow($resource)) { //Set default supplier for product Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'product_supplier` + INSERT INTO `' . _DB_PREFIX_ . 'product_supplier` (`id_product`, `id_product_attribute`, `id_supplier`, `product_supplier_reference`, `product_supplier_price_te`, `id_currency`) VALUES - ("'.(int)$row['id_product'].'", "0", "'.(int)$row['id_supplier'].'", - "'.pSQL($row['supplier_reference']).'", "'.(int)$row['wholesale_price'].'", - "'.(int)$ps_currency_default.'") + ("' . (int) $row['id_product'] . '", "0", "' . (int) $row['id_supplier'] . '", + "' . pSQL($row['supplier_reference']) . '", "' . (int) $row['wholesale_price'] . '", + "' . (int) $ps_currency_default . '") '); //Try to get product attribues $attributes = Db::getInstance()->executeS( ' SELECT id_product_attribute, supplier_reference, wholesale_price - FROM `'._DB_PREFIX_.'product_attribute` - WHERE `id_product` = '.(int)$row['id_product'] + FROM `' . _DB_PREFIX_ . 'product_attribute` + WHERE `id_product` = ' . (int) $row['id_product'] ); //Add each attribute to stock_available foreach ($attributes as $attribute) { // set supplier for attribute Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'product_supplier` + INSERT INTO `' . _DB_PREFIX_ . 'product_supplier` (`id_product`, `id_product_attribute`, `id_supplier`, `product_supplier_reference`, `product_supplier_price_te`, `id_currency`) VALUES - ("'.(int)$row['id_product'].'", "'.(int)$attribute['id_product_attribute'].'", - "'.(int)$row['id_supplier'].'", "'.pSQL($attribute['supplier_reference']).'", - "'.(int)$attribute['wholesale_price'].'", "'.(int)$ps_currency_default.'") + ("' . (int) $row['id_product'] . '", "' . (int) $attribute['id_product_attribute'] . '", + "' . (int) $row['id_supplier'] . '", "' . pSQL($attribute['supplier_reference']) . '", + "' . (int) $attribute['wholesale_price'] . '", "' . (int) $ps_currency_default . '") '); } } diff --git a/upgrade/php/set_stock_available.php b/upgrade/php/set_stock_available.php index a2977e421..fb76124b0 100644 --- a/upgrade/php/set_stock_available.php +++ b/upgrade/php/set_stock_available.php @@ -23,14 +23,13 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function set_stock_available() { $res = true; //Get all products with positive quantity $resource = Db::getInstance()->query(' SELECT quantity, id_product, out_of_stock - FROM `'._DB_PREFIX_.'product` + FROM `' . _DB_PREFIX_ . 'product` WHERE `active` = 1 '); @@ -41,8 +40,8 @@ function set_stock_available() $attributes = Db::getInstance()->executeS( ' SELECT quantity, id_product_attribute - FROM `'._DB_PREFIX_.'product_attribute` - WHERE `id_product` = '.(int)$row['id_product'] + FROM `' . _DB_PREFIX_ . 'product_attribute` + WHERE `id_product` = ' . (int) $row['id_product'] ); //Add each attribute to stock_available @@ -52,29 +51,29 @@ function set_stock_available() //add stock available for attributes $res &= Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'stock_available` + INSERT INTO `' . _DB_PREFIX_ . 'stock_available` (`id_product`, `id_product_attribute`, `id_shop`, `id_group_shop`, `quantity`, `depends_on_stock`, `out_of_stock`) VALUES - ("'.(int)$row['id_product'].'", "'.(int)$attribute['id_product_attribute'].'", "1", "0", "'.(int)$attribute['quantity'].'", "0", "'.(int)$row['out_of_stock'].'") + ("' . (int) $row['id_product'] . '", "' . (int) $attribute['id_product_attribute'] . '", "1", "0", "' . (int) $attribute['quantity'] . '", "0", "' . (int) $row['out_of_stock'] . '") '); if (!$res) { - return array('error' => Db::getInstance()->getNumberError(), 'msg' => '(attributes)'.Db::getInstance()->getMsgError()); + return ['error' => Db::getInstance()->getNumberError(), 'msg' => '(attributes)' . Db::getInstance()->getMsgError()]; } } if (count($attributes) == 0) { - $quantity = (int)$row['quantity']; + $quantity = (int) $row['quantity']; } //Add stock available for product; $res &= Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'stock_available` + INSERT INTO `' . _DB_PREFIX_ . 'stock_available` (`id_product`, `id_product_attribute`, `id_shop`, `id_group_shop`, `quantity`, `depends_on_stock`, `out_of_stock`) VALUES - ("'.(int)$row['id_product'].'", "0", "1", "0", "'.(int)$quantity.'", "0", "'.(int)$row['out_of_stock'].'") + ("' . (int) $row['id_product'] . '", "0", "1", "0", "' . (int) $quantity . '", "0", "' . (int) $row['out_of_stock'] . '") '); if (!$res) { - return array('error' => Db::getInstance()->getNumberError(), 'msg' => '(products)'.Db::getInstance()->getMsgError()); + return ['error' => Db::getInstance()->getNumberError(), 'msg' => '(products)' . Db::getInstance()->getMsgError()]; } } diff --git a/upgrade/php/setallgroupsonhomecategory.php b/upgrade/php/setallgroupsonhomecategory.php index b617b0d6b..dc85e0c62 100644 --- a/upgrade/php/setallgroupsonhomecategory.php +++ b/upgrade/php/setallgroupsonhomecategory.php @@ -23,24 +23,23 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function setAllGroupsOnHomeCategory() { $ps_lang_default = Db::getInstance()->getValue('SELECT value - FROM `'._DB_PREFIX_.'configuration` WHERE name="PS_LANG_DEFAULT"'); + FROM `' . _DB_PREFIX_ . 'configuration` WHERE name="PS_LANG_DEFAULT"'); - $results = Db::getInstance()->executeS('SELECT id_group FROM `'._DB_PREFIX_.'group`'); - $groups = array(); + $results = Db::getInstance()->executeS('SELECT id_group FROM `' . _DB_PREFIX_ . 'group`'); + $groups = []; foreach ($results as $result) { $groups[] = $result['id_group']; } if (is_array($groups) && count($groups)) { // cleanGroups - Db::getInstance()->execute('DELETE FROM `'._DB_PREFIX_.'category_group` + Db::getInstance()->execute('DELETE FROM `' . _DB_PREFIX_ . 'category_group` WHERE `id_category` = 1'); // addGroups($groups); - $row = array('id_category' => 1, 'id_group' => (int)$groups); + $row = ['id_category' => 1, 'id_group' => (int) $groups]; Db::getInstance()->insert('category_group', $row); } } diff --git a/upgrade/php/shop_url.php b/upgrade/php/shop_url.php index b80b19bc8..7739bc170 100644 --- a/upgrade/php/shop_url.php +++ b/upgrade/php/shop_url.php @@ -23,27 +23,26 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function shop_url() { - $host = Db::getInstance()->getValue('SELECT value FROM `'._DB_PREFIX_.'configuration` WHERE name="CANONICAL_URL"'); + $host = Db::getInstance()->getValue('SELECT value FROM `' . _DB_PREFIX_ . 'configuration` WHERE name="CANONICAL_URL"'); if (!$host) { $host = (isset($_SERVER['HTTP_X_FORWARDED_HOST']) ? $_SERVER['HTTP_X_FORWARDED_HOST'] : $_SERVER['HTTP_HOST']); } $res = true; - $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = \'PS_SHOP_DOMAIN\''); + $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` = \'PS_SHOP_DOMAIN\''); if ($exist) { - $res &= Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET value = "'.pSQL($host).'" WHERE `name` = \'PS_SHOP_DOMAIN\''); + $res &= Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'configuration` SET value = "' . pSQL($host) . '" WHERE `name` = \'PS_SHOP_DOMAIN\''); } else { - $res &= Db::getInstance()->getValue('INSERT INTO `'._DB_PREFIX_.'configuration` (name, value) VALUES ("PS_SHOP_DOMAIN", "'.pSQL($host).'")'); + $res &= Db::getInstance()->getValue('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (name, value) VALUES ("PS_SHOP_DOMAIN", "' . pSQL($host) . '")'); } - $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = \'PS_SHOP_DOMAIN_SSL\''); + $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` = \'PS_SHOP_DOMAIN_SSL\''); if ($exist) { - $res &= Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET value = "'.pSQL($host).'" WHERE `name` = \'PS_SHOP_DOMAIN_SSL\''); + $res &= Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'configuration` SET value = "' . pSQL($host) . '" WHERE `name` = \'PS_SHOP_DOMAIN_SSL\''); } else { - $res &= Db::getInstance()->getValue('INSERT INTO `'._DB_PREFIX_.'configuration` (name, value) VALUES ("PS_SHOP_DOMAIN_SSL", "'.pSQL($host).'")'); + $res &= Db::getInstance()->getValue('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (name, value) VALUES ("PS_SHOP_DOMAIN_SSL", "' . pSQL($host) . '")'); } return $res; diff --git a/upgrade/php/sql_indexes.php b/upgrade/php/sql_indexes.php index deeec16a2..d9675f361 100644 --- a/upgrade/php/sql_indexes.php +++ b/upgrade/php/sql_indexes.php @@ -23,17 +23,17 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function drop_index_if_exists($indexName, $table) { - $keyExists = Db::getInstance()->executeS('SHOW INDEX + $keyExists = Db::getInstance()->executeS('SHOW INDEX FROM `' . $table . '` WHERE Key_name = \'' . $indexName . '\''); - if ($keyExists) { - return Db::getInstance()->execute('ALTER TABLE + if ($keyExists) { + return Db::getInstance()->execute('ALTER TABLE `' . $table . '` DROP KEY `' . $indexName . '`'); - } - return true; - } \ No newline at end of file + } + + return true; + } diff --git a/upgrade/php/update_carrier_url.php b/upgrade/php/update_carrier_url.php index 2cd2a5aec..4b8d66cd0 100644 --- a/upgrade/php/update_carrier_url.php +++ b/upgrade/php/update_carrier_url.php @@ -23,22 +23,21 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function update_carrier_url() { // Get all carriers $sql = ' SELECT c.`id_carrier`, c.`url` - FROM `'._DB_PREFIX_.'carrier` c'; + FROM `' . _DB_PREFIX_ . 'carrier` c'; $carriers = Db::getInstance()->executeS($sql); // Check each one and erase carrier URL if not correct URL foreach ($carriers as $carrier) { if (empty($carrier['url']) || !preg_match('/^https?:\/\/[:#%&_=\(\)\.\? \+\-@\/a-zA-Z0-9]+$/', $carrier['url'])) { Db::getInstance()->execute(' - UPDATE `'._DB_PREFIX_.'carrier` + UPDATE `' . _DB_PREFIX_ . 'carrier` SET `url` = \'\' - WHERE `id_carrier`= '.(int)($carrier['id_carrier'])); + WHERE `id_carrier`= ' . (int) ($carrier['id_carrier'])); } } } diff --git a/upgrade/php/update_customer_default_group.php b/upgrade/php/update_customer_default_group.php index 00207004e..1a6c3eac4 100644 --- a/upgrade/php/update_customer_default_group.php +++ b/upgrade/php/update_customer_default_group.php @@ -23,10 +23,9 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function update_customer_default_group() { - $filename = _PS_ROOT_DIR_.'/config/defines.inc.php'; + $filename = _PS_ROOT_DIR_ . '/config/defines.inc.php'; $filename_old = str_replace('.inc.', '.old.', $filename); copy($filename, $filename_old); chmod($filename_old, 0664); @@ -34,38 +33,38 @@ function update_customer_default_group() $pattern = "/define\('_PS_DEFAULT_CUSTOMER_GROUP_', (\d)\);/"; preg_match($pattern, $content, $matches); if (!defined('_PS_DEFAULT_CUSTOMER_GROUP_')) { - define('_PS_DEFAULT_CUSTOMER_GROUP_', ((isset($matches[1]) && is_numeric($matches[1]))? $matches[1] : 3)); + define('_PS_DEFAULT_CUSTOMER_GROUP_', ((isset($matches[1]) && is_numeric($matches[1])) ? $matches[1] : 3)); } - $ps_customer_group = Db::getInstance()->getValue('SELECT value FROM `'._DB_PREFIX_.'configuration` WHERE name = "PS_CUSTOMER_GROUP"', false); + $ps_customer_group = Db::getInstance()->getValue('SELECT value FROM `' . _DB_PREFIX_ . 'configuration` WHERE name = "PS_CUSTOMER_GROUP"', false); if ($ps_customer_group) { - $str_old = 'define(\'_PS_DEFAULT_CUSTOMER_GROUP_\', '.(int)_PS_DEFAULT_CUSTOMER_GROUP_.');'; - $str_new = 'define(\'_PS_DEFAULT_CUSTOMER_GROUP_\', '.(int)$ps_customer_group.');'; + $str_old = 'define(\'_PS_DEFAULT_CUSTOMER_GROUP_\', ' . (int) _PS_DEFAULT_CUSTOMER_GROUP_ . ');'; + $str_new = 'define(\'_PS_DEFAULT_CUSTOMER_GROUP_\', ' . (int) $ps_customer_group . ');'; $content = str_replace($str_old, $str_new, $content); } $carriers = Db::getInstance()->executeS(' SELECT `id_carrier` - FROM `'._DB_PREFIX_.'carrier` + FROM `' . _DB_PREFIX_ . 'carrier` WHERE `deleted` = 0'); $groups = Db::getInstance()->executeS(' SELECT `value` as id_group - FROM `'._DB_PREFIX_.'configuration` + FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` IN (\'PS_UNIDENTIFIED_GROUP\', \'PS_GUEST_GROUP\')'); if (is_array($carriers) && count($carriers) && is_array($groups) && count($groups)) { foreach ($carriers as $carrier) { foreach ($groups as $group) { Db::getInstance()->execute(' - INSERT IGNORE INTO `'._DB_PREFIX_.'carrier_group` - VALUES ('.(int)$carrier['id_carrier'].', '.(int)$group['id_group'].')'); + INSERT IGNORE INTO `' . _DB_PREFIX_ . 'carrier_group` + VALUES (' . (int) $carrier['id_carrier'] . ', ' . (int) $group['id_group'] . ')'); } } } $result = false; if (file_exists($filename) && is_writable($filename)) { - $result = (bool)file_put_contents($filename, $content); + $result = (bool) file_put_contents($filename, $content); if ($result && file_exists($filename_old)) { unlink($filename_old); @chmod($filename, 0664); diff --git a/upgrade/php/update_feature_detachable_cache.php b/upgrade/php/update_feature_detachable_cache.php index d08b37aa0..4744fb053 100644 --- a/upgrade/php/update_feature_detachable_cache.php +++ b/upgrade/php/update_feature_detachable_cache.php @@ -23,10 +23,9 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function update_feature_detachable_cache() { - $array_features = array( + $array_features = [ 'PS_SPECIFIC_PRICE_FEATURE_ACTIVE' => 'specific_price', 'PS_SCENE_FEATURE_ACTIVE' => 'scene', 'PS_PRODUCT_DOWNLOAD_FEATURE_ACTIVE' => 'product_download', @@ -35,17 +34,17 @@ function update_feature_detachable_cache() 'PS_GROUP_FEATURE_ACTIVE' => 'group', 'PS_PACK_FEATURE_ACTIVE' => 'pack', 'PS_ALIAS_FEATURE_ACTIVE' => 'alias', - ); + ]; $res = true; foreach ($array_features as $config_key => $feature) { // array_features is an array defined above, so please don't add bqSql ! - $count = (int)Db::getInstance()->getValue('SELECT count(*) FROM `'._DB_PREFIX_.$feature.'`'); + $count = (int) Db::getInstance()->getValue('SELECT count(*) FROM `' . _DB_PREFIX_ . $feature . '`'); - $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = \''.pSQL($config_key).'\''); + $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` = \'' . pSQL($config_key) . '\''); if ($exist) { - $res &= Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET value = "'.(int)$count.'" WHERE `name` = \''.pSQL($config_key).'\''); + $res &= Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'configuration` SET value = "' . (int) $count . '" WHERE `name` = \'' . pSQL($config_key) . '\''); } else { - $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'configuration` (name, value) values ("'.pSQL($config_key).'", "'.(int)$count.'")'); + $res &= Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (name, value) values ("' . pSQL($config_key) . '", "' . (int) $count . '")'); } } diff --git a/upgrade/php/update_for_13version.php b/upgrade/php/update_for_13version.php index b36a6458f..8ecf16ff7 100644 --- a/upgrade/php/update_for_13version.php +++ b/upgrade/php/update_for_13version.php @@ -23,7 +23,6 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function update_for_13version() { global $oldversion; @@ -37,25 +36,25 @@ function update_for_13version() // Disable Canonical redirection $res = true; - $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = \'PS_FORCE_SMARTY_2\''); + $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` = \'PS_FORCE_SMARTY_2\''); if ($exist) { - $res &= Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET value = "1" WHERE `name` = \'PS_FORCE_SMARTY_2\''); + $res &= Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'configuration` SET value = "1" WHERE `name` = \'PS_FORCE_SMARTY_2\''); } else { - $res &= Db::getInstance()->getValue('INSERT INTO `'._DB_PREFIX_.'configuration` (name, value) VALUES ("PS_FORCE_SMARTY_2", "1")'); + $res &= Db::getInstance()->getValue('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (name, value) VALUES ("PS_FORCE_SMARTY_2", "1")'); } - $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = \'PS_REWRITING_SETTINGS\''); + $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` = \'PS_REWRITING_SETTINGS\''); if ($exist) { - $res &= Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET value = "0" WHERE `name` = \'PS_REWRITING_SETTINGS\''); + $res &= Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'configuration` SET value = "0" WHERE `name` = \'PS_REWRITING_SETTINGS\''); } else { - $res &= Db::getInstance()->getValue('INSERT INTO `'._DB_PREFIX_.'configuration` (name, value) VALUES ("PS_REWRITING_SETTINGS", "0")'); + $res &= Db::getInstance()->getValue('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (name, value) VALUES ("PS_REWRITING_SETTINGS", "0")'); } - $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = \'PS_CANONICAL_REDIRECT\''); + $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` = \'PS_CANONICAL_REDIRECT\''); if ($exist) { - $res &= Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET value = "0" WHERE `name` = \'PS_CANONICAL_REDIRECT\''); + $res &= Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'configuration` SET value = "0" WHERE `name` = \'PS_CANONICAL_REDIRECT\''); } else { - $res &= Db::getInstance()->getValue('INSERT INTO `'._DB_PREFIX_.'configuration` (name, value) VALUES ("PS_CANONICAL_REDIRECT", "0")'); + $res &= Db::getInstance()->getValue('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (name, value) VALUES ("PS_CANONICAL_REDIRECT", "0")'); } return $res; diff --git a/upgrade/php/update_genders_images.php b/upgrade/php/update_genders_images.php index 9b6cf66e1..3fdbcea40 100644 --- a/upgrade/php/update_genders_images.php +++ b/upgrade/php/update_genders_images.php @@ -23,19 +23,18 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function update_genders_images() { - if (@file_exists(_PS_ROOT_DIR_.'/img/genders/Mr.jpg')) { - @rename(_PS_ROOT_DIR_.'/img/genders/Mr.jpg', _PS_ROOT_DIR_.'/img/genders/1.jpg'); + if (@file_exists(_PS_ROOT_DIR_ . '/img/genders/Mr.jpg')) { + @rename(_PS_ROOT_DIR_ . '/img/genders/Mr.jpg', _PS_ROOT_DIR_ . '/img/genders/1.jpg'); } - if (@file_exists(_PS_ROOT_DIR_.'/img/genders/Ms.jpg')) { - @rename(_PS_ROOT_DIR_.'/img/genders/Ms.jpg', _PS_ROOT_DIR_.'/img/genders/2.jpg'); + if (@file_exists(_PS_ROOT_DIR_ . '/img/genders/Ms.jpg')) { + @rename(_PS_ROOT_DIR_ . '/img/genders/Ms.jpg', _PS_ROOT_DIR_ . '/img/genders/2.jpg'); } - if (@file_exists(_PS_ROOT_DIR_.'/img/genders/Miss.jpg')) { - @rename(_PS_ROOT_DIR_.'/img/genders/Miss.jpg', _PS_ROOT_DIR_.'/img/genders/3.jpg'); + if (@file_exists(_PS_ROOT_DIR_ . '/img/genders/Miss.jpg')) { + @rename(_PS_ROOT_DIR_ . '/img/genders/Miss.jpg', _PS_ROOT_DIR_ . '/img/genders/3.jpg'); } - if (@file_exists(_PS_ROOT_DIR_.'/img/genders/unknown.jpg')) { - @rename(_PS_ROOT_DIR_.'/img/genders/unknown.jpg', _PS_ROOT_DIR_.'/img/genders/Unknown.jpg'); + if (@file_exists(_PS_ROOT_DIR_ . '/img/genders/unknown.jpg')) { + @rename(_PS_ROOT_DIR_ . '/img/genders/unknown.jpg', _PS_ROOT_DIR_ . '/img/genders/Unknown.jpg'); } } diff --git a/upgrade/php/update_image_size_in_db.php b/upgrade/php/update_image_size_in_db.php index 4070edaf0..7c157c221 100644 --- a/upgrade/php/update_image_size_in_db.php +++ b/upgrade/php/update_image_size_in_db.php @@ -23,20 +23,19 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function update_image_size_in_db() { - $logo_name = Db::getInstance()->getValue('SELECT `value` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = \'PS_LOGO\''); + $logo_name = Db::getInstance()->getValue('SELECT `value` FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` = \'PS_LOGO\''); $logo_name = (!empty($logo_name)) ? $logo_name : 'logo.jpg'; - if (file_exists(realpath(INSTALL_PATH.'/../img').'/'.$logo_name)) { - list($width, $height, $type, $attr) = getimagesize(realpath(INSTALL_PATH.'/../img').'/'.$logo_name); - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET value = "'.(int)round($width).'" WHERE `name` = \'SHOP_LOGO_WIDTH\''); - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET value = "'.(int)round($height).'" WHERE `name` = \'SHOP_LOGO_HEIGHT\''); + if (file_exists(realpath(INSTALL_PATH . '/../img') . '/' . $logo_name)) { + list($width, $height, $type, $attr) = getimagesize(realpath(INSTALL_PATH . '/../img') . '/' . $logo_name); + Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'configuration` SET value = "' . (int) round($width) . '" WHERE `name` = \'SHOP_LOGO_WIDTH\''); + Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'configuration` SET value = "' . (int) round($height) . '" WHERE `name` = \'SHOP_LOGO_HEIGHT\''); } - if (file_exists(realpath(INSTALL_PATH.'/../modules/editorial').'/homepage_logo.jpg')) { - list($width, $height, $type, $attr) = getimagesize(realpath(INSTALL_PATH.'/../modules/editorial').'/homepage_logo.jpg'); - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET value = "'.(int)round($width).'" WHERE `name` = \'EDITORIAL_IMAGE_WIDTH\''); - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET value = "'.(int)round($height).'" WHERE `name` = \'EDITORIAL_IMAGE_HEIGHT\''); + if (file_exists(realpath(INSTALL_PATH . '/../modules/editorial') . '/homepage_logo.jpg')) { + list($width, $height, $type, $attr) = getimagesize(realpath(INSTALL_PATH . '/../modules/editorial') . '/homepage_logo.jpg'); + Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'configuration` SET value = "' . (int) round($width) . '" WHERE `name` = \'EDITORIAL_IMAGE_WIDTH\''); + Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'configuration` SET value = "' . (int) round($height) . '" WHERE `name` = \'EDITORIAL_IMAGE_HEIGHT\''); } } diff --git a/upgrade/php/update_mailalerts_add_column_idshop.php b/upgrade/php/update_mailalerts_add_column_idshop.php index 5f8efb0ae..308c5f63f 100644 --- a/upgrade/php/update_mailalerts_add_column_idshop.php +++ b/upgrade/php/update_mailalerts_add_column_idshop.php @@ -30,10 +30,10 @@ */ function update_mailalerts_add_column_idshop() { - $installed = Db::getInstance()->getValue('SELECT id_module FROM `'._DB_PREFIX_.'module` WHERE name = "mailalerts"'); - $installed &= Db::getInstance()->getValue('SHOW TABLES LIKE "'._DB_PREFIX_.'mailalert_customer_oos"'); - if ($installed && !Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'mailalert_customer_oos` ADD COLUMN `id_shop` int(11) NOT NULL default "0" AFTER `id_customer`')) { - return array('error' => 1, 'msg' => sprintf('unable to create column id_shop (%s)', Db::getInstance()->getMsgError())); + $installed = Db::getInstance()->getValue('SELECT id_module FROM `' . _DB_PREFIX_ . 'module` WHERE name = "mailalerts"'); + $installed &= Db::getInstance()->getValue('SHOW TABLES LIKE "' . _DB_PREFIX_ . 'mailalert_customer_oos"'); + if ($installed && !Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'mailalert_customer_oos` ADD COLUMN `id_shop` int(11) NOT NULL default "0" AFTER `id_customer`')) { + return ['error' => 1, 'msg' => sprintf('unable to create column id_shop (%s)', Db::getInstance()->getMsgError())]; } return true; diff --git a/upgrade/php/update_module_blocklayered.php b/upgrade/php/update_module_blocklayered.php index 1fdfba837..e26a5323f 100644 --- a/upgrade/php/update_module_blocklayered.php +++ b/upgrade/php/update_module_blocklayered.php @@ -23,11 +23,10 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function update_module_blocklayered() { - if (Db::getInstance()->getValue('SELECT id_module FROM `'._DB_PREFIX_.'module` WHERE name = \'blocklayered\'')) { - @Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'layered_price_index` ADD INDEX id_product (`id_product`)'); + if (Db::getInstance()->getValue('SELECT id_module FROM `' . _DB_PREFIX_ . 'module` WHERE name = \'blocklayered\'')) { + @Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'layered_price_index` ADD INDEX id_product (`id_product`)'); } return true; diff --git a/upgrade/php/update_module_followup.php b/upgrade/php/update_module_followup.php index 1d08dc4c0..f8c74957e 100644 --- a/upgrade/php/update_module_followup.php +++ b/upgrade/php/update_module_followup.php @@ -23,13 +23,12 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function update_module_followup() { - $id_followup = Db::getInstance()->getValue('SELECT id_module FROM `'._DB_PREFIX_.'module` WHERE name = "followup"'); + $id_followup = Db::getInstance()->getValue('SELECT id_module FROM `' . _DB_PREFIX_ . 'module` WHERE name = "followup"'); if (!$id_followup) { return; } - Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'log_email` ADD INDEX `date_add`(`date_add`), ADD INDEX `id_cart`(`id_cart`);'); + Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'log_email` ADD INDEX `date_add`(`date_add`), ADD INDEX `id_cart`(`id_cart`);'); } diff --git a/upgrade/php/update_module_loyalty.php b/upgrade/php/update_module_loyalty.php index 57b555c71..35eeb354c 100644 --- a/upgrade/php/update_module_loyalty.php +++ b/upgrade/php/update_module_loyalty.php @@ -30,23 +30,23 @@ function update_module_loyalty() { $ps_loyalty_point_value = Db::getInstance()->getValue('SELECT value - FROM `'._DB_PREFIX_.'configuration` + FROM `' . _DB_PREFIX_ . 'configuration` WHERE name="PS_LOYALTY_POINT_VALUE"'); if ($ps_loyalty_point_value !== false) { $category_list = ''; - $categories = Db::getInstance()->executeS('SELECT id_category FROM `'._DB_PREFIX_.'category`'); + $categories = Db::getInstance()->executeS('SELECT id_category FROM `' . _DB_PREFIX_ . 'category`'); foreach ($categories as $category) { - $category_list .= $category['id_category'].','; + $category_list .= $category['id_category'] . ','; } if (!empty($category_list)) { $category_list = rtrim($category_list, ','); - $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `'._DB_PREFIX_.'configuration` WHERE `name` = \'PS_LOYALTY_VOUCHER_CATEGORY\''); + $exist = Db::getInstance()->getValue('SELECT `id_configuration` FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` = \'PS_LOYALTY_VOUCHER_CATEGORY\''); if ($exist) { - $res = Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'configuration` SET value = "'.pSQL($category_list).'" WHERE `name` = \'PS_LOYALTY_VOUCHER_CATEGORY\''); + $res = Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'configuration` SET value = "' . pSQL($category_list) . '" WHERE `name` = \'PS_LOYALTY_VOUCHER_CATEGORY\''); } else { - $res = Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'configuration` (name, value) VALUES ("PS_LOYALTY_VOUCHER_CATEGORY", "'.pSQL($category_list).'"'); + $res = Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (name, value) VALUES ("PS_LOYALTY_VOUCHER_CATEGORY", "' . pSQL($category_list) . '"'); } } } diff --git a/upgrade/php/update_module_pagesnotfound.php b/upgrade/php/update_module_pagesnotfound.php index d711f2b81..0790913a3 100644 --- a/upgrade/php/update_module_pagesnotfound.php +++ b/upgrade/php/update_module_pagesnotfound.php @@ -23,16 +23,15 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function update_module_pagesnotfound() { - $id_pagesnotfound = (int)Db::getInstance()->getValue('SELECT id_module FROM `'._DB_PREFIX_.'module` WHERE name = \'pagesnotfound\''); + $id_pagesnotfound = (int) Db::getInstance()->getValue('SELECT id_module FROM `' . _DB_PREFIX_ . 'module` WHERE name = \'pagesnotfound\''); if ($id_pagesnotfound) { - $id_hook = (int)Db::getInstance()->getValue('SELECT `id_hook` FROM `'._DB_PREFIX_.'hook` WHERE `name` = \'frontCanonicalRedirect\''); + $id_hook = (int) Db::getInstance()->getValue('SELECT `id_hook` FROM `' . _DB_PREFIX_ . 'hook` WHERE `name` = \'frontCanonicalRedirect\''); if ($id_hook) { - $position = (int)Db::getInstance()->getValue('SELECT IFNULL(MAX(`position`), 0) + 1 FROM `'._DB_PREFIX_.'hook_module` WHERE `id_hook` = '.(int)$id_hook); + $position = (int) Db::getInstance()->getValue('SELECT IFNULL(MAX(`position`), 0) + 1 FROM `' . _DB_PREFIX_ . 'hook_module` WHERE `id_hook` = ' . (int) $id_hook); if ($position) { - return Db::getInstance()->execute('INSERT IGNORE INTO `'._DB_PREFIX_.'hook_module` (`id_hook`, `id_module`, `position`) VALUES ('.(int)$id_hook.', '.(int)$id_pagesnotfound.', '.(int)$position.')'); + return Db::getInstance()->execute('INSERT IGNORE INTO `' . _DB_PREFIX_ . 'hook_module` (`id_hook`, `id_module`, `position`) VALUES (' . (int) $id_hook . ', ' . (int) $id_pagesnotfound . ', ' . (int) $position . ')'); } } } diff --git a/upgrade/php/update_module_product_comments.php b/upgrade/php/update_module_product_comments.php index 4da237dac..2854d5a4a 100644 --- a/upgrade/php/update_module_product_comments.php +++ b/upgrade/php/update_module_product_comments.php @@ -23,23 +23,22 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function update_module_product_comments() { - if (Db::getInstance()->getValue('SELECT `id_module` FROM `'._DB_PREFIX_.'module` WHERE `name`="productcomments"')) { + if (Db::getInstance()->getValue('SELECT `id_module` FROM `' . _DB_PREFIX_ . 'module` WHERE `name`="productcomments"')) { Db::getInstance()->execute(' - CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'product_comment_usefulness` ( + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'product_comment_usefulness` ( `id_product_comment` int(10) unsigned NOT NULL, `id_customer` int(10) unsigned NOT NULL, `usefulness` tinyint(1) unsigned NOT NULL, PRIMARY KEY (`id_product_comment`, `id_customer`) - ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'); Db::getInstance()->execute(' - CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'product_comment_report` ( + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'product_comment_report` ( `id_product_comment` int(10) unsigned NOT NULL, `id_customer` int(10) unsigned NOT NULL, PRIMARY KEY (`id_product_comment`, `id_customer`) - ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'); } } diff --git a/upgrade/php/update_modules_multishop.php b/upgrade/php/update_modules_multishop.php index f03b1f252..e04647b82 100644 --- a/upgrade/php/update_modules_multishop.php +++ b/upgrade/php/update_modules_multishop.php @@ -23,38 +23,37 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function update_modules_multishop() { - $block_cms_installed = (bool)Db::getInstance()->getValue('SELECT count(*) FROM `'._DB_PREFIX_.'module` WHERE name = "blockcms"'); + $block_cms_installed = (bool) Db::getInstance()->getValue('SELECT count(*) FROM `' . _DB_PREFIX_ . 'module` WHERE name = "blockcms"'); if ($block_cms_installed) { - Db::getInstance()->execute('CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'blocklink_shop` ( + Db::getInstance()->execute('CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'blocklink_shop` ( `id_blocklink` int(2) NOT NULL AUTO_INCREMENT, `id_shop` varchar(255) NOT NULL, PRIMARY KEY(`id_blocklink`, `id_shop`)) - ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8'); + ENGINE=' . _MYSQL_ENGINE_ . ' default CHARSET=utf8'); Db::getInstance()->execute(' - CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'cms_block_shop` ( + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'cms_block_shop` ( `id_cms_block` int(10) unsigned NOT NULL auto_increment, `id_shop` int(10) unsigned NOT NULL, PRIMARY KEY (`id_cms_block`, `id_shop`) - ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'); - Db::getInstance()->execute('INSERT INTO '._DB_PREFIX_.'cms_block_shop (cms_block, id_shop) - (SELECT id_cms_block, 1 FROM '._DB_PREFIX_.'cms_block)'); + Db::getInstance()->execute('INSERT INTO ' . _DB_PREFIX_ . 'cms_block_shop (cms_block, id_shop) + (SELECT id_cms_block, 1 FROM ' . _DB_PREFIX_ . 'cms_block)'); } - $block_link_installed = (bool)Db::getInstance()->getValue('SELECT count(*) FROM `'._DB_PREFIX_.'module` WHERE name = "blocklink"'); + $block_link_installed = (bool) Db::getInstance()->getValue('SELECT count(*) FROM `' . _DB_PREFIX_ . 'module` WHERE name = "blocklink"'); if ($block_link_installed) { Db::getInstance()->execute(' - CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'blocklink_shop` ( + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'blocklink_shop` ( `id_blocklink` int(2) NOT NULL AUTO_INCREMENT, `id_shop` varchar(255) NOT NULL, PRIMARY KEY(`id_blocklink`, `id_shop`)) - ENGINE='._MYSQL_ENGINE_.' default CHARSET=utf8'); - Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'blocklink_shop` (id_blocklink, id_shop) - (SELECT id_blocklink, 1 FROM `'._DB_PREFIX_.'blocklink`)'); + ENGINE=' . _MYSQL_ENGINE_ . ' default CHARSET=utf8'); + Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'blocklink_shop` (id_blocklink, id_shop) + (SELECT id_blocklink, 1 FROM `' . _DB_PREFIX_ . 'blocklink`)'); } return true; diff --git a/upgrade/php/update_modules_sql.php b/upgrade/php/update_modules_sql.php index 2bb58b96f..90e7761e6 100644 --- a/upgrade/php/update_modules_sql.php +++ b/upgrade/php/update_modules_sql.php @@ -23,17 +23,16 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function update_modules_sql() { - $id_blocklink = Db::getInstance()->getValue('SELECT id_module FROM `'._DB_PREFIX_.'module` WHERE name = "blocklink"'); + $id_blocklink = Db::getInstance()->getValue('SELECT id_module FROM `' . _DB_PREFIX_ . 'module` WHERE name = "blocklink"'); if ($id_blocklink) { - Db::getInstance()->execute('ALTER IGNORE TABLE `'._DB_PREFIX_.'blocklink_lang` ADD PRIMARY KEY (`id_link`, `id_lang`);'); + Db::getInstance()->execute('ALTER IGNORE TABLE `' . _DB_PREFIX_ . 'blocklink_lang` ADD PRIMARY KEY (`id_link`, `id_lang`);'); } - $id_productcomments = Db::getInstance()->getValue('SELECT id_module FROM `'._DB_PREFIX_.'module` WHERE name = "productcomments"'); + $id_productcomments = Db::getInstance()->getValue('SELECT id_module FROM `' . _DB_PREFIX_ . 'module` WHERE name = "productcomments"'); if ($id_productcomments) { - Db::getInstance()->execute('ALTER IGNORE TABLE `'._DB_PREFIX_.'product_comment_grade` ADD PRIMARY KEY (`id_product_comment`, `id_product_comment_criterion`);'); - Db::getInstance()->execute('ALTER IGNORE TABLE `'._DB_PREFIX_.'product_comment_criterion` DROP PRIMARY KEY, ADD PRIMARY KEY (`id_product_comment_criterion`, `id_lang`);'); - Db::getInstance()->execute('ALTER IGNORE TABLE `'._DB_PREFIX_.'product_comment_criterion_product` ADD PRIMARY KEY(`id_product`, `id_product_comment_criterion`);'); + Db::getInstance()->execute('ALTER IGNORE TABLE `' . _DB_PREFIX_ . 'product_comment_grade` ADD PRIMARY KEY (`id_product_comment`, `id_product_comment_criterion`);'); + Db::getInstance()->execute('ALTER IGNORE TABLE `' . _DB_PREFIX_ . 'product_comment_criterion` DROP PRIMARY KEY, ADD PRIMARY KEY (`id_product_comment_criterion`, `id_lang`);'); + Db::getInstance()->execute('ALTER IGNORE TABLE `' . _DB_PREFIX_ . 'product_comment_criterion_product` ADD PRIMARY KEY(`id_product`, `id_product_comment_criterion`);'); } } diff --git a/upgrade/php/update_order_canada.php b/upgrade/php/update_order_canada.php index 583b711c8..5a84e69fa 100644 --- a/upgrade/php/update_order_canada.php +++ b/upgrade/php/update_order_canada.php @@ -23,80 +23,79 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function update_order_canada() { - $sql ='SHOW TABLES LIKE "'.str_replace('_', '\_', _DB_PREFIX_).'order\_tax"'; + $sql = 'SHOW TABLES LIKE "' . str_replace('_', '\_', _DB_PREFIX_) . 'order\_tax"'; $table = Db::getInstance()->executeS($sql); if (!count($table)) { Db::getInstance()->execute(' - CREATE TABLE IF NOT EXISTS `'._DB_PREFIX_.'order_tax` ( + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'order_tax` ( `id_order` int(11) NOT NULL, `tax_name` varchar(40) NOT NULL, `tax_rate` decimal(6,3) NOT NULL, `amount` decimal(20,6) NOT NULL - ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'); $address_field = Db::getInstance()->getValue('SELECT value - FROM `'._DB_PREFIX_.'configuration` + FROM `' . _DB_PREFIX_ . 'configuration` WHERE name="PS_TAX_ADDRESS_TYPE"'); $address_field = str_replace('`', '\`', $address_field); $sql = 'SELECT `id_order`, `price_display_method` - FROM `'._DB_PREFIX_.'orders` o - LEFT JOIN `'._DB_PREFIX_.'customer` cus ON (o.id_customer = cus.id_customer) - LEFT JOIN `'._DB_PREFIX_.'group` g ON (g.id_group = cus.id_default_group) - LEFT JOIN `'._DB_PREFIX_.'address` a ON (a.`id_address` = o.`'.$address_field.'`) - LEFT JOIN `'._DB_PREFIX_.'country` c ON (c.`id_country` = a.`id_country`) + FROM `' . _DB_PREFIX_ . 'orders` o + LEFT JOIN `' . _DB_PREFIX_ . 'customer` cus ON (o.id_customer = cus.id_customer) + LEFT JOIN `' . _DB_PREFIX_ . 'group` g ON (g.id_group = cus.id_default_group) + LEFT JOIN `' . _DB_PREFIX_ . 'address` a ON (a.`id_address` = o.`' . $address_field . '`) + LEFT JOIN `' . _DB_PREFIX_ . 'country` c ON (c.`id_country` = a.`id_country`) WHERE c.`iso_code` = "CA"'; $id_order_list = Db::getInstance()->executeS($sql); $default_price_display_method = Db::getInstance()->getValue('SELECT price_display_method - FROM `'._DB_PREFIX_.'group` WHERE id_group=1'); + FROM `' . _DB_PREFIX_ . 'group` WHERE id_group=1'); $values = ''; if (is_array($id_order_list)) { foreach ($id_order_list as $order) { - $amount = array(); + $amount = []; $id_order = $order['id_order']; - // in Order class, getTaxCalculationMethod - // returns Group::getDefaultPriceDisplayMethod - $tax_calculation_method = $order['price_display_method']; + // in Order class, getTaxCalculationMethod + // returns Group::getDefaultPriceDisplayMethod + $tax_calculation_method = $order['price_display_method']; $products = Db::getInstance()->executeS(' - SELECT * FROM `'._DB_PREFIX_.'order_detail` od - WHERE od.`id_order` = '.(int)$id_order); + SELECT * FROM `' . _DB_PREFIX_ . 'order_detail` od + WHERE od.`id_order` = ' . (int) $id_order); foreach ($products as $product) { if (!array_key_exists($product['tax_name'], $amount)) { - $amount[$product['tax_name']] = array('amount' => 0, 'rate' => $product['tax_rate']); + $amount[$product['tax_name']] = ['amount' => 0, 'rate' => $product['tax_rate']]; } - // PS_TAX_EXC = 1, PS_TAX_INC = 0 - if ($tax_calculation_method == 1) { - $total_product = $product['product_price'] * $product['product_quantity']; - $amount_tmp = update_order_canada_ps_round($total_product * ($product['tax_rate'] / 100), 2); - $amount[$product['tax_name']]['amount'] += update_order_canada_ps_round($total_product * ($product['tax_rate'] / 100), 2); - } else { - $total_product = $product['product_price'] * $product['product_quantity']; - $amount_tmp = update_order_canada_ps_round($total_product - ($total_product / (1 + ($product['tax_rate'] / 100))), 2); - $amount[$product['tax_name']]['amount'] += update_order_canada_ps_round($total_product - ($total_product / (1 + ($product['tax_rate'] / 100))), 2); - } + // PS_TAX_EXC = 1, PS_TAX_INC = 0 + if ($tax_calculation_method == 1) { + $total_product = $product['product_price'] * $product['product_quantity']; + $amount_tmp = update_order_canada_ps_round($total_product * ($product['tax_rate'] / 100), 2); + $amount[$product['tax_name']]['amount'] += update_order_canada_ps_round($total_product * ($product['tax_rate'] / 100), 2); + } else { + $total_product = $product['product_price'] * $product['product_quantity']; + $amount_tmp = update_order_canada_ps_round($total_product - ($total_product / (1 + ($product['tax_rate'] / 100))), 2); + $amount[$product['tax_name']]['amount'] += update_order_canada_ps_round($total_product - ($total_product / (1 + ($product['tax_rate'] / 100))), 2); + } } foreach ($amount as $tax_name => $tax_infos) { - $values .= '('.(int)$id_order.', "'.$tax_name.'\', "'.$tax_infos['rate'].'", '.(float)$tax_infos['amount'].'),'; + $values .= '(' . (int) $id_order . ', "' . $tax_name . '\', "' . $tax_infos['rate'] . '", ' . (float) $tax_infos['amount'] . '),'; } unset($order); } } if (!empty($values)) { - $values = rtrim($values, ","); + $values = rtrim($values, ','); Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'order_tax` (id_order, tax_name, tax_rate, amount) - VALUES '.$values); + INSERT INTO `' . _DB_PREFIX_ . 'order_tax` (id_order, tax_name, tax_rate, amount) + VALUES ' . $values); } } } @@ -106,15 +105,15 @@ function update_order_canada_ps_round($val) static $ps_price_round_mode; if (empty($ps_price_round_mode)) { $ps_price_round_mode = Db::getInstance()->getValue('SELECT value - FROM `'._DB_PREFIX_.'configuration` + FROM `' . _DB_PREFIX_ . 'configuration` WHERE name = "PS_PRICE_ROUND_MODE"'); } switch ($ps_price_round_mode) { case 0: - return ceil($val * 100)/100; + return ceil($val * 100) / 100; case 1: - return floor($val * 100)/100; + return floor($val * 100) / 100; default: return round($val, 2); } diff --git a/upgrade/php/update_order_detail_taxes.php b/upgrade/php/update_order_detail_taxes.php index 8d7f66406..19a5466bb 100644 --- a/upgrade/php/update_order_detail_taxes.php +++ b/upgrade/php/update_order_detail_taxes.php @@ -23,35 +23,34 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function update_order_detail_taxes() { $order_detail_taxes = Db::getInstance()->executeS(' - SELECT `id_order_detail`, `tax_name`, `tax_rate` FROM `'._DB_PREFIX_.'order_detail` + SELECT `id_order_detail`, `tax_name`, `tax_rate` FROM `' . _DB_PREFIX_ . 'order_detail` '); - $id_lang_list = Db::getInstance()->executeS('SELECT id_lang FROM `'._DB_PREFIX_.'lang`'); + $id_lang_list = Db::getInstance()->executeS('SELECT id_lang FROM `' . _DB_PREFIX_ . 'lang`'); foreach ($order_detail_taxes as $order_detail_tax) { if ($order_detail_tax['tax_rate'] == '0.000') { continue; } - $alternative_tax_name = 'Tax '.$order_detail_tax['tax_rate']; + $alternative_tax_name = 'Tax ' . $order_detail_tax['tax_rate']; $create_tax = true; - $id_tax = (int)Db::getInstance()->getValue('SELECT t.`id_tax` - FROM `'._DB_PREFIX_.'tax` t - LEFT JOIN `'._DB_PREFIX_.'tax_lang` tl ON (tl.id_tax = t.id_tax) - WHERE tl.`name` = \''.pSQL($order_detail_tax['tax_name']).'\' '); - $id_tax_alt = (int)Db::getInstance()->getValue('SELECT t.`id_tax` - FROM `'._DB_PREFIX_.'tax` t - LEFT JOIN `'._DB_PREFIX_.'tax_lang` tl ON (tl.id_tax = t.id_tax) - WHERE tl.`name` = \''.pSQL($alternative_tax_name).'\' '); + $id_tax = (int) Db::getInstance()->getValue('SELECT t.`id_tax` + FROM `' . _DB_PREFIX_ . 'tax` t + LEFT JOIN `' . _DB_PREFIX_ . 'tax_lang` tl ON (tl.id_tax = t.id_tax) + WHERE tl.`name` = \'' . pSQL($order_detail_tax['tax_name']) . '\' '); + $id_tax_alt = (int) Db::getInstance()->getValue('SELECT t.`id_tax` + FROM `' . _DB_PREFIX_ . 'tax` t + LEFT JOIN `' . _DB_PREFIX_ . 'tax_lang` tl ON (tl.id_tax = t.id_tax) + WHERE tl.`name` = \'' . pSQL($alternative_tax_name) . '\' '); if ($id_tax || $id_tax_alt) { - $create_tax = !(bool)Db::getInstance()->getValue('SELECT count(*) - FROM `'._DB_PREFIX_.'tax` - WHERE id_tax = '. (int)$id_tax .' - AND rate = "'.pSQL($order_detail_tax['tax_rate']).'" + $create_tax = !(bool) Db::getInstance()->getValue('SELECT count(*) + FROM `' . _DB_PREFIX_ . 'tax` + WHERE id_tax = ' . (int) $id_tax . ' + AND rate = "' . pSQL($order_detail_tax['tax_rate']) . '" '); } @@ -59,22 +58,22 @@ function update_order_detail_taxes() $tax_name = (isset($order_detail_tax['tax_name']) ? $order_detail_tax['tax_name'] : $alternative_tax_name); Db::getInstance()->execute( - 'INSERT INTO `'._DB_PREFIX_.'tax` (`rate`, `active`, `deleted`) - VALUES (\''.(float)$order_detail_tax['tax_rate'].'\', 0, 1)' + 'INSERT INTO `' . _DB_PREFIX_ . 'tax` (`rate`, `active`, `deleted`) + VALUES (\'' . (float) $order_detail_tax['tax_rate'] . '\', 0, 1)' ); $id_tax = Db::getInstance()->Insert_ID(); foreach ($id_lang_list as $id_lang) { Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'tax_lang` (`id_tax`, `id_lang`, `name`) - VALUES ('.(int)$id_tax.','.(int)$id_lang['id_lang'].',\''.pSQL($tax_name).'\') + INSERT INTO `' . _DB_PREFIX_ . 'tax_lang` (`id_tax`, `id_lang`, `name`) + VALUES (' . (int) $id_tax . ',' . (int) $id_lang['id_lang'] . ',\'' . pSQL($tax_name) . '\') '); } } Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'order_detail_tax` (`id_order_detail`, `id_tax`) - VALUES ('.(int)$order_detail_tax['id_order_detail'].','.$id_tax.') + INSERT INTO `' . _DB_PREFIX_ . 'order_detail_tax` (`id_order_detail`, `id_tax`) + VALUES (' . (int) $order_detail_tax['id_order_detail'] . ',' . $id_tax . ') '); } } diff --git a/upgrade/php/update_order_details.php b/upgrade/php/update_order_details.php index bb172d812..e961e52cc 100644 --- a/upgrade/php/update_order_details.php +++ b/upgrade/php/update_order_details.php @@ -23,13 +23,12 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function update_order_details() { - $res = Db::getInstance()->executeS('SHOW COLUMNS FROM `'._DB_PREFIX_.'order_detail` = \'reduction_percent\''); + $res = Db::getInstance()->executeS('SHOW COLUMNS FROM `' . _DB_PREFIX_ . 'order_detail` = \'reduction_percent\''); if (count($res) == 0) { - Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'order_detail` ADD `reduction_percent` DECIMAL(10, 2) NOT NULL default \'0.00\' AFTER `product_price`'); - Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'order_detail` ADD `reduction_amount` DECIMAL(20, 6) NOT NULL default \'0.000000\' AFTER `reduction_percent`'); + Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'order_detail` ADD `reduction_percent` DECIMAL(10, 2) NOT NULL default \'0.00\' AFTER `product_price`'); + Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'order_detail` ADD `reduction_amount` DECIMAL(20, 6) NOT NULL default \'0.000000\' AFTER `reduction_percent`'); } } diff --git a/upgrade/php/update_order_messages.php b/upgrade/php/update_order_messages.php index f1d9fd369..bb1706d56 100644 --- a/upgrade/php/update_order_messages.php +++ b/upgrade/php/update_order_messages.php @@ -23,26 +23,25 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function update_order_messages() { $step = 3000; - $count_messages = Db::getInstance()->getValue('SELECT count(id_message) FROM '._DB_PREFIX_.'message'); + $count_messages = Db::getInstance()->getValue('SELECT count(id_message) FROM ' . _DB_PREFIX_ . 'message'); $nb_loop = $start = 0; $pattern = ' 0) { $nb_loop = ceil($count_messages / $step); } - for ($i = 0; $i < $nb_loop; $i++) { - $sql = 'SELECT id_message, message FROM `'._DB_PREFIX_.'message` WHERE message REGEXP \''.pSQL($pattern, true).'\' LIMIT '.(int)$start.', '.(int)$step; - $start = (int) (($i+1) * $step); + for ($i = 0; $i < $nb_loop; ++$i) { + $sql = 'SELECT id_message, message FROM `' . _DB_PREFIX_ . 'message` WHERE message REGEXP \'' . pSQL($pattern, true) . '\' LIMIT ' . (int) $start . ', ' . (int) $step; + $start = (int) (($i + 1) * $step); if ($messages = Db::getInstance()->query($sql)) { while ($message = Db::getInstance()->nextRow($messages)) { if (is_array($message)) { Db::getInstance()->execute(' - UPDATE `'._DB_PREFIX_.'message` - SET message = \''.pSQL(preg_replace('/'.$pattern.'/', '', Tools::htmlentitiesDecodeUTF8(br2nl($message['message'])))).'\' - WHERE id_message = '.(int)$message['id_message']); + UPDATE `' . _DB_PREFIX_ . 'message` + SET message = \'' . pSQL(preg_replace('/' . $pattern . '/', '', Tools::htmlentitiesDecodeUTF8(br2nl($message['message'])))) . '\' + WHERE id_message = ' . (int) $message['id_message']); } } } @@ -51,16 +50,16 @@ function update_order_messages() if ($count_messages > 0) { $nb_loop = ceil($count_messages / $step); } - for ($i = 0; $i < $nb_loop; $i++) { - $sql = 'SELECT id_customer_message, message FROM `'._DB_PREFIX_.'customer_message` WHERE message REGEXP \''.pSQL($pattern, true).'\' LIMIT '.(int)$start.', '.(int)$step; - $start = (int) (($i+1) * $step); + for ($i = 0; $i < $nb_loop; ++$i) { + $sql = 'SELECT id_customer_message, message FROM `' . _DB_PREFIX_ . 'customer_message` WHERE message REGEXP \'' . pSQL($pattern, true) . '\' LIMIT ' . (int) $start . ', ' . (int) $step; + $start = (int) (($i + 1) * $step); if ($messages = Db::getInstance()->query($sql)) { while ($message = Db::getInstance()->nextRow($messages)) { if (is_array($message)) { Db::getInstance()->execute(' - UPDATE `'._DB_PREFIX_.'customer_message` - SET message = \''.pSQL(preg_replace('/'.$pattern.'/', '', Tools::htmlentitiesDecodeUTF8(str_replace('&', '&', $message['message'])))).'\' - WHERE id_customer_message = '.(int)$message['id_customer_message']); + UPDATE `' . _DB_PREFIX_ . 'customer_message` + SET message = \'' . pSQL(preg_replace('/' . $pattern . '/', '', Tools::htmlentitiesDecodeUTF8(str_replace('&', '&', $message['message'])))) . '\' + WHERE id_customer_message = ' . (int) $message['id_customer_message']); } } } @@ -69,5 +68,5 @@ function update_order_messages() function br2nl($str) { - return str_replace(array('
', '
', '
'), "\n", $str); + return str_replace(['
', '
', '
'], "\n", $str); } diff --git a/upgrade/php/update_products_ecotax_v133.php b/upgrade/php/update_products_ecotax_v133.php index dee429e78..8da538d2e 100644 --- a/upgrade/php/update_products_ecotax_v133.php +++ b/upgrade/php/update_products_ecotax_v133.php @@ -23,12 +23,11 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function update_products_ecotax_v133() { global $oldversion; if ($oldversion < '1.3.3.0') { - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'product` SET `ecotax` = \'0\' WHERE 1'); - Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'order_detail` SET `ecotax` = \'0\' WHERE 1;'); + Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'product` SET `ecotax` = \'0\' WHERE 1'); + Db::getInstance()->execute('UPDATE `' . _DB_PREFIX_ . 'order_detail` SET `ecotax` = \'0\' WHERE 1;'); } } diff --git a/upgrade/php/update_stock_mvt_reason.php b/upgrade/php/update_stock_mvt_reason.php index 8f5db6a85..4ac906b4b 100644 --- a/upgrade/php/update_stock_mvt_reason.php +++ b/upgrade/php/update_stock_mvt_reason.php @@ -23,14 +23,13 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function update_stock_mvt_reason() { //Get all stock mvts reasons already presents in the solution (from 1.4.x) //Remove standard movements to keep only custom movement $mvts = Db::getInstance()->executeS(' SELECT smr.* - FROM `'._DB_PREFIX_.'stock_mvt_reason` + FROM `' . _DB_PREFIX_ . 'stock_mvt_reason` WHERE `id` > 5 '); @@ -38,17 +37,17 @@ function update_stock_mvt_reason() //Remove standard movements to keep only custom movement $mvts_lang = Db::getInstance()->executeS(' SELECT smrl.* - FROM `'._DB_PREFIX_.'stock_movement_reason_lang` + FROM `' . _DB_PREFIX_ . 'stock_movement_reason_lang` WHERE `id_stock_mvt_reason` > 5 '); //Clean table - Db::getInstance()->query('TRUNCATE TABLE `'._DB_PREFIX_.'stock_movement_reason`'); - Db::getInstance()->query('TRUNCATE TABLE `'._DB_PREFIX_.'stock_movement_reason_lang`'); + Db::getInstance()->query('TRUNCATE TABLE `' . _DB_PREFIX_ . 'stock_movement_reason`'); + Db::getInstance()->query('TRUNCATE TABLE `' . _DB_PREFIX_ . 'stock_movement_reason_lang`'); //Recreate new standards movements Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'stock_mvt_reason` (`id_stock_mvt_reason`, `sign`, `date_add`, `date_upd`) + INSERT INTO `' . _DB_PREFIX_ . 'stock_mvt_reason` (`id_stock_mvt_reason`, `sign`, `date_add`, `date_upd`) VALUES (1, 1, NOW(), NOW()), (2, -1, NOW(), NOW()), @@ -60,8 +59,8 @@ function update_stock_mvt_reason() (8, 1, NOW(), NOW()) '); - Db::getInstance()->execute(" - INSERT INTO `"._DB_PREFIX_."stock_mvt_reason_lang` (`id_stock_mvt_reason`, `id_lang`, `name`) + Db::getInstance()->execute(' + INSERT INTO `' . _DB_PREFIX_ . "stock_mvt_reason_lang` (`id_stock_mvt_reason`, `id_lang`, `name`) VALUES (1, 1, 'Increase'), (1, 2, 'Augmenter'), @@ -109,8 +108,8 @@ function update_stock_mvt_reason() if (is_array($mvts)) { foreach ($mvts as $mvt) { Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'stock_mvt_reason` (`sign`, `date_add`, `date_upd`) - VALUES ("'.(int)$mvt['sign'].'", "'.pSQL($mvt['date_add']).'", "'.pSQL($mvt['date_upd']).'") + INSERT INTO `' . _DB_PREFIX_ . 'stock_mvt_reason` (`sign`, `date_add`, `date_upd`) + VALUES ("' . (int) $mvt['sign'] . '", "' . pSQL($mvt['date_add']) . '", "' . pSQL($mvt['date_upd']) . '") '); $row_id = Db::getInstance()->Insert_ID(); @@ -121,8 +120,8 @@ function update_stock_mvt_reason() } Db::getInstance()->execute(' - INSERT INTO `'._DB_PREFIX_.'stock_mvt_reason_lang` (`id_stock_mvt_reason`, `id_lang`, `name`) - VALUES ("'.(int)$row_id.'", "'.(int)$mvt_lang['id_lang'].'", "'.pSQL($mvt_lang['name']).'") + INSERT INTO `' . _DB_PREFIX_ . 'stock_mvt_reason_lang` (`id_stock_mvt_reason`, `id_lang`, `name`) + VALUES ("' . (int) $row_id . '", "' . (int) $mvt_lang['id_lang'] . '", "' . pSQL($mvt_lang['name']) . '") '); } } diff --git a/upgrade/php/updateproductcomments.php b/upgrade/php/updateproductcomments.php index e06284336..fd8185f12 100644 --- a/upgrade/php/updateproductcomments.php +++ b/upgrade/php/updateproductcomments.php @@ -23,32 +23,31 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function updateproductcomments() { - if (Db::getInstance()->executeS('SELECT * FROM '._DB_PREFIX_.'product_comment') !== false) { - Db::getInstance()->execute('CREATE TABLE IF NOT EXISTS '._DB_PREFIX_.'product_comment_criterion_lang ( + if (Db::getInstance()->executeS('SELECT * FROM ' . _DB_PREFIX_ . 'product_comment') !== false) { + Db::getInstance()->execute('CREATE TABLE IF NOT EXISTS ' . _DB_PREFIX_ . 'product_comment_criterion_lang ( `id_product_comment_criterion` INT( 11 ) UNSIGNED NOT NULL , `id_lang` INT(11) UNSIGNED NOT NULL , `name` VARCHAR(64) NOT NULL , PRIMARY KEY ( `id_product_comment_criterion` , `id_lang` ) - ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); - Db::getInstance()->execute('CREATE TABLE IF NOT EXISTS '._DB_PREFIX_.'product_comment_criterion_category ( + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'); + Db::getInstance()->execute('CREATE TABLE IF NOT EXISTS ' . _DB_PREFIX_ . 'product_comment_criterion_category ( `id_product_comment_criterion` int(10) unsigned NOT NULL, `id_category` int(10) unsigned NOT NULL, PRIMARY KEY(`id_product_comment_criterion`, `id_category`), KEY `id_category` (`id_category`) - ) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8'); - Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment ADD `id_guest` INT(11) NULL AFTER `id_customer`'); - Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment ADD `customer_name` varchar(64) NULL AFTER `content`'); - Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment ADD `deleted` tinyint(1) NOT NULL AFTER `validate`'); - Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment ADD INDEX (id_customer)'); - Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment ADD INDEX (id_guest)'); - Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment ADD INDEX (id_product)'); - Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment_criterion DROP `id_lang`'); - Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment_criterion DROP `name`'); - Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment_criterion ADD `id_product_comment_criterion_type` tinyint(1) NOT NULL AFTER `id_product_comment_criterion`'); - Db::getInstance()->execute('ALTER TABLE '._DB_PREFIX_.'product_comment_criterion ADD `active` tinyint(1) NOT NULL AFTER `id_product_comment_criterion_type`'); - Db::getInstance()->execute('ALTER IGNORE TABLE `'._DB_PREFIX_.'product_comment` ADD `title` VARCHAR(64) NULL AFTER `id_guest`;'); + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'); + Db::getInstance()->execute('ALTER TABLE ' . _DB_PREFIX_ . 'product_comment ADD `id_guest` INT(11) NULL AFTER `id_customer`'); + Db::getInstance()->execute('ALTER TABLE ' . _DB_PREFIX_ . 'product_comment ADD `customer_name` varchar(64) NULL AFTER `content`'); + Db::getInstance()->execute('ALTER TABLE ' . _DB_PREFIX_ . 'product_comment ADD `deleted` tinyint(1) NOT NULL AFTER `validate`'); + Db::getInstance()->execute('ALTER TABLE ' . _DB_PREFIX_ . 'product_comment ADD INDEX (id_customer)'); + Db::getInstance()->execute('ALTER TABLE ' . _DB_PREFIX_ . 'product_comment ADD INDEX (id_guest)'); + Db::getInstance()->execute('ALTER TABLE ' . _DB_PREFIX_ . 'product_comment ADD INDEX (id_product)'); + Db::getInstance()->execute('ALTER TABLE ' . _DB_PREFIX_ . 'product_comment_criterion DROP `id_lang`'); + Db::getInstance()->execute('ALTER TABLE ' . _DB_PREFIX_ . 'product_comment_criterion DROP `name`'); + Db::getInstance()->execute('ALTER TABLE ' . _DB_PREFIX_ . 'product_comment_criterion ADD `id_product_comment_criterion_type` tinyint(1) NOT NULL AFTER `id_product_comment_criterion`'); + Db::getInstance()->execute('ALTER TABLE ' . _DB_PREFIX_ . 'product_comment_criterion ADD `active` tinyint(1) NOT NULL AFTER `id_product_comment_criterion_type`'); + Db::getInstance()->execute('ALTER IGNORE TABLE `' . _DB_PREFIX_ . 'product_comment` ADD `title` VARCHAR(64) NULL AFTER `id_guest`;'); } } diff --git a/upgrade/php/updatetabicon_from_11version.php b/upgrade/php/updatetabicon_from_11version.php index 806fb3c50..a2ed8cca7 100644 --- a/upgrade/php/updatetabicon_from_11version.php +++ b/upgrade/php/updatetabicon_from_11version.php @@ -23,19 +23,18 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function updatetabicon_from_11version() { global $oldversion; if (version_compare($oldversion, '1.5.0.0', '<')) { - $rows = Db::getInstance()->executeS('SELECT `id_tab`,`class_name` FROM '._DB_PREFIX_.'tab'); + $rows = Db::getInstance()->executeS('SELECT `id_tab`,`class_name` FROM ' . _DB_PREFIX_ . 'tab'); if (count($rows)) { $img_dir = scandir(_PS_ROOT_DIR_ . '/img/t/', SCANDIR_SORT_NONE); $result = true; foreach ($rows as $tab) { - if (file_exists(_PS_ROOT_DIR_.'/img/t/'.$tab['id_tab'].'.gif') - && !file_exists(_PS_ROOT_DIR_.'/img/t/'.$tab['class_name'].'.gif')) { - $result &= rename(_PS_ROOT_DIR_.'/img/t/'.$tab['id_tab'].'.gif', _PS_ROOT_DIR_.'/img/t/'.$tab['class_name'].'.gif'); + if (file_exists(_PS_ROOT_DIR_ . '/img/t/' . $tab['id_tab'] . '.gif') + && !file_exists(_PS_ROOT_DIR_ . '/img/t/' . $tab['class_name'] . '.gif')) { + $result &= rename(_PS_ROOT_DIR_ . '/img/t/' . $tab['id_tab'] . '.gif', _PS_ROOT_DIR_ . '/img/t/' . $tab['class_name'] . '.gif'); } } } diff --git a/upgrade/php/upgrade_cms_15.php b/upgrade/php/upgrade_cms_15.php index e7d50408c..70ca8dc9b 100644 --- a/upgrade/php/upgrade_cms_15.php +++ b/upgrade/php/upgrade_cms_15.php @@ -23,33 +23,32 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function upgrade_cms_15() { $res = true; // note : cms_shop table is required and independant of blockcms module // /!\ : _cms_shop is the wrong table name (fixed in 1.5.0.12.sql : upgrade_cms_15_rename() ) - $res &= Db::getInstance()->execute('CREATE TABLE `'._DB_PREFIX_.'_cms_shop` ( + $res &= Db::getInstance()->execute('CREATE TABLE `' . _DB_PREFIX_ . '_cms_shop` ( `id_cms` INT( 11 ) UNSIGNED NOT NULL, `id_shop` INT( 11 ) UNSIGNED NOT NULL , PRIMARY KEY (`id_cms`, `id_shop`), KEY `id_shop` (`id_shop`) -) ENGINE='._MYSQL_ENGINE_.' DEFAULT CHARSET=utf8;'); +) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;'); // /!\ : _cms_shop and _cms are wrong tables name (fixed in 1.5.0.12.sql : upgrade_cms_15_rename() ) - $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'_cms_shop` (id_shop, id_cms) - (SELECT 1, id_cms FROM '._DB_PREFIX_.'_cms)'); + $res &= Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . '_cms_shop` (id_shop, id_cms) + (SELECT 1, id_cms FROM ' . _DB_PREFIX_ . '_cms)'); // cms_block table is blockcms module dependant. Don't update table that does not exists // /!\ : _module is the wrong table name (fixed in 1.5.0.12.sql : upgrade_cms_15_rename() ) - $id_module_cms = Db::getInstance()->getValue('SELECT id_module from `'._DB_PREFIX_.'_module + $id_module_cms = Db::getInstance()->getValue('SELECT id_module from `' . _DB_PREFIX_ . '_module WHERE name="blockcms"`'); if (!$id_module_cms) { return $res; } // /!\ : _cms_block is the wrong table name (fixed in 1.5.0.12.sql : upgrade_cms_15_rename() ) - $res &= Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'._cms_block` + $res &= Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . '._cms_block` ADD `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT "1" AFTER `id_cms_block`'); return $res; diff --git a/upgrade/php/upgrade_cms_15_rename.php b/upgrade/php/upgrade_cms_15_rename.php index 9b344acd2..2db8cc0c5 100644 --- a/upgrade/php/upgrade_cms_15_rename.php +++ b/upgrade/php/upgrade_cms_15_rename.php @@ -23,25 +23,24 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - function upgrade_cms_15_rename() { $res = true; $db = Db::getInstance(); - $res &= $db->executeS('SHOW TABLES LIKE "'._DB_PREFIX_.'_cms_shop"'); + $res &= $db->executeS('SHOW TABLES LIKE "' . _DB_PREFIX_ . '_cms_shop"'); if ($res) { - $res &= $db->execute('RENAME TABLE `'._DB_PREFIX_.'_cms_shop` to `'._DB_PREFIX_.'cms_shop`'); + $res &= $db->execute('RENAME TABLE `' . _DB_PREFIX_ . '_cms_shop` to `' . _DB_PREFIX_ . 'cms_shop`'); // in case the script upgrade_cms_15.php have set a wrong table name, it's empty - $res &= Db::getInstance()->execute('INSERT INTO `'._DB_PREFIX_.'cms_shop` (id_shop, id_cms) - (SELECT 1, id_cms FROM '._DB_PREFIX_.'cms)'); + $res &= Db::getInstance()->execute('INSERT INTO `' . _DB_PREFIX_ . 'cms_shop` (id_shop, id_cms) + (SELECT 1, id_cms FROM ' . _DB_PREFIX_ . 'cms)'); // cms_block table is blockcms module dependant. Don't update table that does not exists - $table_cms_block_exists = $db->executeS('SHOW TABLES LIKE "'._DB_PREFIX_.'cms"'); + $table_cms_block_exists = $db->executeS('SHOW TABLES LIKE "' . _DB_PREFIX_ . 'cms"'); if (!$table_cms_block_exists) { return $res; } - $res &= Db::getInstance()->execute('ALTER TABLE `'._DB_PREFIX_.'cms` + $res &= Db::getInstance()->execute('ALTER TABLE `' . _DB_PREFIX_ . 'cms` ADD `id_shop` INT(11) UNSIGNED NOT NULL DEFAULT "1" AFTER `id_cms`'); } diff --git a/upgrade/sql/index.php b/upgrade/sql/index.php index 76cd9dd33..c7835bc88 100644 --- a/upgrade/sql/index.php +++ b/upgrade/sql/index.php @@ -23,13 +23,12 @@ * @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ +header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); +header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); -header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); -header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT"); +header('Cache-Control: no-store, no-cache, must-revalidate'); +header('Cache-Control: post-check=0, pre-check=0', false); +header('Pragma: no-cache'); -header("Cache-Control: no-store, no-cache, must-revalidate"); -header("Cache-Control: post-check=0, pre-check=0", false); -header("Pragma: no-cache"); - -header("Location: ../"); +header('Location: ../'); exit; diff --git a/upgrade/upgrade.php b/upgrade/upgrade.php index 867a195d5..df6ab0be5 100644 --- a/upgrade/upgrade.php +++ b/upgrade/upgrade.php @@ -24,9 +24,8 @@ * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ -use PrestaShopBundle\Install\Upgrade; use PrestaShop\PrestaShop\Core\Foundation\Filesystem\FileSystem; - +use PrestaShopBundle\Install\Upgrade; // Although no arguments execute the script, you can get some help if requested. if (isset($argv) && is_array($argv) && in_array('--help', $argv)) { @@ -39,7 +38,7 @@ define('PS_IN_UPGRADE', 1); // remove old unsupported classes -@unlink(__DIR__.'/../../classes/db/MySQL.php'); +@unlink(__DIR__ . '/../../classes/db/MySQL.php'); if (isset($_GET['adminDir']) && $_GET['adminDir'] && !defined('_PS_ADMIN_DIR_')) { define('_PS_ADMIN_DIR_', base64_decode($_GET['adminDir'])); @@ -50,13 +49,13 @@ require_once __DIR__ . '/../../config/autoload.php'; Upgrade::migrateSettingsFile(); require_once __DIR__ . '/../classes/datas.php'; -require_once dirname(__FILE__).'/../init.php'; -require_once _PS_CONFIG_DIR_.'bootstrap.php'; +require_once dirname(__FILE__) . '/../init.php'; +require_once _PS_CONFIG_DIR_ . 'bootstrap.php'; -$logDir = _PS_ROOT_DIR_.'/var/logs/' . _PS_ENV_ . '/'; +$logDir = _PS_ROOT_DIR_ . '/var/logs/' . _PS_ENV_ . '/'; @mkdir($logDir, FileSystem::DEFAULT_MODE_FOLDER, true); -$upgrade = new Upgrade($logDir, dirname(dirname(__FILE__)).'/'); +$upgrade = new Upgrade($logDir, dirname(dirname(__FILE__)) . '/'); if (isset($_GET['autoupgrade']) && $_GET['autoupgrade'] == 1) { $upgrade->setInAutoUpgrade(true); } @@ -86,8 +85,8 @@ date_default_timezone_set('Europe/Paris'); } -if (isset($_GET['action']) && method_exists($upgrade, 'do'.$_GET['action'])) { - $action = 'do'.$_GET['action']; +if (isset($_GET['action']) && method_exists($upgrade, 'do' . $_GET['action'])) { + $action = 'do' . $_GET['action']; $upgrade->$action(); } else { $upgrade->run(); @@ -101,29 +100,29 @@ Configuration::updateValue('PS_VERSION_DB', _PS_INSTALL_VERSION_); } - $result .= ''."\n"; + $result .= '' . "\n"; foreach ($upgrade->getInfoList() as $info) { - $result .= $info."\n"; + $result .= $info . "\n"; } foreach ($upgrade->getWarningList() as $warning) { - $result .= $warning."\n"; + $result .= $warning . "\n"; } } else { foreach ($upgrade->getFailureList() as $failure) { - $result .= $failure."\n"; + $result .= $failure . "\n"; } } if ($upgrade->getInAutoUpgrade()) { header('Content-Type: application/json'); - echo json_encode(array( + echo json_encode([ 'nextQuickInfo' => $upgrade->getNextQuickInfo(), 'nextErrors' => $upgrade->getNextErrors(), 'next' => $upgrade->getNext(), 'nextDesc' => $upgrade->getNextDesc(), 'warningExists' => $upgrade->hasWarning(), - )); + ]); } else { header('Content-Type: text/xml'); echo $result; From 73ee89f16116ec21d94fec2aa6df6d2063a02576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Gonz=C3=A1lez=20Garza?= Date: Tue, 8 Feb 2022 02:30:40 -0600 Subject: [PATCH 007/128] Updated PREFIX_state.name field to 80 chars. --- upgrade/sql/1.7.8.4.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 upgrade/sql/1.7.8.4.sql diff --git a/upgrade/sql/1.7.8.4.sql b/upgrade/sql/1.7.8.4.sql new file mode 100644 index 000000000..c7fae3727 --- /dev/null +++ b/upgrade/sql/1.7.8.4.sql @@ -0,0 +1,4 @@ +SET SESSION sql_mode=''; +SET NAMES 'utf8mb4'; + +ALTER TABLE `PREFIX_state` MODIFY COLUMN `name` VARCHAR(80) NOT NULL; From abe45b108674cc0ec276e3a7afae9cd9dc07c9de Mon Sep 17 00:00:00 2001 From: Jonathan Lelievre Date: Tue, 2 Nov 2021 15:34:18 +0100 Subject: [PATCH 008/128] Use GenerateThemeMailTemplatesCommand during upgrade instead of legacy removed Language::installEmailsLanguagePack function --- .../CoreUpgrader/CoreUpgrader17.php | 29 ++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php index 1ab1de474..027daf4f3 100644 --- a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php +++ b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php @@ -30,6 +30,7 @@ use PrestaShop\Module\AutoUpgrade\UpgradeException; use PrestaShop\Module\AutoUpgrade\UpgradeTools\ThemeAdapter; use PrestaShop\PrestaShop\Core\CommandBus\CommandBusInterface; +use PrestaShop\PrestaShop\Core\Domain\MailTemplate\Command\GenerateThemeMailTemplatesCommand; use PrestaShop\PrestaShop\Core\Domain\Theme\Command\AdaptThemeToRTLLanguagesCommand; use PrestaShop\PrestaShop\Core\Domain\Theme\ValueObject\ThemeName; use PrestaShop\PrestaShop\Core\Exception\CoreException; @@ -83,7 +84,33 @@ protected function upgradeLanguage($lang) \Language::installSfLanguagePack($lang_pack['locale'], $errorsLanguage); if (!$this->container->getUpgradeConfiguration()->shouldKeepMails()) { - \Language::installEmailsLanguagePack($lang_pack, $errorsLanguage); + $mailTheme = \Configuration::get('PS_MAIL_THEME', null, null, null, 'modern'); + + $frontTheme = _THEME_NAME_; + $frontThemeMailsFolder = _PS_ALL_THEMES_DIR_ . $frontTheme . '/mails'; + $frontThemeModulesFolder = _PS_ALL_THEMES_DIR_ . $frontTheme . '/modules'; + + $generateCommand = new GenerateThemeMailTemplatesCommand( + $mailTheme, + $lang_pack['locale'], + true, + $frontThemeMailsFolder, + $frontThemeModulesFolder + ); + /** @var CommandBusInterface $commandBus */ + $commandBus = $this->container->get('prestashop.core.command_bus'); + + try { + $commandBus->handle($generateCommand); + } catch (CoreException $e) { + throw new UpgradeException( + $this->container->getTranslator()->trans( + 'Cannot generate email templates: %s.', + [$e->getMessage()], + 'Modules.Autoupgrade.Admin' + ) + ); + } } if (!empty($errorsLanguage)) { From 6ea0622c934bc8d5e5f4b7f86c8b216ecd1bd68d Mon Sep 17 00:00:00 2001 From: Jonathan Lelievre Date: Wed, 3 Nov 2021 10:32:42 +0100 Subject: [PATCH 009/128] Create new CoreUpgrade80 to handle backward compatibility regardless of the target version --- classes/TaskRunner/Upgrade/UpgradeDb.php | 9 +- .../CoreUpgrader/CoreUpgrader17.php | 29 +--- .../CoreUpgrader/CoreUpgrader80.php | 135 ++++++++++++++++++ 3 files changed, 143 insertions(+), 30 deletions(-) create mode 100644 classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php diff --git a/classes/TaskRunner/Upgrade/UpgradeDb.php b/classes/TaskRunner/Upgrade/UpgradeDb.php index c26ca0f9e..38975516a 100644 --- a/classes/TaskRunner/Upgrade/UpgradeDb.php +++ b/classes/TaskRunner/Upgrade/UpgradeDb.php @@ -31,6 +31,7 @@ use PrestaShop\Module\AutoUpgrade\UpgradeException; use PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader\CoreUpgrader16; use PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader\CoreUpgrader17; +use PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader\CoreUpgrader80; use PrestaShop\Module\AutoUpgrade\UpgradeTools\SettingsFileWriter; class UpgradeDb extends AbstractTask @@ -59,11 +60,15 @@ public function run() public function getCoreUpgrader() { - if (version_compare($this->container->getState()->getInstallVersion(), '1.7.0.0', '<=')) { + if (version_compare($this->container->getState()->getInstallVersion(), '1.7.0.0', '<')) { return new CoreUpgrader16($this->container, $this->logger); } - return new CoreUpgrader17($this->container, $this->logger); + if (version_compare($this->container->getState()->getInstallVersion(), '8.0.0.0', '<')) { + return new CoreUpgrader17($this->container, $this->logger); + } + + return new CoreUpgrader80($this->container, $this->logger); } public function init() diff --git a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php index 027daf4f3..1ab1de474 100644 --- a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php +++ b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php @@ -30,7 +30,6 @@ use PrestaShop\Module\AutoUpgrade\UpgradeException; use PrestaShop\Module\AutoUpgrade\UpgradeTools\ThemeAdapter; use PrestaShop\PrestaShop\Core\CommandBus\CommandBusInterface; -use PrestaShop\PrestaShop\Core\Domain\MailTemplate\Command\GenerateThemeMailTemplatesCommand; use PrestaShop\PrestaShop\Core\Domain\Theme\Command\AdaptThemeToRTLLanguagesCommand; use PrestaShop\PrestaShop\Core\Domain\Theme\ValueObject\ThemeName; use PrestaShop\PrestaShop\Core\Exception\CoreException; @@ -84,33 +83,7 @@ protected function upgradeLanguage($lang) \Language::installSfLanguagePack($lang_pack['locale'], $errorsLanguage); if (!$this->container->getUpgradeConfiguration()->shouldKeepMails()) { - $mailTheme = \Configuration::get('PS_MAIL_THEME', null, null, null, 'modern'); - - $frontTheme = _THEME_NAME_; - $frontThemeMailsFolder = _PS_ALL_THEMES_DIR_ . $frontTheme . '/mails'; - $frontThemeModulesFolder = _PS_ALL_THEMES_DIR_ . $frontTheme . '/modules'; - - $generateCommand = new GenerateThemeMailTemplatesCommand( - $mailTheme, - $lang_pack['locale'], - true, - $frontThemeMailsFolder, - $frontThemeModulesFolder - ); - /** @var CommandBusInterface $commandBus */ - $commandBus = $this->container->get('prestashop.core.command_bus'); - - try { - $commandBus->handle($generateCommand); - } catch (CoreException $e) { - throw new UpgradeException( - $this->container->getTranslator()->trans( - 'Cannot generate email templates: %s.', - [$e->getMessage()], - 'Modules.Autoupgrade.Admin' - ) - ); - } + \Language::installEmailsLanguagePack($lang_pack, $errorsLanguage); } if (!empty($errorsLanguage)) { diff --git a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php new file mode 100644 index 000000000..ba3912e93 --- /dev/null +++ b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php @@ -0,0 +1,135 @@ + + * @copyright Since 2007 PrestaShop SA and Contributors + * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) + */ + +declare(strict_types=1); + +namespace PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader; + +use PrestaShop\Module\AutoUpgrade\UpgradeException; +use PrestaShop\PrestaShop\Core\CommandBus\CommandBusInterface; +use PrestaShop\PrestaShop\Core\Domain\MailTemplate\Command\GenerateThemeMailTemplatesCommand; +use PrestaShop\PrestaShop\Core\Exception\CoreException; + +class CoreUpgrader80 extends CoreUpgrader +{ + protected function initConstants() + { + parent::initConstants(); + + /*if (!file_exists(SETTINGS_FILE_PHP)) { + throw new UpgradeException($this->container->getTranslator()->trans('The app/config/parameters.php file was not found.', array(), 'Modules.Autoupgrade.Admin')); + } + if (!file_exists(SETTINGS_FILE_YML)) { + throw new UpgradeException($this->container->getTranslator()->trans('The app/config/parameters.yml file was not found.', array(), 'Modules.Autoupgrade.Admin')); + }*/ + + // Container may be needed to run upgrade scripts + $this->container->getSymfonyAdapter()->initAppKernel(); + } + + protected function upgradeDb($oldversion) + { + parent::upgradeDb($oldversion); + + $commandResult = $this->container->getSymfonyAdapter()->runSchemaUpgradeCommand(); + if (0 !== $commandResult['exitCode']) { + throw (new UpgradeException($this->container->getTranslator()->trans('Error upgrading Doctrine schema', array(), 'Modules.Autoupgrade.Admin'))) + ->setQuickInfos(explode("\n", $commandResult['output'])); + } + } + + protected function upgradeLanguage($lang) + { + $isoCode = $lang['iso_code']; + + if (!\Validate::isLangIsoCode($isoCode)) { + return; + } + $errorsLanguage = array(); + + if (!\Language::downloadLanguagePack($isoCode, _PS_VERSION_, $errorsLanguage)) { + throw new UpgradeException( + $this->container->getTranslator()->trans( + 'Download of the language pack %lang% failed. %details%', + [ + '%lang%' => $isoCode, + '%details%' => implode('; ', $errorsLanguage), + ], + 'Modules.Autoupgrade.Admin' + ) + ); + } + + $lang_pack = \Language::getLangDetails($isoCode); + \Language::installSfLanguagePack($lang_pack['locale'], $errorsLanguage); + + if (!$this->container->getUpgradeConfiguration()->shouldKeepMails()) { + $mailTheme = \Configuration::get('PS_MAIL_THEME', null, null, null, 'modern'); + + $frontTheme = _THEME_NAME_; + $frontThemeMailsFolder = _PS_ALL_THEMES_DIR_ . $frontTheme . '/mails'; + $frontThemeModulesFolder = _PS_ALL_THEMES_DIR_ . $frontTheme . '/modules'; + + $generateCommand = new GenerateThemeMailTemplatesCommand( + $mailTheme, + $lang_pack['locale'], + true, + $frontThemeMailsFolder, + $frontThemeModulesFolder + ); + /** @var CommandBusInterface $commandBus */ + $commandBus = $this->container->get('prestashop.core.command_bus'); + + try { + $commandBus->handle($generateCommand); + } catch (CoreException $e) { + throw new UpgradeException( + $this->container->getTranslator()->trans( + 'Cannot generate email templates: %s.', + [$e->getMessage()], + 'Modules.Autoupgrade.Admin' + ) + ); + } + } + + if (!empty($errorsLanguage)) { + throw new UpgradeException( + $this->container->getTranslator()->trans( + 'Error while updating translations for lang %lang%. %details%', + [ + '%lang%' => $isoCode, + '%details%' => implode('; ', $errorsLanguage), + ], + 'Modules.Autoupgrade.Admin' + ) + ); + } + \Language::loadLanguages(); + + // TODO: Update AdminTranslationsController::addNewTabs to install tabs translated + } +} From ddf316d38547c6d2aaa52314545422092459d763 Mon Sep 17 00:00:00 2001 From: atomiix Date: Thu, 16 Dec 2021 14:47:48 +0100 Subject: [PATCH 010/128] Remove comment Co-authored-by: GoT --- classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php index ba3912e93..4558710c5 100644 --- a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php +++ b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php @@ -39,13 +39,6 @@ protected function initConstants() { parent::initConstants(); - /*if (!file_exists(SETTINGS_FILE_PHP)) { - throw new UpgradeException($this->container->getTranslator()->trans('The app/config/parameters.php file was not found.', array(), 'Modules.Autoupgrade.Admin')); - } - if (!file_exists(SETTINGS_FILE_YML)) { - throw new UpgradeException($this->container->getTranslator()->trans('The app/config/parameters.yml file was not found.', array(), 'Modules.Autoupgrade.Admin')); - }*/ - // Container may be needed to run upgrade scripts $this->container->getSymfonyAdapter()->initAppKernel(); } From be6d365545ab58fcf4e66ec3112e5a45e01d6c62 Mon Sep 17 00:00:00 2001 From: atomiix Date: Fri, 7 Jan 2022 11:37:00 +0100 Subject: [PATCH 011/128] Get command bus from moduleAdapter --- classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php index 4558710c5..5f767c44d 100644 --- a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php +++ b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php @@ -94,7 +94,7 @@ protected function upgradeLanguage($lang) $frontThemeModulesFolder ); /** @var CommandBusInterface $commandBus */ - $commandBus = $this->container->get('prestashop.core.command_bus'); + $commandBus = $this->container->getModuleAdapter()->getCommandBus(); try { $commandBus->handle($generateCommand); From b99c34d1654a0aaf8d27fb8eb36f83e710ff536a Mon Sep 17 00:00:00 2001 From: Thomas BACCELLI Date: Fri, 7 Jan 2022 19:17:40 +0100 Subject: [PATCH 012/128] Fix ps version detection & mail generation output folders --- classes/TaskRunner/Upgrade/UpgradeDb.php | 2 +- classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/classes/TaskRunner/Upgrade/UpgradeDb.php b/classes/TaskRunner/Upgrade/UpgradeDb.php index 38975516a..7d5e357fc 100644 --- a/classes/TaskRunner/Upgrade/UpgradeDb.php +++ b/classes/TaskRunner/Upgrade/UpgradeDb.php @@ -64,7 +64,7 @@ public function getCoreUpgrader() return new CoreUpgrader16($this->container, $this->logger); } - if (version_compare($this->container->getState()->getInstallVersion(), '8.0.0.0', '<')) { + if (version_compare($this->container->getState()->getInstallVersion(), '8.0.0', '<')) { return new CoreUpgrader17($this->container, $this->logger); } diff --git a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php index 5f767c44d..a229e5aff 100644 --- a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php +++ b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php @@ -90,8 +90,8 @@ protected function upgradeLanguage($lang) $mailTheme, $lang_pack['locale'], true, - $frontThemeMailsFolder, - $frontThemeModulesFolder + is_dir($frontThemeMailsFolder) ? $frontThemeMailsFolder : '', + is_dir($frontThemeModulesFolder) ? $frontThemeModulesFolder : '' ); /** @var CommandBusInterface $commandBus */ $commandBus = $this->container->getModuleAdapter()->getCommandBus(); From 86678ea1af28bce8128fb4783ae6fe99fce40be8 Mon Sep 17 00:00:00 2001 From: Thomas BACCELLI Date: Wed, 9 Feb 2022 18:43:03 +0100 Subject: [PATCH 013/128] Fix tests --- .github/workflows/php.yml | 2 +- .../CoreUpgrader/CoreUpgrader80.php | 35 +++---------------- tests/phpstan/phpstan-1.6.1.18.neon | 1 + tests/phpstan/phpstan-1.7.2.5.neon | 2 ++ tests/phpstan/phpstan-1.7.3.4.neon | 2 ++ tests/phpstan/phpstan-1.7.4.4.neon | 2 ++ tests/phpstan/phpstan-1.7.5.1.neon | 2 ++ tests/phpstan/phpstan-1.7.6.neon | 2 ++ tests/phpstan/phpstan-1.7.7.neon | 2 ++ tests/phpstan/phpstan-1.7.8.neon | 2 ++ 10 files changed, 21 insertions(+), 31 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 9300ba15d..5060b84b4 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -12,7 +12,7 @@ jobs: - name: PHP syntax checker 5.6 uses: prestashop/github-action-php-lint/5.6@master with: - folder-to-exclude: "! -path \"./.github/*\"" + folder-to-exclude: "! -path \"./.github/*\" ! -path \"./classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php\"" - name: PHP syntax checker 7.2 uses: prestashop/github-action-php-lint/7.2@master diff --git a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php index a229e5aff..7fa6de321 100644 --- a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php +++ b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php @@ -49,8 +49,7 @@ protected function upgradeDb($oldversion) $commandResult = $this->container->getSymfonyAdapter()->runSchemaUpgradeCommand(); if (0 !== $commandResult['exitCode']) { - throw (new UpgradeException($this->container->getTranslator()->trans('Error upgrading Doctrine schema', array(), 'Modules.Autoupgrade.Admin'))) - ->setQuickInfos(explode("\n", $commandResult['output'])); + throw (new UpgradeException($this->container->getTranslator()->trans('Error upgrading Doctrine schema', [], 'Modules.Autoupgrade.Admin')))->setQuickInfos(explode("\n", $commandResult['output'])); } } @@ -61,19 +60,10 @@ protected function upgradeLanguage($lang) if (!\Validate::isLangIsoCode($isoCode)) { return; } - $errorsLanguage = array(); + $errorsLanguage = []; if (!\Language::downloadLanguagePack($isoCode, _PS_VERSION_, $errorsLanguage)) { - throw new UpgradeException( - $this->container->getTranslator()->trans( - 'Download of the language pack %lang% failed. %details%', - [ - '%lang%' => $isoCode, - '%details%' => implode('; ', $errorsLanguage), - ], - 'Modules.Autoupgrade.Admin' - ) - ); + throw new UpgradeException($this->container->getTranslator()->trans('Download of the language pack %lang% failed. %details%', ['%lang%' => $isoCode, '%details%' => implode('; ', $errorsLanguage)], 'Modules.Autoupgrade.Admin')); } $lang_pack = \Language::getLangDetails($isoCode); @@ -99,27 +89,12 @@ protected function upgradeLanguage($lang) try { $commandBus->handle($generateCommand); } catch (CoreException $e) { - throw new UpgradeException( - $this->container->getTranslator()->trans( - 'Cannot generate email templates: %s.', - [$e->getMessage()], - 'Modules.Autoupgrade.Admin' - ) - ); + throw new UpgradeException($this->container->getTranslator()->trans('Cannot generate email templates: %s.', [$e->getMessage()], 'Modules.Autoupgrade.Admin')); } } if (!empty($errorsLanguage)) { - throw new UpgradeException( - $this->container->getTranslator()->trans( - 'Error while updating translations for lang %lang%. %details%', - [ - '%lang%' => $isoCode, - '%details%' => implode('; ', $errorsLanguage), - ], - 'Modules.Autoupgrade.Admin' - ) - ); + throw new UpgradeException($this->container->getTranslator()->trans('Error while updating translations for lang %lang%. %details%', ['%lang%' => $isoCode, '%details%' => implode('; ', $errorsLanguage)], 'Modules.Autoupgrade.Admin')); } \Language::loadLanguages(); diff --git a/tests/phpstan/phpstan-1.6.1.18.neon b/tests/phpstan/phpstan-1.6.1.18.neon index eb0a4a06e..cdb8c8e95 100644 --- a/tests/phpstan/phpstan-1.6.1.18.neon +++ b/tests/phpstan/phpstan-1.6.1.18.neon @@ -7,6 +7,7 @@ parameters: - ./../../classes/pclzip.lib.php - ./../../functions.php - ./../../classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php + - ./../../classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php - ./../../classes/UpgradeTools/SymfonyAdapter.php ignoreErrors: - '#Access to an undefined property Autoupgrade::\$bootstrap.#' diff --git a/tests/phpstan/phpstan-1.7.2.5.neon b/tests/phpstan/phpstan-1.7.2.5.neon index 5e9a4b90c..8f3fc54ad 100644 --- a/tests/phpstan/phpstan-1.7.2.5.neon +++ b/tests/phpstan/phpstan-1.7.2.5.neon @@ -2,6 +2,8 @@ includes: - %currentWorkingDirectory%/tests/phpstan/phpstan.neon parameters: + excludes_analyse: + - ./../../classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php ignoreErrors: - '#Access to an undefined property Autoupgrade::\$bootstrap.#' - '#Access to an undefined property Module::\$installed.#' diff --git a/tests/phpstan/phpstan-1.7.3.4.neon b/tests/phpstan/phpstan-1.7.3.4.neon index 5e9a4b90c..8f3fc54ad 100644 --- a/tests/phpstan/phpstan-1.7.3.4.neon +++ b/tests/phpstan/phpstan-1.7.3.4.neon @@ -2,6 +2,8 @@ includes: - %currentWorkingDirectory%/tests/phpstan/phpstan.neon parameters: + excludes_analyse: + - ./../../classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php ignoreErrors: - '#Access to an undefined property Autoupgrade::\$bootstrap.#' - '#Access to an undefined property Module::\$installed.#' diff --git a/tests/phpstan/phpstan-1.7.4.4.neon b/tests/phpstan/phpstan-1.7.4.4.neon index efe9eddfa..5112a3798 100644 --- a/tests/phpstan/phpstan-1.7.4.4.neon +++ b/tests/phpstan/phpstan-1.7.4.4.neon @@ -2,6 +2,8 @@ includes: - %currentWorkingDirectory%/tests/phpstan/phpstan.neon parameters: + excludes_analyse: + - ./../../classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php ignoreErrors: - '#Access to an undefined property Autoupgrade::\$bootstrap.#' - '#Access to an undefined property Module::\$installed.#' diff --git a/tests/phpstan/phpstan-1.7.5.1.neon b/tests/phpstan/phpstan-1.7.5.1.neon index 0436222ff..29e97db98 100644 --- a/tests/phpstan/phpstan-1.7.5.1.neon +++ b/tests/phpstan/phpstan-1.7.5.1.neon @@ -2,6 +2,8 @@ includes: - %currentWorkingDirectory%/tests/phpstan/phpstan.neon parameters: + excludes_analyse: + - ./../../classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php ignoreErrors: - '#Access to an undefined property Autoupgrade::\$bootstrap.#' - '#Access to an undefined property Module::\$installed.#' diff --git a/tests/phpstan/phpstan-1.7.6.neon b/tests/phpstan/phpstan-1.7.6.neon index ded546c58..2745e98ec 100644 --- a/tests/phpstan/phpstan-1.7.6.neon +++ b/tests/phpstan/phpstan-1.7.6.neon @@ -2,6 +2,8 @@ includes: - %currentWorkingDirectory%/tests/phpstan/phpstan.neon parameters: + excludes_analyse: + - ./../../classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php ignoreErrors: - '#Access to an undefined property Autoupgrade::\$bootstrap.#' - '#Access to an undefined property Module::\$installed.#' diff --git a/tests/phpstan/phpstan-1.7.7.neon b/tests/phpstan/phpstan-1.7.7.neon index ebbff783a..5aba843bc 100644 --- a/tests/phpstan/phpstan-1.7.7.neon +++ b/tests/phpstan/phpstan-1.7.7.neon @@ -2,6 +2,8 @@ includes: - %currentWorkingDirectory%/tests/phpstan/phpstan.neon parameters: + excludes_analyse: + - ./../../classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php ignoreErrors: - '#Access to an undefined property Module::\$installed.#' - '#Call to method fetchLocale\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Cldr\\Update.#' diff --git a/tests/phpstan/phpstan-1.7.8.neon b/tests/phpstan/phpstan-1.7.8.neon index 509919dd2..94bf1b5eb 100644 --- a/tests/phpstan/phpstan-1.7.8.neon +++ b/tests/phpstan/phpstan-1.7.8.neon @@ -2,6 +2,8 @@ includes: - %currentWorkingDirectory%/tests/phpstan/phpstan.neon parameters: + excludes_analyse: + - ./../../classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php ignoreErrors: - '#Access to an undefined property Module::\$installed.#' - '#Call to method fetchLocale\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Cldr\\Update.#' From fb200e0f7a0119e4eaace3f298d92a2e630a1850 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Feb 2022 02:08:12 +0000 Subject: [PATCH 014/128] Bump pathval from 1.1.0 to 1.1.1 in /tests/e2e Bumps [pathval](https://github.com/chaijs/pathval) from 1.1.0 to 1.1.1. - [Release notes](https://github.com/chaijs/pathval/releases) - [Changelog](https://github.com/chaijs/pathval/blob/master/CHANGELOG.md) - [Commits](https://github.com/chaijs/pathval/compare/v1.1.0...v1.1.1) --- updated-dependencies: - dependency-name: pathval dependency-type: indirect ... Signed-off-by: dependabot[bot] --- tests/e2e/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/package-lock.json b/tests/e2e/package-lock.json index b3c39d4f4..ba65e5efc 100644 --- a/tests/e2e/package-lock.json +++ b/tests/e2e/package-lock.json @@ -2176,9 +2176,9 @@ } }, "pathval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=" + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==" }, "pend": { "version": "1.2.0", From 9155c1c92e7ba07435d9555638e995ca24f38941 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Feb 2022 03:41:28 +0000 Subject: [PATCH 015/128] Bump follow-redirects from 1.14.7 to 1.14.8 in /tests/e2e Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.7 to 1.14.8. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.7...v1.14.8) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] --- tests/e2e/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/package-lock.json b/tests/e2e/package-lock.json index ba65e5efc..a25184041 100644 --- a/tests/e2e/package-lock.json +++ b/tests/e2e/package-lock.json @@ -1102,9 +1102,9 @@ "dev": true }, "follow-redirects": { - "version": "1.14.7", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.7.tgz", - "integrity": "sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==" + "version": "1.14.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", + "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==" }, "fs-extra": { "version": "7.0.1", From b83b5e0bb8ac2885cfca02f7fd386d111390f317 Mon Sep 17 00:00:00 2001 From: Thomas Roux Date: Sat, 19 Feb 2022 11:42:09 +0100 Subject: [PATCH 016/128] Missing coma after rebase --- upgrade/sql/8.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index ddf6af58e..868026039 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -15,7 +15,7 @@ INSERT IGNORE INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `po (NULL, 'actionAdminSecurityControllerPostProcessBefore', 'On post-process in Admin Security Controller', 'This hook is called on Admin Security Controller post-process before processing any form', '1'), (NULL, 'actionAdminSecurityControllerPostProcessGeneralBefore', 'On post-process in Admin Security Controller', 'This hook is called on Admin Security Controller post-process before processing the General form', '1'), (NULL, 'dashboardZoneThree', 'Dashboard column three', 'This hook is displayed in the third column of the dashboard', '1'), - (NULL, 'actionPresentPaymentOptions', 'Payment options Presenter', 'This hook is called before payment options are presented', '1') + (NULL, 'actionPresentPaymentOptions', 'Payment options Presenter', 'This hook is called before payment options are presented', '1'), (NULL, 'actionCustomerLogoutBefore', 'Before customer logout', 'This hook allows you to execute code before customer logout', '1'), (NULL, 'actionCustomerLogoutAfter', 'After customer logout', 'This hook allows you to execute code after customer logout', '1'), (NULL, 'displayCheckoutSummaryTop', 'Cart summary top', 'This hook allows you to display new elements in top of cart summary', '1') From 44c5913d29cd9dbec55007f6ebd7c747780e1db1 Mon Sep 17 00:00:00 2001 From: okom3pom Date: Mon, 4 Oct 2021 16:01:33 +0200 Subject: [PATCH 017/128] Check if override is disabled before update --- classes/Twig/Block/UpgradeChecklist.php | 2 ++ classes/UpgradeSelfCheck.php | 20 ++++++++++++++++++++ css/styles.css | 1 + views/templates/block/checklist.twig | 12 ++++++++++++ 4 files changed, 35 insertions(+) diff --git a/classes/Twig/Block/UpgradeChecklist.php b/classes/Twig/Block/UpgradeChecklist.php index cc5de2b79..a7c8b9d51 100644 --- a/classes/Twig/Block/UpgradeChecklist.php +++ b/classes/Twig/Block/UpgradeChecklist.php @@ -123,6 +123,8 @@ public function render() 'allowUrlFopenOrCurlIsEnabled' => $this->selfCheck->isFOpenOrCurlEnabled(), 'zipIsEnabled' => $this->selfCheck->isZipEnabled(), 'storeIsInMaintenance' => $this->selfCheck->isShopDeactivated(), + 'disableOverrides' => $this->selfCheck->isOverridesDeactivated(), + 'performanceLink' => Context::getContext()->link->getAdminLink('AdminPerformance'), 'currentIndex' => $this->currentIndex, 'token' => $this->token, 'cachingIsDisabled' => $this->selfCheck->isCacheDisabled(), diff --git a/classes/UpgradeSelfCheck.php b/classes/UpgradeSelfCheck.php index fba1f3ab8..d720c908b 100644 --- a/classes/UpgradeSelfCheck.php +++ b/classes/UpgradeSelfCheck.php @@ -212,6 +212,18 @@ public function getAdminAutoUpgradeDirectoryWritableReport() return $this->adminAutoUpgradeDirectoryWritableReport; } + /** + * @return bool + */ + public function isOverridesDeactivated() + { + if (null !== $this->overridesDeactivated) { + return $this->overridesDeactivated; + } + + return $this->overridesDeactivated = $this->checkOverridesIsDeactivated(); + } + /** * @return bool */ @@ -395,6 +407,14 @@ private function checkPhpVersionNeedsUpgrade() return PHP_VERSION_ID < self::RECOMMENDED_PHP_VERSION; } + /** + * @return bool + */ + private function checkOverridesIsDeactivated() + { + return (bool) Configuration::get('PS_DISABLE_OVERRIDES'); + } + /** * @return bool */ diff --git a/css/styles.css b/css/styles.css index 9c66b627d..1604c3c04 100644 --- a/css/styles.css +++ b/css/styles.css @@ -44,3 +44,4 @@ #autoupgradePhpWarningMainIcon {font-size: 3em;} #autoupgradePhpWarn .icon-stack-text {color: white;} .panel-heading {text-transform: uppercase;} +.required {color: #CC0000} diff --git a/views/templates/block/checklist.twig b/views/templates/block/checklist.twig index 639488d8d..f9f417d34 100644 --- a/views/templates/block/checklist.twig +++ b/views/templates/block/checklist.twig @@ -107,6 +107,18 @@ {% endif %} +
+ + + - - - - @@ -39,12 +37,12 @@ - + @@ -92,12 +90,10 @@ + {% if not checkPhpVersionCompatibility %} + + + + + {% endif %} + {% if not checkApacheModRewrite %} + + + + + {% endif %} + {% if notLoadedPhpExtensions|length > 0 %} + + + + + {% endif %} + {% if not checkMemoryLimit %} + + + + + {% endif %} + {% if not checkFileUploads %} + + + + {% endif %} + {% if notExistsPhpFunctions|length > 0 %} + + + + {% endif %} + {% if not checkPhpSessions %} + + + + + {% endif %} + {% if missingFiles|length > 0 %} + - + + + {% endif %} + {% if notWritingDirectories|length > 0 %} + + + + + {% endif %}
+ {{ 'Disable overrides in' }} {{ 'Advanced > Parameters > Performance'|trans|raw }} * + + {% if disableOverrides %} + {{ icons.ok }} + {% else %} + {{ icons.nok }} + {% endif %} +
{{ 'PrestaShop\'s caching features are disabled'|trans }} From 3a0d8f21b5af0349a634d038e87fd54c2b0a3563 Mon Sep 17 00:00:00 2001 From: okom3pom Date: Mon, 4 Oct 2021 16:11:21 +0200 Subject: [PATCH 018/128] Disable override directly from the module add missing variable $overridesDeactivated --- AdminSelfUpgrade.php | 7 +++++++ classes/UpgradeSelfCheck.php | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/AdminSelfUpgrade.php b/AdminSelfUpgrade.php index 4da61e124..ce6fe2746 100755 --- a/AdminSelfUpgrade.php +++ b/AdminSelfUpgrade.php @@ -341,6 +341,13 @@ public function postProcess() Configuration::updateGlobalValue('PS_SHOP_ENABLE', 0); } + if (Tools14::getValue('disableOverrides')) { + foreach (Shop::getCompleteListOfShopsID() as $id_shop) { + Configuration::updateValue('PS_DISABLE_OVERRIDES', 1, false, null, (int) $id_shop); + } + Configuration::updateGlobalValue('PS_DISABLE_OVERRIDES', 1); + } + if (Tools14::isSubmit('ignorePsRequirements')) { Configuration::updateValue('PS_AUTOUP_IGNORE_REQS', 1); } diff --git a/classes/UpgradeSelfCheck.php b/classes/UpgradeSelfCheck.php index d720c908b..35a1298c8 100644 --- a/classes/UpgradeSelfCheck.php +++ b/classes/UpgradeSelfCheck.php @@ -140,6 +140,11 @@ class UpgradeSelfCheck */ private $autoUpgradePath; + /** + * @var bool + */ + private $overridesDeactivated; + /** * UpgradeSelfCheck constructor. * From 02dd289b40470b45ce17fcaa69646d15f3f72ffa Mon Sep 17 00:00:00 2001 From: okom3pom Date: Fri, 8 Oct 2021 11:10:12 +0200 Subject: [PATCH 019/128] Update views/templates/block/checklist.twig Co-authored-by: Mathieu Ferment --- views/templates/block/checklist.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/templates/block/checklist.twig b/views/templates/block/checklist.twig index f9f417d34..26245bb97 100644 --- a/views/templates/block/checklist.twig +++ b/views/templates/block/checklist.twig @@ -109,7 +109,7 @@
- {{ 'Disable overrides in' }} {{ 'Advanced > Parameters > Performance'|trans|raw }} * + {{ 'Disable overrides in' }} {{ 'Advanced > Parameters > Performance'|trans|raw }} * {% if disableOverrides %} From b5336190f950d3ece0694c033f77e90827e710dc Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Thu, 21 Oct 2021 18:19:27 +0200 Subject: [PATCH 020/128] refactor override check --- classes/Twig/Block/UpgradeChecklist.php | 2 +- classes/UpgradeSelfCheck.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/classes/Twig/Block/UpgradeChecklist.php b/classes/Twig/Block/UpgradeChecklist.php index a7c8b9d51..0c031d894 100644 --- a/classes/Twig/Block/UpgradeChecklist.php +++ b/classes/Twig/Block/UpgradeChecklist.php @@ -123,7 +123,7 @@ public function render() 'allowUrlFopenOrCurlIsEnabled' => $this->selfCheck->isFOpenOrCurlEnabled(), 'zipIsEnabled' => $this->selfCheck->isZipEnabled(), 'storeIsInMaintenance' => $this->selfCheck->isShopDeactivated(), - 'disableOverrides' => $this->selfCheck->isOverridesDeactivated(), + 'disableOverrides' => $this->selfCheck->isOverrideDisabled(), 'performanceLink' => Context::getContext()->link->getAdminLink('AdminPerformance'), 'currentIndex' => $this->currentIndex, 'token' => $this->token, diff --git a/classes/UpgradeSelfCheck.php b/classes/UpgradeSelfCheck.php index 35a1298c8..7044583c9 100644 --- a/classes/UpgradeSelfCheck.php +++ b/classes/UpgradeSelfCheck.php @@ -143,7 +143,7 @@ class UpgradeSelfCheck /** * @var bool */ - private $overridesDeactivated; + private $overrideDisabled; /** * UpgradeSelfCheck constructor. @@ -220,13 +220,13 @@ public function getAdminAutoUpgradeDirectoryWritableReport() /** * @return bool */ - public function isOverridesDeactivated() + public function isOverrideDisabled() { - if (null !== $this->overridesDeactivated) { - return $this->overridesDeactivated; + if (null === $this->overrideDisabled) { + $this->overrideDisabled = $this->checkOverrideIsDisabled(); } - return $this->overridesDeactivated = $this->checkOverridesIsDeactivated(); + return $this->overrideDisabled; } /** @@ -415,7 +415,7 @@ private function checkPhpVersionNeedsUpgrade() /** * @return bool */ - private function checkOverridesIsDeactivated() + private function checkOverrideIsDisabled() { return (bool) Configuration::get('PS_DISABLE_OVERRIDES'); } From 42cc6c93d1eecd4bbdae7cefbfb1f406eb760e19 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Thu, 21 Oct 2021 19:15:15 +0200 Subject: [PATCH 021/128] add disable override toggle --- AdminSelfUpgrade.php | 10 ++++++++-- classes/Twig/Form/UpgradeOptionsForm.php | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/AdminSelfUpgrade.php b/AdminSelfUpgrade.php index ce6fe2746..38c428ad4 100755 --- a/AdminSelfUpgrade.php +++ b/AdminSelfUpgrade.php @@ -76,6 +76,7 @@ class AdminSelfUpgrade extends AdminController public $keepMails; public $manualMode; public $deactivateCustomModule; + public $disableOverride; public static $classes14 = ['Cache', 'CacheFS', 'CarrierModule', 'Db', 'FrontController', 'Helper', 'ImportModule', 'MCached', 'Module', 'ModuleGraph', 'ModuleGraphEngine', 'ModuleGrid', 'ModuleGridEngine', @@ -174,9 +175,8 @@ public function __construct() // Create a dummy index.php file in the XML config directory to avoid directory listing if (!file_exists(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'index.php') && (file_exists(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'index.php') && - !@copy(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'index.php', _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'index.php'))) { + !@copy(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'index.php', _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'index.php'))) { $this->_errors[] = $this->trans('Unable to create the directory "%s"', [_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml'], 'Modules.Autoupgrade.Admin'); - return; } } @@ -213,6 +213,10 @@ private function _setFields() 'type' => 'bool', 'desc' => $this->trans('As non-native modules can experience some compatibility issues, we recommend to disable them by default.', [], 'Modules.Autoupgrade.Admin') . '
' . $this->trans('Keeping them enabled might prevent you from loading the "Modules" page properly after the upgrade.', [], 'Modules.Autoupgrade.Admin'), ], + 'PS_DISABLE_OVERRIDES' => array( + 'title' => $this->trans('Disable all overrides', [], 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', + 'type' => 'bool', 'desc' => $this->trans('Enable or disable all classes and controllers overrides.', [], 'Modules.Autoupgrade.Admin'), + ), 'PS_AUTOUP_UPDATE_DEFAULT_THEME' => [ 'title' => $this->trans('Upgrade the default theme', [], 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', 'defaultValue' => '1', 'type' => 'bool', 'desc' => $this->trans('If you customized the default PrestaShop theme in its folder (folder name "classic" in 1.7), enabling this option will lose your modifications.', [], 'Modules.Autoupgrade.Admin') . '
' @@ -299,6 +303,7 @@ public function init() $this->updateRTLFiles = $this->upgradeContainer->getUpgradeConfiguration()->get('PS_AUTOUP_UPDATE_RTL_FILES'); $this->keepMails = $this->upgradeContainer->getUpgradeConfiguration()->get('PS_AUTOUP_KEEP_MAILS'); $this->deactivateCustomModule = $this->upgradeContainer->getUpgradeConfiguration()->get('PS_AUTOUP_CUSTOM_MOD_DESACT'); + $this->disableOverride = $this->upgradeContainer->getUpgradeConfiguration()->get('PS_DISABLE_OVERRIDES'); } /** @@ -405,6 +410,7 @@ public function display() 'PS_AUTOUP_UPDATE_RTL_FILES' => 1, 'PS_AUTOUP_KEEP_MAILS' => 0, 'PS_AUTOUP_CUSTOM_MOD_DESACT' => 1, + 'PS_DISABLE_OVERRIDES' => 0, 'PS_AUTOUP_PERFORMANCE' => 1, ]; diff --git a/classes/Twig/Form/UpgradeOptionsForm.php b/classes/Twig/Form/UpgradeOptionsForm.php index b4b616664..305d32f64 100644 --- a/classes/Twig/Form/UpgradeOptionsForm.php +++ b/classes/Twig/Form/UpgradeOptionsForm.php @@ -108,6 +108,21 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) $translationDomain ), ], + 'PS_DISABLE_OVERRIDES' => [ + 'title' => $translator->trans( + 'Disable all overrides', + [], + $translationDomain + ), + 'cast' => 'intval', + 'validation' => 'isBool', + 'type' => 'bool', + 'desc' => $translator->trans( + 'Enable or disable all classes and controllers overrides.', + [], + $translationDomain + ), + ], 'PS_AUTOUP_UPDATE_DEFAULT_THEME' => [ 'title' => $translator->trans( 'Upgrade the default theme', From c63c3eece633fa521da48a240f6b0fbbb77e3550 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Mon, 25 Oct 2021 18:09:35 +0200 Subject: [PATCH 022/128] add mechanism to save conf in DB instead of file --- AdminSelfUpgrade.php | 45 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/AdminSelfUpgrade.php b/AdminSelfUpgrade.php index 38c428ad4..c892b0c8b 100755 --- a/AdminSelfUpgrade.php +++ b/AdminSelfUpgrade.php @@ -32,6 +32,7 @@ use PrestaShop\Module\AutoUpgrade\UpgradePage; use PrestaShop\Module\AutoUpgrade\UpgradeSelfCheck; use PrestaShop\Module\AutoUpgrade\UpgradeTools\FilesystemAdapter; +use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeConfiguration; require_once _PS_ROOT_DIR_ . '/modules/autoupgrade/vendor/autoload.php'; @@ -89,6 +90,8 @@ class AdminSelfUpgrade extends AdminController public $_fieldsUpgradeOptions = []; public $_fieldsBackupOptions = []; + public $_fieldsToBeSavedInDB = ['PS_DISABLE_OVERRIDES']; + /** * @var UpgradeContainer */ @@ -372,7 +375,10 @@ public function postProcess() $UpConfig = $this->upgradeContainer->getUpgradeConfiguration(); $UpConfig->merge($config); - if ($this->upgradeContainer->getUpgradeConfigurationStorage()->save($UpConfig, UpgradeFileNames::CONFIG_FILENAME)) { + $upConfigValues = $this->extractFieldsToBeSavedInDB($UpConfig); + + if ($this->processDatabaseConfigurationFields($upConfigValues['dbConfig']) && + $this->upgradeContainer->getUpgradeConfigurationStorage()->save($upConfigValues['fileConfig'], UpgradeFileNames::CONFIG_FILENAME)) { Tools14::redirectAdmin(self::$currentIndex . '&conf=6&token=' . Tools14::getValue('token')); } } @@ -401,6 +407,43 @@ public function postProcess() parent::postProcess(); } + /** + * @param UpgradeConfiguration $fileConfig + * @return array + */ + private function extractFieldsToBeSavedInDB(UpgradeConfiguration $fileConfig): array + { + $DBConfig = []; + + foreach ($fileConfig as $key => $value) { + if (in_array($key, $this->_fieldsToBeSavedInDB)) { + $DBConfig[$key] = $value; + unset($fileConfig[$key]); + } + } + + return [ + 'fileConfig' => $fileConfig, + 'dbConfig' => $DBConfig, + ]; + } + + + /** + * Process configuration values to be stored in database + * + * @param array $config + */ + private function processDatabaseConfigurationFields(array $config): void + { + if (isset($config['PS_DISABLE_OVERRIDES'])) { + foreach (Shop::getCompleteListOfShopsID() as $id_shop) { + Configuration::updateValue('PS_DISABLE_OVERRIDES', $config['PS_DISABLE_OVERRIDES'], false, null, (int) $id_shop); + } + Configuration::updateGlobalValue('PS_DISABLE_OVERRIDES', $config['PS_DISABLE_OVERRIDES']); + } + } + public function display() { // Make sure the user has configured the upgrade options, or set default values From 916d0a6543080ee7e3070b961b078dc1e3da9ca0 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Mon, 25 Oct 2021 18:11:13 +0200 Subject: [PATCH 023/128] remove unused code --- AdminSelfUpgrade.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/AdminSelfUpgrade.php b/AdminSelfUpgrade.php index c892b0c8b..ec3ff8816 100755 --- a/AdminSelfUpgrade.php +++ b/AdminSelfUpgrade.php @@ -349,13 +349,6 @@ public function postProcess() Configuration::updateGlobalValue('PS_SHOP_ENABLE', 0); } - if (Tools14::getValue('disableOverrides')) { - foreach (Shop::getCompleteListOfShopsID() as $id_shop) { - Configuration::updateValue('PS_DISABLE_OVERRIDES', 1, false, null, (int) $id_shop); - } - Configuration::updateGlobalValue('PS_DISABLE_OVERRIDES', 1); - } - if (Tools14::isSubmit('ignorePsRequirements')) { Configuration::updateValue('PS_AUTOUP_IGNORE_REQS', 1); } From df20d1a13bf0c4deb3d23df8024a71f571f395bb Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Wed, 27 Oct 2021 17:58:40 +0200 Subject: [PATCH 024/128] add and use db field property in UpgradeContainer --- AdminSelfUpgrade.php | 6 ++---- classes/UpgradeContainer.php | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/AdminSelfUpgrade.php b/AdminSelfUpgrade.php index ec3ff8816..f80a7f4fc 100755 --- a/AdminSelfUpgrade.php +++ b/AdminSelfUpgrade.php @@ -90,8 +90,6 @@ class AdminSelfUpgrade extends AdminController public $_fieldsUpgradeOptions = []; public $_fieldsBackupOptions = []; - public $_fieldsToBeSavedInDB = ['PS_DISABLE_OVERRIDES']; - /** * @var UpgradeContainer */ @@ -409,7 +407,7 @@ private function extractFieldsToBeSavedInDB(UpgradeConfiguration $fileConfig): a $DBConfig = []; foreach ($fileConfig as $key => $value) { - if (in_array($key, $this->_fieldsToBeSavedInDB)) { + if (in_array($key, UpgradeContainer::DB_CONFIG_KEYS)) { $DBConfig[$key] = $value; unset($fileConfig[$key]); } @@ -446,7 +444,7 @@ public function display() 'PS_AUTOUP_UPDATE_RTL_FILES' => 1, 'PS_AUTOUP_KEEP_MAILS' => 0, 'PS_AUTOUP_CUSTOM_MOD_DESACT' => 1, - 'PS_DISABLE_OVERRIDES' => 0, + 'PS_DISABLE_OVERRIDES' => Configuration::get('PS_DISABLE_OVERRIDES'), 'PS_AUTOUP_PERFORMANCE' => 1, ]; diff --git a/classes/UpgradeContainer.php b/classes/UpgradeContainer.php index a398440c1..f00d18b26 100644 --- a/classes/UpgradeContainer.php +++ b/classes/UpgradeContainer.php @@ -63,6 +63,7 @@ class UpgradeContainer const ARCHIVE_FILENAME = 'destDownloadFilename'; const ARCHIVE_FILEPATH = 'destDownloadFilepath'; const PS_VERSION = 'version'; + const DB_CONFIG_KEYS = ['PS_DISABLE_OVERRIDES']; /** * @var CacheCleaner From ab1de0190655b07558bb82c0573c36cbd3c2be14 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Wed, 27 Oct 2021 17:59:05 +0200 Subject: [PATCH 025/128] fetch db conf from DB instead of file config --- classes/Twig/Form/FormRenderer.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/classes/Twig/Form/FormRenderer.php b/classes/Twig/Form/FormRenderer.php index 3213fb557..2555a5033 100644 --- a/classes/Twig/Form/FormRenderer.php +++ b/classes/Twig/Form/FormRenderer.php @@ -28,6 +28,7 @@ namespace PrestaShop\Module\AutoUpgrade\Twig\Form; use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeConfiguration; +use PrestaShop\Module\AutoUpgrade\UpgradeContainer; use PrestaShop\Module\AutoUpgrade\UpgradeTools\Translator; use Twig_Environment; @@ -69,7 +70,15 @@ public function render($name, $fields, $tabname, $size, $icon) $required = !empty($field['required']); $disabled = !empty($field['disabled']); - $val = $this->config->get($key); + + if (in_array($key, UpgradeContainer::DB_CONFIG_KEYS)) { + // values fectched from configuration in database + $val = Configuration::get($key); + } else { + // other conf values are fetched from config file + $val = $this->config->get($key); + } + if ($val === null) { $val = isset($field['defaultValue']) ? $field['defaultValue'] : false; } From e399d5be147510c9b9a22cc161f8cd02ab39ad59 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Wed, 27 Oct 2021 17:59:59 +0200 Subject: [PATCH 026/128] do not change disable override option in DB based on other config field --- .../CoreUpgrader/CoreUpgrader.php | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php index 626a2bea3..596a5b5fa 100644 --- a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php +++ b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php @@ -29,6 +29,7 @@ use Cache; use PrestaShop\Module\AutoUpgrade\Log\LoggerInterface; +use Configuration; use PrestaShop\Module\AutoUpgrade\UpgradeContainer; use PrestaShop\Module\AutoUpgrade\UpgradeException; use PrestaShop\Module\AutoUpgrade\UpgradeTools\ThemeAdapter; @@ -111,7 +112,7 @@ public function doUpgrade() $this->generateHtaccess(); $this->cleanXmlFiles(); - if ($this->container->getUpgradeConfiguration()->shouldDeactivateCustomModules()) { + if (Configuration::get('PS_DISABLE_OVERRIDES')) { $this->disableOverrides(); } @@ -243,7 +244,17 @@ protected function checkVersionIsNewer($oldVersion) $versionCompare = version_compare($this->destinationUpgradeVersion, $oldVersion); if ($versionCompare === -1) { - throw new UpgradeException($this->container->getTranslator()->trans('[ERROR] Version to install is too old.', [], 'Modules.Autoupgrade.Admin') . ' ' . $this->container->getTranslator()->trans('Current version: %oldversion%. Version to install: %newversion%.', ['%oldversion%' => $oldVersion, '%newversion%' => $this->destinationUpgradeVersion], 'Modules.Autoupgrade.Admin')); + throw new UpgradeException( + $this->container->getTranslator()->trans('[ERROR] Version to install is too old.', [], 'Modules.Autoupgrade.Admin') + . ' ' . + $this->container->getTranslator()->trans( + 'Current version: %oldversion%. Version to install: %newversion%.', + [ + '%oldversion%' => $oldVersion, + '%newversion%' => $this->destinationUpgradeVersion, + ], + 'Modules.Autoupgrade.Admin' + )); } elseif ($versionCompare === 0) { throw new UpgradeException($this->container->getTranslator()->trans('You already have the %s version.', [$this->destinationUpgradeVersion], 'Modules.Autoupgrade.Admin')); } @@ -640,17 +651,6 @@ protected function cleanXmlFiles() protected function disableOverrides() { - $exist = $this->db->getValue('SELECT `id_configuration` FROM `' . _DB_PREFIX_ . 'configuration` WHERE `name` LIKE \'PS_DISABLE_OVERRIDES\''); - if ($exist) { - $this->db->execute('UPDATE `' . _DB_PREFIX_ . 'configuration` SET value = 1 WHERE `name` LIKE \'PS_DISABLE_OVERRIDES\''); - } else { - $this->db->execute('INSERT INTO `' . _DB_PREFIX_ . 'configuration` (name, value, date_add, date_upd) VALUES ("PS_DISABLE_OVERRIDES", 1, NOW(), NOW())'); - } - - if (file_exists(_PS_ROOT_DIR_ . '/classes/PrestaShopAutoload.php')) { - require_once _PS_ROOT_DIR_ . '/classes/PrestaShopAutoload.php'; - } - if (class_exists('PrestaShopAutoload') && method_exists('PrestaShopAutoload', 'generateIndex')) { \PrestaShopAutoload::getInstance()->_include_override_path = false; \PrestaShopAutoload::getInstance()->generateIndex(); From 3b12af0d89748a6cf2150faa65e1639a29b20517 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Wed, 27 Oct 2021 18:01:35 +0200 Subject: [PATCH 027/128] fix typo --- classes/Twig/Form/FormRenderer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/Twig/Form/FormRenderer.php b/classes/Twig/Form/FormRenderer.php index 2555a5033..5b5182cb9 100644 --- a/classes/Twig/Form/FormRenderer.php +++ b/classes/Twig/Form/FormRenderer.php @@ -72,7 +72,7 @@ public function render($name, $fields, $tabname, $size, $icon) if (in_array($key, UpgradeContainer::DB_CONFIG_KEYS)) { - // values fectched from configuration in database + // values fetched from configuration in database $val = Configuration::get($key); } else { // other conf values are fetched from config file From ab6a986feb1d0da5bb17fdb448c86e95fd3960a8 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Wed, 27 Oct 2021 18:12:14 +0200 Subject: [PATCH 028/128] add missing configuration use statement --- classes/Twig/Form/FormRenderer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/classes/Twig/Form/FormRenderer.php b/classes/Twig/Form/FormRenderer.php index 5b5182cb9..8d63bec31 100644 --- a/classes/Twig/Form/FormRenderer.php +++ b/classes/Twig/Form/FormRenderer.php @@ -27,6 +27,7 @@ namespace PrestaShop\Module\AutoUpgrade\Twig\Form; +use Configuration; use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeConfiguration; use PrestaShop\Module\AutoUpgrade\UpgradeContainer; use PrestaShop\Module\AutoUpgrade\UpgradeTools\Translator; From ac77c38de6dd96d35a43d4f35e60aebcf9cd4bf2 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Fri, 5 Nov 2021 17:01:55 +0100 Subject: [PATCH 029/128] remove override from checklist --- views/templates/block/checklist.twig | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/views/templates/block/checklist.twig b/views/templates/block/checklist.twig index 26245bb97..639488d8d 100644 --- a/views/templates/block/checklist.twig +++ b/views/templates/block/checklist.twig @@ -107,18 +107,6 @@ {% endif %}
- {{ 'Disable overrides in' }} {{ 'Advanced > Parameters > Performance'|trans|raw }} * - - {% if disableOverrides %} - {{ icons.ok }} - {% else %} - {{ icons.nok }} - {% endif %} -
{{ 'PrestaShop\'s caching features are disabled'|trans }} From eb89a5b6def9f02473bed2d43121d93dd0d44093 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Thu, 30 Dec 2021 16:17:27 +0100 Subject: [PATCH 030/128] fix code style --- AdminSelfUpgrade.php | 95 ++++++++++++++++++++++++++++---------------- 1 file changed, 60 insertions(+), 35 deletions(-) diff --git a/AdminSelfUpgrade.php b/AdminSelfUpgrade.php index f80a7f4fc..69b16d8d7 100755 --- a/AdminSelfUpgrade.php +++ b/AdminSelfUpgrade.php @@ -26,13 +26,13 @@ */ use PrestaShop\Module\AutoUpgrade\AjaxResponse; use PrestaShop\Module\AutoUpgrade\BackupFinder; +use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeConfiguration; use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeFileNames; use PrestaShop\Module\AutoUpgrade\Tools14; use PrestaShop\Module\AutoUpgrade\UpgradeContainer; use PrestaShop\Module\AutoUpgrade\UpgradePage; use PrestaShop\Module\AutoUpgrade\UpgradeSelfCheck; use PrestaShop\Module\AutoUpgrade\UpgradeTools\FilesystemAdapter; -use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeConfiguration; require_once _PS_ROOT_DIR_ . '/modules/autoupgrade/vendor/autoload.php'; @@ -194,47 +194,80 @@ private function _setFields() { $this->_fieldsBackupOptions = [ 'PS_AUTOUP_BACKUP' => [ - 'title' => $this->trans('Back up my files and database', [], 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', 'defaultValue' => '1', - 'type' => 'bool', 'desc' => $this->trans('Automatically back up your database and files in order to restore your shop if needed. This is experimental: you should still perform your own manual backup for safety.', [], 'Modules.Autoupgrade.Admin'), + 'title' => $this->trans('Back up my files and database', [], 'Modules.Autoupgrade.Admin'), + 'cast' => 'intval', + 'validation' => 'isBool', + 'defaultValue' => '1', + 'type' => 'bool', + 'desc' => $this->trans('Automatically back up your database and files in order to restore your shop if needed. This is experimental: you should still perform your own manual backup for safety.', [], 'Modules.Autoupgrade.Admin'), ], 'PS_AUTOUP_KEEP_IMAGES' => [ - 'title' => $this->trans('Back up my images', [], 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', 'defaultValue' => '1', - 'type' => 'bool', 'desc' => $this->trans('To save time, you can decide not to back your images up. In any case, always make sure you did back them up manually.', [], 'Modules.Autoupgrade.Admin'), + 'title' => $this->trans('Back up my images', [], 'Modules.Autoupgrade.Admin'), + 'cast' => 'intval', + 'validation' => 'isBool', + 'defaultValue' => '1', + 'type' => 'bool', + 'desc' => $this->trans('To save time, you can decide not to back your images up. In any case, always make sure you did back them up manually.', [], 'Modules.Autoupgrade.Admin'), ], ]; $this->_fieldsUpgradeOptions = [ 'PS_AUTOUP_PERFORMANCE' => [ - 'title' => $this->trans('Server performance', [], 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isInt', 'defaultValue' => '1', - 'type' => 'select', 'desc' => $this->trans('Unless you are using a dedicated server, select "Low".', [], 'Modules.Autoupgrade.Admin') . '
' . - $this->trans('A high value can cause the upgrade to fail if your server is not powerful enough to process the upgrade tasks in a short amount of time.', [], 'Modules.Autoupgrade.Admin'), + 'title' => $this->trans('Server performance', [], 'Modules.Autoupgrade.Admin'), + 'cast' => 'intval', + 'validation' => 'isInt', + 'defaultValue' => '1', + 'type' => 'select', + 'desc' => $this->trans('Unless you are using a dedicated server, select "Low".', [], 'Modules.Autoupgrade.Admin') . '
' . + $this->trans('A high value can cause the upgrade to fail if your server is not powerful enough to process the upgrade tasks in a short amount of time.', [], 'Modules.Autoupgrade.Admin'), 'choices' => [1 => $this->trans('Low (recommended)', [], 'Modules.Autoupgrade.Admin'), 2 => $this->trans('Medium', [], 'Modules.Autoupgrade.Admin'), 3 => $this->trans('High', [], 'Modules.Autoupgrade.Admin')], ], 'PS_AUTOUP_CUSTOM_MOD_DESACT' => [ - 'title' => $this->trans('Disable non-native modules', [], 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', - 'type' => 'bool', 'desc' => $this->trans('As non-native modules can experience some compatibility issues, we recommend to disable them by default.', [], 'Modules.Autoupgrade.Admin') . '
' . - $this->trans('Keeping them enabled might prevent you from loading the "Modules" page properly after the upgrade.', [], 'Modules.Autoupgrade.Admin'), + 'title' => $this->trans('Disable non-native modules', [], 'Modules.Autoupgrade.Admin'), + 'cast' => 'intval', + 'validation' => 'isBool', + 'type' => 'bool', + 'desc' => $this->trans('As non-native modules can experience some compatibility issues, we recommend to disable them by default.', [], 'Modules.Autoupgrade.Admin') . '
' . + $this->trans('Keeping them enabled might prevent you from loading the "Modules" page properly after the upgrade.', [], 'Modules.Autoupgrade.Admin'), ], - 'PS_DISABLE_OVERRIDES' => array( - 'title' => $this->trans('Disable all overrides', [], 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', - 'type' => 'bool', 'desc' => $this->trans('Enable or disable all classes and controllers overrides.', [], 'Modules.Autoupgrade.Admin'), - ), - 'PS_AUTOUP_UPDATE_DEFAULT_THEME' => [ - 'title' => $this->trans('Upgrade the default theme', [], 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', 'defaultValue' => '1', - 'type' => 'bool', 'desc' => $this->trans('If you customized the default PrestaShop theme in its folder (folder name "classic" in 1.7), enabling this option will lose your modifications.', [], 'Modules.Autoupgrade.Admin') . '
' - . $this->trans('If you are using your own theme, enabling this option will simply update the default theme files, and your own theme will be safe.', [], 'Modules.Autoupgrade.Admin'), + 'PS_DISABLE_OVERRIDES' => [ + 'title' => $this->trans('Disable all overrides', [], 'Modules.Autoupgrade.Admin'), + 'cast' => 'intval', + 'validation' => 'isBool', + 'type' => 'bool', + 'desc' => $this->trans('Enable or disable all classes and controllers overrides.', [], 'Modules.Autoupgrade.Admin'), ], - 'PS_AUTOUP_CHANGE_DEFAULT_THEME' => [ - 'title' => $this->trans('Switch to the default theme', [], 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', 'defaultValue' => '0', - 'type' => 'bool', 'desc' => $this->trans('This will change your theme: your shop will then use the default theme of the version of PrestaShop you are upgrading to.', [], 'Modules.Autoupgrade.Admin'), + 'PS_AUTOUP_UPDATE_DEFAULT_THEME' => [ + 'title' => $this->trans('Upgrade the default theme', [], 'Modules.Autoupgrade.Admin'), + 'cast' => 'intval', + 'validation' => 'isBool', + 'defaultValue' => '1', + 'type' => 'bool', + 'desc' => $this->trans('If you customized the default PrestaShop theme in its folder (folder name "classic" in 1.7), enabling this option will lose your modifications.', [], 'Modules.Autoupgrade.Admin') . '
' + . $this->trans('If you are using your own theme, enabling this option will simply update the default theme files, and your own theme will be safe.', [], 'Modules.Autoupgrade.Admin'), ], 'PS_AUTOUP_UPDATE_RTL_FILES' => [ - 'title' => $this->trans('Regenerate RTL stylesheet', [], 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', 'defaultValue' => '1', - 'type' => 'bool', 'desc' => $this->trans('If enabled, any RTL-specific files that you might have added to all your themes might be deleted by the created stylesheet.', [], 'Modules.Autoupgrade.Admin'), + 'title' => $this->trans('Regenerate RTL stylesheet', [], 'Modules.Autoupgrade.Admin'), + 'cast' => 'intval', + 'validation' => 'isBool', + 'defaultValue' => '1', + 'type' => 'bool', + 'desc' => $this->trans('If enabled, any RTL-specific files that you might have added to all your themes might be deleted by the created stylesheet.', [], 'Modules.Autoupgrade.Admin'), + ], + 'PS_AUTOUP_CHANGE_DEFAULT_THEME' => [ + 'title' => $this->trans('Switch to the default theme', [], 'Modules.Autoupgrade.Admin'), + 'cast' => 'intval', + 'validation' => 'isBool', + 'defaultValue' => '0', + 'type' => 'bool', + 'desc' => $this->trans('This will change your theme: your shop will then use the default theme of the version of PrestaShop you are upgrading to.', [], 'Modules.Autoupgrade.Admin'), ], 'PS_AUTOUP_KEEP_MAILS' => [ - 'title' => $this->trans('Keep the customized email templates', [], 'Modules.Autoupgrade.Admin'), 'cast' => 'intval', 'validation' => 'isBool', - 'type' => 'bool', 'desc' => $this->trans('This will not upgrade the default PrestaShop e-mails.', [], 'Modules.Autoupgrade.Admin') . '
' - . $this->trans('If you customized the default PrestaShop e-mail templates, enabling this option will keep your modifications.', [], 'Modules.Autoupgrade.Admin'), + 'title' => $this->trans('Keep the customized email templates', [], 'Modules.Autoupgrade.Admin'), + 'cast' => 'intval', + 'validation' => 'isBool', + 'type' => 'bool', + 'desc' => $this->trans('This will not upgrade the default PrestaShop e-mails.', [], 'Modules.Autoupgrade.Admin') . '
' + . $this->trans('If you customized the default PrestaShop e-mail templates, enabling this option will keep your modifications.', [], 'Modules.Autoupgrade.Admin'), ], ]; } @@ -398,10 +431,6 @@ public function postProcess() parent::postProcess(); } - /** - * @param UpgradeConfiguration $fileConfig - * @return array - */ private function extractFieldsToBeSavedInDB(UpgradeConfiguration $fileConfig): array { $DBConfig = []; @@ -419,11 +448,8 @@ private function extractFieldsToBeSavedInDB(UpgradeConfiguration $fileConfig): a ]; } - /** * Process configuration values to be stored in database - * - * @param array $config */ private function processDatabaseConfigurationFields(array $config): void { @@ -520,7 +546,6 @@ public function displayErrors() * Making them available for PS 1.6 as well. * * @param string $id - * @param array $parameters * @param string $domain * @param string $locale */ From 916840c9c752644294852ed6a68e1b969cf5bd3d Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Thu, 30 Dec 2021 16:32:10 +0100 Subject: [PATCH 031/128] remove unused variables --- classes/Twig/Block/UpgradeChecklist.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/classes/Twig/Block/UpgradeChecklist.php b/classes/Twig/Block/UpgradeChecklist.php index 0c031d894..cc5de2b79 100644 --- a/classes/Twig/Block/UpgradeChecklist.php +++ b/classes/Twig/Block/UpgradeChecklist.php @@ -123,8 +123,6 @@ public function render() 'allowUrlFopenOrCurlIsEnabled' => $this->selfCheck->isFOpenOrCurlEnabled(), 'zipIsEnabled' => $this->selfCheck->isZipEnabled(), 'storeIsInMaintenance' => $this->selfCheck->isShopDeactivated(), - 'disableOverrides' => $this->selfCheck->isOverrideDisabled(), - 'performanceLink' => Context::getContext()->link->getAdminLink('AdminPerformance'), 'currentIndex' => $this->currentIndex, 'token' => $this->token, 'cachingIsDisabled' => $this->selfCheck->isCacheDisabled(), From add52d60970b78ceaff820daa20fceb407c9107f Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Fri, 25 Feb 2022 15:57:42 +0100 Subject: [PATCH 032/128] cs fixer --- AdminSelfUpgrade.php | 5 +++-- classes/Twig/Form/FormRenderer.php | 1 - classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php | 14 ++------------ 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/AdminSelfUpgrade.php b/AdminSelfUpgrade.php index 69b16d8d7..80097855e 100755 --- a/AdminSelfUpgrade.php +++ b/AdminSelfUpgrade.php @@ -178,6 +178,7 @@ public function __construct() (file_exists(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'index.php') && !@copy(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'index.php', _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'index.php'))) { $this->_errors[] = $this->trans('Unable to create the directory "%s"', [_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml'], 'Modules.Autoupgrade.Admin'); + return; } } @@ -431,7 +432,7 @@ public function postProcess() parent::postProcess(); } - private function extractFieldsToBeSavedInDB(UpgradeConfiguration $fileConfig): array + private function extractFieldsToBeSavedInDB(UpgradeConfiguration $fileConfig) { $DBConfig = []; @@ -451,7 +452,7 @@ private function extractFieldsToBeSavedInDB(UpgradeConfiguration $fileConfig): a /** * Process configuration values to be stored in database */ - private function processDatabaseConfigurationFields(array $config): void + private function processDatabaseConfigurationFields(array $config) { if (isset($config['PS_DISABLE_OVERRIDES'])) { foreach (Shop::getCompleteListOfShopsID() as $id_shop) { diff --git a/classes/Twig/Form/FormRenderer.php b/classes/Twig/Form/FormRenderer.php index 8d63bec31..1fc82811f 100644 --- a/classes/Twig/Form/FormRenderer.php +++ b/classes/Twig/Form/FormRenderer.php @@ -71,7 +71,6 @@ public function render($name, $fields, $tabname, $size, $icon) $required = !empty($field['required']); $disabled = !empty($field['disabled']); - if (in_array($key, UpgradeContainer::DB_CONFIG_KEYS)) { // values fetched from configuration in database $val = Configuration::get($key); diff --git a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php index 596a5b5fa..ad4ce735f 100644 --- a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php +++ b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php @@ -28,8 +28,8 @@ namespace PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader; use Cache; -use PrestaShop\Module\AutoUpgrade\Log\LoggerInterface; use Configuration; +use PrestaShop\Module\AutoUpgrade\Log\LoggerInterface; use PrestaShop\Module\AutoUpgrade\UpgradeContainer; use PrestaShop\Module\AutoUpgrade\UpgradeException; use PrestaShop\Module\AutoUpgrade\UpgradeTools\ThemeAdapter; @@ -244,17 +244,7 @@ protected function checkVersionIsNewer($oldVersion) $versionCompare = version_compare($this->destinationUpgradeVersion, $oldVersion); if ($versionCompare === -1) { - throw new UpgradeException( - $this->container->getTranslator()->trans('[ERROR] Version to install is too old.', [], 'Modules.Autoupgrade.Admin') - . ' ' . - $this->container->getTranslator()->trans( - 'Current version: %oldversion%. Version to install: %newversion%.', - [ - '%oldversion%' => $oldVersion, - '%newversion%' => $this->destinationUpgradeVersion, - ], - 'Modules.Autoupgrade.Admin' - )); + throw new UpgradeException($this->container->getTranslator()->trans('[ERROR] Version to install is too old.', [], 'Modules.Autoupgrade.Admin') . ' ' . $this->container->getTranslator()->trans('Current version: %oldversion%. Version to install: %newversion%.', ['%oldversion%' => $oldVersion, '%newversion%' => $this->destinationUpgradeVersion], 'Modules.Autoupgrade.Admin')); } elseif ($versionCompare === 0) { throw new UpgradeException($this->container->getTranslator()->trans('You already have the %s version.', [$this->destinationUpgradeVersion], 'Modules.Autoupgrade.Admin')); } From cab197d4c481e1dfe6e2fa37aecfbf87593467ec Mon Sep 17 00:00:00 2001 From: Thomas BACCELLI Date: Mon, 28 Feb 2022 18:49:31 +0100 Subject: [PATCH 033/128] Add missing Security tab entries --- upgrade/php/ps_800_add_security_tab.php | 75 +++++++++++++++++++++++++ upgrade/sql/8.0.0.sql | 5 +- 2 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 upgrade/php/ps_800_add_security_tab.php diff --git a/upgrade/php/ps_800_add_security_tab.php b/upgrade/php/ps_800_add_security_tab.php new file mode 100644 index 000000000..4bdf18164 --- /dev/null +++ b/upgrade/php/ps_800_add_security_tab.php @@ -0,0 +1,75 @@ + + * @copyright Since 2007 PrestaShop SA and Contributors + * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) + */ +function ps_800_add_security_tab() +{ + include_once __DIR__ . '/add_new_tab.php'; + $tabs = [ + ['AdminParentSecurity', 'en:Security', 0, false, 'AdminAdvancedParameters'], + ['AdminSecurity', 'en:Security', 0, false, 'AdminParentSecurity'], + ['AdminSecuritySessionEmployee', 'en:Employee Sessions', 0, false, 'AdminParentSecurity'], + ['AdminSecuritySessionCustomer', 'en:Customer Sessions', 0, false, 'AdminParentSecurity'], + ]; + $tabsData = [ + 'AdminParentSecurity' => [ + 'active' => 1, + 'enabled' => 1, + 'wording' => '\'Security\'', + 'wording_domain' => '\'Admin.Navigation.Menu\'', + ], + 'AdminSecurity' => [ + 'active' => 1, + 'enabled' => 1, + 'wording' => '\'Security\'', + 'wording_domain' => '\'Admin.Navigation.Menu\'', + 'route_name' => '\'admin_security\'', + ], + 'AdminSecuritySessionEmployee' => [ + 'active' => 1, + 'enabled' => 1, + 'wording' => '\'Employee Sessions\'', + 'wording_domain' => '\'Admin.Navigation.Menu\'', + 'route_name' => '\'admin_security_sessions_employee_list\'', + ], + 'AdminSecuritySessionCustomer' => [ + 'active' => 1, + 'enabled' => 1, + 'wording' => '\'Customer Sessions\'', + 'wording_domain' => '\'Admin.Navigation.Menu\'', + 'route_name' => '\'admin_security_sessions_customer_list\'', + ], + ]; + + foreach ($tabs as $tab) { + add_new_tab_17(...$tab); + $data = []; + foreach ($tabsData[$tab[0]] as $key => $value) { + $data[] = '`' . $key . '` = ' . $value; + } + Db::getInstance()->execute( + 'UPDATE `' . _DB_PREFIX_ . 'tab` SET ' . implode(', ', $data) . ' WHERE `class_name` = \'' . $tab[0] . '\'' + ); + } +} diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index 85ed2fbee..2904cabe2 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -10,7 +10,8 @@ INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VAL ('PS_MAIL_DKIM_DOMAIN', '', NOW(), NOW()), ('PS_MAIL_DKIM_SELECTOR', '', NOW(), NOW()), ('PS_MAIL_DKIM_KEY', '', NOW(), NOW()), - ('PS_WEBP_QUALITY', '80', NOW(), NOW()) + ('PS_WEBP_QUALITY', '80', NOW(), NOW()), + ('PS_SECURITY_TOKEN', '1', NOW(), NOW()) ; INSERT IGNORE INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `position`) VALUES @@ -38,3 +39,5 @@ ALTER TABLE `PREFIX_product` MODIFY COLUMN `redirect_type` ENUM( ALTER TABLE `PREFIX_product_shop` MODIFY COLUMN `redirect_type` ENUM( '404', '410', '301-product', '302-product', '301-category', '302-category' ) NOT NULL DEFAULT '404'; + +/* PHP:ps_800_add_security_tab(); */; From b1bc4995e5d261e870c82b2c2c30e238495a19c9 Mon Sep 17 00:00:00 2001 From: Prestaworks Date: Wed, 2 Mar 2022 10:54:31 +0100 Subject: [PATCH 034/128] Update 1.7.0.0.sql --- upgrade/sql/1.7.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade/sql/1.7.0.0.sql b/upgrade/sql/1.7.0.0.sql index 128dbe539..a466e6731 100644 --- a/upgrade/sql/1.7.0.0.sql +++ b/upgrade/sql/1.7.0.0.sql @@ -154,7 +154,7 @@ CREATE TABLE `PREFIX_module_access` ( /* PHP:add_quick_access_tab(); */; -INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`) VALUES +INSERT IGNORE INTO `PREFIX_hook` (`name`, `title`, `description`, `position`) VALUES ('actionValidateCustomerAddressForm', 'Customer address form validation', 'This hook is called when a customer submit its address form', '1'), ('displayAfterCarrier', 'After carriers list', 'This hook is displayed after the carrier list in Front Office', '1'), ('displayCarrierExtraContent', 'Display additional content for a carrier (e.g pickup points)', 'This hook calls only the module related to the carrier, in order to add options when needed.', '1'), From 08d7cc0036b7e24bd1378e24ba098a882c291ebe Mon Sep 17 00:00:00 2001 From: Prestaworks Date: Wed, 9 Mar 2022 11:15:19 +0100 Subject: [PATCH 035/128] more inserts that could fail added 1.6.1.0.sql and 1.6.1.7.sql. That should be all INSERTS INTO PREFIX_hook in the upgrade folder. --- upgrade/sql/1.6.1.0.sql | 2 +- upgrade/sql/1.6.1.7.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/upgrade/sql/1.6.1.0.sql b/upgrade/sql/1.6.1.0.sql index 60f03eab2..45eea88ef 100644 --- a/upgrade/sql/1.6.1.0.sql +++ b/upgrade/sql/1.6.1.0.sql @@ -208,7 +208,7 @@ ALTER TABLE `PREFIX_order_invoice` ADD `invoice_address` TEXT DEFAULT NULL AFTER ALTER TABLE `PREFIX_order_invoice` ADD `delivery_address` TEXT DEFAULT NULL AFTER `invoice_address`; -INSERT INTO `PREFIX_hook` (`name`, `title`, `description`) VALUES ('displayInvoiceLegalFreeText', 'PDF Invoice - Legal Free Text', 'This hook allows you to modify the legal free text on PDF invoices'); +INSERT IGNORE INTO `PREFIX_hook` (`name`, `title`, `description`) VALUES ('displayInvoiceLegalFreeText', 'PDF Invoice - Legal Free Text', 'This hook allows you to modify the legal free text on PDF invoices'); UPDATE `PREFIX_hook` SET position = 0 WHERE name LIKE 'action%'; diff --git a/upgrade/sql/1.6.1.7.sql b/upgrade/sql/1.6.1.7.sql index 071f9e585..68fdd4450 100644 --- a/upgrade/sql/1.6.1.7.sql +++ b/upgrade/sql/1.6.1.7.sql @@ -1,3 +1,3 @@ SET NAMES 'utf8'; -INSERT INTO `PREFIX_hook` (`name`, `title`, `description`, `position`) VALUES ('displayCartExtraProductActions', 'Extra buttons in shopping cart', 'This hook adds extra buttons to the product lines, in the shopping cart', 0); +INSERT IGNORE INTO `PREFIX_hook` (`name`, `title`, `description`, `position`) VALUES ('displayCartExtraProductActions', 'Extra buttons in shopping cart', 'This hook adds extra buttons to the product lines, in the shopping cart', 0); From a61bdecb71d4fe7af35426db43670282adb1b5d9 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Wed, 15 Dec 2021 10:15:41 +0100 Subject: [PATCH 036/128] Display the details of errors if PrestaShop requirements are not satisfied --- AdminSelfUpgrade.php | 8 - autoupgrade.php | 7 - .../TaskRunner/Upgrade/UpgradeComplete.php | 3 - classes/Twig/Block/UpgradeChecklist.php | 13 +- classes/UpgradeSelfCheck.php | 164 ++++++++++++++---- tests/phpstan/phpstan-1.6.1.18.neon | 2 + tests/phpstan/phpstan-1.7.2.5.neon | 1 + tests/phpstan/phpstan-1.7.3.4.neon | 1 + tests/phpstan/phpstan-1.7.4.4.neon | 1 + tests/phpstan/phpstan-1.7.5.1.neon | 1 + tests/phpstan/phpstan-1.7.6.neon | 1 + views/templates/block/checklist.twig | 114 +++++++++--- 12 files changed, 237 insertions(+), 79 deletions(-) diff --git a/AdminSelfUpgrade.php b/AdminSelfUpgrade.php index 4da61e124..2dc175d9c 100755 --- a/AdminSelfUpgrade.php +++ b/AdminSelfUpgrade.php @@ -341,14 +341,6 @@ public function postProcess() Configuration::updateGlobalValue('PS_SHOP_ENABLE', 0); } - if (Tools14::isSubmit('ignorePsRequirements')) { - Configuration::updateValue('PS_AUTOUP_IGNORE_REQS', 1); - } - - if (Tools14::isSubmit('ignorePhpOutdated')) { - Configuration::updateValue('PS_AUTOUP_IGNORE_PHP_UPGRADE', 1); - } - if (Tools14::isSubmit('customSubmitAutoUpgrade')) { $config_keys = array_keys(array_merge($this->_fieldsUpgradeOptions, $this->_fieldsBackupOptions)); $config = []; diff --git a/autoupgrade.php b/autoupgrade.php index 81377a0bb..2ca3d46fc 100644 --- a/autoupgrade.php +++ b/autoupgrade.php @@ -66,10 +66,6 @@ public function install() return false; } - if (defined('_PS_HOST_MODE_') && _PS_HOST_MODE_) { - return false; - } - // Before creating a new tab "AdminSelfUpgrade" we need to remove any existing "AdminUpgrade" tab (present in v1.4.4.0 and v1.4.4.1) if ($id_tab = Tab::getIdFromClassName('AdminUpgrade')) { $tab = new Tab((int) $id_tab); @@ -118,9 +114,6 @@ public function uninstall() // Remove the 1-click upgrade working directory self::_removeDirectory(_PS_ADMIN_DIR_ . DIRECTORY_SEPARATOR . 'autoupgrade'); - Configuration::deleteByName('PS_AUTOUP_IGNORE_REQS'); - Configuration::deleteByName('PS_AUTOUP_IGNORE_PHP_UPGRADE'); - return parent::uninstall(); } diff --git a/classes/TaskRunner/Upgrade/UpgradeComplete.php b/classes/TaskRunner/Upgrade/UpgradeComplete.php index bf7a18177..1f02562e0 100644 --- a/classes/TaskRunner/Upgrade/UpgradeComplete.php +++ b/classes/TaskRunner/Upgrade/UpgradeComplete.php @@ -27,7 +27,6 @@ namespace PrestaShop\Module\AutoUpgrade\TaskRunner\Upgrade; -use Configuration; use PrestaShop\Module\AutoUpgrade\TaskRunner\AbstractTask; use PrestaShop\Module\AutoUpgrade\UpgradeContainer; use PrestaShop\Module\AutoUpgrade\UpgradeTools\FilesystemAdapter; @@ -58,8 +57,6 @@ public function run() $this->logger->debug('' . $this->translator->trans('Please remove %s by FTP', [$this->container->getProperty(UpgradeContainer::LATEST_PATH)], 'Modules.Autoupgrade.Admin') . ''); } - // Reinit config - Configuration::deleteByName('PS_AUTOUP_IGNORE_REQS'); // removing temporary files $this->container->getFileConfigurationStorage()->cleanAll(); } diff --git a/classes/Twig/Block/UpgradeChecklist.php b/classes/Twig/Block/UpgradeChecklist.php index cc5de2b79..be045b589 100644 --- a/classes/Twig/Block/UpgradeChecklist.php +++ b/classes/Twig/Block/UpgradeChecklist.php @@ -115,8 +115,9 @@ public function render() 'moduleUpdateLink' => Context::getContext()->link->getAdminLink('AdminModulesUpdates'), 'adminToken' => Tools14::getAdminTokenLite('AdminModules'), 'informationsLink' => Context::getContext()->link->getAdminLink('AdminInformation'), + 'maintenanceLink' => Context::getContext()->link->getAdminLink('AdminMaintenance'), 'rootDirectoryIsWritable' => $this->selfCheck->isRootDirectoryWritable(), - 'rootDirectoryWritableReport' => $this->selfCheck->getRootWritableReport(), + 'rootDirectory' => _PS_ROOT_DIR_, 'adminDirectoryIsWritable' => $this->selfCheck->isAdminAutoUpgradeDirectoryWritable(), 'adminDirectoryWritableReport' => $this->selfCheck->getAdminAutoUpgradeDirectoryWritableReport(), 'safeModeIsDisabled' => $this->selfCheck->isSafeModeDisabled(), @@ -128,7 +129,15 @@ public function render() 'cachingIsDisabled' => $this->selfCheck->isCacheDisabled(), 'maxExecutionTime' => $this->selfCheck->getMaxExecutionTime(), 'phpUpgradeRequired' => $this->selfCheck->isPhpUpgradeRequired(), - 'isPrestaShopReady' => $this->selfCheck->isPrestaShopReady(), + 'checkPhpVersionCompatibility' => $this->selfCheck->isPhpVersionCompatible(), + 'checkApacheModRewrite' => $this->selfCheck->isApacheModRewriteEnabled(), + 'notLoadedPhpExtensions' => $this->selfCheck->getNotLoadedPhpExtensions(), + 'checkMemoryLimit' => $this->selfCheck->isMemoryLimitValid(), + 'checkFileUploads' => $this->selfCheck->isPhpFileUploadsConfigurationEnabled(), + 'notExistsPhpFunctions' => $this->selfCheck->getNotExistsPhpFunctions(), + 'checkPhpSessions' => $this->selfCheck->isPhpSessionsValid(), + 'missingFiles' => $this->selfCheck->getMissingFiles(), + 'notWritingDirectories' => $this->selfCheck->getNotWritingDirectories(), ]; return $this->twig->render('@ModuleAutoUpgrade/block/checklist.twig', $data); diff --git a/classes/UpgradeSelfCheck.php b/classes/UpgradeSelfCheck.php index fba1f3ab8..86f06eb8f 100644 --- a/classes/UpgradeSelfCheck.php +++ b/classes/UpgradeSelfCheck.php @@ -35,7 +35,7 @@ class UpgradeSelfCheck /** * Recommended PHP Version. If below, display a notice. */ - const RECOMMENDED_PHP_VERSION = 70103; + const RECOMMENDED_PHP_VERSION = 70205; /** * @var bool @@ -104,11 +104,6 @@ class UpgradeSelfCheck */ private $phpUpgradeNoticelink; - /** - * @var bool - */ - private $prestashopReady; - /** * @var string */ @@ -312,10 +307,6 @@ public function getMaxExecutionTime() */ public function isPhpUpgradeRequired() { - if (1 === (int) Configuration::get('PS_AUTOUP_IGNORE_PHP_UPGRADE')) { - return false; - } - if (null !== $this->phpUpgradeNoticelink) { return $this->phpUpgradeNoticelink; } @@ -323,18 +314,6 @@ public function isPhpUpgradeRequired() return $this->phpUpgradeNoticelink = $this->checkPhpVersionNeedsUpgrade(); } - /** - * @return bool - */ - public function isPrestaShopReady() - { - if (null === $this->prestashopReady) { - $this->prestashopReady = $this->runPrestaShopCoreChecks(); - } - - return $this->prestashopReady || 1 === (int) Configuration::get('PS_AUTOUP_IGNORE_REQS'); - } - /** * Indicates if the self check status allows going ahead with the upgrade. * @@ -349,7 +328,17 @@ public function isOkForUpgrade() && $this->isAdminAutoUpgradeDirectoryWritable() && $this->isShopDeactivated() && $this->isCacheDisabled() - && $this->isPrestaShopReady(); + && $this->isModuleVersionLatest() + && $this->isPhpVersionCompatible() + && $this->isApacheModRewriteEnabled() + && $this->getNotLoadedPhpExtensions() === [] + && $this->isMemoryLimitValid() + && $this->isPhpFileUploadsConfigurationEnabled() + && $this->getNotExistsPhpFunctions() === [] + && $this->isPhpSessionsValid() + && $this->getMissingFiles() === [] + && $this->getNotWritingDirectories() === [] + ; } /** @@ -445,23 +434,136 @@ private function checkMaxExecutionTime() } /** - * Ask the core to run its tests, if available. - * * @return bool */ - public function runPrestaShopCoreChecks() + public function isPhpVersionCompatible() { - if (!class_exists('ConfigurationTest')) { + if (!class_exists(ConfigurationTest::class)) { return true; } - $defaultTests = ConfigurationTest::check(ConfigurationTest::getDefaultTests()); - foreach ($defaultTests as $testResult) { - if ($testResult !== 'ok') { - return false; + return (bool) ConfigurationTest::test_phpversion(); + } + + /** + * @return bool + */ + public function isApacheModRewriteEnabled() + { + if (class_exists(ConfigurationTest::class) && is_callable([ConfigurationTest::class, 'test_apache_mod_rewrite'])) { + return ConfigurationTest::test_apache_mod_rewrite(); + } + + return true; + } + + /** + * @return array + */ + public function getNotLoadedPhpExtensions() + { + if (!class_exists(ConfigurationTest::class)) { + return []; + } + $extensions = []; + foreach ([ + 'curl', 'dom', 'fileinfo', 'gd', 'intl', 'json', 'mbstring', 'openssl', 'pdo_mysql', 'simplexml', 'zip', + ] as $extension) { + if (!ConfigurationTest::{'test_' . $extension}()) { + $extensions[] = $extension; + } + } + + return $extensions; + } + + /** + * @return array + */ + public function getNotExistsPhpFunctions() + { + if (!class_exists(ConfigurationTest::class)) { + return []; + } + $functions = []; + foreach ([ + 'fopen', 'fclose', 'fread', 'fwrite', 'rename', 'file_exists', 'unlink', 'rmdir', 'mkdir', 'getcwd', + 'chdir', 'chmod', + ] as $function) { + if (!ConfigurationTest::test_system([$function])) { + $functions[] = $function; } } + return $functions; + } + + /** + * @return bool + */ + public function isMemoryLimitValid() + { + if (class_exists(ConfigurationTest::class) && is_callable([ConfigurationTest::class, 'test_memory_limit'])) { + return ConfigurationTest::test_memory_limit(); + } + return true; } + + /** + * @return bool + */ + public function isPhpFileUploadsConfigurationEnabled() + { + if (!class_exists(ConfigurationTest::class)) { + return true; + } + + return (bool) ConfigurationTest::test_upload(); + } + + /** + * @return bool + */ + public function isPhpSessionsValid() + { + if (!class_exists(ConfigurationTest::class)) { + return true; + } + + return ConfigurationTest::test_sessions(); + } + + /** + * @return array + */ + public function getMissingFiles() + { + return ConfigurationTest::test_files(true); + } + + /** + * @return array + */ + public function getNotWritingDirectories() + { + if (!class_exists(ConfigurationTest::class)) { + return []; + } + + $tests = ConfigurationTest::getDefaultTests(); + + $directories = []; + foreach ([ + 'cache_dir', 'log_dir', 'img_dir', 'module_dir', 'theme_lang_dir', 'theme_pdf_lang_dir', 'theme_cache_dir', + 'translations_dir', 'customizable_products_dir', 'virtual_products_dir', 'config_sf2_dir', 'config_dir', + 'mails_dir', 'translations_sf2', + ] as $testKey) { + if (isset($tests[$testKey]) && !ConfigurationTest::{'test_' . $testKey}($tests[$testKey])) { + $directories[] = $tests[$testKey]; + } + } + + return $directories; + } } diff --git a/tests/phpstan/phpstan-1.6.1.18.neon b/tests/phpstan/phpstan-1.6.1.18.neon index cdb8c8e95..fb1b3ab9e 100644 --- a/tests/phpstan/phpstan-1.6.1.18.neon +++ b/tests/phpstan/phpstan-1.6.1.18.neon @@ -13,7 +13,9 @@ parameters: - '#Access to an undefined property Autoupgrade::\$bootstrap.#' - '#Access to an undefined property Module::\$installed.#' - '#[cC]lass PrestaShop\\PrestaShop\\Core\\Addon\\Theme\\ThemeManagerBuilder#' + - '#Call to an undefined static method ConfigurationTest::test_apache_mod_rewrite\(\).#' - '#Call to an undefined static method ConfigurationTest::test_curl\(\).#' + - '#Call to an undefined static method ConfigurationTest::test_memory_limit\(\).#' - '#Call to method assign\(\) on an unknown class Smarty.#' - '#Call to method fetch\(\) on an unknown class Smarty.#' - '#Call to method getContainer\(\) on an unknown class AppKernel.#' diff --git a/tests/phpstan/phpstan-1.7.2.5.neon b/tests/phpstan/phpstan-1.7.2.5.neon index 8f3fc54ad..c89b3643a 100644 --- a/tests/phpstan/phpstan-1.7.2.5.neon +++ b/tests/phpstan/phpstan-1.7.2.5.neon @@ -7,6 +7,7 @@ parameters: ignoreErrors: - '#Access to an undefined property Autoupgrade::\$bootstrap.#' - '#Access to an undefined property Module::\$installed.#' + - '#Call to an undefined static method ConfigurationTest::test_memory_limit\(\).#' - '#Call to method boot\(\) on an unknown class AppKernel.#' - '#Call to method getContainer\(\) on an unknown class AppKernel.#' - '#Call to method getMessage\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Exception\\CoreException.#' diff --git a/tests/phpstan/phpstan-1.7.3.4.neon b/tests/phpstan/phpstan-1.7.3.4.neon index 8f3fc54ad..c89b3643a 100644 --- a/tests/phpstan/phpstan-1.7.3.4.neon +++ b/tests/phpstan/phpstan-1.7.3.4.neon @@ -7,6 +7,7 @@ parameters: ignoreErrors: - '#Access to an undefined property Autoupgrade::\$bootstrap.#' - '#Access to an undefined property Module::\$installed.#' + - '#Call to an undefined static method ConfigurationTest::test_memory_limit\(\).#' - '#Call to method boot\(\) on an unknown class AppKernel.#' - '#Call to method getContainer\(\) on an unknown class AppKernel.#' - '#Call to method getMessage\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Exception\\CoreException.#' diff --git a/tests/phpstan/phpstan-1.7.4.4.neon b/tests/phpstan/phpstan-1.7.4.4.neon index 5112a3798..aa06b6516 100644 --- a/tests/phpstan/phpstan-1.7.4.4.neon +++ b/tests/phpstan/phpstan-1.7.4.4.neon @@ -7,6 +7,7 @@ parameters: ignoreErrors: - '#Access to an undefined property Autoupgrade::\$bootstrap.#' - '#Access to an undefined property Module::\$installed.#' + - '#Call to an undefined static method ConfigurationTest::test_memory_limit\(\).#' - '#Call to method getMessage\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Exception\\CoreException.#' - '#Call to method handle\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\CommandBus\\CommandBusInterface.#' - '#Caught class PrestaShop\\PrestaShop\\Core\\Exception\\CoreException not found.#' diff --git a/tests/phpstan/phpstan-1.7.5.1.neon b/tests/phpstan/phpstan-1.7.5.1.neon index 29e97db98..f228e2ad0 100644 --- a/tests/phpstan/phpstan-1.7.5.1.neon +++ b/tests/phpstan/phpstan-1.7.5.1.neon @@ -7,6 +7,7 @@ parameters: ignoreErrors: - '#Access to an undefined property Autoupgrade::\$bootstrap.#' - '#Access to an undefined property Module::\$installed.#' + - '#Call to an undefined static method ConfigurationTest::test_memory_limit\(\).#' - '#Function deactivate_custom_modules not found.#' - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Domain\\Theme\\ValueObject\\ThemeName not found.#' - '#Property ModuleCore::\$version \(float\) does not accept string.#' diff --git a/tests/phpstan/phpstan-1.7.6.neon b/tests/phpstan/phpstan-1.7.6.neon index 2745e98ec..45eed3c13 100644 --- a/tests/phpstan/phpstan-1.7.6.neon +++ b/tests/phpstan/phpstan-1.7.6.neon @@ -7,6 +7,7 @@ parameters: ignoreErrors: - '#Access to an undefined property Autoupgrade::\$bootstrap.#' - '#Access to an undefined property Module::\$installed.#' + - '#Call to an undefined static method ConfigurationTest::test_memory_limit\(\).#' - '#Call to method fetchLocale\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Cldr\\Update.#' - '#Function deactivate_custom_modules not found.#' - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Cldr\\Update not found.#' diff --git a/views/templates/block/checklist.twig b/views/templates/block/checklist.twig index 639488d8d..498f90efe 100644 --- a/views/templates/block/checklist.twig +++ b/views/templates/block/checklist.twig @@ -22,11 +22,9 @@ {% if not phpUpgradeRequired %} {{ 'Your server is running on a supported PHP version.'|trans }} {% else %} - {{ 'The PHP version your server is running on is obsolete and needs to be upgraded. [1]Learn more why[/1] or [2]ignore[/2].'|trans({ - '[1]': '', + {{ 'The PHP version your server is running on is obsolete and needs to be upgraded. [1]Learn more[/1].'|trans({ + '[1]': '', '[/1]': '', - '[2]': '', - '[/2]': '', })|raw }} {% endif %}
{{ 'Your store\'s root directory is writable (with appropriate CHMOD permissions)'|trans }}{{ 'Your store\'s root directory (%s) is writable (with appropriate CHMOD permissions).'|trans([rootDirectory]) }} {% if rootDirectoryIsWritable %} {{ icons.ok }} {% else %} - {{ icons.nok }} {{ rootDirectoryWritableReport }} + {{ icons.nok }} {% endif %}
- {{ 'Your store is in maintenance mode'|trans }} - {% if not storeIsInMaintenance %} -
- -
- {% endif %} + {{ 'Enable the maintenance mode and add your maintenance IP in [1]Shop parameters > General > Maintenance[/1]'|trans({ + '[1]': '', + '[/1]': '', + })|raw }}
{% if storeIsInMaintenance %} @@ -133,30 +129,92 @@ {% endif %}
{{ 'Your current PHP version isn\'t compatible with your PrestaShop version.'|trans }}{{ icons.nok }}
{{ 'Apache mod_rewrite is disabled.'|trans }}{{ icons.nok }}
+ {% if notLoadedPhpExtensions|length > 1 %} + {{ 'The following PHP extensions are not installed: %s.'|trans([notLoadedPhpExtensions|join(', ')]) }} + {% else %} + {{ 'The following PHP extension is not installed: %s.'|trans([notLoadedPhpExtensions|first]) }} + {% endif %} + {{ icons.nok }}
{{ 'PHP memory_limit is inferior to 256 MB.'|trans }}{{ icons.nok }}
{{ 'PHP file_uploads configuration is disabled.'|trans }}{{ icons.nok }}
- {% if isPrestaShopReady %} - {{ 'PrestaShop requirements are satisfied.'|trans }} - {% else %} - {{ 'PrestaShop requirements are not satisfied. [1]See details[/1] or [2]ignore[/2].'|trans({ - '[1]': '', - '[/1]': '', - '[2]': '', - '[/2]': '', - })|raw }} - {% endif %} + {% if notExistsPhpFunctions|length > 1 %} + {{ 'The following PHP functions are not installed: %s.'|trans([notExistsPhpFunctions|join(', ')]) }} + {% else %} + {{ 'The following PHP function is not installed: %s.'|trans([notExistsPhpFunctions|first]) }} + {% endif %} {{ icons.nok }}
{{ 'It\'s not possible to create a PHP session.'|trans }}{{ icons.nok }}
- {% if isPrestaShopReady %} - {{ icons.ok }} - {% else %} - {{ icons.warning }} - {% endif %} + {{ 'The following files are missing:'|trans }} +
    + {% for file in missingFiles %} +
  • {{ file }}
  • + {% endfor %} +
{{ icons.nok }}
+ {{ 'It\'s not possible to write in the following folders:'|trans }} +
    + {% for missingFile in notWritingDirectories %} +
  • {{ missingFile }}
  • + {% endfor %} +
+
{{ icons.nok }}

{{ 'Please also make sure you make a full manual backup of your files and database.'|trans }}

+ {% if showErrorMessage %} +

{{ 'PrestaShop requirements are not satisfied.'|trans }}

+ {% endif %} From 2b6bbfdb8d3f70e53d21d8a5a68ade525cc9a4a1 Mon Sep 17 00:00:00 2001 From: Thomas BACCELLI Date: Thu, 10 Mar 2022 11:50:46 +0100 Subject: [PATCH 037/128] Use xml file during archive upgrade --- .github/action.yml | 4 +++- .github/action_upgrade.sh | 4 +++- .github/get_matrix.php | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/action.yml b/.github/action.yml index 781397c30..596ae8cc2 100644 --- a/.github/action.yml +++ b/.github/action.yml @@ -17,6 +17,7 @@ runs: env: CHANNEL: 'archive' ARCHIVE_URL: 'https://github.com/PrestaShop/PrestaShop/releases/download/1.7.7.8/prestashop_1.7.7.8.zip' + XML_URL: 'https://api.prestashop.com/xml/md5/1.7.7.8.xml' VERSION: '1.7.7.8' FROM: ${{ matrix.from }} SKIP: ${{ matrix.ps-versions.channel != 'archive' || !startsWith(matrix.from, '1.6') || startsWith(matrix.ps-versions.version, '1.7.7') }} @@ -31,7 +32,8 @@ runs: - name: Upgrade env: CHANNEL: ${{ matrix.ps-versions.channel }} - ARCHIVE_URL: ${{ matrix.ps-versions.file }} + ARCHIVE_URL: ${{ matrix.ps-versions.zip }} + XML_URL: ${{ matrix.ps-versions.xml }} VERSION: ${{ matrix.ps-versions.version }} FROM: ${{ matrix.from }} shell: bash diff --git a/.github/action_upgrade.sh b/.github/action_upgrade.sh index c79148158..d0ea07dc4 100755 --- a/.github/action_upgrade.sh +++ b/.github/action_upgrade.sh @@ -24,8 +24,10 @@ if [[ $CHANNEL == "archive" ]]; then docker exec -u www-data prestashop_autoupgrade mkdir admin-dev/autoupgrade/download docker exec -u www-data prestashop_autoupgrade curl -L $ARCHIVE_URL -o admin-dev/autoupgrade/download/prestashop.zip - echo "{\"channel\":\"archive\",\"archive_prestashop\":\"prestashop.zip\",\"archive_num\":\"${VERSION}\", \"PS_AUTOUP_CHANGE_DEFAULT_THEME\":${UPDATE_THEME}, \"skip_backup\": ${SKIP_BACKUP}}" > config.json + docker exec -u www-data prestashop_autoupgrade curl -L $XML_URL -o admin-dev/autoupgrade/download/prestashop.xml + echo "{\"channel\":\"archive\",\"archive_prestashop\":\"prestashop.zip\",\"archive_num\":\"${VERSION}\", \"archive_xml\":\"prestashop.xml\", \"PS_AUTOUP_CHANGE_DEFAULT_THEME\":${UPDATE_THEME}, \"skip_backup\": ${SKIP_BACKUP}}" > config.json docker exec -u www-data prestashop_autoupgrade php admin-dev/autoupgrade/cli-updateconfig.php --from=modules/autoupgrade/config.json --dir=admin-dev fi +docker exec -u www-data prestashop_autoupgrade php modules/autoupgrade/tests/testCliProcess.php admin-dev/autoupgrade/cli-upgrade.php --dir="admin-dev" --action="compareReleases" docker exec -u www-data prestashop_autoupgrade php modules/autoupgrade/tests/testCliProcess.php admin-dev/autoupgrade/cli-upgrade.php --dir="admin-dev" diff --git a/.github/get_matrix.php b/.github/get_matrix.php index de67ed27e..e6667d317 100644 --- a/.github/get_matrix.php +++ b/.github/get_matrix.php @@ -23,7 +23,8 @@ "channel" => "archive", "branch" => $report['version'], "version" => getVersionFromFilename($report['download']), - "file" => $report['download'] + "zip" => $report['download'], + "xml" => $report['xml'], ]; } } From 5c004a33503a23dade1a7fa2d25125afadf5a531 Mon Sep 17 00:00:00 2001 From: Krystian Podemski Date: Wed, 16 Mar 2022 09:26:33 +0100 Subject: [PATCH 038/128] Accept more characters in the product name --- upgrade/sql/8.0.0.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index 2904cabe2..9aa934179 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -41,3 +41,5 @@ ALTER TABLE `PREFIX_product_shop` MODIFY COLUMN `redirect_type` ENUM( ) NOT NULL DEFAULT '404'; /* PHP:ps_800_add_security_tab(); */; + +ALTER TABLE `PREFIX_order_detail` MODIFY COLUMN `product_name` TEXT NOT NULL; From afe1e43769fbe66011ef38d184845bc52246ff2e Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Wed, 16 Mar 2022 16:44:19 +0100 Subject: [PATCH 039/128] fix condition before redirect --- AdminSelfUpgrade.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/AdminSelfUpgrade.php b/AdminSelfUpgrade.php index 80097855e..4b4ec9ec4 100755 --- a/AdminSelfUpgrade.php +++ b/AdminSelfUpgrade.php @@ -401,9 +401,12 @@ public function postProcess() $UpConfig->merge($config); $upConfigValues = $this->extractFieldsToBeSavedInDB($UpConfig); + $this->processDatabaseConfigurationFields($upConfigValues['dbConfig']); - if ($this->processDatabaseConfigurationFields($upConfigValues['dbConfig']) && - $this->upgradeContainer->getUpgradeConfigurationStorage()->save($upConfigValues['fileConfig'], UpgradeFileNames::CONFIG_FILENAME)) { + if ($this->upgradeContainer->getUpgradeConfigurationStorage()->save( + $upConfigValues['fileConfig'], + UpgradeFileNames::CONFIG_FILENAME) + ) { Tools14::redirectAdmin(self::$currentIndex . '&conf=6&token=' . Tools14::getValue('token')); } } From 16ae27aaee0b89cc9aa27d3f8cf56cd24ba15092 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Mon, 17 Jan 2022 21:25:10 +0100 Subject: [PATCH 040/128] Disabled upgrades of modules if the installed version is higher than this proposed by Addons --- classes/Parameters/UpgradeFileNames.php | 1 + classes/State.php | 30 ++++- classes/TaskRunner/Upgrade/UpgradeModules.php | 6 +- classes/UpgradeTools/FileFilter.php | 3 +- classes/UpgradeTools/FilesystemAdapter.php | 10 +- classes/UpgradeTools/ModuleAdapter.php | 107 ++++++++++-------- tests/{ => unit/Cookie}/CookieTest.php | 0 tests/{ => unit}/ErrorHandlerTest.php | 0 tests/{ => unit/Log}/LegacyLoggerTest.php | 0 tests/{ => unit/Log}/StreamedLoggerTest.php | 0 .../UpgradeConfigurationStorageTest.php} | 2 +- .../PrestaShopConfigurationTest.php | 2 +- tests/{ => unit}/StateTest.php | 0 .../FilesystemAdapterTest.php | 0 tests/{ => unit}/UpgradeContainerTest.php | 0 .../CoreUpgrader/CoreUpgrader17Test.php} | 2 +- .../UpgradeTools}/SettingsFileWriterTest.php | 0 .../Translator}/TranslatorTest.php | 0 tests/{ => unit}/ZipActionTest.php | 2 +- 19 files changed, 106 insertions(+), 59 deletions(-) rename tests/{ => unit/Cookie}/CookieTest.php (100%) rename tests/{ => unit}/ErrorHandlerTest.php (100%) rename tests/{ => unit/Log}/LegacyLoggerTest.php (100%) rename tests/{ => unit/Log}/StreamedLoggerTest.php (100%) rename tests/{UpgradeConfigurationTest.php => unit/Parameters/UpgradeConfigurationStorageTest.php} (98%) rename tests/{ => unit/PrestashopConfiguration}/PrestaShopConfigurationTest.php (96%) rename tests/{ => unit}/StateTest.php (100%) rename tests/{ => unit/UpgradeContainer}/FilesystemAdapterTest.php (100%) rename tests/{ => unit}/UpgradeContainerTest.php (100%) rename tests/{CoreUpgraderTest.php => unit/UpgradeTools/CoreUpgrader/CoreUpgrader17Test.php} (98%) rename tests/{ => unit/UpgradeTools}/SettingsFileWriterTest.php (100%) rename tests/{ => unit/UpgradeTools/Translator}/TranslatorTest.php (100%) rename tests/{ => unit}/ZipActionTest.php (97%) diff --git a/classes/Parameters/UpgradeFileNames.php b/classes/Parameters/UpgradeFileNames.php index bb8167c4f..71906d93f 100644 --- a/classes/Parameters/UpgradeFileNames.php +++ b/classes/Parameters/UpgradeFileNames.php @@ -154,5 +154,6 @@ class UpgradeFileNames 'FILES_FROM_ARCHIVE_LIST', 'MAILS_CUSTOM_LIST', 'TRANSLATION_FILES_CUSTOM_LIST', + 'MODULES_TO_UPGRADE_LIST', ]; } diff --git a/classes/State.php b/classes/State.php index 58002609e..7b39b1fcd 100644 --- a/classes/State.php +++ b/classes/State.php @@ -80,6 +80,12 @@ class State * @var array */ private $modules_addons = []; + /** + * modules_versions is an array of array(id_addons => version of the module). + * + * @var array + */ + private $modules_versions = []; /** * @var bool Determining if all steps went totally successfully @@ -132,13 +138,15 @@ public function initDefault(Upgrader $upgrader, $prodRootDir, $version) $xml_local = $prodRootDir . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'xml' . DIRECTORY_SEPARATOR . 'modules_native_addons.xml'; $xml = $upgrader->getApiAddons($xml_local, $postData, true); - $modules_addons = []; + $modules_addons = $modules_versions = []; if (is_object($xml)) { foreach ($xml as $mod) { $modules_addons[(string) $mod->id] = (string) $mod->name; + $modules_versions[(string) $mod->id] = (string) $mod->version; } } $this->setModulesAddons($modules_addons); + $this->setModulesVersions($modules_versions); // installedLanguagesIso is used to merge translations files $installedLanguagesIso = array_map( @@ -226,6 +234,14 @@ public function getModules_addons() return $this->modules_addons; } + /** + * @return array + */ + public function getModulesVersions() + { + return $this->modules_versions; + } + public function getWarningExists() { return $this->warning_exists; @@ -332,6 +348,18 @@ public function setModulesAddons($modules_addons) return $this; } + /** + * @param array $modules_versions + * + * @return self + */ + public function setModulesVersions($modules_versions) + { + $this->modules_versions = $modules_versions; + + return $this; + } + public function setWarningExists($warning_exists) { $this->warning_exists = $warning_exists; diff --git a/classes/TaskRunner/Upgrade/UpgradeModules.php b/classes/TaskRunner/Upgrade/UpgradeModules.php index cf760ffcc..130e130bd 100644 --- a/classes/TaskRunner/Upgrade/UpgradeModules.php +++ b/classes/TaskRunner/Upgrade/UpgradeModules.php @@ -56,7 +56,6 @@ public function run() return true; } - $time_elapsed = time() - $start_time; // module list if (count($listModules) > 0) { do { @@ -141,7 +140,10 @@ public function run() public function warmUp() { try { - $modulesToUpgrade = $this->container->getModuleAdapter()->listModulesToUpgrade($this->container->getState()->getModules_addons()); + $modulesToUpgrade = $this->container->getModuleAdapter()->listModulesToUpgrade( + $this->container->getState()->getModules_addons(), + $this->container->getState()->getModulesVersions() + ); $modulesToUpgrade = array_reverse($modulesToUpgrade); $this->container->getFileConfigurationStorage()->save($modulesToUpgrade, UpgradeFileNames::MODULES_TO_UPGRADE_LIST); } catch (UpgradeException $e) { diff --git a/classes/UpgradeTools/FileFilter.php b/classes/UpgradeTools/FileFilter.php index b34952665..093f4aec6 100644 --- a/classes/UpgradeTools/FileFilter.php +++ b/classes/UpgradeTools/FileFilter.php @@ -37,7 +37,7 @@ class FileFilter protected $configuration; /** - * @var string Autoupgrade sub directory* + * @var string Autoupgrade sub directory */ protected $autoupgradeDir; @@ -115,6 +115,7 @@ public function getFilesToIgnoreOnUpgrade() '/app/config/parameters.yml', '/install', '/install-dev', + '/modules', ]; // this will exclude autoupgrade dir from admin, and autoupgrade from modules diff --git a/classes/UpgradeTools/FilesystemAdapter.php b/classes/UpgradeTools/FilesystemAdapter.php index a87bc45b2..7d349e313 100644 --- a/classes/UpgradeTools/FilesystemAdapter.php +++ b/classes/UpgradeTools/FilesystemAdapter.php @@ -56,9 +56,13 @@ class FilesystemAdapter ], ]; - public function __construct(FileFilter $fileFilter, $restoreFilesFilename, - $autoupgradeDir, $adminSubDir, $prodRootDir) - { + public function __construct( + FileFilter $fileFilter, + $restoreFilesFilename, + $autoupgradeDir, + $adminSubDir, + $prodRootDir + ) { $this->fileFilter = $fileFilter; $this->restoreFilesFilename = $restoreFilesFilename; diff --git a/classes/UpgradeTools/ModuleAdapter.php b/classes/UpgradeTools/ModuleAdapter.php index 7317aa9d2..b158701ef 100644 --- a/classes/UpgradeTools/ModuleAdapter.php +++ b/classes/UpgradeTools/ModuleAdapter.php @@ -116,10 +116,11 @@ public function disableNonNativeModules($pathToUpgradeScripts) * list modules to upgrade and save them in a serialized array in $this->toUpgradeModuleList. * * @param array $modulesFromAddons Modules available on the marketplace for download + * @param array $modulesVersions * * @return array Module available on the local filesystem and on the marketplace */ - public function listModulesToUpgrade(array $modulesFromAddons) + public function listModulesToUpgrade(array $modulesFromAddons, array $modulesVersions) { $list = []; $dir = $this->modulesPath; @@ -129,17 +130,37 @@ public function listModulesToUpgrade(array $modulesFromAddons) } foreach (scandir($dir) as $module_name) { - if (is_file($dir . DIRECTORY_SEPARATOR . $module_name)) { + // We don't update autoupgrade module + if ($module_name === 'autoupgrade') { continue; } - + // We have a file modules/mymodule + if (is_file($dir . $module_name)) { + continue; + } + // We don't have a file modules/mymodule/config.xml + if (!is_file($dir . $module_name . DIRECTORY_SEPARATOR . 'config.xml')) { + continue; + } + // We don't have a file modules/mymodule/mymodule.php if (!is_file($dir . $module_name . DIRECTORY_SEPARATOR . $module_name . '.php')) { continue; } $id_addons = array_search($module_name, $modulesFromAddons); - if (false !== $id_addons && $module_name !== 'autoupgrade') { - $list[] = ['id' => $id_addons, 'name' => $module_name]; + // We don't find the module on Addons + if (false === $id_addons) { + continue; } + $configXML = file_get_contents($dir . $module_name . DIRECTORY_SEPARATOR . 'config.xml'); + $moduleXML = simplexml_load_string($configXML); + // The module installed has a higher version than this available on Addons + if (version_compare((string) $moduleXML->version, $modulesVersions[$id_addons]) >= 0) { + continue; + } + $list[$module_name] = [ + 'id' => $id_addons, + 'name' => $module_name, + ]; } return $list; @@ -155,61 +176,51 @@ public function upgradeModule($id, $name) { $zip_fullpath = $this->tempPath . DIRECTORY_SEPARATOR . $name . '.zip'; - $addons_url = 'api.addons.prestashop.com'; - $protocolsList = ['https://' => 443, 'http://' => 80]; - if (!extension_loaded('openssl')) { - unset($protocolsList['https://']); - } else { - unset($protocolsList['http://']); - } - - $postData = 'version=' . $this->upgradeVersion . '&method=module&id_module=' . (int) $id; + $addons_url = extension_loaded('openssl') + ? 'https://api.addons.prestashop.com' + : 'http://api.addons.prestashop.com'; // Make the request - $opts = [ + $context = stream_context_create([ 'http' => [ 'method' => 'POST', - 'content' => $postData, + 'content' => 'version=' . $this->upgradeVersion . '&method=module&id_module=' . (int) $id, 'header' => 'Content-type: application/x-www-form-urlencoded', 'timeout' => 10, ], - ]; - $context = stream_context_create($opts); - foreach ($protocolsList as $protocol => $port) { - // file_get_contents can return false if https is not supported (or warning) - $content = Tools14::file_get_contents($protocol . $addons_url, false, $context); - if ($content == false || substr($content, 5) == '' . $this->translator->trans('[ERROR] No response from Addons server.', [], 'Modules.Autoupgrade.Admin') . ''; - throw new UpgradeException($msg); - } + // file_get_contents can return false if https is not supported (or warning) + $content = Tools14::file_get_contents($addons_url, false, $context); + if ($content == false || substr($content, 5) == '' . $this->translator->trans('[ERROR] Unable to write module %s\'s zip file in temporary directory.', [$name], 'Modules.Autoupgrade.Admin') . ''; - throw new UpgradeException($msg); - } + if (empty($content)) { + $msg = '' . $this->translator->trans('[ERROR] No response from Addons server.', [], 'Modules.Autoupgrade.Admin') . ''; + throw new UpgradeException($msg); + } - if (filesize($zip_fullpath) <= 300) { - unlink($zip_fullpath); - } - // unzip in modules/[mod name] old files will be conserved - if (!$this->zipAction->extract($zip_fullpath, $this->modulesPath)) { - throw (new UpgradeException('' . $this->translator->trans('[WARNING] Error when trying to extract module %s.', [$name], 'Modules.Autoupgrade.Admin') . ''))->setSeverity(UpgradeException::SEVERITY_WARNING); - } - if (file_exists($zip_fullpath)) { - unlink($zip_fullpath); - } + if (false === (bool) file_put_contents($zip_fullpath, $content)) { + $msg = '' . $this->translator->trans('[ERROR] Unable to write module %s\'s zip file in temporary directory.', [$name], 'Modules.Autoupgrade.Admin') . ''; + throw new UpgradeException($msg); + } - // Only 1.7 step - if (version_compare($this->upgradeVersion, '1.7.0.0', '>=') - && !$this->doUpgradeModule($name)) { - throw (new UpgradeException('' . $this->translator->trans('[WARNING] Error when trying to upgrade module %s.', [$name], 'Modules.Autoupgrade.Admin') . ''))->setSeverity(UpgradeException::SEVERITY_WARNING)->setQuickInfos(\Module::getInstanceByName($name)->getErrors()); - } + if (filesize($zip_fullpath) <= 300) { + unlink($zip_fullpath); + } + // unzip in modules/[mod name] old files will be conserved + if (!$this->zipAction->extract($zip_fullpath, $this->modulesPath)) { + throw (new UpgradeException('' . $this->translator->trans('[WARNING] Error when trying to extract module %s.', [$name], 'Modules.Autoupgrade.Admin') . ''))->setSeverity(UpgradeException::SEVERITY_WARNING); + } + if (file_exists($zip_fullpath)) { + unlink($zip_fullpath); + } - return; + // Only 1.7 step + if (version_compare($this->upgradeVersion, '1.7.0.0', '>=') + && !$this->doUpgradeModule($name)) { + throw (new UpgradeException('' . $this->translator->trans('[WARNING] Error when trying to upgrade module %s.', [$name], 'Modules.Autoupgrade.Admin') . ''))->setSeverity(UpgradeException::SEVERITY_WARNING)->setQuickInfos(\Module::getInstanceByName($name)->getErrors()); } } diff --git a/tests/CookieTest.php b/tests/unit/Cookie/CookieTest.php similarity index 100% rename from tests/CookieTest.php rename to tests/unit/Cookie/CookieTest.php diff --git a/tests/ErrorHandlerTest.php b/tests/unit/ErrorHandlerTest.php similarity index 100% rename from tests/ErrorHandlerTest.php rename to tests/unit/ErrorHandlerTest.php diff --git a/tests/LegacyLoggerTest.php b/tests/unit/Log/LegacyLoggerTest.php similarity index 100% rename from tests/LegacyLoggerTest.php rename to tests/unit/Log/LegacyLoggerTest.php diff --git a/tests/StreamedLoggerTest.php b/tests/unit/Log/StreamedLoggerTest.php similarity index 100% rename from tests/StreamedLoggerTest.php rename to tests/unit/Log/StreamedLoggerTest.php diff --git a/tests/UpgradeConfigurationTest.php b/tests/unit/Parameters/UpgradeConfigurationStorageTest.php similarity index 98% rename from tests/UpgradeConfigurationTest.php rename to tests/unit/Parameters/UpgradeConfigurationStorageTest.php index 4800c753f..55a4f17a1 100644 --- a/tests/UpgradeConfigurationTest.php +++ b/tests/unit/Parameters/UpgradeConfigurationStorageTest.php @@ -27,7 +27,7 @@ use PrestaShop\Module\AutoUpgrade\Parameters\FileConfigurationStorage; use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeConfigurationStorage; -class UpgradeConfigurationTest extends TestCase +class UpgradeConfigurationStorageTest extends TestCase { /** * This method only initialize the configuration from empty data saves. diff --git a/tests/PrestaShopConfigurationTest.php b/tests/unit/PrestashopConfiguration/PrestaShopConfigurationTest.php similarity index 96% rename from tests/PrestaShopConfigurationTest.php rename to tests/unit/PrestashopConfiguration/PrestaShopConfigurationTest.php index edba0a54b..ca2cbd9d2 100644 --- a/tests/PrestaShopConfigurationTest.php +++ b/tests/unit/PrestashopConfiguration/PrestaShopConfigurationTest.php @@ -60,7 +60,7 @@ public function testPrestaShopVersionInAppKernel() $this->assertSame( '1.7.6.0', $class->findPrestaShopVersionInFile( - file_get_contents(__DIR__ . '/fixtures/AppKernelExample.php.txt') + file_get_contents(__DIR__ . '/../../fixtures/AppKernelExample.php.txt') ) ); } diff --git a/tests/StateTest.php b/tests/unit/StateTest.php similarity index 100% rename from tests/StateTest.php rename to tests/unit/StateTest.php diff --git a/tests/FilesystemAdapterTest.php b/tests/unit/UpgradeContainer/FilesystemAdapterTest.php similarity index 100% rename from tests/FilesystemAdapterTest.php rename to tests/unit/UpgradeContainer/FilesystemAdapterTest.php diff --git a/tests/UpgradeContainerTest.php b/tests/unit/UpgradeContainerTest.php similarity index 100% rename from tests/UpgradeContainerTest.php rename to tests/unit/UpgradeContainerTest.php diff --git a/tests/CoreUpgraderTest.php b/tests/unit/UpgradeTools/CoreUpgrader/CoreUpgrader17Test.php similarity index 98% rename from tests/CoreUpgraderTest.php rename to tests/unit/UpgradeTools/CoreUpgrader/CoreUpgrader17Test.php index 12323f785..4962f610f 100644 --- a/tests/CoreUpgraderTest.php +++ b/tests/unit/UpgradeTools/CoreUpgrader/CoreUpgrader17Test.php @@ -28,7 +28,7 @@ use PrestaShop\Module\AutoUpgrade\UpgradeContainer; use PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader\CoreUpgrader17; -class CoreUpgraderTest extends TestCase +class CoreUpgrader17Test extends TestCase { protected $coreUpgrader; diff --git a/tests/SettingsFileWriterTest.php b/tests/unit/UpgradeTools/SettingsFileWriterTest.php similarity index 100% rename from tests/SettingsFileWriterTest.php rename to tests/unit/UpgradeTools/SettingsFileWriterTest.php diff --git a/tests/TranslatorTest.php b/tests/unit/UpgradeTools/Translator/TranslatorTest.php similarity index 100% rename from tests/TranslatorTest.php rename to tests/unit/UpgradeTools/Translator/TranslatorTest.php diff --git a/tests/ZipActionTest.php b/tests/unit/ZipActionTest.php similarity index 97% rename from tests/ZipActionTest.php rename to tests/unit/ZipActionTest.php index 21627682f..54c9716ab 100644 --- a/tests/ZipActionTest.php +++ b/tests/unit/ZipActionTest.php @@ -28,7 +28,7 @@ class ZipActionTest extends TestCase { - const ZIP_CONTENT_PATH = __DIR__ . '/fixtures/ArchiveExample.zip'; + const ZIP_CONTENT_PATH = __DIR__ . '/../fixtures/ArchiveExample.zip'; private $container; private $contentExcepted; From 13197f534b2e9f1b66d9075e748f85fea9409797 Mon Sep 17 00:00:00 2001 From: Hlavtox Date: Thu, 24 Mar 2022 13:59:22 +0100 Subject: [PATCH 041/128] Add category additional description column during upgrade --- upgrade/sql/8.0.0.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index 2904cabe2..672d4612a 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -33,6 +33,8 @@ ALTER TABLE `PREFIX_customer_session` ADD `date_add` DATETIME NOT NULL AFTER `da ALTER TABLE `PREFIX_carrier` DROP COLUMN `id_tax_rules_group`; +ALTER TABLE `PREFIX_category_lang` ADD `additional_description` text AFTER `description`; + ALTER TABLE `PREFIX_product` MODIFY COLUMN `redirect_type` ENUM( '404', '410', '301-product', '302-product', '301-category', '302-category' ) NOT NULL DEFAULT '404'; From 8132cdf63804341b837315dce0508a347c2382d1 Mon Sep 17 00:00:00 2001 From: Daniel Hlavacek Date: Thu, 3 Feb 2022 10:48:34 +0100 Subject: [PATCH 042/128] Add displayCheckoutBeforeConfirmation hook --- upgrade/sql/8.0.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index 2904cabe2..6a2bd03e3 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -24,6 +24,7 @@ INSERT IGNORE INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `po (NULL, 'actionCustomerLogoutBefore', 'Before customer logout', 'This hook allows you to execute code before customer logout', '1'), (NULL, 'actionCustomerLogoutAfter', 'After customer logout', 'This hook allows you to execute code after customer logout', '1'), (NULL, 'displayCheckoutSummaryTop', 'Cart summary top', 'This hook allows you to display new elements in top of cart summary', '1') + (NULL, 'displayCheckoutBeforeConfirmation', 'Show custom content before checkout confirmation', 'This hook allows you to display custom content at the end of checkout process', '1') ; ALTER TABLE `PREFIX_employee_session` ADD `date_upd` DATETIME NOT NULL AFTER `token`; From ef8febf962fe04afc649462322464c1a29acbdb6 Mon Sep 17 00:00:00 2001 From: boubkerbribri Date: Fri, 25 Mar 2022 12:22:40 +0100 Subject: [PATCH 043/128] Fix setup GCP on workflows to push results on nightly --- .github/workflows/e2e_nightly_upgrade.yml | 2 +- .github/workflows/nigthly_upgrade.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e_nightly_upgrade.yml b/.github/workflows/e2e_nightly_upgrade.yml index 39dd96159..54eceeb69 100755 --- a/.github/workflows/e2e_nightly_upgrade.yml +++ b/.github/workflows/e2e_nightly_upgrade.yml @@ -213,7 +213,7 @@ jobs: name: combined-report-${{ matrix.ps_target_version.branch }} path: ${{ env.reports_directory }} - - uses: google-github-actions/setup-gcloud@master + - uses: google-github-actions/setup-gcloud@v0 name: Setup Cloud Sdk with: project_id: ${{ secrets.GC_PROJECT_ID }} diff --git a/.github/workflows/nigthly_upgrade.yml b/.github/workflows/nigthly_upgrade.yml index eb270e705..7f40d9989 100644 --- a/.github/workflows/nigthly_upgrade.yml +++ b/.github/workflows/nigthly_upgrade.yml @@ -82,7 +82,7 @@ jobs: - name: Format results run: php ./.github/get_results.php ${{matrix.ps-versions.branch}} - name: Set up Cloud SDK - uses: google-github-actions/setup-gcloud@master + uses: google-github-actions/setup-gcloud@v0 with: project_id: ${{ secrets.GC_PROJECT_ID }} service_account_key: ${{ secrets.GC_SERVICE_KEY }} From 6668ce7c3b2ca91dd68a929ee7510a3455bbb09c Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Fri, 7 Jan 2022 17:02:43 +0100 Subject: [PATCH 044/128] add maintenance configuration link --- classes/Twig/Block/UpgradeChecklist.php | 2 ++ views/templates/block/checklist.twig | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/classes/Twig/Block/UpgradeChecklist.php b/classes/Twig/Block/UpgradeChecklist.php index be045b589..3673a7a2d 100644 --- a/classes/Twig/Block/UpgradeChecklist.php +++ b/classes/Twig/Block/UpgradeChecklist.php @@ -138,6 +138,8 @@ public function render() 'checkPhpSessions' => $this->selfCheck->isPhpSessionsValid(), 'missingFiles' => $this->selfCheck->getMissingFiles(), 'notWritingDirectories' => $this->selfCheck->getNotWritingDirectories(), + 'isPrestaShopReady' => $this->selfCheck->isPrestaShopReady(), + 'maintenanceAdminLink' => Context::getContext()->link->getAdminLink('AdminMaintenance'), ]; return $this->twig->render('@ModuleAutoUpgrade/block/checklist.twig', $data); diff --git a/views/templates/block/checklist.twig b/views/templates/block/checklist.twig index 498f90efe..ff031c3d0 100644 --- a/views/templates/block/checklist.twig +++ b/views/templates/block/checklist.twig @@ -90,10 +90,14 @@
- {{ 'Enable the maintenance mode and add your maintenance IP in [1]Shop parameters > General > Maintenance[/1]'|trans({ - '[1]': '', - '[/1]': '', - })|raw }} + {% if storeIsInMaintenance %} + {{ 'Your store is in maintenance mode'|trans }} + {% else %} + {{ 'Enable maintenance mode and add your maintenance IP in [1]Shop parameters > General > Maintenance[/1]'|trans({ + '[1]' : '', + '[/1]' : '', + })|raw }} + {% endif %} {% if storeIsInMaintenance %} From a90f8f368e7f3b8ebd37aef94309fbea19c6a1f4 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Fri, 7 Jan 2022 17:04:24 +0100 Subject: [PATCH 045/128] check that all stores are enabled and have a maintenance IP --- classes/UpgradeSelfCheck.php | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/classes/UpgradeSelfCheck.php b/classes/UpgradeSelfCheck.php index 6d9bd3522..1cae11142 100644 --- a/classes/UpgradeSelfCheck.php +++ b/classes/UpgradeSelfCheck.php @@ -29,6 +29,7 @@ use Configuration; use ConfigurationTest; +use Shop; class UpgradeSelfCheck { @@ -414,9 +415,28 @@ private function checkOverrideIsDisabled() */ private function checkShopIsDeactivated() { - return - !Configuration::get('PS_SHOP_ENABLE') - || (isset($_SERVER['HTTP_HOST']) && in_array($_SERVER['HTTP_HOST'], ['127.0.0.1', 'localhost', '[::1]'])); + // always return true in localhost + if (isset($_SERVER['HTTP_HOST']) && in_array($_SERVER['HTTP_HOST'], ['127.0.0.1', 'localhost', '[::1]'])) { + return true; + } + + // if multistore is not active, just check if shop is enabled and has a maintenance IP + if (!Shop::isFeatureActive()) { + return !(Configuration::get('PS_SHOP_ENABLE') && Configuration::get('PS_MAINTENANCE_IP')); + } + + // multistore is active: all shops must be deactivated and have a maintenance IP, otherwise return false + foreach (Shop::getCompleteListOfShopsID() as $shopId) { + $shop = new Shop((int) $shopId); + $isEnabled = Configuration::get('PS_SHOP_ENABLE', null, (int) $shop->getGroup()->id, (int) $shopId); + $maintenanceIp = Configuration::get('PS_MAINTENANCE_IP', null, (int) $shop->getGroup()->id, (int) $shopId); + + if ($isEnabled || !$maintenanceIp) { + return false; + } + } + + return true; } /** From ed22134f2607ae46ba42faab29139cce52c00b40 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Mon, 10 Jan 2022 09:54:27 +0100 Subject: [PATCH 046/128] code improvement --- classes/UpgradeSelfCheck.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/classes/UpgradeSelfCheck.php b/classes/UpgradeSelfCheck.php index 1cae11142..58b9ebaba 100644 --- a/classes/UpgradeSelfCheck.php +++ b/classes/UpgradeSelfCheck.php @@ -428,8 +428,9 @@ private function checkShopIsDeactivated() // multistore is active: all shops must be deactivated and have a maintenance IP, otherwise return false foreach (Shop::getCompleteListOfShopsID() as $shopId) { $shop = new Shop((int) $shopId); - $isEnabled = Configuration::get('PS_SHOP_ENABLE', null, (int) $shop->getGroup()->id, (int) $shopId); - $maintenanceIp = Configuration::get('PS_MAINTENANCE_IP', null, (int) $shop->getGroup()->id, (int) $shopId); + $groupId = (int) $shop->getGroup()->id; + $isEnabled = Configuration::get('PS_SHOP_ENABLE', null, $groupId, (int) $shopId); + $maintenanceIp = Configuration::get('PS_MAINTENANCE_IP', null, $groupId, (int) $shopId); if ($isEnabled || !$maintenanceIp) { return false; From f3d1dab61ddf00a8b542342bafd0418474496488 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Mon, 28 Feb 2022 17:35:34 +0100 Subject: [PATCH 047/128] add remote addr method for localhost detection --- classes/UpgradeSelfCheck.php | 42 +++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/classes/UpgradeSelfCheck.php b/classes/UpgradeSelfCheck.php index 58b9ebaba..131853374 100644 --- a/classes/UpgradeSelfCheck.php +++ b/classes/UpgradeSelfCheck.php @@ -416,7 +416,7 @@ private function checkOverrideIsDisabled() private function checkShopIsDeactivated() { // always return true in localhost - if (isset($_SERVER['HTTP_HOST']) && in_array($_SERVER['HTTP_HOST'], ['127.0.0.1', 'localhost', '[::1]'])) { + if (in_array($this->getRemoteAddr(), ['127.0.0.1', 'localhost', '[::1]', '::1'])) { return true; } @@ -601,10 +601,10 @@ public function getNotWritingDirectories() $directories = []; foreach ([ - 'cache_dir', 'log_dir', 'img_dir', 'module_dir', 'theme_lang_dir', 'theme_pdf_lang_dir', 'theme_cache_dir', - 'translations_dir', 'customizable_products_dir', 'virtual_products_dir', 'config_sf2_dir', 'config_dir', - 'mails_dir', 'translations_sf2', - ] as $testKey) { + 'cache_dir', 'log_dir', 'img_dir', 'module_dir', 'theme_lang_dir', 'theme_pdf_lang_dir', 'theme_cache_dir', + 'translations_dir', 'customizable_products_dir', 'virtual_products_dir', 'config_sf2_dir', 'config_dir', + 'mails_dir', 'translations_sf2', + ] as $testKey) { if (isset($tests[$testKey]) && !ConfigurationTest::{'test_' . $testKey}($tests[$testKey])) { $directories[] = $tests[$testKey]; } @@ -612,4 +612,36 @@ public function getNotWritingDirectories() return $directories; } + + /** + * Get the server variable REMOTE_ADDR, or the first ip of HTTP_X_FORWARDED_FOR (when using proxy). + * + * @return string $remote_addr ip of client + */ + private function getRemoteAddr() + { + if (function_exists('apache_request_headers')) { + $headers = apache_request_headers(); + } else { + $headers = $_SERVER; + } + + if (array_key_exists('X-Forwarded-For', $headers)) { + $_SERVER['HTTP_X_FORWARDED_FOR'] = $headers['X-Forwarded-For']; + } + + if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] && (!isset($_SERVER['REMOTE_ADDR']) + || preg_match('/^127\..*/i', trim($_SERVER['REMOTE_ADDR'])) || preg_match('/^172\.(1[6-9]|2\d|30|31)\..*/i', trim($_SERVER['REMOTE_ADDR'])) + || preg_match('/^192\.168\.*/i', trim($_SERVER['REMOTE_ADDR'])) || preg_match('/^10\..*/i', trim($_SERVER['REMOTE_ADDR'])))) { + if (strpos($_SERVER['HTTP_X_FORWARDED_FOR'], ',')) { + $ips = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); + + return $ips[0]; + } else { + return $_SERVER['HTTP_X_FORWARDED_FOR']; + } + } else { + return $_SERVER['REMOTE_ADDR']; + } + } } From 404770164fc5699e66cc5d563bae01abb944b4c2 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Mon, 28 Feb 2022 17:45:25 +0100 Subject: [PATCH 048/128] cs fixer --- classes/UpgradeSelfCheck.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/classes/UpgradeSelfCheck.php b/classes/UpgradeSelfCheck.php index 131853374..3c0b09bd1 100644 --- a/classes/UpgradeSelfCheck.php +++ b/classes/UpgradeSelfCheck.php @@ -422,7 +422,7 @@ private function checkShopIsDeactivated() // if multistore is not active, just check if shop is enabled and has a maintenance IP if (!Shop::isFeatureActive()) { - return !(Configuration::get('PS_SHOP_ENABLE') && Configuration::get('PS_MAINTENANCE_IP')); + return !(Configuration::get('PS_SHOP_ENABLE') && Configuration::get('PS_MAINTENANCE_IP')); } // multistore is active: all shops must be deactivated and have a maintenance IP, otherwise return false From 49748f59fc1444ae6ab3d418c47a80f514058318 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Fri, 25 Mar 2022 12:32:40 +0100 Subject: [PATCH 049/128] remove duplicate admin maintenance link assignment --- classes/Twig/Block/UpgradeChecklist.php | 1 - classes/UpgradeSelfCheck.php | 8 ++++---- views/templates/block/checklist.twig | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/classes/Twig/Block/UpgradeChecklist.php b/classes/Twig/Block/UpgradeChecklist.php index 3673a7a2d..0b465d762 100644 --- a/classes/Twig/Block/UpgradeChecklist.php +++ b/classes/Twig/Block/UpgradeChecklist.php @@ -139,7 +139,6 @@ public function render() 'missingFiles' => $this->selfCheck->getMissingFiles(), 'notWritingDirectories' => $this->selfCheck->getNotWritingDirectories(), 'isPrestaShopReady' => $this->selfCheck->isPrestaShopReady(), - 'maintenanceAdminLink' => Context::getContext()->link->getAdminLink('AdminMaintenance'), ]; return $this->twig->render('@ModuleAutoUpgrade/block/checklist.twig', $data); diff --git a/classes/UpgradeSelfCheck.php b/classes/UpgradeSelfCheck.php index 3c0b09bd1..e6de26a9e 100644 --- a/classes/UpgradeSelfCheck.php +++ b/classes/UpgradeSelfCheck.php @@ -601,10 +601,10 @@ public function getNotWritingDirectories() $directories = []; foreach ([ - 'cache_dir', 'log_dir', 'img_dir', 'module_dir', 'theme_lang_dir', 'theme_pdf_lang_dir', 'theme_cache_dir', - 'translations_dir', 'customizable_products_dir', 'virtual_products_dir', 'config_sf2_dir', 'config_dir', - 'mails_dir', 'translations_sf2', - ] as $testKey) { + 'cache_dir', 'log_dir', 'img_dir', 'module_dir', 'theme_lang_dir', 'theme_pdf_lang_dir', 'theme_cache_dir', + 'translations_dir', 'customizable_products_dir', 'virtual_products_dir', 'config_sf2_dir', 'config_dir', + 'mails_dir', 'translations_sf2', + ] as $testKey) { if (isset($tests[$testKey]) && !ConfigurationTest::{'test_' . $testKey}($tests[$testKey])) { $directories[] = $tests[$testKey]; } diff --git a/views/templates/block/checklist.twig b/views/templates/block/checklist.twig index ff031c3d0..f59e70eea 100644 --- a/views/templates/block/checklist.twig +++ b/views/templates/block/checklist.twig @@ -94,7 +94,7 @@ {{ 'Your store is in maintenance mode'|trans }} {% else %} {{ 'Enable maintenance mode and add your maintenance IP in [1]Shop parameters > General > Maintenance[/1]'|trans({ - '[1]' : '', + '[1]' : '', '[/1]' : '', })|raw }} {% endif %} From 171af62e820022c33bb2528aa2f26bc073d39fbf Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Fri, 25 Mar 2022 12:45:14 +0100 Subject: [PATCH 050/128] remove unused assignment --- classes/Twig/Block/UpgradeChecklist.php | 1 - 1 file changed, 1 deletion(-) diff --git a/classes/Twig/Block/UpgradeChecklist.php b/classes/Twig/Block/UpgradeChecklist.php index 0b465d762..be045b589 100644 --- a/classes/Twig/Block/UpgradeChecklist.php +++ b/classes/Twig/Block/UpgradeChecklist.php @@ -138,7 +138,6 @@ public function render() 'checkPhpSessions' => $this->selfCheck->isPhpSessionsValid(), 'missingFiles' => $this->selfCheck->getMissingFiles(), 'notWritingDirectories' => $this->selfCheck->getNotWritingDirectories(), - 'isPrestaShopReady' => $this->selfCheck->isPrestaShopReady(), ]; return $this->twig->render('@ModuleAutoUpgrade/block/checklist.twig', $data); From 8c649e4442fce0c5e2a9d493c5de931f0b05b371 Mon Sep 17 00:00:00 2001 From: Thomas BACCELLI Date: Fri, 25 Mar 2022 17:16:02 +0100 Subject: [PATCH 051/128] Check that test_* functions exist before calling them --- classes/UpgradeSelfCheck.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/classes/UpgradeSelfCheck.php b/classes/UpgradeSelfCheck.php index e6de26a9e..b3babe2e7 100644 --- a/classes/UpgradeSelfCheck.php +++ b/classes/UpgradeSelfCheck.php @@ -422,7 +422,7 @@ private function checkShopIsDeactivated() // if multistore is not active, just check if shop is enabled and has a maintenance IP if (!Shop::isFeatureActive()) { - return !(Configuration::get('PS_SHOP_ENABLE') && Configuration::get('PS_MAINTENANCE_IP')); + return !(Configuration::get('PS_SHOP_ENABLE') || !Configuration::get('PS_MAINTENANCE_IP')); } // multistore is active: all shops must be deactivated and have a maintenance IP, otherwise return false @@ -515,7 +515,8 @@ public function getNotLoadedPhpExtensions() foreach ([ 'curl', 'dom', 'fileinfo', 'gd', 'intl', 'json', 'mbstring', 'openssl', 'pdo_mysql', 'simplexml', 'zip', ] as $extension) { - if (!ConfigurationTest::{'test_' . $extension}()) { + $method = 'test_' . $extension; + if (method_exists(ConfigurationTest::class, $method) && !ConfigurationTest::$method()) { $extensions[] = $extension; } } From 58f3e9446c6cb3250c7576d923c8be1dbcec727f Mon Sep 17 00:00:00 2001 From: Thomas BACCELLI Date: Fri, 25 Mar 2022 17:16:39 +0100 Subject: [PATCH 052/128] Checklist is now 8 items long, not 10 --- tests/e2e/scenarios/02_upgrade.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/scenarios/02_upgrade.js b/tests/e2e/scenarios/02_upgrade.js index 02525fbf7..5194383a3 100755 --- a/tests/e2e/scenarios/02_upgrade.js +++ b/tests/e2e/scenarios/02_upgrade.js @@ -108,10 +108,10 @@ describe(`[${global.AUTOUPGRADE_VERSION}] Upgrade PrestaShop from '${global.PS_V await expect(textResult).to.contain(upgradeModulePage.configResultValidationMessage); }); - it('should put the shop under maintenance and check if the checklist is all green', async () => { + it('Check if the checklist is all green', async () => { await upgradeModulePage.putShopUnderMaintenance(page); - for (let i = 1; i <= 10; i++) { + for (let i = 1; i <= 8; i++) { const textResult = await upgradeModulePage.getRowImageContent(page, i); await expect(textResult).to.equal('ok'); } From ff946540ed1ebba41e4d9af97f617d9f47d61f56 Mon Sep 17 00:00:00 2001 From: boubkerbribri Date: Tue, 5 Apr 2022 10:00:28 +0200 Subject: [PATCH 053/128] Add steps to disable shop before upgrade --- tests/e2e/.gitignore | 1 + tests/e2e/configClassMap.js | 18 ++++++++++ tests/e2e/globals.js | 2 +- .../pages/BO/shopParameters/general/index.js | 31 ++++++++++++++++ .../general/maintenance/index.js | 36 +++++++++++++++++++ tests/e2e/scenarios/02_upgrade.js | 27 ++++++++++++-- 6 files changed, 111 insertions(+), 4 deletions(-) create mode 100644 tests/e2e/pages/BO/shopParameters/general/index.js create mode 100644 tests/e2e/pages/BO/shopParameters/general/maintenance/index.js diff --git a/tests/e2e/.gitignore b/tests/e2e/.gitignore index ce94cb512..6274e6aa7 100644 --- a/tests/e2e/.gitignore +++ b/tests/e2e/.gitignore @@ -1,3 +1,4 @@ node_modules */node_modules +mochawesome-report .idea diff --git a/tests/e2e/configClassMap.js b/tests/e2e/configClassMap.js index 607332755..ddce9d786 100755 --- a/tests/e2e/configClassMap.js +++ b/tests/e2e/configClassMap.js @@ -12,4 +12,22 @@ module.exports = [ '1.7.7': `${basePath}/pages/BO/modules/autoupgrade/index.js`, }, }, + { + file: 'BO/shopParameters/general/index.js', + versions: { + '1.7.4': `${basePath}/pages/BO/shopParameters/general/index.js`, + '1.7.5': `${basePath}/pages/BO/shopParameters/general/index.js`, + '1.7.6': `${basePath}/pages/BO/shopParameters/general/index.js`, + '1.7.7': `${basePath}/pages/BO/shopParameters/general/index.js`, + }, + }, + { + file: 'BO/shopParameters/general/maintenance/index.js', + versions: { + '1.7.4': `${basePath}/pages/BO/shopParameters/general/maintenance/index.js`, + '1.7.5': `${basePath}/pages/BO/shopParameters/general/maintenance/index.js`, + '1.7.6': `${basePath}/pages/BO/shopParameters/general/maintenance/index.js`, + '1.7.7': `${basePath}/pages/BO/shopParameters/general/maintenance/index.js`, + }, + }, ]; diff --git a/tests/e2e/globals.js b/tests/e2e/globals.js index 5a285d888..4a7afacfc 100755 --- a/tests/e2e/globals.js +++ b/tests/e2e/globals.js @@ -1,5 +1,5 @@ global.PS_VERSION_UPGRADE_FROM = global.PS_VERSION; -global.PS_VERSION_UPGRADE_TO = process.env.PS_VERSION_UPGRADE_TO || '1.7.8'; +global.PS_VERSION_UPGRADE_TO = process.env.PS_VERSION_UPGRADE_TO || '1.7.8.5'; global.PS_RESOLVER_VERSION = { FROM: global.PS_VERSION.substr(0, global.PS_VERSION.lastIndexOf('.')), TO: global.PS_VERSION_UPGRADE_TO.substr(0, global.PS_VERSION_UPGRADE_TO.lastIndexOf('.')), diff --git a/tests/e2e/pages/BO/shopParameters/general/index.js b/tests/e2e/pages/BO/shopParameters/general/index.js new file mode 100644 index 000000000..34c43f68b --- /dev/null +++ b/tests/e2e/pages/BO/shopParameters/general/index.js @@ -0,0 +1,31 @@ +// Get resolver +const VersionSelectResolver = require('prestashop_test_lib/kernel/resolvers/versionSelectResolver'); + +const configClassMap = require('@root/configClassMap.js'); + +const versionSelectResolver = new VersionSelectResolver(global.PS_RESOLVER_VERSION.FROM, configClassMap); + +// Import BOBasePage +const BoBasePage = versionSelectResolver.require('BO/BObasePage.js'); + +class General extends BoBasePage { + constructor() { + super(); + + this.pageTitle = 'Preferences'; + + this.maintenanceSubTabLink = '#subtab-AdminMaintenance'; + } + + // Methods + /** + * Go to maintenance tab + * @param page {Page} Browser tab + * @returns {Promise} + */ + async goToMaintenanceTab(page) { + await this.clickAndWaitForNavigation(page, this.maintenanceSubTabLink); + } +} + +module.exports = new General(); diff --git a/tests/e2e/pages/BO/shopParameters/general/maintenance/index.js b/tests/e2e/pages/BO/shopParameters/general/maintenance/index.js new file mode 100644 index 000000000..3e51c005a --- /dev/null +++ b/tests/e2e/pages/BO/shopParameters/general/maintenance/index.js @@ -0,0 +1,36 @@ +// Get resolver +const VersionSelectResolver = require('prestashop_test_lib/kernel/resolvers/versionSelectResolver'); + +const configClassMap = require('@root/configClassMap.js'); + +const versionSelectResolver = new VersionSelectResolver(global.PS_RESOLVER_VERSION.FROM, configClassMap); + +// Import BOBasePage +const BoBasePage = versionSelectResolver.require('BO/BObasePage.js'); + +class Maintenance extends BoBasePage { + constructor() { + super(); + + this.pageTitle = 'Maintenance'; + this.storeStatusRadio = status => `#form_general_enable_shop_${status}, #form_enable_shop_${status}`; + this.saveButton = '.card-footer button'; + } + + // Methods + + /** + * Set shop status + * @param page {Page} Browser tab + * @param status {boolean} Status for the shop + * @returns {Promise} + */ + async setShopStatus(page, status = true) { + // eslint-disable-next-line no-return-assign,no-param-reassign + await page.$eval(this.storeStatusRadio(status ? '1' : '0'), el => el.checked = true); + await this.clickAndWaitForNavigation(page, this.saveButton); + await page.screenshot({path: 'page.png', fullPage: true}); + } +} + +module.exports = new Maintenance(); diff --git a/tests/e2e/scenarios/02_upgrade.js b/tests/e2e/scenarios/02_upgrade.js index 5194383a3..1a9808ae2 100755 --- a/tests/e2e/scenarios/02_upgrade.js +++ b/tests/e2e/scenarios/02_upgrade.js @@ -15,6 +15,8 @@ const newVersionSelectResolver = new VersionSelectResolver(global.PS_RESOLVER_VE // Import pages const loginPage = versionSelectResolver.require('BO/login/index.js'); const dashboardPage = versionSelectResolver.require('BO/dashboard/index.js'); +const shopParamGeneralPage = versionSelectResolver.require('BO/shopParameters/general/index.js'); +const shopParamMaintenancePage = versionSelectResolver.require('BO/shopParameters/general/maintenance/index.js'); const moduleManagerPage = versionSelectResolver.require('BO/modules/moduleManager/index.js'); const upgradeModulePage = versionSelectResolver.require('BO/modules/autoupgrade/index.js'); const newLoginPage = newVersionSelectResolver.require('BO/login/index.js'); @@ -78,11 +80,30 @@ describe(`[${global.AUTOUPGRADE_VERSION}] Upgrade PrestaShop from '${global.PS_V await expect(pageTitle).to.contains(dashboardPage.pageTitle); }); - it('should go to modules manager page', async () => { + it('should go to shop parameter page', async () => { await dashboardPage.goToSubMenu( page, - dashboardPage.modulesParentLink, - dashboardPage.moduleManagerLink, + dashboardPage.shopParametersParentLink, + dashboardPage.shopParametersGeneralLink, + ); + + const pageTitle = await shopParamGeneralPage.getPageTitle(page); + await expect(pageTitle).to.contains(shopParamGeneralPage.pageTitle); + }); + + it('should go to maintenance page and disable the shop', async () => { + await shopParamGeneralPage.goToMaintenanceTab(page); + + const pageTitle = await shopParamMaintenancePage.getPageTitle(page); + await expect(pageTitle).to.contains(shopParamMaintenancePage.pageTitle); + await shopParamMaintenancePage.setShopStatus(page, false); + }); + + it('should go to modules manager page', async () => { + await shopParamMaintenancePage.goToSubMenu( + page, + shopParamMaintenancePage.modulesParentLink, + shopParamMaintenancePage.moduleManagerLink, ); const pageTitle = await moduleManagerPage.getPageTitle(page); From 3737af87f7650a1b0278ecb2bd5001857055b45c Mon Sep 17 00:00:00 2001 From: boubkerbribri Date: Tue, 5 Apr 2022 10:01:37 +0200 Subject: [PATCH 054/128] Run on push --- .github/workflows/e2e_nightly_upgrade.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/e2e_nightly_upgrade.yml b/.github/workflows/e2e_nightly_upgrade.yml index 54eceeb69..454201dff 100755 --- a/.github/workflows/e2e_nightly_upgrade.yml +++ b/.github/workflows/e2e_nightly_upgrade.yml @@ -1,6 +1,7 @@ name: Nightly upgrades with user inferfaces on: + push: schedule: - cron: "0 6 * * *" # Every day at 06:00Am From 9066aa505cad66d201ba5322d7dcffce859c0f40 Mon Sep 17 00:00:00 2001 From: boubkerbribri Date: Tue, 5 Apr 2022 10:26:56 +0200 Subject: [PATCH 055/128] Add my ip --- .../BO/shopParameters/general/maintenance/index.js | 12 +++++++++++- tests/e2e/scenarios/02_upgrade.js | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/e2e/pages/BO/shopParameters/general/maintenance/index.js b/tests/e2e/pages/BO/shopParameters/general/maintenance/index.js index 3e51c005a..6f7302648 100644 --- a/tests/e2e/pages/BO/shopParameters/general/maintenance/index.js +++ b/tests/e2e/pages/BO/shopParameters/general/maintenance/index.js @@ -14,6 +14,7 @@ class Maintenance extends BoBasePage { this.pageTitle = 'Maintenance'; this.storeStatusRadio = status => `#form_general_enable_shop_${status}, #form_enable_shop_${status}`; + this.addIpButton = '.add_ip_button'; this.saveButton = '.card-footer button'; } @@ -29,7 +30,16 @@ class Maintenance extends BoBasePage { // eslint-disable-next-line no-return-assign,no-param-reassign await page.$eval(this.storeStatusRadio(status ? '1' : '0'), el => el.checked = true); await this.clickAndWaitForNavigation(page, this.saveButton); - await page.screenshot({path: 'page.png', fullPage: true}); + } + + /** + * Add my ip to shop + * @param page {Page} Browser tab + * @returns {Promise} + */ + async addMyIp(page) { + await page.click(this.addIpButton); + await this.clickAndWaitForNavigation(page, this.saveButton); } } diff --git a/tests/e2e/scenarios/02_upgrade.js b/tests/e2e/scenarios/02_upgrade.js index 1a9808ae2..b0d8936d4 100755 --- a/tests/e2e/scenarios/02_upgrade.js +++ b/tests/e2e/scenarios/02_upgrade.js @@ -97,6 +97,7 @@ describe(`[${global.AUTOUPGRADE_VERSION}] Upgrade PrestaShop from '${global.PS_V const pageTitle = await shopParamMaintenancePage.getPageTitle(page); await expect(pageTitle).to.contains(shopParamMaintenancePage.pageTitle); await shopParamMaintenancePage.setShopStatus(page, false); + await shopParamMaintenancePage.addMyIp(page); }); it('should go to modules manager page', async () => { From 2a5a46c1a9b4b179fdaf69c9b5dede8f691650a3 Mon Sep 17 00:00:00 2001 From: boubkerbribri Date: Tue, 5 Apr 2022 11:29:02 +0200 Subject: [PATCH 056/128] Delete run on push --- .github/workflows/e2e_nightly_upgrade.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/e2e_nightly_upgrade.yml b/.github/workflows/e2e_nightly_upgrade.yml index 454201dff..54eceeb69 100755 --- a/.github/workflows/e2e_nightly_upgrade.yml +++ b/.github/workflows/e2e_nightly_upgrade.yml @@ -1,7 +1,6 @@ name: Nightly upgrades with user inferfaces on: - push: schedule: - cron: "0 6 * * *" # Every day at 06:00Am From 4103546d158d2e672b54cadbef139338876b92dc Mon Sep 17 00:00:00 2001 From: Daniel Hlavacek Date: Tue, 5 Apr 2022 17:33:50 +0200 Subject: [PATCH 057/128] Update upgrade/sql/8.0.0.sql Co-authored-by: Krystian Podemski --- upgrade/sql/8.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index 6a2bd03e3..7a4e9ef7b 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -23,7 +23,7 @@ INSERT IGNORE INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `po (NULL, 'actionPresentPaymentOptions', 'Payment options Presenter', 'This hook is called before payment options are presented', '1'), (NULL, 'actionCustomerLogoutBefore', 'Before customer logout', 'This hook allows you to execute code before customer logout', '1'), (NULL, 'actionCustomerLogoutAfter', 'After customer logout', 'This hook allows you to execute code after customer logout', '1'), - (NULL, 'displayCheckoutSummaryTop', 'Cart summary top', 'This hook allows you to display new elements in top of cart summary', '1') + (NULL, 'displayCheckoutSummaryTop', 'Cart summary top', 'This hook allows you to display new elements in top of cart summary', '1'), (NULL, 'displayCheckoutBeforeConfirmation', 'Show custom content before checkout confirmation', 'This hook allows you to display custom content at the end of checkout process', '1') ; From 4dc9bf0aca2e4c730c0cb817829cf54eb81dde47 Mon Sep 17 00:00:00 2001 From: Krystian Podemski Date: Sat, 9 Apr 2022 19:15:07 +0200 Subject: [PATCH 058/128] State field will be longer from 1.7.8.6, not .4 --- upgrade/sql/{1.7.8.4.sql => 1.7.8.6.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename upgrade/sql/{1.7.8.4.sql => 1.7.8.6.sql} (100%) diff --git a/upgrade/sql/1.7.8.4.sql b/upgrade/sql/1.7.8.6.sql similarity index 100% rename from upgrade/sql/1.7.8.4.sql rename to upgrade/sql/1.7.8.6.sql From 6166f5b3f38fbcd946be04d1ca76dcc50215c41b Mon Sep 17 00:00:00 2001 From: Ibrahima SOW Date: Tue, 22 Feb 2022 17:08:06 +0000 Subject: [PATCH 059/128] Add hooks displayAdminThemesListAfter and displayModuleConfigureExtraButtons for 8.0.0 --- upgrade/sql/8.0.0.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index a688de915..cda86eb5c 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -24,7 +24,10 @@ INSERT IGNORE INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `po (NULL, 'actionCustomerLogoutBefore', 'Before customer logout', 'This hook allows you to execute code before customer logout', '1'), (NULL, 'actionCustomerLogoutAfter', 'After customer logout', 'This hook allows you to execute code after customer logout', '1'), (NULL, 'displayCheckoutSummaryTop', 'Cart summary top', 'This hook allows you to display new elements in top of cart summary', '1'), - (NULL, 'displayCheckoutBeforeConfirmation', 'Show custom content before checkout confirmation', 'This hook allows you to display custom content at the end of checkout process', '1') + (NULL, 'displayCheckoutBeforeConfirmation', 'Show custom content before checkout confirmation', 'This hook allows you to display custom content at the end of checkout process', '1'), + (NULL, 'displayCheckoutSummaryTop', 'Cart summary top', 'This hook allows you to display new elements in top of cart summary', '1'), + (NULL, 'displayAdminThemesListAfter', 'BO themes list extra content', 'This hook displays content after the themes list in the BackOffice', '1'), + (NULL, 'displayModuleConfigureExtraButtons', 'Module configuration - After toolbar buttons', 'This hook allows to add toolbar''s additional content on module configuration page', '1') ; ALTER TABLE `PREFIX_employee_session` ADD `date_upd` DATETIME NOT NULL AFTER `token`; From 94999d4e7198d5c0ee19b5701e19a966eda819a1 Mon Sep 17 00:00:00 2001 From: Ibrahima SOW Date: Wed, 9 Mar 2022 16:23:47 +0000 Subject: [PATCH 060/128] fix SQL for 8.0 --- upgrade/sql/8.0.0.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index cda86eb5c..54e9cb181 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -23,7 +23,6 @@ INSERT IGNORE INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `po (NULL, 'actionPresentPaymentOptions', 'Payment options Presenter', 'This hook is called before payment options are presented', '1'), (NULL, 'actionCustomerLogoutBefore', 'Before customer logout', 'This hook allows you to execute code before customer logout', '1'), (NULL, 'actionCustomerLogoutAfter', 'After customer logout', 'This hook allows you to execute code after customer logout', '1'), - (NULL, 'displayCheckoutSummaryTop', 'Cart summary top', 'This hook allows you to display new elements in top of cart summary', '1'), (NULL, 'displayCheckoutBeforeConfirmation', 'Show custom content before checkout confirmation', 'This hook allows you to display custom content at the end of checkout process', '1'), (NULL, 'displayCheckoutSummaryTop', 'Cart summary top', 'This hook allows you to display new elements in top of cart summary', '1'), (NULL, 'displayAdminThemesListAfter', 'BO themes list extra content', 'This hook displays content after the themes list in the BackOffice', '1'), From f79c2d782ecfa407cc13294186fc1bf23e03babb Mon Sep 17 00:00:00 2001 From: Ibrahima SOW Date: Tue, 12 Apr 2022 09:45:42 +0000 Subject: [PATCH 061/128] Update upgrade/sql/8.0.0.sql Co-authored-by: PululuK --- upgrade/sql/8.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index 54e9cb181..c8330766b 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -25,7 +25,7 @@ INSERT IGNORE INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `po (NULL, 'actionCustomerLogoutAfter', 'After customer logout', 'This hook allows you to execute code after customer logout', '1'), (NULL, 'displayCheckoutBeforeConfirmation', 'Show custom content before checkout confirmation', 'This hook allows you to display custom content at the end of checkout process', '1'), (NULL, 'displayCheckoutSummaryTop', 'Cart summary top', 'This hook allows you to display new elements in top of cart summary', '1'), - (NULL, 'displayAdminThemesListAfter', 'BO themes list extra content', 'This hook displays content after the themes list in the BackOffice', '1'), + (NULL, 'displayAdminThemesListAfter', 'BO themes list extra content', 'This hook displays content after the themes list in the back office', '1'), (NULL, 'displayModuleConfigureExtraButtons', 'Module configuration - After toolbar buttons', 'This hook allows to add toolbar''s additional content on module configuration page', '1') ; From f25293f0ee0904fa8272ade666e864390706afc8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Apr 2022 02:08:15 +0000 Subject: [PATCH 062/128] Bump minimist from 1.2.5 to 1.2.6 in /tests/e2e Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6. - [Release notes](https://github.com/substack/minimist/releases) - [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6) --- updated-dependencies: - dependency-name: minimist dependency-type: indirect ... Signed-off-by: dependabot[bot] --- tests/e2e/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/package-lock.json b/tests/e2e/package-lock.json index a25184041..a3a25975b 100644 --- a/tests/e2e/package-lock.json +++ b/tests/e2e/package-lock.json @@ -1645,9 +1645,9 @@ } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, "mkdirp": { From 538ddadfbdf9e408ef53eae06e10ebd8d4717fab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Apr 2022 07:53:45 +0000 Subject: [PATCH 063/128] Bump ansi-regex from 3.0.0 to 3.0.1 in /tests/e2e Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1. - [Release notes](https://github.com/chalk/ansi-regex/releases) - [Commits](https://github.com/chalk/ansi-regex/compare/v3.0.0...v3.0.1) --- updated-dependencies: - dependency-name: ansi-regex dependency-type: indirect ... Signed-off-by: dependabot[bot] --- tests/e2e/package-lock.json | 48 ++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/tests/e2e/package-lock.json b/tests/e2e/package-lock.json index a3a25975b..c0dc5bdcb 100644 --- a/tests/e2e/package-lock.json +++ b/tests/e2e/package-lock.json @@ -243,9 +243,9 @@ "dev": true }, "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", + "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==" }, "ansi-styles": { "version": "4.3.0", @@ -461,9 +461,9 @@ }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==" }, "string-width": { "version": "3.1.0", @@ -1317,9 +1317,9 @@ }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true }, "ansi-styles": { @@ -1719,9 +1719,9 @@ }, "dependencies": { "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" }, "diff": { "version": "5.0.0", @@ -1751,9 +1751,9 @@ }, "dependencies": { "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "cliui": { @@ -2719,9 +2719,9 @@ }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", "dev": true }, "string-width": { @@ -2903,9 +2903,9 @@ }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==" }, "ansi-styles": { "version": "3.2.1", @@ -2990,9 +2990,9 @@ }, "dependencies": { "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", + "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==" }, "find-up": { "version": "3.0.0", From ad84c78293e5cd29f69a2b5d0c85edd79db707b0 Mon Sep 17 00:00:00 2001 From: matks Date: Fri, 22 Apr 2022 16:30:17 +0200 Subject: [PATCH 064/128] Bump to 4.15.0 --- autoupgrade.php | 2 +- config.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autoupgrade.php b/autoupgrade.php index 2ca3d46fc..11936db7e 100644 --- a/autoupgrade.php +++ b/autoupgrade.php @@ -36,7 +36,7 @@ public function __construct() $this->name = 'autoupgrade'; $this->tab = 'administration'; $this->author = 'PrestaShop'; - $this->version = '4.14.0'; + $this->version = '4.15.0'; $this->need_instance = 1; $this->bootstrap = true; diff --git a/config.xml b/config.xml index b44f0b3ba..cfc3a1a96 100644 --- a/config.xml +++ b/config.xml @@ -2,7 +2,7 @@ autoupgrade - + From 51528fad783d09aef6072f8805d518ef95c496aa Mon Sep 17 00:00:00 2001 From: Thomas BACCELLI Date: Mon, 25 Apr 2022 11:59:07 +0200 Subject: [PATCH 065/128] Fix CI --- .github/action.yml | 1 - .github/workflows/nigthly_upgrade.yml | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/action.yml b/.github/action.yml index 596ae8cc2..9dd8c1372 100644 --- a/.github/action.yml +++ b/.github/action.yml @@ -24,7 +24,6 @@ runs: shell: bash run: | [[ "$SKIP" == true ]] || ${{ github.action_path }}action_upgrade.sh - [[ "$SKIP" == true ]] || docker exec prestashop_autoupgrade rm admin-dev/autoupgrade/modulesToUpgrade.list [[ "$SKIP" == true ]] || docker stop prestashop_autoupgrade [[ "$SKIP" == true ]] || docker rm prestashop_autoupgrade [[ "$SKIP" == true ]] || docker run --name prestashop_autoupgrade -p 8001:80 -v autoupgrade_temp-ps:/var/www/html -v "$(pwd):/var/www/html/modules/autoupgrade" --network autoupgrade_default -d prestashop/base:7.2-apache diff --git a/.github/workflows/nigthly_upgrade.yml b/.github/workflows/nigthly_upgrade.yml index 7f40d9989..53df44821 100644 --- a/.github/workflows/nigthly_upgrade.yml +++ b/.github/workflows/nigthly_upgrade.yml @@ -1,5 +1,6 @@ name: Nightly Upgrades on: + workflow_dispatch: schedule: - cron: '0 0 * * *' jobs: From 2200c552a9b5ba54344760ff4cc084e207dde2da Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Tue, 3 May 2022 10:10:32 +0200 Subject: [PATCH 066/128] When module upgrade, install new modules if present --- classes/UpgradeContainer.php | 13 +++++- classes/UpgradeTools/FileFilter.php | 69 +++++++++++++++++++++++++++-- 2 files changed, 77 insertions(+), 5 deletions(-) diff --git a/classes/UpgradeContainer.php b/classes/UpgradeContainer.php index f00d18b26..1db6c85df 100644 --- a/classes/UpgradeContainer.php +++ b/classes/UpgradeContainer.php @@ -276,7 +276,10 @@ public function getFileFilter() return $this->fileFilter; } - $this->fileFilter = new FileFilter($this->getUpgradeConfiguration()); + $this->fileFilter = new FileFilter( + $this->getUpgradeConfiguration(), + $this->getProperty(self::PS_ROOT_PATH) + ); return $this->fileFilter; } @@ -340,7 +343,13 @@ public function getFilesystemAdapter() $this->getFileFilter(), $this->getState()->getRestoreFilesFilename(), $this->getProperty(self::WORKSPACE_PATH), - str_replace($this->getProperty(self::PS_ROOT_PATH), '', $this->getProperty(self::PS_ADMIN_PATH)), $this->getProperty(self::PS_ROOT_PATH)); + str_replace( + $this->getProperty(self::PS_ROOT_PATH), + '', + $this->getProperty(self::PS_ADMIN_PATH) + ), + $this->getProperty(self::PS_ROOT_PATH) + ); return $this->filesystemAdapter; } diff --git a/classes/UpgradeTools/FileFilter.php b/classes/UpgradeTools/FileFilter.php index 093f4aec6..a8d661ddb 100644 --- a/classes/UpgradeTools/FileFilter.php +++ b/classes/UpgradeTools/FileFilter.php @@ -27,6 +27,7 @@ namespace PrestaShop\Module\AutoUpgrade\UpgradeTools; +use DirectoryIterator; use PrestaShop\Module\AutoUpgrade\Parameters\UpgradeConfiguration; class FileFilter @@ -41,9 +42,29 @@ class FileFilter */ protected $autoupgradeDir; - public function __construct(UpgradeConfiguration $configuration, $autoupgradeDir = 'autoupgrade') - { + /** + * @var string Root directory + */ + protected $rootDir; + + private const COMPOSER_PACKAGE_TYPE = 'prestashop-module'; + + private const ADDITIONAL_ALLOWED_MODULES = [ + 'autoupgrade', + ]; + + /** + * @param UpgradeConfiguration $configuration + * @param string $rootDir + * @param string $autoupgradeDir + */ + public function __construct( + UpgradeConfiguration $configuration, + $rootDir, + $autoupgradeDir = 'autoupgrade' + ) { $this->configuration = $configuration; + $this->rootDir = $rootDir; $this->autoupgradeDir = $autoupgradeDir; } @@ -115,9 +136,21 @@ public function getFilesToIgnoreOnUpgrade() '/app/config/parameters.yml', '/install', '/install-dev', - '/modules', ]; + // Fetch all existing native modules + $nativeModules = $this->getNativeModules(); + + $dir = new DirectoryIterator($this->rootDir . '/modules'); + foreach ($dir as $fileinfo) { + if (!$fileinfo->isDir() ||$fileinfo->isDot()) { + continue; + } + if (in_array($fileinfo->getFilename(), $nativeModules)) { + $excludeAbsoluteFilesFromUpgrade[] = '/modules/' . $fileinfo->getFilename(); + } + } + // this will exclude autoupgrade dir from admin, and autoupgrade from modules // If set to false, we need to preserve the default themes if (!$this->configuration->shouldUpdateDefaultTheme()) { @@ -148,4 +181,34 @@ public function getExcludeFiles() $this->autoupgradeDir, ]; } + + /** + * Returns an array of native modules + * + * @return array + */ + private function getNativeModules(): array + { + // Native modules are the one integrated in PrestaShop release via composer + // so we use the lock files to generate the list + $content = file_get_contents($this->rootDir . '/composer.lock'); + $content = json_decode($content, true); + if (empty($content['packages'])) { + return []; + } + + $modules = array_filter($content['packages'], function (array $package) { + return self::COMPOSER_PACKAGE_TYPE === $package['type'] && !empty($package['name']); + }); + $modules = array_map(function (array $package) { + $vendorName = explode('/', $package['name']); + + return $vendorName[1]; + }, $modules); + + return array_merge( + $modules, + self::ADDITIONAL_ALLOWED_MODULES + ); + } } From 8c0719c1b4cf7920cee368c0e2af433331169e73 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Tue, 3 May 2022 10:33:49 +0200 Subject: [PATCH 067/128] Fixed CI --- classes/UpgradeTools/FileFilter.php | 45 +- tests/unit/Resources/composer.lock | 12787 ++++++++++++++++++++++++++ 2 files changed, 12817 insertions(+), 15 deletions(-) create mode 100644 tests/unit/Resources/composer.lock diff --git a/classes/UpgradeTools/FileFilter.php b/classes/UpgradeTools/FileFilter.php index a8d661ddb..ef9baf7a0 100644 --- a/classes/UpgradeTools/FileFilter.php +++ b/classes/UpgradeTools/FileFilter.php @@ -47,9 +47,14 @@ class FileFilter */ protected $rootDir; - private const COMPOSER_PACKAGE_TYPE = 'prestashop-module'; + /** + * @var array|null + */ + protected $excludeAbsoluteFilesFromUpgrade; - private const ADDITIONAL_ALLOWED_MODULES = [ + const COMPOSER_PACKAGE_TYPE = 'prestashop-module'; + + const ADDITIONAL_ALLOWED_MODULES = [ 'autoupgrade', ]; @@ -130,8 +135,12 @@ public function getFilesToIgnoreOnRestore() */ public function getFilesToIgnoreOnUpgrade() { + if ($this->excludeAbsoluteFilesFromUpgrade) { + return $this->excludeAbsoluteFilesFromUpgrade; + } + // do not copy install, neither app/config/parameters.php in case it would be present - $excludeAbsoluteFilesFromUpgrade = [ + $this->excludeAbsoluteFilesFromUpgrade = [ '/app/config/parameters.php', '/app/config/parameters.yml', '/install', @@ -141,24 +150,26 @@ public function getFilesToIgnoreOnUpgrade() // Fetch all existing native modules $nativeModules = $this->getNativeModules(); - $dir = new DirectoryIterator($this->rootDir . '/modules'); - foreach ($dir as $fileinfo) { - if (!$fileinfo->isDir() ||$fileinfo->isDot()) { - continue; - } - if (in_array($fileinfo->getFilename(), $nativeModules)) { - $excludeAbsoluteFilesFromUpgrade[] = '/modules/' . $fileinfo->getFilename(); + if (is_dir($this->rootDir . '/modules')) { + $dir = new DirectoryIterator($this->rootDir . '/modules'); + foreach ($dir as $fileinfo) { + if (!$fileinfo->isDir() || $fileinfo->isDot()) { + continue; + } + if (in_array($fileinfo->getFilename(), $nativeModules)) { + $this->excludeAbsoluteFilesFromUpgrade[] = '/modules/' . $fileinfo->getFilename(); + } } } // this will exclude autoupgrade dir from admin, and autoupgrade from modules // If set to false, we need to preserve the default themes if (!$this->configuration->shouldUpdateDefaultTheme()) { - $excludeAbsoluteFilesFromUpgrade[] = '/themes/classic'; - $excludeAbsoluteFilesFromUpgrade[] = '/themes/default-bootstrap'; + $this->excludeAbsoluteFilesFromUpgrade[] = '/themes/classic'; + $this->excludeAbsoluteFilesFromUpgrade[] = '/themes/default-bootstrap'; } - return $excludeAbsoluteFilesFromUpgrade; + return $this->excludeAbsoluteFilesFromUpgrade; } /** @@ -187,11 +198,15 @@ public function getExcludeFiles() * * @return array */ - private function getNativeModules(): array + private function getNativeModules() { + $composerFile = $this->rootDir . '/composer.lock'; + if (!file_exists($composerFile)) { + return []; + } // Native modules are the one integrated in PrestaShop release via composer // so we use the lock files to generate the list - $content = file_get_contents($this->rootDir . '/composer.lock'); + $content = file_get_contents($composerFile); $content = json_decode($content, true); if (empty($content['packages'])) { return []; diff --git a/tests/unit/Resources/composer.lock b/tests/unit/Resources/composer.lock new file mode 100644 index 000000000..a0fb911c5 --- /dev/null +++ b/tests/unit/Resources/composer.lock @@ -0,0 +1,12787 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "7cdbb5f44bee9dae840f726098cd6d2e", + "packages": [ + { + "name": "beberlei/doctrineextensions", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/beberlei/DoctrineExtensions.git", + "reference": "008f162f191584a6c37c03a803f718802ba9dd9a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/beberlei/DoctrineExtensions/zipball/008f162f191584a6c37c03a803f718802ba9dd9a", + "reference": "008f162f191584a6c37c03a803f718802ba9dd9a", + "shasum": "" + }, + "require": { + "doctrine/orm": "^2.7", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.14", + "nesbot/carbon": "*", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "symfony/yaml": "^4.2 || ^5.0", + "zf1/zend-date": "^1.12", + "zf1/zend-registry": "^1.12" + }, + "type": "library", + "autoload": { + "psr-4": { + "DoctrineExtensions\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Steve Lacey", + "email": "steve@steve.ly" + } + ], + "description": "A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL, Oracle, PostgreSQL and SQLite.", + "keywords": [ + "database", + "doctrine", + "orm" + ], + "support": { + "source": "https://github.com/beberlei/DoctrineExtensions/tree/v1.3.0" + }, + "time": "2020-11-29T07:37:23+00:00" + }, + { + "name": "composer/ca-bundle", + "version": "1.2.9", + "source": { + "type": "git", + "url": "https://github.com/composer/ca-bundle.git", + "reference": "78a0e288fdcebf92aa2318a8d3656168da6ac1a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/78a0e288fdcebf92aa2318a8d3656168da6ac1a5", + "reference": "78a0e288fdcebf92aa2318a8d3656168da6ac1a5", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "ext-pcre": "*", + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "psr/log": "^1.0", + "symfony/phpunit-bridge": "^4.2 || ^5", + "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\CaBundle\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", + "keywords": [ + "cabundle", + "cacert", + "certificate", + "ssl", + "tls" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/ca-bundle/issues", + "source": "https://github.com/composer/ca-bundle/tree/1.2.9" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-01-12T12:10:35+00:00" + }, + { + "name": "composer/installers", + "version": "v1.11.0", + "source": { + "type": "git", + "url": "https://github.com/composer/installers.git", + "reference": "ae03311f45dfe194412081526be2e003960df74b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/installers/zipball/ae03311f45dfe194412081526be2e003960df74b", + "reference": "ae03311f45dfe194412081526be2e003960df74b", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0" + }, + "replace": { + "roundcube/plugin-installer": "*", + "shama/baton": "*" + }, + "require-dev": { + "composer/composer": "1.6.* || ^2.0", + "composer/semver": "^1 || ^3", + "phpstan/phpstan": "^0.12.55", + "phpstan/phpstan-phpunit": "^0.12.16", + "symfony/phpunit-bridge": "^4.2 || ^5", + "symfony/process": "^2.3" + }, + "type": "composer-plugin", + "extra": { + "class": "Composer\\Installers\\Plugin", + "branch-alias": { + "dev-main": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Installers\\": "src/Composer/Installers" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kyle Robinson Young", + "email": "kyle@dontkry.com", + "homepage": "https://github.com/shama" + } + ], + "description": "A multi-framework Composer library installer", + "homepage": "https://composer.github.io/installers/", + "keywords": [ + "Craft", + "Dolibarr", + "Eliasis", + "Hurad", + "ImageCMS", + "Kanboard", + "Lan Management System", + "MODX Evo", + "MantisBT", + "Mautic", + "Maya", + "OXID", + "Plentymarkets", + "Porto", + "RadPHP", + "SMF", + "Starbug", + "Thelia", + "Whmcs", + "WolfCMS", + "agl", + "aimeos", + "annotatecms", + "attogram", + "bitrix", + "cakephp", + "chef", + "cockpit", + "codeigniter", + "concrete5", + "croogo", + "dokuwiki", + "drupal", + "eZ Platform", + "elgg", + "expressionengine", + "fuelphp", + "grav", + "installer", + "itop", + "joomla", + "known", + "kohana", + "laravel", + "lavalite", + "lithium", + "magento", + "majima", + "mako", + "mediawiki", + "miaoxing", + "modulework", + "modx", + "moodle", + "osclass", + "phpbb", + "piwik", + "ppi", + "processwire", + "puppet", + "pxcms", + "reindex", + "roundcube", + "shopware", + "silverstripe", + "sydes", + "sylius", + "symfony", + "tastyigniter", + "typo3", + "wordpress", + "yawik", + "zend", + "zikula" + ], + "support": { + "issues": "https://github.com/composer/installers/issues", + "source": "https://github.com/composer/installers/tree/v1.11.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-04-28T06:42:17+00:00" + }, + { + "name": "composer/package-versions-deprecated", + "version": "1.11.99.2", + "source": { + "type": "git", + "url": "https://github.com/composer/package-versions-deprecated.git", + "reference": "c6522afe5540d5fc46675043d3ed5a45a740b27c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/c6522afe5540d5fc46675043d3ed5a45a740b27c", + "reference": "c6522afe5540d5fc46675043d3ed5a45a740b27c", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0 || ^2.0", + "php": "^7 || ^8" + }, + "replace": { + "ocramius/package-versions": "1.11.99" + }, + "require-dev": { + "composer/composer": "^1.9.3 || ^2.0@dev", + "ext-zip": "^1.13", + "phpunit/phpunit": "^6.5 || ^7" + }, + "type": "composer-plugin", + "extra": { + "class": "PackageVersions\\Installer", + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "PackageVersions\\": "src/PackageVersions" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be" + } + ], + "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", + "support": { + "issues": "https://github.com/composer/package-versions-deprecated/issues", + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.2" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-05-24T07:46:03+00:00" + }, + { + "name": "composer/semver", + "version": "3.2.4", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", + "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.54", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Semver library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.2.4" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2020-11-13T08:59:24+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "964adcdd3a28bf9ed5d9ac6450064e0d71ed7496" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/964adcdd3a28bf9ed5d9ac6450064e0d71ed7496", + "reference": "964adcdd3a28bf9ed5d9ac6450064e0d71ed7496", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0", + "psr/log": "^1.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.55", + "symfony/phpunit-bridge": "^4.2 || ^5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "irc://irc.freenode.org/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/2.0.1" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2021-05-05T19:37:51+00:00" + }, + { + "name": "cssjanus/cssjanus", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/cssjanus/php-cssjanus.git", + "reference": "de7483c0805750a6462b372eab55d022d555df02" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cssjanus/php-cssjanus/zipball/de7483c0805750a6462b372eab55d022d555df02", + "reference": "de7483c0805750a6462b372eab55d022d555df02", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "require-dev": { + "mediawiki/mediawiki-phan-config": "0.10.6", + "php-parallel-lint/php-parallel-lint": "^1.3.0", + "phpunit/phpunit": "^8.5.15", + "squizlabs/php_codesniffer": "^3.6.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Roan Kattouw" + }, + { + "name": "Trevor Parscal" + }, + { + "name": "Timo Tijhof" + } + ], + "description": "Convert CSS stylesheets between left-to-right and right-to-left.", + "support": { + "issues": "https://github.com/cssjanus/php-cssjanus/issues", + "source": "https://github.com/cssjanus/php-cssjanus/tree/v2.1.0" + }, + "time": "2021-09-09T17:58:26+00:00" + }, + { + "name": "curl/curl", + "version": "2.3.2", + "source": { + "type": "git", + "url": "https://github.com/php-mod/curl.git", + "reference": "8a3e3f1cb6061180c53cb18e2ad823f68ff91ac0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-mod/curl/zipball/8a3e3f1cb6061180c53cb18e2ad823f68ff91ac0", + "reference": "8a3e3f1cb6061180c53cb18e2ad823f68ff91ac0", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": "^5.6 | ^7.0 | ^8.0" + }, + "require-dev": { + "yoast/phpunit-polyfills": "^0.2.0" + }, + "type": "library", + "autoload": { + "psr-0": { + "Curl": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "php-curl-class", + "homepage": "https://github.com/php-curl-class" + }, + { + "name": "Hassan Amouhzi", + "email": "hassan@anezi.net", + "homepage": "http://hassan.amouhzi.com" + }, + { + "name": "user52", + "homepage": "https://github.com/user52" + } + ], + "description": "cURL class for PHP", + "homepage": "https://github.com/php-mod/curl", + "keywords": [ + "curl", + "dot" + ], + "support": { + "issues": "https://github.com/php-mod/curl/issues", + "source": "https://github.com/php-mod/curl/tree/2.3.2" + }, + "time": "2021-04-11T19:00:09+00:00" + }, + { + "name": "defuse/php-encryption", + "version": "v2.3.1", + "source": { + "type": "git", + "url": "https://github.com/defuse/php-encryption.git", + "reference": "77880488b9954b7884c25555c2a0ea9e7053f9d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/defuse/php-encryption/zipball/77880488b9954b7884c25555c2a0ea9e7053f9d2", + "reference": "77880488b9954b7884c25555c2a0ea9e7053f9d2", + "shasum": "" + }, + "require": { + "ext-openssl": "*", + "paragonie/random_compat": ">= 2", + "php": ">=5.6.0" + }, + "require-dev": { + "phpunit/phpunit": "^4|^5|^6|^7|^8|^9" + }, + "bin": [ + "bin/generate-defuse-key" + ], + "type": "library", + "autoload": { + "psr-4": { + "Defuse\\Crypto\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Hornby", + "email": "taylor@defuse.ca", + "homepage": "https://defuse.ca/" + }, + { + "name": "Scott Arciszewski", + "email": "info@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "Secure PHP Encryption Library", + "keywords": [ + "aes", + "authenticated encryption", + "cipher", + "crypto", + "cryptography", + "encrypt", + "encryption", + "openssl", + "security", + "symmetric key cryptography" + ], + "support": { + "issues": "https://github.com/defuse/php-encryption/issues", + "source": "https://github.com/defuse/php-encryption/tree/v2.3.1" + }, + "time": "2021-04-09T23:57:26+00:00" + }, + { + "name": "doctrine/annotations", + "version": "1.13.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f", + "reference": "e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "ext-tokenizer": "*", + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3" + }, + "require-dev": { + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/coding-standard": "^6.0 || ^8.1", + "phpstan/phpstan": "^0.12.20", + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", + "symfony/cache": "^4.4 || ^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "https://www.doctrine-project.org/projects/annotations.html", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "support": { + "issues": "https://github.com/doctrine/annotations/issues", + "source": "https://github.com/doctrine/annotations/tree/1.13.1" + }, + "time": "2021-05-16T18:07:53+00:00" + }, + { + "name": "doctrine/cache", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "c9622c6820d3ede1e2315a6a377ea1076e421d88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/c9622c6820d3ede1e2315a6a377ea1076e421d88", + "reference": "c9622c6820d3ede1e2315a6a377ea1076e421d88", + "shasum": "" + }, + "require": { + "php": "~7.1 || ^8.0" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4", + "psr/cache": ">=3" + }, + "require-dev": { + "alcaeus/mongo-php-adapter": "^1.1", + "cache/integration-tests": "dev-master", + "doctrine/coding-standard": "^8.0", + "mongodb/mongodb": "^1.1", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "predis/predis": "~1.0", + "psr/cache": "^1.0 || ^2.0", + "symfony/cache": "^4.4 || ^5.2" + }, + "suggest": { + "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.", + "homepage": "https://www.doctrine-project.org/projects/cache.html", + "keywords": [ + "abstraction", + "apcu", + "cache", + "caching", + "couchdb", + "memcached", + "php", + "redis", + "xcache" + ], + "support": { + "issues": "https://github.com/doctrine/cache/issues", + "source": "https://github.com/doctrine/cache/tree/2.0.3" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache", + "type": "tidelift" + } + ], + "time": "2021-05-25T09:43:04+00:00" + }, + { + "name": "doctrine/collections", + "version": "1.6.7", + "source": { + "type": "git", + "url": "https://github.com/doctrine/collections.git", + "reference": "55f8b799269a1a472457bd1a41b4f379d4cfba4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/collections/zipball/55f8b799269a1a472457bd1a41b4f379d4cfba4a", + "reference": "55f8b799269a1a472457bd1a41b4f379d4cfba4a", + "shasum": "" + }, + "require": { + "php": "^7.1.3 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan-shim": "^0.9.2", + "phpunit/phpunit": "^7.0", + "vimeo/psalm": "^3.8.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.", + "homepage": "https://www.doctrine-project.org/projects/collections.html", + "keywords": [ + "array", + "collections", + "iterators", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/collections/issues", + "source": "https://github.com/doctrine/collections/tree/1.6.7" + }, + "time": "2020-07-27T17:53:49+00:00" + }, + { + "name": "doctrine/common", + "version": "3.1.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/common.git", + "reference": "a036d90c303f3163b5be8b8fde9b6755b2be4a3a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/common/zipball/a036d90c303f3163b5be8b8fde9b6755b2be4a3a", + "reference": "a036d90c303f3163b5be8b8fde9b6755b2be4a3a", + "shasum": "" + }, + "require": { + "doctrine/persistence": "^2.0", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0 || ^8.0", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.5.20 || ^8.5 || ^9.0", + "squizlabs/php_codesniffer": "^3.0", + "symfony/phpunit-bridge": "^4.0.5", + "vimeo/psalm": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, proxies and much more.", + "homepage": "https://www.doctrine-project.org/projects/common.html", + "keywords": [ + "common", + "doctrine", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/common/issues", + "source": "https://github.com/doctrine/common/tree/3.1.2" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcommon", + "type": "tidelift" + } + ], + "time": "2021-02-10T20:18:51+00:00" + }, + { + "name": "doctrine/dbal", + "version": "2.13.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/dbal.git", + "reference": "8dd39d2ead4409ce652fd4f02621060f009ea5e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/8dd39d2ead4409ce652fd4f02621060f009ea5e4", + "reference": "8dd39d2ead4409ce652fd4f02621060f009ea5e4", + "shasum": "" + }, + "require": { + "doctrine/cache": "^1.0|^2.0", + "doctrine/deprecations": "^0.5.3", + "doctrine/event-manager": "^1.0", + "ext-pdo": "*", + "php": "^7.1 || ^8" + }, + "require-dev": { + "doctrine/coding-standard": "9.0.0", + "jetbrains/phpstorm-stubs": "2020.2", + "phpstan/phpstan": "0.12.81", + "phpunit/phpunit": "^7.5.20|^8.5|9.5.5", + "squizlabs/php_codesniffer": "3.6.0", + "symfony/cache": "^4.4", + "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", + "vimeo/psalm": "4.6.4" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "bin": [ + "bin/doctrine-dbal" + ], + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\DBAL\\": "lib/Doctrine/DBAL" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.", + "homepage": "https://www.doctrine-project.org/projects/dbal.html", + "keywords": [ + "abstraction", + "database", + "db2", + "dbal", + "mariadb", + "mssql", + "mysql", + "oci8", + "oracle", + "pdo", + "pgsql", + "postgresql", + "queryobject", + "sasql", + "sql", + "sqlanywhere", + "sqlite", + "sqlserver", + "sqlsrv" + ], + "support": { + "issues": "https://github.com/doctrine/dbal/issues", + "source": "https://github.com/doctrine/dbal/tree/2.13.2" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", + "type": "tidelift" + } + ], + "time": "2021-06-18T21:48:39+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "v0.5.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "9504165960a1f83cc1480e2be1dd0a0478561314" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/9504165960a1f83cc1480e2be1dd0a0478561314", + "reference": "9504165960a1f83cc1480e2be1dd0a0478561314", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0|^7.0|^8.0", + "phpunit/phpunit": "^7.0|^8.0|^9.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/v0.5.3" + }, + "time": "2021-03-21T12:59:47+00:00" + }, + { + "name": "doctrine/doctrine-bundle", + "version": "2.4.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrineBundle.git", + "reference": "4202ce675d29e70a8b9ee763bec021b6f44caccb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/4202ce675d29e70a8b9ee763bec021b6f44caccb", + "reference": "4202ce675d29e70a8b9ee763bec021b6f44caccb", + "shasum": "" + }, + "require": { + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/dbal": "^2.9.0|^3.0", + "doctrine/persistence": "^1.3.3|^2.0", + "doctrine/sql-formatter": "^1.0.1", + "php": "^7.1 || ^8.0", + "symfony/cache": "^4.3.3|^5.0|^6.0", + "symfony/config": "^4.4.3|^5.0|^6.0", + "symfony/console": "^3.4.30|^4.3.3|^5.0|^6.0", + "symfony/dependency-injection": "^4.3.3|^5.0|^6.0", + "symfony/deprecation-contracts": "^2.1", + "symfony/doctrine-bridge": "^4.4.22|^5.2.7|^6.0", + "symfony/framework-bundle": "^3.4.30|^4.3.3|^5.0|^6.0", + "symfony/service-contracts": "^1.1.1|^2.0" + }, + "conflict": { + "doctrine/orm": "<2.9", + "twig/twig": "<1.34|>=2.0,<2.4" + }, + "require-dev": { + "doctrine/coding-standard": "^9.0", + "doctrine/orm": "^2.9", + "friendsofphp/proxy-manager-lts": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.0 || ^9.3", + "psalm/plugin-phpunit": "^0.15.1", + "psalm/plugin-symfony": "^2.3.0", + "symfony/phpunit-bridge": "^5.2|^6.0", + "symfony/property-info": "^4.3.3|^5.0|^6.0", + "symfony/proxy-manager-bridge": "^3.4|^4.3.3|^5.0|^6.0", + "symfony/security-bundle": "^4.4|^5.0|^6.0", + "symfony/twig-bridge": "^3.4.30|^4.3.3|^5.0|^6.0", + "symfony/validator": "^3.4.30|^4.3.3|^5.0|^6.0", + "symfony/web-profiler-bundle": "^3.4.30|^4.3.3|^5.0|^6.0", + "symfony/yaml": "^3.4.30|^4.3.3|^5.0|^6.0", + "twig/twig": "^1.34|^2.12|^3.0", + "vimeo/psalm": "^4.7" + }, + "suggest": { + "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", + "ext-pdo": "*", + "symfony/web-profiler-bundle": "To use the data collector." + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Doctrine\\Bundle\\DoctrineBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Doctrine Project", + "homepage": "http://www.doctrine-project.org/" + } + ], + "description": "Symfony DoctrineBundle", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "dbal", + "orm", + "persistence" + ], + "support": { + "issues": "https://github.com/doctrine/DoctrineBundle/issues", + "source": "https://github.com/doctrine/DoctrineBundle/tree/2.4.2" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdoctrine-bundle", + "type": "tidelift" + } + ], + "time": "2021-06-05T13:40:39+00:00" + }, + { + "name": "doctrine/event-manager", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/event-manager.git", + "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/41370af6a30faa9dc0368c4a6814d596e81aba7f", + "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/common": "<2.9@dev" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", + "homepage": "https://www.doctrine-project.org/projects/event-manager.html", + "keywords": [ + "event", + "event dispatcher", + "event manager", + "event system", + "events" + ], + "support": { + "issues": "https://github.com/doctrine/event-manager/issues", + "source": "https://github.com/doctrine/event-manager/tree/1.1.x" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager", + "type": "tidelift" + } + ], + "time": "2020-05-29T18:28:51+00:00" + }, + { + "name": "doctrine/inflector", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/9cf661f4eb38f7c881cac67c75ea9b00bf97b210", + "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^7.0", + "phpstan/phpstan": "^0.11", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-strict-rules": "^0.11", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", + "keywords": [ + "inflection", + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/2.0.x" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], + "time": "2020-05-29T15:13:26+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", + "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^8.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/1.4.0" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2020-11-10T18:47:58+00:00" + }, + { + "name": "doctrine/lexer", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", + "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "phpstan/phpstan": "^0.11.8", + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/1.2.1" + }, + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", + "type": "tidelift" + } + ], + "time": "2020-05-25T17:44:05+00:00" + }, + { + "name": "doctrine/orm", + "version": "2.9.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/orm.git", + "reference": "82e77cf5089a1303733f75f0f0ed01be3ab9ec22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/orm/zipball/82e77cf5089a1303733f75f0f0ed01be3ab9ec22", + "reference": "82e77cf5089a1303733f75f0f0ed01be3ab9ec22", + "shasum": "" + }, + "require": { + "composer/package-versions-deprecated": "^1.8", + "doctrine/annotations": "^1.13", + "doctrine/cache": "^1.11.3|^2.0.3", + "doctrine/collections": "^1.5", + "doctrine/common": "^3.0.3", + "doctrine/dbal": "^2.13.0", + "doctrine/deprecations": "^0.5.3", + "doctrine/event-manager": "^1.1", + "doctrine/inflector": "^1.4|^2.0", + "doctrine/instantiator": "^1.3", + "doctrine/lexer": "^1.0", + "doctrine/persistence": "^2.2", + "ext-pdo": "*", + "php": "^7.1|^8.0", + "psr/cache": "^1 || ^2 || ^3", + "symfony/console": "^3.0|^4.0|^5.0|^6.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9.0", + "phpstan/phpstan": "^0.12.83", + "phpunit/phpunit": "^7.5|^8.5|^9.4", + "squizlabs/php_codesniffer": "3.6.0", + "symfony/cache": "^4.4|^5.2", + "symfony/yaml": "^3.4|^4.0|^5.0|^6.0", + "vimeo/psalm": "4.7.0" + }, + "suggest": { + "symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0", + "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" + }, + "bin": [ + "bin/doctrine" + ], + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\ORM\\": "lib/Doctrine/ORM" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "Object-Relational-Mapper for PHP", + "homepage": "https://www.doctrine-project.org/projects/orm.html", + "keywords": [ + "database", + "orm" + ], + "support": { + "issues": "https://github.com/doctrine/orm/issues", + "source": "https://github.com/doctrine/orm/tree/2.9.3" + }, + "time": "2021-06-13T10:29:22+00:00" + }, + { + "name": "doctrine/persistence", + "version": "2.2.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/persistence.git", + "reference": "d138f3ab5f761055cab1054070377cfd3222e368" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/d138f3ab5f761055cab1054070377cfd3222e368", + "reference": "d138f3ab5f761055cab1054070377cfd3222e368", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.0", + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/collections": "^1.0", + "doctrine/deprecations": "^0.5.3", + "doctrine/event-manager": "^1.0", + "php": "^7.1 || ^8.0", + "psr/cache": "^1.0|^2.0|^3.0" + }, + "conflict": { + "doctrine/common": "<2.10@dev" + }, + "require-dev": { + "composer/package-versions-deprecated": "^1.11", + "doctrine/coding-standard": "^6.0 || ^9.0", + "doctrine/common": "^3.0", + "phpstan/phpstan": "0.12.84", + "phpunit/phpunit": "^7.5.20 || ^8.0 || ^9.0", + "symfony/cache": "^4.4|^5.0", + "vimeo/psalm": "4.7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common", + "Doctrine\\Persistence\\": "lib/Doctrine/Persistence" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.", + "homepage": "https://doctrine-project.org/projects/persistence.html", + "keywords": [ + "mapper", + "object", + "odm", + "orm", + "persistence" + ], + "support": { + "issues": "https://github.com/doctrine/persistence/issues", + "source": "https://github.com/doctrine/persistence/tree/2.2.1" + }, + "time": "2021-05-19T07:07:01+00:00" + }, + { + "name": "doctrine/sql-formatter", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/sql-formatter.git", + "reference": "56070bebac6e77230ed7d306ad13528e60732871" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/sql-formatter/zipball/56070bebac6e77230ed7d306ad13528e60732871", + "reference": "56070bebac6e77230ed7d306ad13528e60732871", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4" + }, + "bin": [ + "bin/sql-formatter" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\SqlFormatter\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeremy Dorn", + "email": "jeremy@jeremydorn.com", + "homepage": "http://jeremydorn.com/" + } + ], + "description": "a PHP SQL highlighting library", + "homepage": "https://github.com/doctrine/sql-formatter/", + "keywords": [ + "highlight", + "sql" + ], + "support": { + "issues": "https://github.com/doctrine/sql-formatter/issues", + "source": "https://github.com/doctrine/sql-formatter/tree/1.1.x" + }, + "time": "2020-07-30T16:57:33+00:00" + }, + { + "name": "egulias/email-validator", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/egulias/EmailValidator.git", + "reference": "c81f18a3efb941d8c4d2e025f6183b5c6d697307" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/c81f18a3efb941d8c4d2e025f6183b5c6d697307", + "reference": "c81f18a3efb941d8c4d2e025f6183b5c6d697307", + "shasum": "" + }, + "require": { + "doctrine/lexer": "^1.2", + "php": ">=7.2", + "symfony/polyfill-intl-idn": "^1.15" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.2", + "phpunit/phpunit": "^8.5.8|^9.3.3", + "vimeo/psalm": "^4" + }, + "suggest": { + "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Egulias\\EmailValidator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eduardo Gulias Davis" + } + ], + "description": "A library for validating emails against several RFCs", + "homepage": "https://github.com/egulias/EmailValidator", + "keywords": [ + "email", + "emailvalidation", + "emailvalidator", + "validation", + "validator" + ], + "support": { + "issues": "https://github.com/egulias/EmailValidator/issues", + "source": "https://github.com/egulias/EmailValidator/tree/3.1.1" + }, + "funding": [ + { + "url": "https://github.com/egulias", + "type": "github" + } + ], + "time": "2021-04-01T18:37:14+00:00" + }, + { + "name": "ezyang/htmlpurifier", + "version": "v4.13.0", + "source": { + "type": "git", + "url": "https://github.com/ezyang/htmlpurifier.git", + "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/08e27c97e4c6ed02f37c5b2b20488046c8d90d75", + "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75", + "shasum": "" + }, + "require": { + "php": ">=5.2" + }, + "require-dev": { + "simpletest/simpletest": "dev-master#72de02a7b80c6bb8864ef9bf66d41d2f58f826bd" + }, + "type": "library", + "autoload": { + "files": [ + "library/HTMLPurifier.composer.php" + ], + "psr-0": { + "HTMLPurifier": "library/" + }, + "exclude-from-classmap": [ + "/library/HTMLPurifier/Language/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Edward Z. Yang", + "email": "admin@htmlpurifier.org", + "homepage": "http://ezyang.com" + } + ], + "description": "Standards compliant HTML filter written in PHP", + "homepage": "http://htmlpurifier.org/", + "keywords": [ + "html" + ], + "support": { + "issues": "https://github.com/ezyang/htmlpurifier/issues", + "source": "https://github.com/ezyang/htmlpurifier/tree/master" + }, + "time": "2020-06-29T00:56:53+00:00" + }, + { + "name": "friendsofphp/php-cs-fixer", + "version": "v2.19.0", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", + "reference": "d5b8a9d852b292c2f8a035200fa6844b1f82300b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/d5b8a9d852b292c2f8a035200fa6844b1f82300b", + "reference": "d5b8a9d852b292c2f8a035200fa6844b1f82300b", + "shasum": "" + }, + "require": { + "composer/semver": "^1.4 || ^2.0 || ^3.0", + "composer/xdebug-handler": "^1.2 || ^2.0", + "doctrine/annotations": "^1.2", + "ext-json": "*", + "ext-tokenizer": "*", + "php": "^5.6 || ^7.0 || ^8.0", + "php-cs-fixer/diff": "^1.3", + "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0", + "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", + "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", + "symfony/finder": "^3.0 || ^4.0 || ^5.0", + "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", + "symfony/polyfill-php70": "^1.0", + "symfony/polyfill-php72": "^1.4", + "symfony/process": "^3.0 || ^4.0 || ^5.0", + "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" + }, + "require-dev": { + "justinrainbow/json-schema": "^5.0", + "keradus/cli-executor": "^1.4", + "mikey179/vfsstream": "^1.6", + "php-coveralls/php-coveralls": "^2.4.2", + "php-cs-fixer/accessible-object": "^1.0", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", + "phpspec/prophecy-phpunit": "^1.1 || ^2.0", + "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", + "phpunitgoodpractices/polyfill": "^1.5", + "phpunitgoodpractices/traits": "^1.9.1", + "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", + "symfony/phpunit-bridge": "^5.2.1", + "symfony/yaml": "^3.0 || ^4.0 || ^5.0" + }, + "suggest": { + "ext-dom": "For handling output formats in XML", + "ext-mbstring": "For handling non-UTF8 characters.", + "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", + "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", + "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." + }, + "bin": [ + "php-cs-fixer" + ], + "type": "application", + "extra": { + "branch-alias": { + "dev-master": "2.19-dev" + } + }, + "autoload": { + "psr-4": { + "PhpCsFixer\\": "src/" + }, + "classmap": [ + "tests/Test/AbstractFixerTestCase.php", + "tests/Test/AbstractIntegrationCaseFactory.php", + "tests/Test/AbstractIntegrationTestCase.php", + "tests/Test/Assert/AssertTokensTrait.php", + "tests/Test/IntegrationCase.php", + "tests/Test/IntegrationCaseFactory.php", + "tests/Test/IntegrationCaseFactoryInterface.php", + "tests/Test/InternalIntegrationCaseFactory.php", + "tests/Test/IsIdenticalConstraint.php", + "tests/Test/TokensWithObservedTransformers.php", + "tests/TestCase.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Dariusz RumiÅ„ski", + "email": "dariusz.ruminski@gmail.com" + } + ], + "description": "A tool to automatically fix PHP code style", + "support": { + "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.19.0" + }, + "funding": [ + { + "url": "https://github.com/keradus", + "type": "github" + } + ], + "time": "2021-05-03T21:43:24+00:00" + }, + { + "name": "friendsofphp/proxy-manager-lts", + "version": "v1.0.3", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfPHP/proxy-manager-lts.git", + "reference": "121af47c9aee9c03031bdeca3fac0540f59aa5c3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfPHP/proxy-manager-lts/zipball/121af47c9aee9c03031bdeca3fac0540f59aa5c3", + "reference": "121af47c9aee9c03031bdeca3fac0540f59aa5c3", + "shasum": "" + }, + "require": { + "laminas/laminas-code": "~3.4.1|^4.0", + "php": ">=7.1", + "symfony/filesystem": "^4.4.17|^5.0" + }, + "conflict": { + "laminas/laminas-stdlib": "<3.2.1", + "zendframework/zend-stdlib": "<3.2.1" + }, + "replace": { + "ocramius/proxy-manager": "^2.1" + }, + "require-dev": { + "ext-phar": "*", + "symfony/phpunit-bridge": "^5.2" + }, + "type": "library", + "extra": { + "thanks": { + "name": "ocramius/proxy-manager", + "url": "https://github.com/Ocramius/ProxyManager" + } + }, + "autoload": { + "psr-4": { + "ProxyManager\\": "src/ProxyManager" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.io/" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + } + ], + "description": "Adding support for a wider range of PHP versions to ocramius/proxy-manager", + "homepage": "https://github.com/FriendsOfPHP/proxy-manager-lts", + "keywords": [ + "aop", + "lazy loading", + "proxy", + "proxy pattern", + "service proxies" + ], + "support": { + "issues": "https://github.com/FriendsOfPHP/proxy-manager-lts/issues", + "source": "https://github.com/FriendsOfPHP/proxy-manager-lts/tree/v1.0.3" + }, + "funding": [ + { + "url": "https://github.com/Ocramius", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/ocramius/proxy-manager", + "type": "tidelift" + } + ], + "time": "2021-01-14T21:52:44+00:00" + }, + { + "name": "friendsofsymfony/jsrouting-bundle", + "version": "2.7.0", + "source": { + "type": "git", + "url": "https://github.com/FriendsOfSymfony/FOSJsRoutingBundle.git", + "reference": "d56600542504148bf2faa2b6bd7571a6adf6799e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/FriendsOfSymfony/FOSJsRoutingBundle/zipball/d56600542504148bf2faa2b6bd7571a6adf6799e", + "reference": "d56600542504148bf2faa2b6bd7571a6adf6799e", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0", + "symfony/console": "~3.3|^4.0|^5.0", + "symfony/framework-bundle": "~3.3|^4.0|^5.0", + "symfony/serializer": "~3.3|^4.0|^5.0", + "willdurand/jsonp-callback-validator": "~1.0" + }, + "require-dev": { + "symfony/expression-language": "~3.3|^4.0|^5.0", + "symfony/phpunit-bridge": "^5.1" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "FOS\\JsRoutingBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "William Durand", + "email": "will+git@drnd.me" + }, + { + "name": "FriendsOfSymfony Community", + "homepage": "https://github.com/friendsofsymfony/FOSJsRoutingBundle/contributors" + } + ], + "description": "A pretty nice way to expose your Symfony2 routing to client applications.", + "homepage": "http://friendsofsymfony.github.com", + "keywords": [ + "Js Routing", + "javascript", + "routing" + ], + "support": { + "issues": "https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/issues", + "source": "https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/tree/2.7.0" + }, + "time": "2020-11-20T10:38:12+00:00" + }, + { + "name": "geoip2/geoip2", + "version": "v2.4.5", + "source": { + "type": "git", + "url": "https://github.com/maxmind/GeoIP2-php.git", + "reference": "b28a0ed0190cd76c878ed7002a5d1bb8c5f4c175" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maxmind/GeoIP2-php/zipball/b28a0ed0190cd76c878ed7002a5d1bb8c5f4c175", + "reference": "b28a0ed0190cd76c878ed7002a5d1bb8c5f4c175", + "shasum": "" + }, + "require": { + "maxmind-db/reader": "~1.0", + "maxmind/web-service-common": "~0.3", + "php": ">=5.3.1" + }, + "require-dev": { + "phpunit/phpunit": "4.2.*", + "squizlabs/php_codesniffer": "2.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "GeoIp2\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Gregory J. Oschwald", + "email": "goschwald@maxmind.com", + "homepage": "http://www.maxmind.com/" + } + ], + "description": "MaxMind GeoIP2 PHP API", + "homepage": "https://github.com/maxmind/GeoIP2-php", + "keywords": [ + "IP", + "geoip", + "geoip2", + "geolocation", + "maxmind" + ], + "support": { + "issues": "https://github.com/maxmind/GeoIP2-php/issues", + "source": "https://github.com/maxmind/GeoIP2-php/tree/master" + }, + "time": "2017-01-31T17:28:48+00:00" + }, + { + "name": "greenlion/php-sql-parser", + "version": "v4.4.0", + "source": { + "type": "git", + "url": "https://github.com/greenlion/PHP-SQL-Parser.git", + "reference": "e38d6f0f500d4d86bee7722e2e89262eeaab7e59" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/greenlion/PHP-SQL-Parser/zipball/e38d6f0f500d4d86bee7722e2e89262eeaab7e59", + "reference": "e38d6f0f500d4d86bee7722e2e89262eeaab7e59", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "analog/analog": "^1.0.6", + "phpunit/phpunit": "^4.0.14", + "squizlabs/php_codesniffer": "^1.5.1" + }, + "type": "library", + "autoload": { + "psr-0": { + "PHPSQLParser\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Justin Swanhart", + "email": "greenlion@gmail.com", + "homepage": "http://code.google.com/u/greenlion@gmail.com/", + "role": "Owner" + }, + { + "name": "André Rothe", + "email": "phosco@gmx.de", + "homepage": "https://www.phosco.info", + "role": "Committer" + } + ], + "description": "A pure PHP SQL (non validating) parser w/ focus on MySQL dialect of SQL", + "homepage": "https://github.com/greenlion/PHP-SQL-Parser", + "keywords": [ + "creator", + "mysql", + "parser", + "sql" + ], + "support": { + "issues": "https://github.com/greenlion/PHP-SQL-Parser/issues", + "source": "https://github.com/greenlion/PHP-SQL-Parser" + }, + "time": "2021-03-28T23:13:55+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.3.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "7008573787b430c1c1f650e3722d9bba59967628" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7008573787b430c1c1f650e3722d9bba59967628", + "reference": "7008573787b430c1c1f650e3722d9bba59967628", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.4", + "guzzlehttp/psr7": "^1.7 || ^2.0", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "ext-curl": "*", + "php-http/client-integration-tests": "^3.0", + "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "psr/log": "^1.1" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.3-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.3.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://github.com/alexeyshockov", + "type": "github" + }, + { + "url": "https://github.com/gmponos", + "type": "github" + } + ], + "time": "2021-03-23T11:33:13+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "symfony/phpunit-bridge": "^4.4 || ^5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/1.4.1" + }, + "time": "2021-03-07T09:25:29+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.2.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2", + "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.8 || ^9.3.10" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.2.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2022-03-20T21:55:58+00:00" + }, + { + "name": "incenteev/composer-parameter-handler", + "version": "v2.1.4", + "source": { + "type": "git", + "url": "https://github.com/Incenteev/ParameterHandler.git", + "reference": "084befb11ec21faeadcddefb88b66132775ff59b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Incenteev/ParameterHandler/zipball/084befb11ec21faeadcddefb88b66132775ff59b", + "reference": "084befb11ec21faeadcddefb88b66132775ff59b", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/yaml": "^2.3 || ^3.0 || ^4.0 || ^5.0" + }, + "require-dev": { + "composer/composer": "^1.0@dev", + "symfony/filesystem": "^2.3 || ^3 || ^4 || ^5", + "symfony/phpunit-bridge": "^4.0 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Incenteev\\ParameterHandler\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christophe Coevoet", + "email": "stof@notk.org" + } + ], + "description": "Composer script handling your ignored parameter file", + "homepage": "https://github.com/Incenteev/ParameterHandler", + "keywords": [ + "parameters management" + ], + "support": { + "issues": "https://github.com/Incenteev/ParameterHandler/issues", + "source": "https://github.com/Incenteev/ParameterHandler/tree/v2.1.4" + }, + "time": "2020-03-17T21:10:00+00:00" + }, + { + "name": "intervention/httpauth", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/Intervention/httpauth.git", + "reference": "825202e88c0918f5249bd5af6ff1fb8ef6e3271e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Intervention/httpauth/zipball/825202e88c0918f5249bd5af6ff1fb8ef6e3271e", + "reference": "825202e88c0918f5249bd5af6ff1fb8ef6e3271e", + "shasum": "" + }, + "require": { + "php": "^7.2" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.11", + "phpunit/phpunit": "^8.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Intervention\\HttpAuth\\Laravel\\HttpAuthServiceProvider" + ], + "aliases": { + "HttpAuth": "Intervention\\HttpAuth\\Laravel\\Facades\\HttpAuth" + } + } + }, + "autoload": { + "psr-4": { + "Intervention\\HttpAuth\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Oliver Vogel", + "email": "oliver@olivervogel.com", + "homepage": "https://olivervogel.com/" + } + ], + "description": "HTTP authentication (Basic & Digest) including ServiceProviders for easy Laravel integration", + "homepage": "https://github.com/Intervention/httpauth", + "keywords": [ + "Authentication", + "http", + "laravel" + ], + "support": { + "issues": "https://github.com/Intervention/httpauth/issues", + "source": "https://github.com/Intervention/httpauth/tree/3.0.1" + }, + "time": "2020-03-09T16:18:28+00:00" + }, + { + "name": "ircmaxell/password-compat", + "version": "v1.0.4", + "source": { + "type": "git", + "url": "https://github.com/ircmaxell/password_compat.git", + "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/5c5cde8822a69545767f7c7f3058cb15ff84614c", + "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, + "type": "library", + "autoload": { + "files": [ + "lib/password.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anthony Ferrara", + "email": "ircmaxell@php.net", + "homepage": "http://blog.ircmaxell.com" + } + ], + "description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash", + "homepage": "https://github.com/ircmaxell/password_compat", + "keywords": [ + "hashing", + "password" + ], + "support": { + "issues": "https://github.com/ircmaxell/password_compat/issues", + "source": "https://github.com/ircmaxell/password_compat/tree/v1.0" + }, + "time": "2014-11-20T16:49:30+00:00" + }, + { + "name": "ircmaxell/random-lib", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/ircmaxell/RandomLib.git", + "reference": "e9e0204f40e49fa4419946c677eccd3fa25b8cf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ircmaxell/RandomLib/zipball/e9e0204f40e49fa4419946c677eccd3fa25b8cf4", + "reference": "e9e0204f40e49fa4419946c677eccd3fa25b8cf4", + "shasum": "" + }, + "require": { + "ircmaxell/security-lib": "^1.1", + "php": ">=5.3.2" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^1.11", + "mikey179/vfsstream": "^1.6", + "phpunit/phpunit": "^4.8|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "RandomLib": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anthony Ferrara", + "email": "ircmaxell@ircmaxell.com", + "homepage": "http://blog.ircmaxell.com" + } + ], + "description": "A Library For Generating Secure Random Numbers", + "homepage": "https://github.com/ircmaxell/RandomLib", + "keywords": [ + "cryptography", + "random", + "random-numbers", + "random-strings" + ], + "support": { + "issues": "https://github.com/ircmaxell/RandomLib/issues", + "source": "https://github.com/ircmaxell/RandomLib/tree/master" + }, + "time": "2016-09-07T15:52:06+00:00" + }, + { + "name": "ircmaxell/security-lib", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/ircmaxell/SecurityLib.git", + "reference": "f3db6de12c20c9bcd1aa3db4353a1bbe0e44e1b5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ircmaxell/SecurityLib/zipball/f3db6de12c20c9bcd1aa3db4353a1bbe0e44e1b5", + "reference": "f3db6de12c20c9bcd1aa3db4353a1bbe0e44e1b5", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "mikey179/vfsstream": "1.1.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "SecurityLib": "lib" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anthony Ferrara", + "email": "ircmaxell@ircmaxell.com", + "homepage": "http://blog.ircmaxell.com" + } + ], + "description": "A Base Security Library", + "homepage": "https://github.com/ircmaxell/SecurityLib", + "support": { + "issues": "https://github.com/ircmaxell/SecurityLib/issues", + "source": "https://github.com/ircmaxell/SecurityLib/tree/master" + }, + "time": "2015-03-20T14:31:23+00:00" + }, + { + "name": "jakeasmith/http_build_url", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/jakeasmith/http_build_url.git", + "reference": "93c273e77cb1edead0cf8bcf8cd2003428e74e37" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jakeasmith/http_build_url/zipball/93c273e77cb1edead0cf8bcf8cd2003428e74e37", + "reference": "93c273e77cb1edead0cf8bcf8cd2003428e74e37", + "shasum": "" + }, + "type": "library", + "autoload": { + "files": [ + "src/http_build_url.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jake A. Smith", + "email": "theman@jakeasmith.com" + } + ], + "description": "Provides functionality for http_build_url() to environments without pecl_http.", + "support": { + "issues": "https://github.com/jakeasmith/http_build_url/issues", + "source": "https://github.com/jakeasmith/http_build_url" + }, + "time": "2017-05-01T15:36:40+00:00" + }, + { + "name": "laminas/laminas-code", + "version": "3.4.1", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-code.git", + "reference": "1cb8f203389ab1482bf89c0e70a04849bacd7766" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-code/zipball/1cb8f203389ab1482bf89c0e70a04849bacd7766", + "reference": "1cb8f203389ab1482bf89c0e70a04849bacd7766", + "shasum": "" + }, + "require": { + "laminas/laminas-eventmanager": "^2.6 || ^3.0", + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^7.1" + }, + "conflict": { + "phpspec/prophecy": "<1.9.0" + }, + "replace": { + "zendframework/zend-code": "self.version" + }, + "require-dev": { + "doctrine/annotations": "^1.7", + "ext-phar": "*", + "laminas/laminas-coding-standard": "^1.0", + "laminas/laminas-stdlib": "^2.7 || ^3.0", + "phpunit/phpunit": "^7.5.16 || ^8.4" + }, + "suggest": { + "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features", + "laminas/laminas-stdlib": "Laminas\\Stdlib component" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4.x-dev", + "dev-develop": "3.5.x-dev", + "dev-dev-4.0": "4.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laminas\\Code\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Extensions to the PHP Reflection API, static code scanning, and code generation", + "homepage": "https://laminas.dev", + "keywords": [ + "code", + "laminas" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-code/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-code/issues", + "rss": "https://github.com/laminas/laminas-code/releases.atom", + "source": "https://github.com/laminas/laminas-code" + }, + "time": "2019-12-31T16:28:24+00:00" + }, + { + "name": "laminas/laminas-eventmanager", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-eventmanager.git", + "reference": "ce4dc0bdf3b14b7f9815775af9dfee80a63b4748" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/ce4dc0bdf3b14b7f9815775af9dfee80a63b4748", + "reference": "ce4dc0bdf3b14b7f9815775af9dfee80a63b4748", + "shasum": "" + }, + "require": { + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^5.6 || ^7.0" + }, + "replace": { + "zendframework/zend-eventmanager": "self.version" + }, + "require-dev": { + "athletic/athletic": "^0.1", + "container-interop/container-interop": "^1.1.0", + "laminas/laminas-coding-standard": "~1.0.0", + "laminas/laminas-stdlib": "^2.7.3 || ^3.0", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2" + }, + "suggest": { + "container-interop/container-interop": "^1.1.0, to use the lazy listeners feature", + "laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev", + "dev-develop": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Laminas\\EventManager\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Trigger and listen to events within a PHP application", + "homepage": "https://laminas.dev", + "keywords": [ + "event", + "eventmanager", + "events", + "laminas" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-eventmanager/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-eventmanager/issues", + "rss": "https://github.com/laminas/laminas-eventmanager/releases.atom", + "source": "https://github.com/laminas/laminas-eventmanager" + }, + "time": "2019-12-31T16:44:52+00:00" + }, + { + "name": "laminas/laminas-zendframework-bridge", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-zendframework-bridge.git", + "reference": "6ede70583e101030bcace4dcddd648f760ddf642" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6ede70583e101030bcace4dcddd648f760ddf642", + "reference": "6ede70583e101030bcace4dcddd648f760ddf642", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3", + "squizlabs/php_codesniffer": "^3.5" + }, + "type": "library", + "extra": { + "laminas": { + "module": "Laminas\\ZendFrameworkBridge" + } + }, + "autoload": { + "files": [ + "src/autoload.php" + ], + "psr-4": { + "Laminas\\ZendFrameworkBridge\\": "src//" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Alias legacy ZF class names to Laminas Project equivalents.", + "keywords": [ + "ZendFramework", + "autoloading", + "laminas", + "zf" + ], + "support": { + "forum": "https://discourse.laminas.dev/", + "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", + "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", + "source": "https://github.com/laminas/laminas-zendframework-bridge" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2020-09-14T14:23:00+00:00" + }, + { + "name": "league/tactician", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/tactician.git", + "reference": "e79f763170f3d5922ec29e85cffca0bac5cd8975" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/tactician/zipball/e79f763170f3d5922ec29e85cffca0bac5cd8975", + "reference": "e79f763170f3d5922ec29e85cffca0bac5cd8975", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "mockery/mockery": "^1.3", + "phpunit/phpunit": "^7.5.20 || ^9.3.8", + "squizlabs/php_codesniffer": "^3.5.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Tactician\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ross Tuck", + "homepage": "http://tactician.thephpleague.com" + } + ], + "description": "A small, flexible command bus. Handy for building service layers.", + "keywords": [ + "command", + "command bus", + "service layer" + ], + "support": { + "issues": "https://github.com/thephpleague/tactician/issues", + "source": "https://github.com/thephpleague/tactician/tree/v1.1.0" + }, + "time": "2021-02-14T15:29:04+00:00" + }, + { + "name": "league/tactician-bundle", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/tactician-bundle.git", + "reference": "89c51277423ac485b62580c38322426c3ec6ad47" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/tactician-bundle/zipball/89c51277423ac485b62580c38322426c3ec6ad47", + "reference": "89c51277423ac485b62580c38322426c3ec6ad47", + "shasum": "" + }, + "require": { + "league/tactician": "^1.0", + "league/tactician-container": "^2.0", + "league/tactician-logger": "^0.10.0", + "php": ">=7.2", + "symfony/config": "^3.4|^4.4|^5.0", + "symfony/dependency-injection": "^3.4|^4.4|^5.0", + "symfony/http-kernel": "^3.4|^4.4|^5.0", + "symfony/yaml": "^3.4|^4.4|^5.0" + }, + "require-dev": { + "matthiasnoback/symfony-config-test": "^4.2.1", + "matthiasnoback/symfony-dependency-injection-test": "^4.2.1", + "mockery/mockery": "~1.0", + "phpunit/phpunit": "~8.5", + "symfony/console": "^3.4|^4.4|^5.0", + "symfony/framework-bundle": "^3.4.31|^4.4|^5.0", + "symfony/security-bundle": "^3.4|^4.4|^5.0", + "symfony/security-core": "^3.4|^4.4|^5.0", + "symfony/validator": "^3.4|^4.4|^5.0" + }, + "suggest": { + "league/tactician-doctrine": "For doctrine transaction middleware", + "symfony/console": "For debugging command-to-handler routing using the tactician:debug console command", + "symfony/security": "For command security middleware", + "symfony/validator": "For command validator middleware" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Tactician\\Bundle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Rafael Dohms", + "homepage": "http://doh.ms" + }, + { + "name": "Richard Tuin", + "homepage": "http://www.rtuin.nl/" + }, + { + "name": "Xander Smalbil", + "email": "xander@videofunk.nl" + }, + { + "name": "Ross Tuck", + "email": "me@rosstuck.com" + } + ], + "description": "Bundle to integrate Tactician with Symfony projects", + "keywords": [ + "bundle", + "symfony", + "tactician" + ], + "support": { + "issues": "https://github.com/thephpleague/tactician-bundle/issues", + "source": "https://github.com/thephpleague/tactician-bundle/tree/v1.3.0" + }, + "time": "2021-01-31T17:06:29+00:00" + }, + { + "name": "league/tactician-container", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/tactician-container.git", + "reference": "d1a5d884e072b8cafbff802d07766076eb2ffcb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/tactician-container/zipball/d1a5d884e072b8cafbff802d07766076eb2ffcb0", + "reference": "d1a5d884e072b8cafbff802d07766076eb2ffcb0", + "shasum": "" + }, + "require": { + "league/tactician": "^1.0", + "php": ">=5.5", + "psr/container": "^1.0" + }, + "require-dev": { + "league/container": "~2.3", + "phpunit/phpunit": "~4.3", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Tactician\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nigel Greenway", + "homepage": "http://futurepixels.co.uk" + } + ], + "description": "Tactician integration for any container implementing PSR-11", + "keywords": [ + "container", + "container-interop", + "di", + "interoperable", + "league", + "tactician" + ], + "support": { + "issues": "https://github.com/thephpleague/tactician-container/issues", + "source": "https://github.com/thephpleague/tactician-container/tree/master" + }, + "time": "2017-04-13T06:27:12+00:00" + }, + { + "name": "league/tactician-logger", + "version": "v0.10.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/tactician-logger.git", + "reference": "3ff9ee04e4cbec100af827f829ed4c7ff7c08442" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/tactician-logger/zipball/3ff9ee04e4cbec100af827f829ed4c7ff7c08442", + "reference": "3ff9ee04e4cbec100af827f829ed4c7ff7c08442", + "shasum": "" + }, + "require": { + "league/tactician": "^1.0", + "php": ">=5.5.0", + "psr/log": "~1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9", + "phpunit/phpunit": "4.*", + "squizlabs/php_codesniffer": "~2.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Tactician\\Logger\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ross Tuck" + } + ], + "description": "Adds PSR-3 logging support to the Tactician command bus", + "homepage": "https://github.com/thephpleague/tactician-logger", + "keywords": [ + "log", + "logging", + "tactician" + ], + "support": { + "issues": "https://github.com/thephpleague/tactician-logger/issues", + "source": "https://github.com/thephpleague/tactician-logger/tree/master" + }, + "time": "2016-08-23T05:50:38+00:00" + }, + { + "name": "maennchen/zipstream-php", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/maennchen/ZipStream-PHP.git", + "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/c4c5803cc1f93df3d2448478ef79394a5981cc58", + "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58", + "shasum": "" + }, + "require": { + "myclabs/php-enum": "^1.5", + "php": ">= 7.1", + "psr/http-message": "^1.0", + "symfony/polyfill-mbstring": "^1.0" + }, + "require-dev": { + "ext-zip": "*", + "guzzlehttp/guzzle": ">= 6.3", + "mikey179/vfsstream": "^1.6", + "phpunit/phpunit": ">= 7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "ZipStream\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paul Duncan", + "email": "pabs@pablotron.org" + }, + { + "name": "Jonatan Männchen", + "email": "jonatan@maennchen.ch" + }, + { + "name": "Jesse Donat", + "email": "donatj@gmail.com" + }, + { + "name": "András Kolesár", + "email": "kolesar@kolesar.hu" + } + ], + "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.", + "keywords": [ + "stream", + "zip" + ], + "support": { + "issues": "https://github.com/maennchen/ZipStream-PHP/issues", + "source": "https://github.com/maennchen/ZipStream-PHP/tree/master" + }, + "funding": [ + { + "url": "https://opencollective.com/zipstream", + "type": "open_collective" + } + ], + "time": "2020-05-30T13:11:16+00:00" + }, + { + "name": "marcusschwarz/lesserphp", + "version": "v0.5.5", + "source": { + "type": "git", + "url": "https://github.com/MarcusSchwarz/lesserphp.git", + "reference": "77ba82b5218ff228267d3b0e5ec8697be75e86a7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarcusSchwarz/lesserphp/zipball/77ba82b5218ff228267d3b0e5ec8697be75e86a7", + "reference": "77ba82b5218ff228267d3b0e5ec8697be75e86a7", + "shasum": "" + }, + "require-dev": { + "phpunit/phpunit": ">=4.8.35 <8" + }, + "bin": [ + "plessc" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.5.1-dev" + } + }, + "autoload": { + "classmap": [ + "lessc.inc.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT", + "GPL-3.0" + ], + "authors": [ + { + "name": "Leaf Corcoran", + "email": "leafot@gmail.com", + "homepage": "http://leafo.net" + }, + { + "name": "Marcus Schwarz", + "email": "github@maswaba.de", + "homepage": "https://www.maswaba.de" + } + ], + "description": "lesserphp is a compiler for LESS written in PHP based on leafo's lessphp.", + "homepage": "http://leafo.net/lessphp/", + "support": { + "issues": "https://github.com/MarcusSchwarz/lesserphp/issues", + "source": "https://github.com/MarcusSchwarz/lesserphp/tree/v0.5.5" + }, + "time": "2021-03-10T17:56:57+00:00" + }, + { + "name": "markbaker/complex", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "9999f1432fae467bc93c53f357105b4c31bb994c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/9999f1432fae467bc93c53f357105b4c31bb994c", + "reference": "9999f1432fae467bc93c53f357105b4c31bb994c", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "phpcompatibility/php-compatibility": "^9.0", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "^4.0", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.3", + "sebastian/phpcpd": "^4.0", + "squizlabs/php_codesniffer": "^3.4" + }, + "type": "library", + "autoload": { + "files": [ + "classes/src/functions/abs.php", + "classes/src/functions/acos.php", + "classes/src/functions/acosh.php", + "classes/src/functions/acot.php", + "classes/src/functions/acoth.php", + "classes/src/functions/acsc.php", + "classes/src/functions/acsch.php", + "classes/src/functions/argument.php", + "classes/src/functions/asec.php", + "classes/src/functions/asech.php", + "classes/src/functions/asin.php", + "classes/src/functions/asinh.php", + "classes/src/functions/atan.php", + "classes/src/functions/atanh.php", + "classes/src/functions/conjugate.php", + "classes/src/functions/cos.php", + "classes/src/functions/cosh.php", + "classes/src/functions/cot.php", + "classes/src/functions/coth.php", + "classes/src/functions/csc.php", + "classes/src/functions/csch.php", + "classes/src/functions/exp.php", + "classes/src/functions/inverse.php", + "classes/src/functions/ln.php", + "classes/src/functions/log2.php", + "classes/src/functions/log10.php", + "classes/src/functions/negative.php", + "classes/src/functions/pow.php", + "classes/src/functions/rho.php", + "classes/src/functions/sec.php", + "classes/src/functions/sech.php", + "classes/src/functions/sin.php", + "classes/src/functions/sinh.php", + "classes/src/functions/sqrt.php", + "classes/src/functions/tan.php", + "classes/src/functions/tanh.php", + "classes/src/functions/theta.php", + "classes/src/operations/add.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ], + "psr-4": { + "Complex\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPComplex/issues", + "source": "https://github.com/MarkBaker/PHPComplex/tree/PHP8" + }, + "time": "2020-08-26T10:42:07+00:00" + }, + { + "name": "markbaker/matrix", + "version": "2.1.2", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPMatrix.git", + "reference": "361c0f545c3172ee26c3d596a0aa03f0cef65e6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/361c0f545c3172ee26c3d596a0aa03f0cef65e6a", + "reference": "361c0f545c3172ee26c3d596a0aa03f0cef65e6a", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "phpcompatibility/php-compatibility": "^9.0", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "^4.0", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.3", + "sebastian/phpcpd": "^4.0", + "squizlabs/php_codesniffer": "^3.4" + }, + "type": "library", + "autoload": { + "files": [ + "classes/src/Functions/adjoint.php", + "classes/src/Functions/antidiagonal.php", + "classes/src/Functions/cofactors.php", + "classes/src/Functions/determinant.php", + "classes/src/Functions/diagonal.php", + "classes/src/Functions/identity.php", + "classes/src/Functions/inverse.php", + "classes/src/Functions/minors.php", + "classes/src/Functions/trace.php", + "classes/src/Functions/transpose.php", + "classes/src/Operations/add.php", + "classes/src/Operations/directsum.php", + "classes/src/Operations/subtract.php", + "classes/src/Operations/multiply.php", + "classes/src/Operations/divideby.php", + "classes/src/Operations/divideinto.php" + ], + "psr-4": { + "Matrix\\": "classes/src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@demon-angel.eu" + } + ], + "description": "PHP Class for working with matrices", + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "keywords": [ + "mathematics", + "matrix", + "vector" + ], + "support": { + "issues": "https://github.com/MarkBaker/PHPMatrix/issues", + "source": "https://github.com/MarkBaker/PHPMatrix/tree/2.1.2" + }, + "time": "2021-01-23T16:37:31+00:00" + }, + { + "name": "martinlindhe/php-mb-helpers", + "version": "0.1.7", + "source": { + "type": "git", + "url": "https://github.com/martinlindhe/php-mb-helpers.git", + "reference": "d12570aff7f44f17c1e8b2da59795fe847a7a7c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/martinlindhe/php-mb-helpers/zipball/d12570aff7f44f17c1e8b2da59795fe847a7a7c6", + "reference": "d12570aff7f44f17c1e8b2da59795fe847a7a7c6", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.6" + }, + "type": "library", + "autoload": { + "files": [ + "src/mb_helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Martin Lindhe", + "email": "martin@ubique.se" + } + ], + "description": "Provides mb_ucwords(), mb_ucfirst(), mb_strrev(), mb_str_pad(), mb_count_chars(), mb_str_split()", + "homepage": "https://github.com/martinlindhe/php-mb-helpers", + "support": { + "issues": "https://github.com/martinlindhe/php-mb-helpers/issues", + "source": "https://github.com/martinlindhe/php-mb-helpers/tree/0.1.7" + }, + "time": "2021-03-17T22:34:41+00:00" + }, + { + "name": "matthiasmullie/minify", + "version": "1.3.66", + "source": { + "type": "git", + "url": "https://github.com/matthiasmullie/minify.git", + "reference": "45fd3b0f1dfa2c965857c6d4a470bea52adc31a6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/45fd3b0f1dfa2c965857c6d4a470bea52adc31a6", + "reference": "45fd3b0f1dfa2c965857c6d4a470bea52adc31a6", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "matthiasmullie/path-converter": "~1.1", + "php": ">=5.3.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.0", + "matthiasmullie/scrapbook": "dev-master", + "phpunit/phpunit": ">=4.8" + }, + "suggest": { + "psr/cache-implementation": "Cache implementation to use with Minify::cache" + }, + "bin": [ + "bin/minifycss", + "bin/minifyjs" + ], + "type": "library", + "autoload": { + "psr-4": { + "MatthiasMullie\\Minify\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthias Mullie", + "email": "minify@mullie.eu", + "homepage": "http://www.mullie.eu", + "role": "Developer" + } + ], + "description": "CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.", + "homepage": "http://www.minifier.org", + "keywords": [ + "JS", + "css", + "javascript", + "minifier", + "minify" + ], + "support": { + "issues": "https://github.com/matthiasmullie/minify/issues", + "source": "https://github.com/matthiasmullie/minify/tree/1.3.66" + }, + "funding": [ + { + "url": "https://github.com/[user1", + "type": "github" + }, + { + "url": "https://github.com/matthiasmullie] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g.", + "type": "github" + }, + { + "url": "https://github.com/user2", + "type": "github" + } + ], + "time": "2021-01-06T15:18:10+00:00" + }, + { + "name": "matthiasmullie/path-converter", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/matthiasmullie/path-converter.git", + "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/matthiasmullie/path-converter/zipball/e7d13b2c7e2f2268e1424aaed02085518afa02d9", + "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "MatthiasMullie\\PathConverter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthias Mullie", + "email": "pathconverter@mullie.eu", + "homepage": "http://www.mullie.eu", + "role": "Developer" + } + ], + "description": "Relative path converter", + "homepage": "http://github.com/matthiasmullie/path-converter", + "keywords": [ + "converter", + "path", + "paths", + "relative" + ], + "support": { + "issues": "https://github.com/matthiasmullie/path-converter/issues", + "source": "https://github.com/matthiasmullie/path-converter/tree/1.1.3" + }, + "time": "2019-02-05T23:41:09+00:00" + }, + { + "name": "maxmind-db/reader", + "version": "v1.10.1", + "source": { + "type": "git", + "url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git", + "reference": "569bd44d97d30a4ec12c7793a33004a76d4caf18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/569bd44d97d30a4ec12c7793a33004a76d4caf18", + "reference": "569bd44d97d30a4ec12c7793a33004a76d4caf18", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "conflict": { + "ext-maxminddb": "<1.10.1,>=2.0.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "*", + "php-coveralls/php-coveralls": "^2.1", + "phpstan/phpstan": "*", + "phpunit/phpcov": ">=6.0.0", + "phpunit/phpunit": ">=8.0.0,<10.0.0", + "squizlabs/php_codesniffer": "3.*" + }, + "suggest": { + "ext-bcmath": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder", + "ext-gmp": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder", + "ext-maxminddb": "A C-based database decoder that provides significantly faster lookups" + }, + "type": "library", + "autoload": { + "psr-4": { + "MaxMind\\Db\\": "src/MaxMind/Db" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Gregory J. Oschwald", + "email": "goschwald@maxmind.com", + "homepage": "https://www.maxmind.com/" + } + ], + "description": "MaxMind DB Reader API", + "homepage": "https://github.com/maxmind/MaxMind-DB-Reader-php", + "keywords": [ + "database", + "geoip", + "geoip2", + "geolocation", + "maxmind" + ], + "support": { + "issues": "https://github.com/maxmind/MaxMind-DB-Reader-php/issues", + "source": "https://github.com/maxmind/MaxMind-DB-Reader-php/tree/v1.10.1" + }, + "time": "2021-04-14T17:49:35+00:00" + }, + { + "name": "maxmind/web-service-common", + "version": "v0.8.1", + "source": { + "type": "git", + "url": "https://github.com/maxmind/web-service-common-php.git", + "reference": "32f274051c543fc865e5a84d3a2c703913641ea8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maxmind/web-service-common-php/zipball/32f274051c543fc865e5a84d3a2c703913641ea8", + "reference": "32f274051c543fc865e5a84d3a2c703913641ea8", + "shasum": "" + }, + "require": { + "composer/ca-bundle": "^1.0.3", + "ext-curl": "*", + "ext-json": "*", + "php": ">=7.2" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "2.*", + "phpunit/phpunit": "^8.0 || ^9.0", + "squizlabs/php_codesniffer": "3.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "MaxMind\\Exception\\": "src/Exception", + "MaxMind\\WebService\\": "src/WebService" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Gregory Oschwald", + "email": "goschwald@maxmind.com" + } + ], + "description": "Internal MaxMind Web Service API", + "homepage": "https://github.com/maxmind/web-service-common-php", + "support": { + "issues": "https://github.com/maxmind/web-service-common-php/issues", + "source": "https://github.com/maxmind/web-service-common-php/tree/v0.8.1" + }, + "time": "2020-11-02T17:00:53+00:00" + }, + { + "name": "mobiledetect/mobiledetectlib", + "version": "2.8.37", + "source": { + "type": "git", + "url": "https://github.com/serbanghita/Mobile-Detect.git", + "reference": "9841e3c46f5bd0739b53aed8ac677fa712943df7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/9841e3c46f5bd0739b53aed8ac677fa712943df7", + "reference": "9841e3c46f5bd0739b53aed8ac677fa712943df7", + "shasum": "" + }, + "require": { + "php": ">=5.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8.35||~5.7" + }, + "type": "library", + "autoload": { + "psr-0": { + "Detection": "namespaced/" + }, + "classmap": [ + "Mobile_Detect.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Serban Ghita", + "email": "serbanghita@gmail.com", + "homepage": "http://mobiledetect.net", + "role": "Developer" + } + ], + "description": "Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.", + "homepage": "https://github.com/serbanghita/Mobile-Detect", + "keywords": [ + "detect mobile devices", + "mobile", + "mobile detect", + "mobile detector", + "php mobile detect" + ], + "support": { + "issues": "https://github.com/serbanghita/Mobile-Detect/issues", + "source": "https://github.com/serbanghita/Mobile-Detect/tree/2.8.37" + }, + "funding": [ + { + "url": "https://github.com/serbanghita", + "type": "github" + } + ], + "time": "2021-02-19T21:22:57+00:00" + }, + { + "name": "monolog/monolog", + "version": "1.26.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "2209ddd84e7ef1256b7af205d0717fb62cfc9c33" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/2209ddd84e7ef1256b7af205d0717fb62cfc9c33", + "reference": "2209ddd84e7ef1256b7af205d0717fb62cfc9c33", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpstan/phpstan": "^0.12.59", + "phpunit/phpunit": "~4.5", + "ruflin/elastica": ">=0.90 <3.0", + "sentry/sentry": "^0.13", + "swiftmailer/swiftmailer": "^5.3|^6.0" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "sentry/sentry": "Allow sending log messages to a Sentry server" + }, + "type": "library", + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "http://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "support": { + "issues": "https://github.com/Seldaek/monolog/issues", + "source": "https://github.com/Seldaek/monolog/tree/1.26.0" + }, + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", + "type": "tidelift" + } + ], + "time": "2020-12-14T12:56:38+00:00" + }, + { + "name": "mrclay/jsmin-php", + "version": "2.4.0", + "source": { + "type": "git", + "url": "https://github.com/mrclay/jsmin-php.git", + "reference": "bb05febc9440852d39899255afd5569b7f21a72c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mrclay/jsmin-php/zipball/bb05febc9440852d39899255afd5569b7f21a72c", + "reference": "bb05febc9440852d39899255afd5569b7f21a72c", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "4.2" + }, + "type": "library", + "autoload": { + "psr-0": { + "JSMin\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Stephen Clay", + "email": "steve@mrclay.org", + "role": "Developer" + }, + { + "name": "Ryan Grove", + "email": "ryan@wonko.com", + "role": "Developer" + } + ], + "description": "Provides a modified port of Douglas Crockford's jsmin.c, which removes unnecessary whitespace from JavaScript files.", + "homepage": "https://github.com/mrclay/jsmin-php/", + "keywords": [ + "compress", + "jsmin", + "minify" + ], + "support": { + "email": "minify@googlegroups.com", + "issues": "https://github.com/mrclay/jsmin-php/issues", + "source": "https://github.com/mrclay/jsmin-php/tree/master" + }, + "time": "2018-12-06T15:03:38+00:00" + }, + { + "name": "mrclay/minify", + "version": "3.0.11", + "source": { + "type": "git", + "url": "https://github.com/mrclay/minify.git", + "reference": "f1572a580a8ab29c5c7df4319c4787c74f7dcb3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mrclay/minify/zipball/f1572a580a8ab29c5c7df4319c4787c74f7dcb3e", + "reference": "f1572a580a8ab29c5c7df4319c4787c74f7dcb3e", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "intervention/httpauth": "^2.0|^3.0", + "marcusschwarz/lesserphp": "^0.5.1", + "monolog/monolog": "~1.1|~2.0", + "mrclay/jsmin-php": "~2", + "mrclay/props-dic": "^2.2|^3.0", + "php": "^5.3.0 || ^7.0 || ^8.0", + "tubalmartin/cssmin": "~4" + }, + "require-dev": { + "firephp/firephp-core": "~0.4.0", + "leafo/scssphp": "^0.3 || ^0.6 || ^0.7", + "meenie/javascript-packer": "~1.1", + "phpunit/phpunit": "^4.8.36", + "tedivm/jshrink": "~1.1.0" + }, + "suggest": { + "firephp/firephp-core": "Use FirePHP for Log messages", + "meenie/javascript-packer": "Keep track of the Packer PHP port using Composer" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "lib/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Stephen Clay", + "email": "steve@mrclay.org", + "role": "Developer" + } + ], + "description": "Minify is a PHP app that helps you follow several rules for client-side performance. It combines multiple CSS or Javascript files, removes unnecessary whitespace and comments, and serves them with gzip encoding and optimal client-side cache headers", + "homepage": "https://github.com/mrclay/minify", + "support": { + "email": "minify@googlegroups.com", + "issues": "https://github.com/mrclay/minify/issues", + "source": "https://github.com/mrclay/minify/tree/3.0.11", + "wiki": "https://github.com/mrclay/minify/blob/master/docs" + }, + "time": "2021-03-11T11:58:14+00:00" + }, + { + "name": "mrclay/props-dic", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/mrclay/Props.git", + "reference": "0b0fd254e33e2d60bc2bcd7867f2ab3cdd05a843" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mrclay/Props/zipball/0b0fd254e33e2d60bc2bcd7867f2ab3cdd05a843", + "reference": "0b0fd254e33e2d60bc2bcd7867f2ab3cdd05a843", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "pimple/pimple": "~3.0", + "psr/container": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "autoload": { + "psr-0": { + "Props\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Steve Clay", + "email": "steve@mrclay.org", + "homepage": "http://www.mrclay.org/" + } + ], + "description": "Props is a simple DI container that allows retrieving values via custom property and method names", + "keywords": [ + "container", + "dependency injection", + "dependency injection container", + "di", + "di container" + ], + "support": { + "issues": "https://github.com/mrclay/Props/issues", + "source": "https://github.com/mrclay/Props/tree/master" + }, + "time": "2019-11-26T17:56:10+00:00" + }, + { + "name": "myclabs/php-enum", + "version": "1.7.7", + "source": { + "type": "git", + "url": "https://github.com/myclabs/php-enum.git", + "reference": "d178027d1e679832db9f38248fcc7200647dc2b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/d178027d1e679832db9f38248fcc7200647dc2b7", + "reference": "d178027d1e679832db9f38248fcc7200647dc2b7", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7", + "squizlabs/php_codesniffer": "1.*", + "vimeo/psalm": "^3.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "MyCLabs\\Enum\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP Enum contributors", + "homepage": "https://github.com/myclabs/php-enum/graphs/contributors" + } + ], + "description": "PHP Enum implementation", + "homepage": "http://github.com/myclabs/php-enum", + "keywords": [ + "enum" + ], + "support": { + "issues": "https://github.com/myclabs/php-enum/issues", + "source": "https://github.com/myclabs/php-enum/tree/1.7.7" + }, + "funding": [ + { + "url": "https://github.com/mnapoli", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum", + "type": "tidelift" + } + ], + "time": "2020-11-14T18:14:52+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v4.10.5", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4432ba399e47c66624bc73c8c0f811e5c109576f", + "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.5" + }, + "time": "2021-05-03T19:11:20+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.100", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", + "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", + "shasum": "" + }, + "require": { + "php": ">= 7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "polyfill", + "pseudorandom", + "random" + ], + "support": { + "email": "info@paragonie.com", + "issues": "https://github.com/paragonie/random_compat/issues", + "source": "https://github.com/paragonie/random_compat" + }, + "time": "2020-10-15T08:29:30+00:00" + }, + { + "name": "pear/archive_tar", + "version": "1.4.13", + "source": { + "type": "git", + "url": "https://github.com/pear/Archive_Tar.git", + "reference": "2b87b41178cc6d4ad3cba678a46a1cae49786011" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pear/Archive_Tar/zipball/2b87b41178cc6d4ad3cba678a46a1cae49786011", + "reference": "2b87b41178cc6d4ad3cba678a46a1cae49786011", + "shasum": "" + }, + "require": { + "pear/pear-core-minimal": "^1.10.0alpha2", + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "*" + }, + "suggest": { + "ext-bz2": "Bz2 compression support.", + "ext-xz": "Lzma2 compression support.", + "ext-zlib": "Gzip compression support." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Archive_Tar": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "./" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Vincent Blavet", + "email": "vincent@phpconcept.net" + }, + { + "name": "Greg Beaver", + "email": "greg@chiaraquartet.net" + }, + { + "name": "Michiel Rook", + "email": "mrook@php.net" + } + ], + "description": "Tar file management class with compression support (gzip, bzip2, lzma2)", + "homepage": "https://github.com/pear/Archive_Tar", + "keywords": [ + "archive", + "tar" + ], + "support": { + "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Archive_Tar", + "source": "https://github.com/pear/Archive_Tar" + }, + "funding": [ + { + "url": "https://github.com/mrook", + "type": "github" + }, + { + "url": "https://www.patreon.com/michielrook", + "type": "patreon" + } + ], + "time": "2021-02-16T10:50:50+00:00" + }, + { + "name": "pear/console_getopt", + "version": "v1.4.3", + "source": { + "type": "git", + "url": "https://github.com/pear/Console_Getopt.git", + "reference": "a41f8d3e668987609178c7c4a9fe48fecac53fa0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pear/Console_Getopt/zipball/a41f8d3e668987609178c7c4a9fe48fecac53fa0", + "reference": "a41f8d3e668987609178c7c4a9fe48fecac53fa0", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "Console": "./" + } + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "./" + ], + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Andrei Zmievski", + "email": "andrei@php.net", + "role": "Lead" + }, + { + "name": "Stig Bakken", + "email": "stig@php.net", + "role": "Developer" + }, + { + "name": "Greg Beaver", + "email": "cellog@php.net", + "role": "Helper" + } + ], + "description": "More info available on: http://pear.php.net/package/Console_Getopt", + "support": { + "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Console_Getopt", + "source": "https://github.com/pear/Console_Getopt" + }, + "time": "2019-11-20T18:27:48+00:00" + }, + { + "name": "pear/pear-core-minimal", + "version": "v1.10.10", + "source": { + "type": "git", + "url": "https://github.com/pear/pear-core-minimal.git", + "reference": "625a3c429d9b2c1546438679074cac1b089116a7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/625a3c429d9b2c1546438679074cac1b089116a7", + "reference": "625a3c429d9b2c1546438679074cac1b089116a7", + "shasum": "" + }, + "require": { + "pear/console_getopt": "~1.4", + "pear/pear_exception": "~1.0" + }, + "replace": { + "rsky/pear-core-min": "self.version" + }, + "type": "library", + "autoload": { + "psr-0": { + "": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "src/" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Christian Weiske", + "email": "cweiske@php.net", + "role": "Lead" + } + ], + "description": "Minimal set of PEAR core files to be used as composer dependency", + "support": { + "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR", + "source": "https://github.com/pear/pear-core-minimal" + }, + "time": "2019-11-19T19:00:24+00:00" + }, + { + "name": "pear/pear_exception", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/pear/PEAR_Exception.git", + "reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/pear/PEAR_Exception/zipball/b14fbe2ddb0b9f94f5b24cf08783d599f776fff0", + "reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "<9" + }, + "type": "class", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "PEAR/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "." + ], + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Helgi Thormar", + "email": "dufuz@php.net" + }, + { + "name": "Greg Beaver", + "email": "cellog@php.net" + } + ], + "description": "The PEAR Exception base class.", + "homepage": "https://github.com/pear/PEAR_Exception", + "keywords": [ + "exception" + ], + "support": { + "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR_Exception", + "source": "https://github.com/pear/PEAR_Exception" + }, + "time": "2021-03-21T15:43:46+00:00" + }, + { + "name": "pelago/emogrifier", + "version": "v5.0.1", + "source": { + "type": "git", + "url": "https://github.com/MyIntervals/emogrifier.git", + "reference": "37595a9bb62c3c25969bdd9e8d7dd24c3ac62bc9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MyIntervals/emogrifier/zipball/37595a9bb62c3c25969bdd9e8d7dd24c3ac62bc9", + "reference": "37595a9bb62c3c25969bdd9e8d7dd24c3ac62bc9", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "php": "~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0", + "symfony/css-selector": "^3.4.32 || ^4.4 || ^5.1" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.2.0", + "rawr/cross-data-providers": "^2.3.0", + "slevomat/coding-standard": "^6.4.1", + "squizlabs/php_codesniffer": "^3.5.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Pelago\\Emogrifier\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Oliver Klee", + "email": "github@oliverklee.de" + }, + { + "name": "Zoli Szabó", + "email": "zoli.szabo+github@gmail.com" + }, + { + "name": "John Reeve", + "email": "jreeve@pelagodesign.com" + }, + { + "name": "Jake Hotson", + "email": "jake@qzdesign.co.uk" + }, + { + "name": "Cameron Brooks" + }, + { + "name": "Jaime Prado" + } + ], + "description": "Converts CSS styles into inline style attributes in your HTML code", + "homepage": "https://www.myintervals.com/emogrifier.php", + "keywords": [ + "css", + "email", + "pre-processing" + ], + "support": { + "issues": "https://github.com/MyIntervals/emogrifier/issues", + "source": "https://github.com/MyIntervals/emogrifier" + }, + "time": "2021-04-06T08:18:22+00:00" + }, + { + "name": "php-cs-fixer/diff", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/PHP-CS-Fixer/diff.git", + "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759", + "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", + "symfony/process": "^3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "SpacePossum" + } + ], + "description": "sebastian/diff v2 backport support for PHP5.6", + "homepage": "https://github.com/PHP-CS-Fixer", + "keywords": [ + "diff" + ], + "support": { + "issues": "https://github.com/PHP-CS-Fixer/diff/issues", + "source": "https://github.com/PHP-CS-Fixer/diff/tree/v1.3.1" + }, + "time": "2020-10-14T08:39:05+00:00" + }, + { + "name": "phpoffice/phpspreadsheet", + "version": "1.17.1", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "c55269cb06911575a126dc225a05c0e4626e5fb4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/c55269cb06911575a126dc225a05c0e4626e5fb4", + "reference": "c55269cb06911575a126dc225a05c0e4626e5fb4", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "ezyang/htmlpurifier": "^4.13", + "maennchen/zipstream-php": "^2.1", + "markbaker/complex": "^1.5||^2.0", + "markbaker/matrix": "^1.2||^2.0", + "php": "^7.2||^8.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/simple-cache": "^1.0" + }, + "require-dev": { + "dompdf/dompdf": "^0.8.5", + "friendsofphp/php-cs-fixer": "^2.18", + "jpgraph/jpgraph": "^4.0", + "mpdf/mpdf": "^8.0", + "phpcompatibility/php-compatibility": "^9.3", + "phpunit/phpunit": "^8.5||^9.3", + "squizlabs/php_codesniffer": "^3.5", + "tecnickcom/tcpdf": "^6.3" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)", + "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "https://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker", + "homepage": "https://markbakeruk.net" + }, + { + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Adrien Crivelli" + } + ], + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "support": { + "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", + "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.17.1" + }, + "time": "2021-03-02T17:54:11+00:00" + }, + { + "name": "pimple/pimple", + "version": "v3.4.0", + "source": { + "type": "git", + "url": "https://github.com/silexphp/Pimple.git", + "reference": "86406047271859ffc13424a048541f4531f53601" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/86406047271859ffc13424a048541f4531f53601", + "reference": "86406047271859ffc13424a048541f4531f53601", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "psr/container": "^1.1" + }, + "require-dev": { + "symfony/phpunit-bridge": "^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4.x-dev" + } + }, + "autoload": { + "psr-0": { + "Pimple": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Pimple, a simple Dependency Injection Container", + "homepage": "https://pimple.symfony.com", + "keywords": [ + "container", + "dependency injection" + ], + "support": { + "source": "https://github.com/silexphp/Pimple/tree/v3.4.0" + }, + "time": "2021-03-06T08:28:00+00:00" + }, + { + "name": "prestashop/blockreassurance", + "version": "v5.1.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/blockreassurance.git", + "reference": "7ec28ecf52fcc0ca9787a81edb00f9e7e85d4400" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/blockreassurance/zipball/7ec28ecf52fcc0ca9787a81edb00f9e7e85d4400", + "reference": "7ec28ecf52fcc0ca9787a81edb00f9e7e85d4400", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "require-dev": { + "prestashop/php-dev-tools": "^3.4" + }, + "type": "prestashop-module", + "autoload": { + "psr-4": { + "PrestaShop\\Module\\BlockReassurance\\": "src/" + }, + "classmap": [ + "blockreassurance.php", + "classes/ReassuranceActivity.php" + ], + "exclude-from-classmap": [] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module blockreassurance", + "homepage": "https://github.com/PrestaShop/blockreassurance", + "support": { + "source": "https://github.com/PrestaShop/blockreassurance/tree/v5.1.1" + }, + "time": "2022-04-08T15:28:20+00:00" + }, + { + "name": "prestashop/blockwishlist", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/blockwishlist.git", + "reference": "4feccca6f5f01baa8cc2d70afa71e2da898c9207" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/blockwishlist/zipball/4feccca6f5f01baa8cc2d70afa71e2da898c9207", + "reference": "4feccca6f5f01baa8cc2d70afa71e2da898c9207", + "shasum": "" + }, + "require-dev": { + "prestashop/php-dev-tools": "~3.0" + }, + "type": "prestashop-module", + "autoload": { + "psr-4": { + "PrestaShop\\Module\\BlockWishList\\": "src/" + }, + "classmap": [ + "blockwishlist.php", + "controllers", + "classes" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module blockwishlist", + "homepage": "https://github.com/PrestaShop/blockwishlist", + "support": { + "source": "https://github.com/PrestaShop/blockwishlist/tree/v2.1.0" + }, + "time": "2022-04-25T16:13:04+00:00" + }, + { + "name": "prestashop/circuit-breaker", + "version": "v4.0.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/circuit-breaker.git", + "reference": "9744f98f5f5a3c678fd14cd60b70d2872d9295f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/circuit-breaker/zipball/9744f98f5f5a3c678fd14cd60b70d2872d9295f2", + "reference": "9744f98f5f5a3c678fd14cd60b70d2872d9295f2", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^7.3", + "prestashop/php-dev-tools": "^4.0" + }, + "require-dev": { + "doctrine/cache": "^1.10.2", + "phpunit/phpunit": "^8", + "psr/simple-cache": "^1.0", + "symfony/cache": "^4.4", + "symfony/event-dispatcher": "^4.4" + }, + "suggest": { + "doctrine/cache": "Allows use of Doctrine Cache adapters to store transactions", + "ext-apcu": "Allows use of APCu adapter (performant) to store transactions", + "symfony/cache": "Allows use of Symfony Cache adapters to store transactions" + }, + "type": "library", + "autoload": { + "psr-4": { + "PrestaShop\\CircuitBreaker\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + }, + { + "name": "PrestaShop Community", + "homepage": "http://contributors.prestashop.com/" + } + ], + "description": "A circuit breaker implementation for PHP", + "support": { + "issues": "https://github.com/PrestaShop/circuit-breaker/issues", + "source": "https://github.com/PrestaShop/circuit-breaker/tree/v4.0.0" + }, + "time": "2021-04-20T14:48:25+00:00" + }, + { + "name": "prestashop/classic", + "version": "dev-develop", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/classic-theme.git", + "reference": "d16d146271c6fe0902988e32fe0745fbbf8133ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/classic-theme/zipball/d16d146271c6fe0902988e32fe0745fbbf8133ef", + "reference": "d16d146271c6fe0902988e32fe0745fbbf8133ef", + "shasum": "" + }, + "require-dev": { + "symfony/console": "~4.4 || ^5.0", + "symfony/yaml": "~4.4 || ^5.0" + }, + "default-branch": true, + "type": "prestashop-theme", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + }, + { + "name": "PrestaShop Community", + "homepage": "https://contributors.prestashop.com/" + } + ], + "description": "Classic theme for PrestaShop 1.7", + "support": { + "source": "https://github.com/PrestaShop/classic-theme/tree/develop" + }, + "time": "2022-03-11T17:10:37+00:00" + }, + { + "name": "prestashop/contactform", + "version": "v4.3.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/contactform.git", + "reference": "849aae54ec564aca94877b9bee50e71bb0468edb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/contactform/zipball/849aae54ec564aca94877b9bee50e71bb0468edb", + "reference": "849aae54ec564aca94877b9bee50e71bb0468edb", + "shasum": "" + }, + "require": { + "jakeasmith/http_build_url": "^1", + "php": ">=5.4.0" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module contactform", + "homepage": "https://github.com/PrestaShop/contactform", + "support": { + "source": "https://github.com/PrestaShop/contactform/tree/v4.3.0" + }, + "time": "2020-09-15T09:37:15+00:00" + }, + { + "name": "prestashop/dashactivity", + "version": "v2.0.2", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/dashactivity.git", + "reference": "8d41fab7a58cdaeabc0248f6fd571da32d7615d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/dashactivity/zipball/8d41fab7a58cdaeabc0248f6fd571da32d7615d4", + "reference": "8d41fab7a58cdaeabc0248f6fd571da32d7615d4", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL - Academic Free License (AFL 3.0)" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module dashactivity", + "homepage": "https://github.com/PrestaShop/dashactivity", + "support": { + "source": "https://github.com/PrestaShop/dashactivity/tree/master" + }, + "time": "2017-12-08T11:06:01+00:00" + }, + { + "name": "prestashop/dashgoals", + "version": "v2.0.2", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/dashgoals.git", + "reference": "2a8d41bcc9f2b09924b5e82407bcd6d61ea61ab6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/dashgoals/zipball/2a8d41bcc9f2b09924b5e82407bcd6d61ea61ab6", + "reference": "2a8d41bcc9f2b09924b5e82407bcd6d61ea61ab6", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module dashgoals", + "homepage": "https://github.com/PrestaShop/dashgoals", + "support": { + "source": "https://github.com/PrestaShop/dashgoals/tree/v2.0.2" + }, + "time": "2018-01-29T17:51:57+00:00" + }, + { + "name": "prestashop/dashproducts", + "version": "v2.1.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/dashproducts.git", + "reference": "22652ff141bfc3d5563918210f9b58305c80f4d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/dashproducts/zipball/22652ff141bfc3d5563918210f9b58305c80f4d7", + "reference": "22652ff141bfc3d5563918210f9b58305c80f4d7", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module dashproducts", + "homepage": "https://github.com/PrestaShop/dashproducts", + "support": { + "source": "https://github.com/PrestaShop/dashproducts/tree/v2.1.1" + }, + "time": "2020-09-28T11:23:29+00:00" + }, + { + "name": "prestashop/dashtrends", + "version": "v2.0.3", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/dashtrends.git", + "reference": "da68ea81c2d0d13d9fd851934c75927fe222d5e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/dashtrends/zipball/da68ea81c2d0d13d9fd851934c75927fe222d5e3", + "reference": "da68ea81c2d0d13d9fd851934c75927fe222d5e3", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "prestashop/php-dev-tools": "~3.0" + }, + "type": "prestashop-module", + "autoload": { + "classmap": [ + "dashtrends.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module dashtrends", + "homepage": "https://github.com/PrestaShop/dashtrends", + "support": { + "source": "https://github.com/PrestaShop/dashtrends/tree/v2.0.3" + }, + "time": "2020-10-14T13:35:03+00:00" + }, + { + "name": "prestashop/decimal", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/decimal.git", + "reference": "b5afdcc4b03140f838bb7b256aec6c21fd83951b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/decimal/zipball/b5afdcc4b03140f838bb7b256aec6c21fd83951b", + "reference": "b5afdcc4b03140f838bb7b256aec6c21fd83951b", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.99", + "phpunit/phpunit": "8.*", + "prestashop/php-dev-tools": "^4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "PrestaShop\\Decimal\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "Object-oriented wrapper/shim for BC Math PHP extension. Allows for arbitrary-precision math operations.", + "homepage": "https://github.com/prestashop/decimal", + "keywords": [ + "bcmath", + "decimal", + "math", + "precision", + "prestashop" + ], + "support": { + "issues": "https://github.com/PrestaShop/decimal/issues", + "source": "https://github.com/PrestaShop/decimal/tree/1.5.0" + }, + "time": "2022-02-02T09:04:37+00:00" + }, + { + "name": "prestashop/graphnvd3", + "version": "v2.0.2", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/graphnvd3.git", + "reference": "ba9d68f6a66aca7b8750977d034e2adcceaa4167" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/graphnvd3/zipball/ba9d68f6a66aca7b8750977d034e2adcceaa4167", + "reference": "ba9d68f6a66aca7b8750977d034e2adcceaa4167", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module graphnvd3", + "homepage": "https://github.com/PrestaShop/graphnvd3", + "support": { + "source": "https://github.com/PrestaShop/graphnvd3/tree/v2.0.2" + }, + "time": "2021-11-19T14:55:33+00:00" + }, + { + "name": "prestashop/gridhtml", + "version": "v2.0.2", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/gridhtml.git", + "reference": "184ed2be93b84dea56c98a9042cafd66ac48458b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/gridhtml/zipball/184ed2be93b84dea56c98a9042cafd66ac48458b", + "reference": "184ed2be93b84dea56c98a9042cafd66ac48458b", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "prestashop/php-dev-tools": "^3.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module gridhtml", + "homepage": "https://github.com/PrestaShop/gridhtml", + "support": { + "source": "https://github.com/PrestaShop/gridhtml/tree/v2.0.2" + }, + "time": "2021-11-19T15:48:55+00:00" + }, + { + "name": "prestashop/gsitemap", + "version": "v4.2.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/gsitemap.git", + "reference": "b67dda02a8b6488eb4e2a67080357ac3f9e57057" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/gsitemap/zipball/b67dda02a8b6488eb4e2a67080357ac3f9e57057", + "reference": "b67dda02a8b6488eb4e2a67080357ac3f9e57057", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module gsitemap", + "homepage": "https://github.com/PrestaShop/gsitemap", + "support": { + "source": "https://github.com/PrestaShop/gsitemap/tree/v4.2.0" + }, + "time": "2020-06-23T05:58:30+00:00" + }, + { + "name": "prestashop/header-stamp", + "version": "v2.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShopCorp/header-stamp.git", + "reference": "db3d7d4604e6ef2ac9cf5d88b66601b96d2b9977" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShopCorp/header-stamp/zipball/db3d7d4604e6ef2ac9cf5d88b66601b96d2b9977", + "reference": "db3d7d4604e6ef2ac9cf5d88b66601b96d2b9977", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.10", + "php": ">=7.2.5", + "symfony/console": "^3.4 || ~4.0 || ~5.0", + "symfony/finder": "^3.4 || ~4.0 || ~5.0" + }, + "require-dev": { + "phpstan/phpstan": "^0.12.83", + "prestashop/php-dev-tools": "1.*" + }, + "bin": [ + "bin/header-stamp" + ], + "type": "library", + "autoload": { + "psr-4": { + "PrestaShop\\HeaderStamp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "Rewrite your file headers to add the license or to make them up-to-date", + "homepage": "https://github.com/PrestaShopCorp/header-stamp", + "support": { + "issues": "https://github.com/PrestaShopCorp/header-stamp/issues", + "source": "https://github.com/PrestaShopCorp/header-stamp/tree/v2.0" + }, + "time": "2021-04-16T13:04:37+00:00" + }, + { + "name": "prestashop/pagesnotfound", + "version": "v2.0.2", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/pagesnotfound.git", + "reference": "ac5b640daa39356c8ca96679cbe58e83964b41d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/pagesnotfound/zipball/ac5b640daa39356c8ca96679cbe58e83964b41d2", + "reference": "ac5b640daa39356c8ca96679cbe58e83964b41d2", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module pagesnotfound", + "homepage": "https://github.com/PrestaShop/pagesnotfound", + "support": { + "source": "https://github.com/PrestaShop/pagesnotfound/tree/v2.0.2" + }, + "time": "2022-01-11T07:53:21+00:00" + }, + { + "name": "prestashop/php-dev-tools", + "version": "v4.0.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/php-dev-tools.git", + "reference": "f675c0c296b8399cdd99ac9c09f414ae4a2e72b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/php-dev-tools/zipball/f675c0c296b8399cdd99ac9c09f414ae4a2e72b2", + "reference": "f675c0c296b8399cdd99ac9c09f414ae4a2e72b2", + "shasum": "" + }, + "require": { + "friendsofphp/php-cs-fixer": "^2.14", + "php": ">=7.2.5", + "prestashop/header-stamp": "^2.0", + "squizlabs/php_codesniffer": "^3.4", + "symfony/console": "~3.2 || ~4.0 || ~5.0", + "symfony/filesystem": "~3.2 || ~4.0 || ~5.0" + }, + "conflict": { + "friendsofphp/php-cs-fixer": "2.18.3" + }, + "bin": [ + "bin/prestashop-coding-standards" + ], + "type": "library", + "autoload": { + "psr-4": { + "PrestaShop\\CodingStandards\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PrestaShop coding standards", + "support": { + "issues": "https://github.com/PrestaShop/php-dev-tools/issues", + "source": "https://github.com/PrestaShop/php-dev-tools/tree/v4.0.1" + }, + "time": "2021-05-10T09:33:33+00:00" + }, + { + "name": "prestashop/productcomments", + "version": "v5.0.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/productcomments.git", + "reference": "b2586beb1283ee037273a6cab2a911d0379f00a8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/productcomments/zipball/b2586beb1283ee037273a6cab2a911d0379f00a8", + "reference": "b2586beb1283ee037273a6cab2a911d0379f00a8", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "require-dev": { + "prestashop/php-dev-tools": "^3.4" + }, + "type": "prestashop-module", + "autoload": { + "psr-4": { + "PrestaShop\\Module\\ProductComment\\": "src/" + }, + "classmap": [ + "productcomments.php" + ], + "exclude-from-classmap": [] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module productcomments", + "homepage": "https://github.com/PrestaShop/productcomments", + "support": { + "source": "https://github.com/PrestaShop/productcomments/tree/v5.0.1" + }, + "time": "2022-02-10T15:06:39+00:00" + }, + { + "name": "prestashop/ps_banner", + "version": "v2.1.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_banner.git", + "reference": "020a0ef7fc5732e18ede2a42ab1e8328fe98168e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_banner/zipball/020a0ef7fc5732e18ede2a42ab1e8328fe98168e", + "reference": "020a0ef7fc5732e18ede2a42ab1e8328fe98168e", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module ps_banner", + "homepage": "https://github.com/PrestaShop/ps_banner", + "support": { + "source": "https://github.com/PrestaShop/ps_banner/tree/v2.1.1" + }, + "time": "2021-02-08T08:29:06+00:00" + }, + { + "name": "prestashop/ps_bestsellers", + "version": "v1.0.3", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_bestsellers.git", + "reference": "202054bc2f0fa320fba7a14354d5532618466245" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_bestsellers/zipball/202054bc2f0fa320fba7a14354d5532618466245", + "reference": "202054bc2f0fa320fba7a14354d5532618466245", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL - Academic Free License (AFL 3.0)" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop - Best Sellers", + "homepage": "https://github.com/PrestaShop/ps_bestsellers", + "support": { + "issues": "https://github.com/PrestaShop/ps_bestsellers/issues", + "source": "https://github.com/PrestaShop/ps_bestsellers/tree/v1.0.3" + }, + "time": "2016-11-15T10:30:43+00:00" + }, + { + "name": "prestashop/ps_brandlist", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_brandlist.git", + "reference": "b9c5bf3af0652371b1664f7e3eaf7fff2bb65ed3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_brandlist/zipball/b9c5bf3af0652371b1664f7e3eaf7fff2bb65ed3", + "reference": "b9c5bf3af0652371b1664f7e3eaf7fff2bb65ed3", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL - Academic Free License (AFL 3.0)" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop - Brand list", + "homepage": "https://github.com/PrestaShop/ps_brandlist", + "support": { + "issues": "https://github.com/PrestaShop/ps_brandlist/issues", + "source": "https://github.com/PrestaShop/ps_brandlist/tree/v1.0.2" + }, + "time": "2016-12-21T13:44:23+00:00" + }, + { + "name": "prestashop/ps_cashondelivery", + "version": "v1.0.6", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_cashondelivery.git", + "reference": "7d503ff1f573ab5400fac6dcf0d50be971154af5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_cashondelivery/zipball/7d503ff1f573ab5400fac6dcf0d50be971154af5", + "reference": "7d503ff1f573ab5400fac6dcf0d50be971154af5", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL - Academic Free License (AFL 3.0)" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module ps_cashondelivery", + "homepage": "https://github.com/PrestaShop/ps_cashondelivery", + "support": { + "source": "https://github.com/PrestaShop/ps_cashondelivery/tree/dev" + }, + "time": "2017-03-16T10:24:54+00:00" + }, + { + "name": "prestashop/ps_categoryproducts", + "version": "v1.0.4", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_categoryproducts.git", + "reference": "84c308c249bfd8ecb710450614c4d291e8799d3a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_categoryproducts/zipball/84c308c249bfd8ecb710450614c4d291e8799d3a", + "reference": "84c308c249bfd8ecb710450614c4d291e8799d3a", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL - Academic Free License (AFL 3.0)" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module ps_categoryproducts", + "homepage": "https://github.com/PrestaShop/ps_categoryproducts", + "support": { + "issues": "https://github.com/PrestaShop/ps_categoryproducts/issues", + "source": "https://github.com/PrestaShop/ps_categoryproducts/tree/master" + }, + "time": "2018-12-13T11:37:48+00:00" + }, + { + "name": "prestashop/ps_categorytree", + "version": "v2.0.2", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_categorytree.git", + "reference": "70a8504d2fd1396359efa0184497c4082afe2ebd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_categorytree/zipball/70a8504d2fd1396359efa0184497c4082afe2ebd", + "reference": "70a8504d2fd1396359efa0184497c4082afe2ebd", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "prestashop/php-dev-tools": "~3.0" + }, + "type": "prestashop-module", + "autoload": { + "classmap": [ + "ps_categorytree.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop category tree links", + "homepage": "https://github.com/PrestaShop/ps_categorytree", + "support": { + "source": "https://github.com/PrestaShop/ps_categorytree/tree/v2.0.2" + }, + "time": "2021-02-16T14:53:25+00:00" + }, + { + "name": "prestashop/ps_checkpayment", + "version": "v2.0.5", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_checkpayment.git", + "reference": "6239ecbe75c427f81536ed2df8b56421ab2fa9b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_checkpayment/zipball/6239ecbe75c427f81536ed2df8b56421ab2fa9b2", + "reference": "6239ecbe75c427f81536ed2df8b56421ab2fa9b2", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "prestashop/php-dev-tools": "~3.0" + }, + "type": "prestashop-module", + "autoload": { + "classmap": [ + "ps_checkpayment.php", + "controllers/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module ps_checkpayment", + "homepage": "https://github.com/PrestaShop/ps_checkpayment", + "support": { + "source": "https://github.com/PrestaShop/ps_checkpayment/tree/v2.0.5" + }, + "time": "2020-10-16T07:20:00+00:00" + }, + { + "name": "prestashop/ps_contactinfo", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_contactinfo.git", + "reference": "1c74f18a12118cbb7622e79044c48aaa55ce93c3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_contactinfo/zipball/1c74f18a12118cbb7622e79044c48aaa55ce93c3", + "reference": "1c74f18a12118cbb7622e79044c48aaa55ce93c3", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module ps_contactinfo", + "homepage": "https://github.com/PrestaShop/ps_contactinfo", + "support": { + "source": "https://github.com/PrestaShop/ps_contactinfo/tree/master" + }, + "time": "2020-05-28T12:57:52+00:00" + }, + { + "name": "prestashop/ps_crossselling", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_crossselling.git", + "reference": "0912b4eddef88ca2b3f23bccdee168ebd6bf507f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_crossselling/zipball/0912b4eddef88ca2b3f23bccdee168ebd6bf507f", + "reference": "0912b4eddef88ca2b3f23bccdee168ebd6bf507f", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "prestashop/php-dev-tools": "~3.0" + }, + "type": "prestashop-module", + "autoload": { + "classmap": [ + "ps_crossselling.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop - Cross selling", + "homepage": "https://github.com/PrestaShop/ps_crossselling", + "support": { + "source": "https://github.com/PrestaShop/ps_crossselling/tree/v2.0.1" + }, + "time": "2021-01-07T15:27:15+00:00" + }, + { + "name": "prestashop/ps_currencyselector", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_currencyselector.git", + "reference": "6e2b87c4fbddf757af0233ab419e8a4a76d4daf0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_currencyselector/zipball/6e2b87c4fbddf757af0233ab419e8a4a76d4daf0", + "reference": "6e2b87c4fbddf757af0233ab419e8a4a76d4daf0", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.15.1", + "prestashop/php-dev-tools": "^2" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module ps_currencyselector", + "homepage": "https://github.com/PrestaShop/ps_currencyselector", + "support": { + "source": "https://github.com/PrestaShop/ps_currencyselector/tree/master" + }, + "time": "2019-12-31T16:04:31+00:00" + }, + { + "name": "prestashop/ps_customeraccountlinks", + "version": "v3.1.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_customeraccountlinks.git", + "reference": "d11934ba345af11e51ed7ebc82d1cb4593d21379" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_customeraccountlinks/zipball/d11934ba345af11e51ed7ebc82d1cb4593d21379", + "reference": "d11934ba345af11e51ed7ebc82d1cb4593d21379", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "prestashop/php-dev-tools": "~3.0" + }, + "type": "prestashop-module", + "autoload": { + "classmap": [ + "ps_customeraccountlinks.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module ps_customeraccountlinks", + "homepage": "https://github.com/PrestaShop/ps_customeraccountlinks", + "support": { + "source": "https://github.com/PrestaShop/ps_customeraccountlinks/tree/v3.1.1" + }, + "time": "2021-01-08T13:24:35+00:00" + }, + { + "name": "prestashop/ps_customersignin", + "version": "v2.0.4", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_customersignin.git", + "reference": "a7c1ebb033bf893a057438121b4c664c5f6cc3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_customersignin/zipball/a7c1ebb033bf893a057438121b4c664c5f6cc3cf", + "reference": "a7c1ebb033bf893a057438121b4c664c5f6cc3cf", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "prestashop/php-dev-tools": "~3.0" + }, + "type": "prestashop-module", + "autoload": { + "classmap": [ + "ps_customersignin.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop - Customer 'Sign in' link", + "homepage": "https://github.com/PrestaShop/ps_customersignin", + "support": { + "source": "https://github.com/PrestaShop/ps_customersignin/tree/v2.0.4" + }, + "time": "2021-02-08T09:21:08+00:00" + }, + { + "name": "prestashop/ps_customtext", + "version": "v4.2.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_customtext.git", + "reference": "fb555e29708a3b94784da48f6e2c3fcea8bf9480" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_customtext/zipball/fb555e29708a3b94784da48f6e2c3fcea8bf9480", + "reference": "fb555e29708a3b94784da48f6e2c3fcea8bf9480", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "prestashop/php-dev-tools": "~3.0" + }, + "type": "prestashop-module", + "autoload": { + "classmap": [ + "ps_customtext.php", + "classes/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module ps_customtext", + "homepage": "https://github.com/PrestaShop/ps_customtext", + "support": { + "source": "https://github.com/PrestaShop/ps_customtext/tree/v4.2.0" + }, + "time": "2021-10-26T13:46:46+00:00" + }, + { + "name": "prestashop/ps_dataprivacy", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_dataprivacy.git", + "reference": "0a1380ea25c2b1285788cb2d5d6246b374500bd2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_dataprivacy/zipball/0a1380ea25c2b1285788cb2d5d6246b374500bd2", + "reference": "0a1380ea25c2b1285788cb2d5d6246b374500bd2", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "prestashop/php-dev-tools": "^3.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop - Data privacy", + "homepage": "https://github.com/PrestaShop/ps_dataprivacy", + "support": { + "source": "https://github.com/PrestaShop/ps_dataprivacy/tree/v2.1.0" + }, + "time": "2021-12-31T10:42:45+00:00" + }, + { + "name": "prestashop/ps_emailalerts", + "version": "v2.3.3", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_emailalerts.git", + "reference": "654f9509da88dda9e5e1703fc0b34ad8b4622c29" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_emailalerts/zipball/654f9509da88dda9e5e1703fc0b34ad8b4622c29", + "reference": "654f9509da88dda9e5e1703fc0b34ad8b4622c29", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "prestashop/php-dev-tools": "^3.16" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module ps_emailalerts", + "homepage": "https://github.com/PrestaShop/ps_emailalerts", + "support": { + "source": "https://github.com/PrestaShop/ps_emailalerts/tree/v2.3.3" + }, + "time": "2022-03-11T08:17:10+00:00" + }, + { + "name": "prestashop/ps_emailsubscription", + "version": "v2.7.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_emailsubscription.git", + "reference": "db945167758ec163b9db60b99c3fe4ca363155c2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_emailsubscription/zipball/db945167758ec163b9db60b99c3fe4ca363155c2", + "reference": "db945167758ec163b9db60b99c3fe4ca363155c2", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "prestashop/php-dev-tools": "^3.4" + }, + "type": "prestashop-module", + "autoload": { + "classmap": [ + "ps_emailsubscription.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module ps_emailsubscription", + "homepage": "https://github.com/PrestaShop/ps_emailsubscription", + "support": { + "source": "https://github.com/PrestaShop/ps_emailsubscription/tree/v2.7.0" + }, + "time": "2021-07-08T15:24:45+00:00" + }, + { + "name": "prestashop/ps_facetedsearch", + "version": "v3.7.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_facetedsearch.git", + "reference": "5d7b80bf767d002c37b281e3598069aa5fdbf6ff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_facetedsearch/zipball/5d7b80bf767d002c37b281e3598069aa5fdbf6ff", + "reference": "5d7b80bf767d002c37b281e3598069aa5fdbf6ff", + "shasum": "" + }, + "require": { + "doctrine/collections": "^1.4", + "php": ">=5.6" + }, + "require-dev": { + "mockery/mockery": "^1.2", + "phpunit/phpunit": "~5.7", + "prestashop/php-dev-tools": "^3.4" + }, + "type": "prestashop-module", + "autoload": { + "psr-4": { + "PrestaShop\\Module\\FacetedSearch\\": "src/", + "PrestaShop\\Module\\FacetedSearch\\Tests\\": "tests/php/FacetedSearch", + "PrestaShop\\Module\\FacetedSearch\\Controller\\": "src/Controller/" + }, + "classmap": [ + "ps_facetedsearch.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module ps_facetedsearch", + "homepage": "https://github.com/PrestaShop/ps_facetedsearch", + "support": { + "source": "https://github.com/PrestaShop/ps_facetedsearch/tree/v3.7.1" + }, + "time": "2021-03-15T07:56:51+00:00" + }, + { + "name": "prestashop/ps_faviconnotificationbo", + "version": "v2.1.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_faviconnotificationbo.git", + "reference": "47f67bbcf2ee3802d2ed492821a056b9513200d8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_faviconnotificationbo/zipball/47f67bbcf2ee3802d2ed492821a056b9513200d8", + "reference": "47f67bbcf2ee3802d2ed492821a056b9513200d8", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "prestashop/php-dev-tools": "^3.4" + }, + "type": "prestashop-module", + "autoload": { + "classmap": [ + "controllers", + "ps_faviconnotificationbo.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop - Favicon notification BO", + "homepage": "https://github.com/PrestaShop/ps_faviconnotificationbo", + "support": { + "source": "https://github.com/PrestaShop/ps_faviconnotificationbo/tree/v2.1.1" + }, + "time": "2021-10-22T18:08:46+00:00" + }, + { + "name": "prestashop/ps_featuredproducts", + "version": "v2.1.2", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_featuredproducts.git", + "reference": "44e6567bd0419537d61389741c7e68ef90d8caf3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_featuredproducts/zipball/44e6567bd0419537d61389741c7e68ef90d8caf3", + "reference": "44e6567bd0419537d61389741c7e68ef90d8caf3", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "prestashop/php-dev-tools": "^3.4" + }, + "type": "prestashop-module", + "autoload": { + "classmap": [ + "ps_featuredproducts.php" + ], + "exclude-from-classmap": [] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop - Featured products", + "homepage": "https://github.com/PrestaShop/ps_featuredproducts", + "support": { + "source": "https://github.com/PrestaShop/ps_featuredproducts/tree/v2.1.2" + }, + "time": "2021-12-14T09:04:39+00:00" + }, + { + "name": "prestashop/ps_googleanalytics", + "version": "v4.1.2", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_googleanalytics.git", + "reference": "ced588980dcc3eeff06a2a8e275cf76c27a35e9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_googleanalytics/zipball/ced588980dcc3eeff06a2a8e275cf76c27a35e9e", + "reference": "ced588980dcc3eeff06a2a8e275cf76c27a35e9e", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "prestashop/php-dev-tools": "3.*" + }, + "type": "prestashop-module", + "autoload": { + "classmap": [ + "ps_googleanalytics.php", + "controllers", + "classes" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module ps_googleanalytics", + "homepage": "https://github.com/PrestaShop/ps_googleanalytics", + "support": { + "source": "https://github.com/PrestaShop/ps_googleanalytics/tree/v4.1.2" + }, + "time": "2022-03-24T08:50:37+00:00" + }, + { + "name": "prestashop/ps_imageslider", + "version": "v3.1.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_imageslider.git", + "reference": "52e9d1a068e3b2879ce2184f00c083c8190c7ce7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_imageslider/zipball/52e9d1a068e3b2879ce2184f00c083c8190c7ce7", + "reference": "52e9d1a068e3b2879ce2184f00c083c8190c7ce7", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop - Image slider", + "homepage": "https://github.com/PrestaShop/ps_imageslider", + "support": { + "source": "https://github.com/PrestaShop/ps_imageslider/tree/master" + }, + "time": "2020-06-01T13:57:45+00:00" + }, + { + "name": "prestashop/ps_languageselector", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_languageselector.git", + "reference": "22d69b4dbc1a12ab2692d91962d8993d6e64557f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_languageselector/zipball/22d69b4dbc1a12ab2692d91962d8993d6e64557f", + "reference": "22d69b4dbc1a12ab2692d91962d8993d6e64557f", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module ps_languageselector", + "homepage": "https://github.com/PrestaShop/ps_languageselector", + "support": { + "source": "https://github.com/PrestaShop/ps_languageselector/tree/v2.1.0" + }, + "time": "2020-06-26T07:00:29+00:00" + }, + { + "name": "prestashop/ps_linklist", + "version": "v5.0.4", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_linklist.git", + "reference": "5cbfe0566d7273cb15e199915cdf2a7c912ebcda" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_linklist/zipball/5cbfe0566d7273cb15e199915cdf2a7c912ebcda", + "reference": "5cbfe0566d7273cb15e199915cdf2a7c912ebcda", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "require-dev": { + "prestashop/php-dev-tools": "^3.4" + }, + "type": "prestashop-module", + "autoload": { + "psr-4": { + "PrestaShop\\Module\\LinkList\\": "src/" + }, + "classmap": [ + "ps_linklist.php" + ], + "exclude-from-classmap": [] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop - Link list", + "homepage": "https://github.com/PrestaShop/ps_linklist", + "support": { + "source": "https://github.com/PrestaShop/ps_linklist/tree/v5.0.4" + }, + "time": "2021-07-27T09:07:29+00:00" + }, + { + "name": "prestashop/ps_mainmenu", + "version": "v2.3.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_mainmenu.git", + "reference": "64dcfbdad19ee20b644b32ea19dafb90c0a66cc2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_mainmenu/zipball/64dcfbdad19ee20b644b32ea19dafb90c0a66cc2", + "reference": "64dcfbdad19ee20b644b32ea19dafb90c0a66cc2", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "prestashop/php-dev-tools": "^3.4" + }, + "type": "prestashop-module", + "autoload": { + "classmap": [ + "ps_mainmenu.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop - Main menu", + "homepage": "https://github.com/PrestaShop/ps_mainmenu", + "support": { + "source": "https://github.com/PrestaShop/ps_mainmenu/tree/v2.3.1" + }, + "time": "2021-10-27T13:44:04+00:00" + }, + { + "name": "prestashop/ps_newproducts", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_newproducts.git", + "reference": "e092cccc304d3ac5a2566db3adacf22c27fc7c51" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_newproducts/zipball/e092cccc304d3ac5a2566db3adacf22c27fc7c51", + "reference": "e092cccc304d3ac5a2566db3adacf22c27fc7c51", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL - Academic Free License (AFL 3.0)" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop - New products", + "homepage": "https://github.com/PrestaShop/ps_newproducts", + "support": { + "issues": "https://github.com/PrestaShop/ps_newproducts/issues", + "source": "https://github.com/PrestaShop/ps_newproducts/tree/v1.0.1" + }, + "time": "2016-11-15T10:46:28+00:00" + }, + { + "name": "prestashop/ps_searchbar", + "version": "v2.1.2", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_searchbar.git", + "reference": "68221f79c163e356765a1cfeda7d623e49d54f73" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_searchbar/zipball/68221f79c163e356765a1cfeda7d623e49d54f73", + "reference": "68221f79c163e356765a1cfeda7d623e49d54f73", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "prestashop/php-dev-tools": "^3.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module ps_searchbar", + "homepage": "https://github.com/PrestaShop/ps_searchbar", + "support": { + "source": "https://github.com/PrestaShop/ps_searchbar/tree/v2.1.2" + }, + "time": "2021-10-29T14:08:07+00:00" + }, + { + "name": "prestashop/ps_sharebuttons", + "version": "v2.1.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_sharebuttons.git", + "reference": "698f3875c5040f16ff6b2a2e549efc306f9d920e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_sharebuttons/zipball/698f3875c5040f16ff6b2a2e549efc306f9d920e", + "reference": "698f3875c5040f16ff6b2a2e549efc306f9d920e", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module ps_sharebuttons", + "homepage": "https://github.com/PrestaShop/ps_sharebuttons", + "support": { + "source": "https://github.com/PrestaShop/ps_sharebuttons/tree/v2.1.1" + }, + "time": "2021-04-01T13:36:26+00:00" + }, + { + "name": "prestashop/ps_shoppingcart", + "version": "v2.0.5", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_shoppingcart.git", + "reference": "114e39589e84536af46cc344e05c0e8bc37355e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_shoppingcart/zipball/114e39589e84536af46cc344e05c0e8bc37355e3", + "reference": "114e39589e84536af46cc344e05c0e8bc37355e3", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "prestashop/php-dev-tools": "~3.0" + }, + "type": "prestashop-module", + "autoload": { + "classmap": [ + "ps_shoppingcart.php", + "controllers/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module ps_shoppingcart", + "homepage": "https://github.com/PrestaShop/ps_shoppingcart", + "support": { + "source": "https://github.com/PrestaShop/ps_shoppingcart/tree/v2.0.5" + }, + "time": "2021-12-15T08:46:24+00:00" + }, + { + "name": "prestashop/ps_socialfollow", + "version": "v2.2.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_socialfollow.git", + "reference": "3b537198d70f935e8c658d57f3e0c98306125838" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_socialfollow/zipball/3b537198d70f935e8c658d57f3e0c98306125838", + "reference": "3b537198d70f935e8c658d57f3e0c98306125838", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module ps_socialfollow", + "homepage": "https://github.com/PrestaShop/ps_socialfollow", + "support": { + "issues": "https://github.com/PrestaShop/ps_socialfollow/issues", + "source": "https://github.com/PrestaShop/ps_socialfollow/tree/v2.2.0" + }, + "time": "2021-07-28T07:38:05+00:00" + }, + { + "name": "prestashop/ps_specials", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_specials.git", + "reference": "536b20a64a8aa7c4eec096ae2adbeb414a94c5ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_specials/zipball/536b20a64a8aa7c4eec096ae2adbeb414a94c5ca", + "reference": "536b20a64a8aa7c4eec096ae2adbeb414a94c5ca", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL - Academic Free License (AFL 3.0)" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop - Specials", + "homepage": "https://github.com/PrestaShop/ps_specials", + "support": { + "issues": "https://github.com/PrestaShop/ps_specials/issues", + "source": "https://github.com/PrestaShop/ps_specials/tree/v1.0.1" + }, + "time": "2016-11-15T10:55:06+00:00" + }, + { + "name": "prestashop/ps_supplierlist", + "version": "v1.0.4", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_supplierlist.git", + "reference": "b2848891f60f5343e4a0f0231d75ad777c2c5dbf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_supplierlist/zipball/b2848891f60f5343e4a0f0231d75ad777c2c5dbf", + "reference": "b2848891f60f5343e4a0f0231d75ad777c2c5dbf", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop - Supplier List", + "homepage": "https://github.com/PrestaShop/ps_supplierlist", + "support": { + "issues": "https://github.com/PrestaShop/ps_supplierlist/issues", + "source": "https://github.com/PrestaShop/ps_supplierlist/tree/v1.0.4" + }, + "time": "2021-11-25T10:48:12+00:00" + }, + { + "name": "prestashop/ps_themecusto", + "version": "v1.2.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_themecusto.git", + "reference": "f9e401ed96a4f4f7f60811a7110d6fe5127d9305" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_themecusto/zipball/f9e401ed96a4f4f7f60811a7110d6fe5127d9305", + "reference": "f9e401ed96a4f4f7f60811a7110d6fe5127d9305", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "prestashop/php-dev-tools": "^3.4" + }, + "type": "prestashop-module", + "autoload": { + "classmap": [ + "ps_themecusto.php", + "controllers", + "classes" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module ps_themecusto", + "homepage": "https://github.com/PrestaShop/ps_themecusto", + "support": { + "source": "https://github.com/PrestaShop/ps_themecusto/tree/v1.2.1" + }, + "time": "2021-01-19T08:41:00+00:00" + }, + { + "name": "prestashop/ps_viewedproduct", + "version": "v1.2.2", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_viewedproduct.git", + "reference": "2ea78388b13a49c18ce409870f32a44e88934456" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_viewedproduct/zipball/2ea78388b13a49c18ce409870f32a44e88934456", + "reference": "2ea78388b13a49c18ce409870f32a44e88934456", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop - Viewed Products", + "homepage": "https://github.com/PrestaShop/ps_viewedproduct", + "support": { + "source": "https://github.com/PrestaShop/ps_viewedproduct/tree/v1.2.2" + }, + "time": "2021-10-26T14:04:09+00:00" + }, + { + "name": "prestashop/ps_wirepayment", + "version": "v2.1.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/ps_wirepayment.git", + "reference": "2c228b7050674d673d515baaedfaf469232a5e9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/ps_wirepayment/zipball/2c228b7050674d673d515baaedfaf469232a5e9e", + "reference": "2c228b7050674d673d515baaedfaf469232a5e9e", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "prestashop/php-dev-tools": "^3.4" + }, + "type": "prestashop-module", + "autoload": { + "classmap": [ + "ps_wirepayment.php" + ], + "exclude-from-classmap": [] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module ps_wirepayment", + "homepage": "https://github.com/PrestaShop/ps_wirepayment", + "support": { + "source": "https://github.com/PrestaShop/ps_wirepayment/tree/v2.1.1" + }, + "time": "2021-12-28T16:47:05+00:00" + }, + { + "name": "prestashop/psgdpr", + "version": "v1.4.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/psgdpr.git", + "reference": "3266aee66e4853920d17551e3c33259b3970bd62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/psgdpr/zipball/3266aee66e4853920d17551e3c33259b3970bd62", + "reference": "3266aee66e4853920d17551e3c33259b3970bd62", + "shasum": "" + }, + "require-dev": { + "prestashop/php-dev-tools": "^3.4" + }, + "type": "prestashop-module", + "autoload": { + "classmap": [ + "classes", + "controllers", + "psgdpr.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module psgdpr", + "homepage": "https://github.com/PrestaShopCorp/psgdpr", + "support": { + "source": "https://github.com/PrestaShop/psgdpr/tree/v1.4.1" + }, + "time": "2022-04-06T14:40:30+00:00" + }, + { + "name": "prestashop/statsbestcategories", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/statsbestcategories.git", + "reference": "fee7b7c679ec6cdec8fe643f8dbc4399f6008e60" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/statsbestcategories/zipball/fee7b7c679ec6cdec8fe643f8dbc4399f6008e60", + "reference": "fee7b7c679ec6cdec8fe643f8dbc4399f6008e60", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module statsbestcategories", + "homepage": "https://github.com/PrestaShop/statsbestcategories", + "support": { + "source": "https://github.com/PrestaShop/statsbestcategories/tree/v2.0.1" + }, + "time": "2022-01-06T18:39:43+00:00" + }, + { + "name": "prestashop/statsbestcustomers", + "version": "v2.0.3", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/statsbestcustomers.git", + "reference": "979518b00f321f1429ca8e251416bf2d2281a931" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/statsbestcustomers/zipball/979518b00f321f1429ca8e251416bf2d2281a931", + "reference": "979518b00f321f1429ca8e251416bf2d2281a931", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "prestashop/php-dev-tools": "^3.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module statsbestcustomers", + "homepage": "https://github.com/PrestaShop/statsbestcustomers", + "support": { + "source": "https://github.com/PrestaShop/statsbestcustomers/tree/v2.0.3" + }, + "time": "2021-11-26T08:43:37+00:00" + }, + { + "name": "prestashop/statsbestmanufacturers", + "version": "v2.0.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/statsbestmanufacturers.git", + "reference": "b9897beda6084d08f489d4d00995a085b8e76739" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/statsbestmanufacturers/zipball/b9897beda6084d08f489d4d00995a085b8e76739", + "reference": "b9897beda6084d08f489d4d00995a085b8e76739", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL - Academic Free License (AFL 3.0)" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module statsbestmanufacturers", + "homepage": "https://github.com/PrestaShop/statsbestmanufacturers", + "support": { + "source": "https://github.com/PrestaShop/statsbestmanufacturers/tree/dev" + }, + "time": "2017-01-31T17:03:07+00:00" + }, + { + "name": "prestashop/statsbestproducts", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/statsbestproducts.git", + "reference": "0f5e03455cce6f6b0798948a67c26b413227d25a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/statsbestproducts/zipball/0f5e03455cce6f6b0798948a67c26b413227d25a", + "reference": "0f5e03455cce6f6b0798948a67c26b413227d25a", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module statsbestproducts", + "homepage": "https://github.com/PrestaShop/statsbestproducts", + "support": { + "source": "https://github.com/PrestaShop/statsbestproducts/tree/v2.0.1" + }, + "time": "2022-01-11T07:52:37+00:00" + }, + { + "name": "prestashop/statsbestsuppliers", + "version": "v2.0.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/statsbestsuppliers.git", + "reference": "7e46e732b8a77dc989f5891ff9d3616d1c5fd46f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/statsbestsuppliers/zipball/7e46e732b8a77dc989f5891ff9d3616d1c5fd46f", + "reference": "7e46e732b8a77dc989f5891ff9d3616d1c5fd46f", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL - Academic Free License (AFL 3.0)" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module statsbestsuppliers", + "homepage": "https://github.com/PrestaShop/statsbestsuppliers", + "support": { + "source": "https://github.com/PrestaShop/statsbestsuppliers/tree/dev" + }, + "time": "2017-01-30T16:34:19+00:00" + }, + { + "name": "prestashop/statsbestvouchers", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/statsbestvouchers.git", + "reference": "9b9a8e1af451541e021c2af17c60e943fe594559" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/statsbestvouchers/zipball/9b9a8e1af451541e021c2af17c60e943fe594559", + "reference": "9b9a8e1af451541e021c2af17c60e943fe594559", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module statsbestvouchers", + "homepage": "https://github.com/PrestaShop/statsbestvouchers", + "support": { + "source": "https://github.com/PrestaShop/statsbestvouchers/tree/v2.0.1" + }, + "time": "2022-01-10T14:25:22+00:00" + }, + { + "name": "prestashop/statscarrier", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/statscarrier.git", + "reference": "9f4cc5c7dbcc6f08be0aa2e7e6dc333d1ea665dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/statscarrier/zipball/9f4cc5c7dbcc6f08be0aa2e7e6dc333d1ea665dc", + "reference": "9f4cc5c7dbcc6f08be0aa2e7e6dc333d1ea665dc", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module statscarrier", + "homepage": "https://github.com/PrestaShop/statscarrier", + "support": { + "source": "https://github.com/PrestaShop/statscarrier/tree/v2.0.1" + }, + "time": "2022-01-11T07:50:23+00:00" + }, + { + "name": "prestashop/statscatalog", + "version": "v2.0.2", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/statscatalog.git", + "reference": "eea71b6b598c27fe4de71956ff9b485ec78de97e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/statscatalog/zipball/eea71b6b598c27fe4de71956ff9b485ec78de97e", + "reference": "eea71b6b598c27fe4de71956ff9b485ec78de97e", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "require-dev": { + "prestashop/php-dev-tools": "^3.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module statscatalog", + "homepage": "https://github.com/PrestaShop/statscatalog", + "support": { + "source": "https://github.com/PrestaShop/statscatalog/tree/v2.0.2" + }, + "time": "2021-10-27T15:24:39+00:00" + }, + { + "name": "prestashop/statscheckup", + "version": "v2.0.2", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/statscheckup.git", + "reference": "ef485adc627745c7e0fa25ad8082c6f4b96dc3cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/statscheckup/zipball/ef485adc627745c7e0fa25ad8082c6f4b96dc3cf", + "reference": "ef485adc627745c7e0fa25ad8082c6f4b96dc3cf", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module statscheckup", + "homepage": "https://github.com/PrestaShop/statscheckup", + "support": { + "source": "https://github.com/PrestaShop/statscheckup/tree/v2.0.2" + }, + "time": "2022-01-04T15:20:35+00:00" + }, + { + "name": "prestashop/statsdata", + "version": "v2.1.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/statsdata.git", + "reference": "4de78d4c0b096f2d6768f5c96856ea8eabd8358c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/statsdata/zipball/4de78d4c0b096f2d6768f5c96856ea8eabd8358c", + "reference": "4de78d4c0b096f2d6768f5c96856ea8eabd8358c", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module statsdata", + "homepage": "https://github.com/PrestaShop/statsdata", + "support": { + "source": "https://github.com/PrestaShop/statsdata/tree/master" + }, + "time": "2020-07-15T13:10:39+00:00" + }, + { + "name": "prestashop/statsforecast", + "version": "v2.0.4", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/statsforecast.git", + "reference": "9f2ab9f6ca1bf35ee5f108c5f2ed346d3f8b9b73" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/statsforecast/zipball/9f2ab9f6ca1bf35ee5f108c5f2ed346d3f8b9b73", + "reference": "9f2ab9f6ca1bf35ee5f108c5f2ed346d3f8b9b73", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module statsforecast", + "homepage": "https://github.com/PrestaShop/statsforecast", + "support": { + "source": "https://github.com/PrestaShop/statsforecast/tree/v2.0.4" + }, + "time": "2022-02-03T14:49:26+00:00" + }, + { + "name": "prestashop/statsnewsletter", + "version": "v2.0.3", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/statsnewsletter.git", + "reference": "cca041983fee792469f865c9709f8f1a4cd4591c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/statsnewsletter/zipball/cca041983fee792469f865c9709f8f1a4cd4591c", + "reference": "cca041983fee792469f865c9709f8f1a4cd4591c", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module statsnewsletter", + "homepage": "https://github.com/PrestaShop/statsnewsletter", + "support": { + "source": "https://github.com/PrestaShop/statsnewsletter/tree/v2.0.3" + }, + "time": "2022-01-11T16:01:42+00:00" + }, + { + "name": "prestashop/statspersonalinfos", + "version": "v2.0.4", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/statspersonalinfos.git", + "reference": "f0dfeccf98e831287db9a66bee6785135fbba643" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/statspersonalinfos/zipball/f0dfeccf98e831287db9a66bee6785135fbba643", + "reference": "f0dfeccf98e831287db9a66bee6785135fbba643", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module statspersonalinfos", + "homepage": "https://github.com/PrestaShop/statspersonalinfos", + "support": { + "source": "https://github.com/PrestaShop/statspersonalinfos/tree/v2.0.4" + }, + "time": "2022-01-10T14:47:14+00:00" + }, + { + "name": "prestashop/statsproduct", + "version": "v2.1.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/statsproduct.git", + "reference": "804f5a33ac45e41525613a1c87ff73928a2a4126" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/statsproduct/zipball/804f5a33ac45e41525613a1c87ff73928a2a4126", + "reference": "804f5a33ac45e41525613a1c87ff73928a2a4126", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module statsproduct", + "homepage": "https://github.com/PrestaShop/statsproduct", + "support": { + "source": "https://github.com/PrestaShop/statsproduct/tree/v2.1.1" + }, + "time": "2022-01-04T12:54:39+00:00" + }, + { + "name": "prestashop/statsregistrations", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/statsregistrations.git", + "reference": "efdc328afa96ffed859fb8333a3a18b9a86e1c4a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/statsregistrations/zipball/efdc328afa96ffed859fb8333a3a18b9a86e1c4a", + "reference": "efdc328afa96ffed859fb8333a3a18b9a86e1c4a", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module statsregistrations", + "homepage": "https://github.com/PrestaShop/statsregistrations", + "support": { + "source": "https://github.com/PrestaShop/statsregistrations/tree/v2.0.1" + }, + "time": "2022-01-04T13:38:03+00:00" + }, + { + "name": "prestashop/statssales", + "version": "v2.0.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/statssales.git", + "reference": "6e28ce4ea2eb1a4a8b6b76bfb6b56e1b02ef651a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/statssales/zipball/6e28ce4ea2eb1a4a8b6b76bfb6b56e1b02ef651a", + "reference": "6e28ce4ea2eb1a4a8b6b76bfb6b56e1b02ef651a", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL - Academic Free License (AFL 3.0)" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module statssales", + "homepage": "https://github.com/PrestaShop/statssales", + "support": { + "source": "https://github.com/PrestaShop/statssales/tree/dev" + }, + "time": "2017-01-31T17:23:19+00:00" + }, + { + "name": "prestashop/statssearch", + "version": "v2.0.2", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/statssearch.git", + "reference": "10fe164304f1cf3d230f04c917d53e8859fed203" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/statssearch/zipball/10fe164304f1cf3d230f04c917d53e8859fed203", + "reference": "10fe164304f1cf3d230f04c917d53e8859fed203", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL-3.0" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module statssearch", + "homepage": "https://github.com/PrestaShop/statssearch", + "support": { + "source": "https://github.com/PrestaShop/statssearch/tree/v2.0.2" + }, + "time": "2022-01-11T07:51:12+00:00" + }, + { + "name": "prestashop/statsstock", + "version": "v2.0.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/statsstock.git", + "reference": "1b60aae430151943d6e4b0068a3e30ab2cc5843e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/statsstock/zipball/1b60aae430151943d6e4b0068a3e30ab2cc5843e", + "reference": "1b60aae430151943d6e4b0068a3e30ab2cc5843e", + "shasum": "" + }, + "require": { + "php": ">=5.4" + }, + "type": "prestashop-module", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AFL - Academic Free License (AFL 3.0)" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop module statsstock", + "homepage": "https://github.com/PrestaShop/statsstock", + "support": { + "source": "https://github.com/PrestaShop/statsstock/tree/dev" + }, + "time": "2017-01-31T17:24:06+00:00" + }, + { + "name": "prestashop/translationtools-bundle", + "version": "v5.0.2", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/TranslationToolsBundle.git", + "reference": "b4ebf59ec6a7598da010b8ef1a4f2b954ccd2db7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/TranslationToolsBundle/zipball/b4ebf59ec6a7598da010b8ef1a4f2b954ccd2db7", + "reference": "b4ebf59ec6a7598da010b8ef1a4f2b954ccd2db7", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4", + "php": ">=7.2", + "smarty/smarty": "^3.1", + "symfony/twig-bridge": "^3.4 || ^4.4 || ^5.0", + "twig/twig": "^1.38 || ^2.7 || ^3.0" + }, + "require-dev": { + "doctrine/common": "^2.10.0", + "friendsofphp/php-cs-fixer": "^3.2", + "phpunit/phpunit": "^7.5 || ^8.5", + "symfony/framework-bundle": "^3.4 || ^4.4 || ^5.0", + "symfony/symfony": "^4", + "symfony/translation": "^3.4 || ^4.4 || ^5.0", + "symfony/twig-bundle": "^4" + }, + "type": "bundle", + "autoload": { + "psr-4": { + "PrestaShop\\TranslationToolsBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + }, + { + "name": "PrestaShop Community", + "homepage": "https://contributors.prestashop.com/" + } + ], + "description": "Translation tools for PrestaShop", + "keywords": [ + "parser", + "prestashop", + "translation" + ], + "support": { + "issues": "https://github.com/PrestaShop/TranslationToolsBundle/issues", + "source": "https://github.com/PrestaShop/TranslationToolsBundle/tree/v5.0.2" + }, + "time": "2021-11-19T15:01:56+00:00" + }, + { + "name": "psr/cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/master" + }, + "time": "2016-08-06T20:24:11+00:00" + }, + { + "name": "psr/container", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.1" + }, + "time": "2021-03-05T17:36:06+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client/tree/master" + }, + "time": "2020-06-29T06:28:15+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory/tree/master" + }, + "time": "2019-04-30T12:38:16+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, + "time": "2016-08-06T14:39:51+00:00" + }, + { + "name": "psr/link", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/link.git", + "reference": "eea8e8662d5cd3ae4517c9b864493f59fca95562" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/link/zipball/eea8e8662d5cd3ae4517c9b864493f59fca95562", + "reference": "eea8e8662d5cd3ae4517c9b864493f59fca95562", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Link\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for HTTP links", + "keywords": [ + "http", + "http-link", + "link", + "psr", + "psr-13", + "rest" + ], + "support": { + "source": "https://github.com/php-fig/link/tree/master" + }, + "time": "2016-10-28T16:06:13+00:00" + }, + { + "name": "psr/log", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", + "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/1.1.4" + }, + "time": "2021-05-03T11:20:27+00:00" + }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/master" + }, + "time": "2017-10-23T01:57:42+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "sensio/framework-extra-bundle", + "version": "v5.6.1", + "source": { + "type": "git", + "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", + "reference": "430d14c01836b77c28092883d195a43ce413ee32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/430d14c01836b77c28092883d195a43ce413ee32", + "reference": "430d14c01836b77c28092883d195a43ce413ee32", + "shasum": "" + }, + "require": { + "doctrine/annotations": "^1.0", + "php": ">=7.2.5", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/framework-bundle": "^4.4|^5.0", + "symfony/http-kernel": "^4.4|^5.0" + }, + "conflict": { + "doctrine/doctrine-cache-bundle": "<1.3.1", + "doctrine/persistence": "<1.3" + }, + "require-dev": { + "doctrine/dbal": "^2.10|^3.0", + "doctrine/doctrine-bundle": "^1.11|^2.0", + "doctrine/orm": "^2.5", + "nyholm/psr7": "^1.1", + "symfony/browser-kit": "^4.4|^5.0", + "symfony/doctrine-bridge": "^4.4|^5.0", + "symfony/dom-crawler": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/finder": "^4.4|^5.0", + "symfony/monolog-bridge": "^4.0|^5.0", + "symfony/monolog-bundle": "^3.2", + "symfony/phpunit-bridge": "^4.4.9|^5.0.9", + "symfony/psr-http-message-bridge": "^1.1", + "symfony/security-bundle": "^4.4|^5.0", + "symfony/twig-bundle": "^4.4|^5.0", + "symfony/yaml": "^4.4|^5.0", + "twig/twig": "^1.34|^2.4|^3.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "5.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "Sensio\\Bundle\\FrameworkExtraBundle\\": "src/" + }, + "exclude-from-classmap": [ + "/tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "This bundle provides a way to configure your controllers with annotations", + "keywords": [ + "annotations", + "controllers" + ], + "support": { + "issues": "https://github.com/sensiolabs/SensioFrameworkExtraBundle/issues", + "source": "https://github.com/sensiolabs/SensioFrameworkExtraBundle/tree/v5.6.1" + }, + "time": "2020-08-25T19:10:18+00:00" + }, + { + "name": "smarty/smarty", + "version": "v3.1.43", + "source": { + "type": "git", + "url": "https://github.com/smarty-php/smarty.git", + "reference": "273f7e00fec034f6d61112552e9caf08d19565b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/smarty-php/smarty/zipball/273f7e00fec034f6d61112552e9caf08d19565b7", + "reference": "273f7e00fec034f6d61112552e9caf08d19565b7", + "shasum": "" + }, + "require": { + "php": ">=5.2" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^6.5 || ^5.7 || ^4.8", + "smarty/smarty-lexer": "^3.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "libs/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0" + ], + "authors": [ + { + "name": "Monte Ohrt", + "email": "monte@ohrt.com" + }, + { + "name": "Uwe Tews", + "email": "uwe.tews@googlemail.com" + }, + { + "name": "Rodney Rehm", + "email": "rodney.rehm@medialize.de" + } + ], + "description": "Smarty - the compiling PHP template engine", + "homepage": "http://www.smarty.net", + "keywords": [ + "templating" + ], + "support": { + "forum": "http://www.smarty.net/forums/", + "irc": "irc://irc.freenode.org/smarty", + "issues": "https://github.com/smarty-php/smarty/issues", + "source": "https://github.com/smarty-php/smarty/tree/v3.1.43" + }, + "time": "2022-01-10T09:52:40+00:00" + }, + { + "name": "soundasleep/html2text", + "version": "0.5.0", + "source": { + "type": "git", + "url": "https://github.com/soundasleep/html2text.git", + "reference": "cdb89f6ffa2c4cc78f8ed9ea6ee0594a9133ccad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/soundasleep/html2text/zipball/cdb89f6ffa2c4cc78f8ed9ea6ee0594a9133ccad", + "reference": "cdb89f6ffa2c4cc78f8ed9ea6ee0594a9133ccad", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": ">=4.0", + "soundasleep/component-tests": "dev-master" + }, + "type": "library", + "autoload": { + "psr-4": { + "Html2Text\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "EPL-1.0" + ], + "authors": [ + { + "name": "Jevon Wright", + "homepage": "https://jevon.org", + "role": "Developer" + } + ], + "description": "A PHP script to convert HTML into a plain text format", + "homepage": "https://github.com/soundasleep/html2text", + "keywords": [ + "email", + "html", + "php", + "text" + ], + "support": { + "email": "support@jevon.org", + "issues": "https://github.com/soundasleep/html2text/issues", + "source": "https://github.com/soundasleep/html2text/tree/master" + }, + "time": "2017-04-19T22:01:50+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.6.0", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" + }, + "bin": [ + "bin/phpcs", + "bin/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards" + ], + "support": { + "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", + "source": "https://github.com/squizlabs/PHP_CodeSniffer", + "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" + }, + "time": "2021-04-09T00:54:41+00:00" + }, + { + "name": "swiftmailer/swiftmailer", + "version": "v6.2.7", + "source": { + "type": "git", + "url": "https://github.com/swiftmailer/swiftmailer.git", + "reference": "15f7faf8508e04471f666633addacf54c0ab5933" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/15f7faf8508e04471f666633addacf54c0ab5933", + "reference": "15f7faf8508e04471f666633addacf54c0ab5933", + "shasum": "" + }, + "require": { + "egulias/email-validator": "^2.0|^3.1", + "php": ">=7.0.0", + "symfony/polyfill-iconv": "^1.0", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^1.0", + "symfony/phpunit-bridge": "^4.4|^5.0" + }, + "suggest": { + "ext-intl": "Needed to support internationalized email addresses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.2-dev" + } + }, + "autoload": { + "files": [ + "lib/swift_required.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Chris Corbyn" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Swiftmailer, free feature-rich PHP mailer", + "homepage": "https://swiftmailer.symfony.com", + "keywords": [ + "email", + "mail", + "mailer" + ], + "support": { + "issues": "https://github.com/swiftmailer/swiftmailer/issues", + "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.7" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/swiftmailer/swiftmailer", + "type": "tidelift" + } + ], + "abandoned": "symfony/mailer", + "time": "2021-03-09T12:30:35+00:00" + }, + { + "name": "symfony/contracts", + "version": "v1.1.10", + "source": { + "type": "git", + "url": "https://github.com/symfony/contracts.git", + "reference": "011c20407c4b99d454f44021d023fb39ce23b73d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/contracts/zipball/011c20407c4b99d454f44021d023fb39ce23b73d", + "reference": "011c20407c4b99d454f44021d023fb39ce23b73d", + "shasum": "" + }, + "require": { + "php": ">=7.1.3", + "psr/cache": "^1.0", + "psr/container": "^1.0" + }, + "replace": { + "symfony/cache-contracts": "self.version", + "symfony/event-dispatcher-contracts": "self.version", + "symfony/http-client-contracts": "self.version", + "symfony/service-contracts": "self.version", + "symfony/translation-contracts": "self.version" + }, + "require-dev": { + "symfony/polyfill-intl-idn": "^1.10" + }, + "suggest": { + "psr/event-dispatcher": "When using the EventDispatcher contracts", + "symfony/cache-implementation": "", + "symfony/event-dispatcher-implementation": "", + "symfony/http-client-implementation": "", + "symfony/service-implementation": "", + "symfony/translation-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\": "" + }, + "exclude-from-classmap": [ + "**/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A set of abstractions extracted out of the Symfony components", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/contracts/tree/v1.1.10" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-09-02T16:08:58+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-23T23:28:01+00:00" + }, + { + "name": "symfony/monolog-bundle", + "version": "v3.7.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/monolog-bundle.git", + "reference": "4054b2e940a25195ae15f0a49ab0c51718922eb4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/4054b2e940a25195ae15f0a49ab0c51718922eb4", + "reference": "4054b2e940a25195ae15f0a49ab0c51718922eb4", + "shasum": "" + }, + "require": { + "monolog/monolog": "~1.22 || ~2.0", + "php": ">=7.1.3", + "symfony/config": "~4.4 || ^5.0", + "symfony/dependency-injection": "^4.4 || ^5.0", + "symfony/http-kernel": "~4.4 || ^5.0", + "symfony/monolog-bridge": "~4.4 || ^5.0" + }, + "require-dev": { + "symfony/console": "~4.4 || ^5.0", + "symfony/phpunit-bridge": "^5.1", + "symfony/yaml": "~4.4 || ^5.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bundle\\MonologBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony MonologBundle", + "homepage": "https://symfony.com", + "keywords": [ + "log", + "logging" + ], + "support": { + "issues": "https://github.com/symfony/monolog-bundle/issues", + "source": "https://github.com/symfony/monolog-bundle/tree/v3.7.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-03-31T07:20:47+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-19T12:13:01+00:00" + }, + { + "name": "symfony/polyfill-iconv", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-iconv.git", + "reference": "06fb361659649bcfd6a208a0f1fcaf4e827ad342" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/06fb361659649bcfd6a208a0f1fcaf4e827ad342", + "reference": "06fb361659649bcfd6a208a0f1fcaf4e827ad342", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-iconv": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Iconv\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Iconv extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "iconv", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-iconv/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-intl-icu", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-icu.git", + "reference": "af1842919c7e7364aaaa2798b29839e3ba168588" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/af1842919c7e7364aaaa2798b29839e3ba168588", + "reference": "af1842919c7e7364aaaa2798b29839e3ba168588", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance and support of other locales than \"en\"" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Icu\\": "" + }, + "classmap": [ + "Resources/stubs" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's ICU-related data and classes", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "icu", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-icu/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-22T09:19:47+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65", + "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-27T09:27:20+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", + "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-19T12:13:01+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.23.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-27T12:26:48+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "v1.20.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", + "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "metapackage", + "extra": { + "branch-alias": { + "dev-main": "1.20-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php70/tree/v1.20.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-10-23T14:02:19+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", + "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-27T09:17:38+00:00" + }, + { + "name": "symfony/polyfill-php73", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", + "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php73\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-02-19T12:13:01+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.22.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", + "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.22-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-01-07T16:49:33+00:00" + }, + { + "name": "symfony/polyfill-php81", + "version": "v1.23.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php81.git", + "reference": "e66119f3de95efc359483f810c4c3e6436279436" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/e66119f3de95efc359483f810c4c3e6436279436", + "reference": "e66119f3de95efc359483f810c4c3e6436279436", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php81\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php81/tree/v1.23.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2021-05-21T13:25:03+00:00" + }, + { + "name": "symfony/swiftmailer-bundle", + "version": "v3.5.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/swiftmailer-bundle.git", + "reference": "6b72355549f02823a2209180f9c035e46ca3f178" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/6b72355549f02823a2209180f9c035e46ca3f178", + "reference": "6b72355549f02823a2209180f9c035e46ca3f178", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "swiftmailer/swiftmailer": "^6.1.3", + "symfony/config": "^4.4|^5.0", + "symfony/dependency-injection": "^4.4|^5.0", + "symfony/http-kernel": "^4.4|^5.0" + }, + "conflict": { + "twig/twig": "<1.41|>=2.0,<2.10" + }, + "require-dev": { + "symfony/console": "^4.4|^5.0", + "symfony/framework-bundle": "^4.4|^5.0", + "symfony/phpunit-bridge": "^4.4|^5.0", + "symfony/yaml": "^4.4|^5.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-main": "3.5-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bundle\\SwiftmailerBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + } + ], + "description": "Symfony SwiftmailerBundle", + "homepage": "http://symfony.com", + "support": { + "issues": "https://github.com/symfony/swiftmailer-bundle/issues", + "source": "https://github.com/symfony/swiftmailer-bundle/tree/v3.5.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "abandoned": "symfony/mailer", + "time": "2021-01-25T17:31:39+00:00" + }, + { + "name": "symfony/symfony", + "version": "v4.4.40", + "source": { + "type": "git", + "url": "https://github.com/symfony/symfony.git", + "reference": "406847f8c944b577c116531cb342d2875324a2c1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/symfony/zipball/406847f8c944b577c116531cb342d2875324a2c1", + "reference": "406847f8c944b577c116531cb342d2875324a2c1", + "shasum": "" + }, + "require": { + "doctrine/event-manager": "~1.0", + "doctrine/persistence": "^1.3|^2", + "ext-xml": "*", + "friendsofphp/proxy-manager-lts": "^1.0.2", + "php": ">=7.1.3", + "psr/cache": "^1.0|^2.0", + "psr/container": "^1.0", + "psr/link": "^1.0", + "psr/log": "^1|^2", + "symfony/contracts": "^1.1.8", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php72": "~1.5", + "symfony/polyfill-php73": "^1.11", + "symfony/polyfill-php80": "^1.16", + "symfony/polyfill-php81": "^1.22", + "twig/twig": "^1.43|^2.13|^3.0.4" + }, + "conflict": { + "doctrine/dbal": "<2.7", + "egulias/email-validator": "~3.0.0", + "masterminds/html5": "<2.6", + "monolog/monolog": ">=2", + "ocramius/proxy-manager": "<2.1", + "phpdocumentor/reflection-docblock": "<3.0|>=3.2.0,<3.2.2", + "phpdocumentor/type-resolver": "<0.3.0|1.3.*", + "phpunit/phpunit": "<5.4.3" + }, + "provide": { + "php-http/async-client-implementation": "*", + "php-http/client-implementation": "*", + "psr/cache-implementation": "1.0|2.0", + "psr/container-implementation": "1.0", + "psr/event-dispatcher-implementation": "1.0", + "psr/http-client-implementation": "1.0", + "psr/link-implementation": "1.0", + "psr/log-implementation": "1.0|2.0", + "psr/simple-cache-implementation": "1.0|2.0", + "symfony/cache-implementation": "1.0|2.0", + "symfony/event-dispatcher-implementation": "1.1", + "symfony/http-client-implementation": "1.1|2.0", + "symfony/service-implementation": "1.0|2.0", + "symfony/translation-implementation": "1.0|2.0" + }, + "replace": { + "symfony/amazon-mailer": "self.version", + "symfony/asset": "self.version", + "symfony/browser-kit": "self.version", + "symfony/cache": "self.version", + "symfony/config": "self.version", + "symfony/console": "self.version", + "symfony/css-selector": "self.version", + "symfony/debug": "self.version", + "symfony/debug-bundle": "self.version", + "symfony/dependency-injection": "self.version", + "symfony/doctrine-bridge": "self.version", + "symfony/dom-crawler": "self.version", + "symfony/dotenv": "self.version", + "symfony/error-handler": "self.version", + "symfony/event-dispatcher": "self.version", + "symfony/expression-language": "self.version", + "symfony/filesystem": "self.version", + "symfony/finder": "self.version", + "symfony/form": "self.version", + "symfony/framework-bundle": "self.version", + "symfony/google-mailer": "self.version", + "symfony/http-client": "self.version", + "symfony/http-foundation": "self.version", + "symfony/http-kernel": "self.version", + "symfony/inflector": "self.version", + "symfony/intl": "self.version", + "symfony/ldap": "self.version", + "symfony/lock": "self.version", + "symfony/mailchimp-mailer": "self.version", + "symfony/mailer": "self.version", + "symfony/mailgun-mailer": "self.version", + "symfony/messenger": "self.version", + "symfony/mime": "self.version", + "symfony/monolog-bridge": "self.version", + "symfony/options-resolver": "self.version", + "symfony/postmark-mailer": "self.version", + "symfony/process": "self.version", + "symfony/property-access": "self.version", + "symfony/property-info": "self.version", + "symfony/proxy-manager-bridge": "self.version", + "symfony/routing": "self.version", + "symfony/security": "self.version", + "symfony/security-bundle": "self.version", + "symfony/security-core": "self.version", + "symfony/security-csrf": "self.version", + "symfony/security-guard": "self.version", + "symfony/security-http": "self.version", + "symfony/sendgrid-mailer": "self.version", + "symfony/serializer": "self.version", + "symfony/stopwatch": "self.version", + "symfony/templating": "self.version", + "symfony/translation": "self.version", + "symfony/twig-bridge": "self.version", + "symfony/twig-bundle": "self.version", + "symfony/validator": "self.version", + "symfony/var-dumper": "self.version", + "symfony/var-exporter": "self.version", + "symfony/web-link": "self.version", + "symfony/web-profiler-bundle": "self.version", + "symfony/web-server-bundle": "self.version", + "symfony/workflow": "self.version", + "symfony/yaml": "self.version" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "composer/package-versions-deprecated": "^1.8", + "doctrine/annotations": "^1.10.4", + "doctrine/cache": "^1.6|^2.0", + "doctrine/collections": "~1.0", + "doctrine/data-fixtures": "^1.1", + "doctrine/dbal": "^2.7|^3.0", + "doctrine/orm": "^2.6.3", + "egulias/email-validator": "^2.1.10|^3.1", + "guzzlehttp/promises": "^1.4", + "masterminds/html5": "^2.6", + "monolog/monolog": "^1.25.1", + "nyholm/psr7": "^1.0", + "paragonie/sodium_compat": "^1.8", + "php-http/httplug": "^1.0|^2.0", + "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", + "predis/predis": "~1.1", + "psr/http-client": "^1.0", + "psr/simple-cache": "^1.0|^2.0", + "symfony/phpunit-bridge": "^5.2", + "symfony/security-acl": "~2.8|~3.0", + "twig/cssinliner-extra": "^2.12|^3", + "twig/inky-extra": "^2.12|^3", + "twig/markdown-extra": "^2.12|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Bundle\\": "src/Symfony/Bundle/", + "Symfony\\Component\\": "src/Symfony/Component/", + "Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/", + "Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/", + "Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/", + "Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/" + }, + "classmap": [ + "src/Symfony/Component/Intl/Resources/stubs" + ], + "exclude-from-classmap": [ + "**/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "The Symfony PHP framework", + "homepage": "https://symfony.com", + "keywords": [ + "framework" + ], + "support": { + "issues": "https://github.com/symfony/symfony/issues", + "source": "https://github.com/symfony/symfony/tree/v4.4.40" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-04-02T05:56:07+00:00" + }, + { + "name": "tecnickcom/tcpdf", + "version": "6.4.1", + "source": { + "type": "git", + "url": "https://github.com/tecnickcom/TCPDF.git", + "reference": "5ba838befdb37ef06a16d9f716f35eb03cb1b329" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/5ba838befdb37ef06a16d9f716f35eb03cb1b329", + "reference": "5ba838befdb37ef06a16d9f716f35eb03cb1b329", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "config", + "include", + "tcpdf.php", + "tcpdf_parser.php", + "tcpdf_import.php", + "tcpdf_barcodes_1d.php", + "tcpdf_barcodes_2d.php", + "include/tcpdf_colors.php", + "include/tcpdf_filters.php", + "include/tcpdf_font_data.php", + "include/tcpdf_fonts.php", + "include/tcpdf_images.php", + "include/tcpdf_static.php", + "include/barcodes/datamatrix.php", + "include/barcodes/pdf417.php", + "include/barcodes/qrcode.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-3.0-only" + ], + "authors": [ + { + "name": "Nicola Asuni", + "email": "info@tecnick.com", + "role": "lead" + } + ], + "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", + "homepage": "http://www.tcpdf.org/", + "keywords": [ + "PDFD32000-2008", + "TCPDF", + "barcodes", + "datamatrix", + "pdf", + "pdf417", + "qrcode" + ], + "support": { + "issues": "https://github.com/tecnickcom/TCPDF/issues", + "source": "https://github.com/tecnickcom/TCPDF/tree/6.4.1" + }, + "funding": [ + { + "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_donations¤cy_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20tcpdf%20project", + "type": "custom" + } + ], + "time": "2021-03-27T16:00:33+00:00" + }, + { + "name": "tijsverkoyen/css-to-inline-styles", + "version": "2.2.3", + "source": { + "type": "git", + "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", + "reference": "b43b05cf43c1b6d849478965062b6ef73e223bb5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/b43b05cf43c1b6d849478965062b6ef73e223bb5", + "reference": "b43b05cf43c1b6d849478965062b6ef73e223bb5", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "php": "^5.5 || ^7.0 || ^8.0", + "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "TijsVerkoyen\\CssToInlineStyles\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Tijs Verkoyen", + "email": "css_to_inline_styles@verkoyen.eu", + "role": "Developer" + } + ], + "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", + "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", + "support": { + "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.3" + }, + "time": "2020-07-13T06:12:54+00:00" + }, + { + "name": "tubalmartin/cssmin", + "version": "v4.1.1", + "source": { + "type": "git", + "url": "https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port.git", + "reference": "3cbf557f4079d83a06f9c3ff9b957c022d7805cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tubalmartin/YUI-CSS-compressor-PHP-port/zipball/3cbf557f4079d83a06f9c3ff9b957c022d7805cf", + "reference": "3cbf557f4079d83a06f9c3ff9b957c022d7805cf", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "php": ">=5.3.2" + }, + "require-dev": { + "cogpowered/finediff": "0.3.*", + "phpunit/phpunit": "4.8.*" + }, + "bin": [ + "cssmin" + ], + "type": "library", + "autoload": { + "psr-4": { + "tubalmartin\\CssMin\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Túbal Martín", + "homepage": "http://tubalmartin.me/" + } + ], + "description": "A PHP port of the YUI CSS compressor", + "homepage": "https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port", + "keywords": [ + "compress", + "compressor", + "css", + "cssmin", + "minify", + "yui" + ], + "support": { + "issues": "https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port/issues", + "source": "https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port" + }, + "time": "2018-01-15T15:26:51+00:00" + }, + { + "name": "twig/twig", + "version": "v3.3.8", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "972d8604a92b7054828b539f2febb0211dd5945c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/972d8604a92b7054828b539f2febb0211dd5945c", + "reference": "972d8604a92b7054828b539f2febb0211dd5945c", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-mbstring": "^1.3" + }, + "require-dev": { + "psr/container": "^1.0", + "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Twig\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Twig Team", + "role": "Contributors" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "https://twig.symfony.com", + "keywords": [ + "templating" + ], + "support": { + "issues": "https://github.com/twigphp/Twig/issues", + "source": "https://github.com/twigphp/Twig/tree/v3.3.8" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2022-02-04T06:59:48+00:00" + }, + { + "name": "willdurand/jsonp-callback-validator", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/willdurand/JsonpCallbackValidator.git", + "reference": "1a7d388bb521959e612ef50c5c7b1691b097e909" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/willdurand/JsonpCallbackValidator/zipball/1a7d388bb521959e612ef50c5c7b1691b097e909", + "reference": "1a7d388bb521959e612ef50c5c7b1691b097e909", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "~3.7" + }, + "type": "library", + "autoload": { + "psr-0": { + "JsonpCallbackValidator": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "William Durand", + "email": "william.durand1@gmail.com", + "homepage": "http://www.willdurand.fr" + } + ], + "description": "JSONP callback validator.", + "support": { + "issues": "https://github.com/willdurand/JsonpCallbackValidator/issues", + "source": "https://github.com/willdurand/JsonpCallbackValidator/tree/master" + }, + "time": "2014-01-20T22:35:06+00:00" + } + ], + "packages-dev": [ + { + "name": "behat/behat", + "version": "v3.8.1", + "source": { + "type": "git", + "url": "https://github.com/Behat/Behat.git", + "reference": "fbb065457d523d9856d4b50775b4151a7598b510" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Behat/Behat/zipball/fbb065457d523d9856d4b50775b4151a7598b510", + "reference": "fbb065457d523d9856d4b50775b4151a7598b510", + "shasum": "" + }, + "require": { + "behat/gherkin": "^4.6.0", + "behat/transliterator": "^1.2", + "ext-mbstring": "*", + "php": "^7.2 || ^8.0", + "psr/container": "^1.0", + "symfony/config": "^4.4 || ^5.0", + "symfony/console": "^4.4 || ^5.0", + "symfony/dependency-injection": "^4.4 || ^5.0", + "symfony/event-dispatcher": "^4.4 || ^5.0", + "symfony/translation": "^4.4 || ^5.0", + "symfony/yaml": "^4.4 || ^5.0" + }, + "require-dev": { + "container-interop/container-interop": "^1.2", + "herrera-io/box": "~1.6.1", + "phpunit/phpunit": "^8.5 || ^9.0", + "symfony/process": "^4.4 || ^5.0" + }, + "suggest": { + "ext-dom": "Needed to output test results in JUnit format." + }, + "bin": [ + "bin/behat" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Behat\\Behat\\": "src/Behat/Behat/", + "Behat\\Testwork\\": "src/Behat/Testwork/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + } + ], + "description": "Scenario-oriented BDD framework for PHP", + "homepage": "http://behat.org/", + "keywords": [ + "Agile", + "BDD", + "ScenarioBDD", + "Scrum", + "StoryBDD", + "User story", + "business", + "development", + "documentation", + "examples", + "symfony", + "testing" + ], + "support": { + "issues": "https://github.com/Behat/Behat/issues", + "source": "https://github.com/Behat/Behat/tree/v3.8.1" + }, + "time": "2020-11-07T15:55:18+00:00" + }, + { + "name": "behat/gherkin", + "version": "v4.8.0", + "source": { + "type": "git", + "url": "https://github.com/Behat/Gherkin.git", + "reference": "2391482cd003dfdc36b679b27e9f5326bd656acd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Behat/Gherkin/zipball/2391482cd003dfdc36b679b27e9f5326bd656acd", + "reference": "2391482cd003dfdc36b679b27e9f5326bd656acd", + "shasum": "" + }, + "require": { + "php": "~7.2|~8.0" + }, + "require-dev": { + "cucumber/cucumber": "dev-gherkin-16.0.0", + "phpunit/phpunit": "~8|~9", + "symfony/phpunit-bridge": "~3|~4|~5", + "symfony/yaml": "~3|~4|~5" + }, + "suggest": { + "symfony/yaml": "If you want to parse features, represented in YAML files" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.4-dev" + } + }, + "autoload": { + "psr-0": { + "Behat\\Gherkin": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + } + ], + "description": "Gherkin DSL parser for PHP", + "homepage": "http://behat.org/", + "keywords": [ + "BDD", + "Behat", + "Cucumber", + "DSL", + "gherkin", + "parser" + ], + "support": { + "issues": "https://github.com/Behat/Gherkin/issues", + "source": "https://github.com/Behat/Gherkin/tree/v4.8.0" + }, + "time": "2021-02-04T12:44:21+00:00" + }, + { + "name": "behat/transliterator", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/Behat/Transliterator.git", + "reference": "3c4ec1d77c3d05caa1f0bf8fb3aae4845005c7fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Behat/Transliterator/zipball/3c4ec1d77c3d05caa1f0bf8fb3aae4845005c7fc", + "reference": "3c4ec1d77c3d05caa1f0bf8fb3aae4845005c7fc", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "chuyskywalker/rolling-curl": "^3.1", + "php-yaoi/php-yaoi": "^1.0", + "phpunit/phpunit": "^4.8.36|^6.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Behat\\Transliterator\\": "src/Behat/Transliterator" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Artistic-1.0" + ], + "description": "String transliterator", + "keywords": [ + "i18n", + "slug", + "transliterator" + ], + "support": { + "issues": "https://github.com/Behat/Transliterator/issues", + "source": "https://github.com/Behat/Transliterator/tree/v1.3.0" + }, + "time": "2020-01-14T16:39:13+00:00" + }, + { + "name": "ergebnis/composer-normalize", + "version": "2.13.3", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/composer-normalize.git", + "reference": "eff003890c655ee0e4b6ac5d4c5b40ce61247f7c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/eff003890c655ee0e4b6ac5d4c5b40ce61247f7c", + "reference": "eff003890c655ee0e4b6ac5d4c5b40ce61247f7c", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.1.0 || ^2.0.0", + "ergebnis/json-normalizer": "^1.0.3", + "ergebnis/json-printer": "^3.1.1", + "justinrainbow/json-schema": "^5.2.10", + "localheinz/diff": "^1.1.1", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "composer/composer": "^1.10.19 || ^2.0.8", + "ergebnis/license": "^1.1.0", + "ergebnis/php-cs-fixer-config": "^2.13.0", + "ergebnis/phpstan-rules": "~0.15.3", + "ergebnis/test-util": "^1.4.0", + "phpstan/extension-installer": "^1.1.0", + "phpstan/phpstan": "~0.12.80", + "phpstan/phpstan-deprecation-rules": "~0.12.6", + "phpstan/phpstan-phpunit": "~0.12.18", + "phpstan/phpstan-strict-rules": "~0.12.9", + "phpunit/phpunit": "^8.5.14", + "psalm/plugin-phpunit": "~0.15.0", + "symfony/filesystem": "^5.2.4", + "vimeo/psalm": "^4.6.2" + }, + "type": "composer-plugin", + "extra": { + "class": "Ergebnis\\Composer\\Normalize\\NormalizePlugin", + "composer-normalize": { + "indent-size": 2, + "indent-style": "space" + } + }, + "autoload": { + "psr-4": { + "Ergebnis\\Composer\\Normalize\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides a composer plugin for normalizing composer.json.", + "homepage": "https://github.com/ergebnis/composer-normalize", + "keywords": [ + "composer", + "normalize", + "normalizer", + "plugin" + ], + "support": { + "issues": "https://github.com/ergebnis/composer-normalize/issues", + "source": "https://github.com/ergebnis/composer-normalize" + }, + "funding": [ + { + "url": "https://github.com/localheinz", + "type": "github" + } + ], + "time": "2021-03-06T14:00:23+00:00" + }, + { + "name": "ergebnis/json-normalizer", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-normalizer.git", + "reference": "4a7f064ce34d5a2e382564565cdd433dbc5b9494" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/4a7f064ce34d5a2e382564565cdd433dbc5b9494", + "reference": "4a7f064ce34d5a2e382564565cdd433dbc5b9494", + "shasum": "" + }, + "require": { + "ergebnis/json-printer": "^3.1.1", + "ext-json": "*", + "justinrainbow/json-schema": "^5.2.10", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "ergebnis/license": "^1.1.0", + "ergebnis/php-cs-fixer-config": "^2.10.0", + "ergebnis/phpstan-rules": "~0.15.3", + "ergebnis/test-util": "^1.4.0", + "infection/infection": "~0.15.3", + "jangregor/phpstan-prophecy": "~0.8.1", + "phpstan/extension-installer": "^1.1.0", + "phpstan/phpstan": "~0.12.80", + "phpstan/phpstan-deprecation-rules": "~0.12.6", + "phpstan/phpstan-phpunit": "~0.12.17", + "phpstan/phpstan-strict-rules": "~0.12.9", + "phpunit/phpunit": "^8.5.14", + "psalm/plugin-phpunit": "~0.12.2", + "vimeo/psalm": "^3.18" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ergebnis\\Json\\Normalizer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides generic and vendor-specific normalizers for normalizing JSON documents.", + "homepage": "https://github.com/ergebnis/json-normalizer", + "keywords": [ + "json", + "normalizer" + ], + "support": { + "issues": "https://github.com/ergebnis/json-normalizer/issues", + "source": "https://github.com/ergebnis/json-normalizer" + }, + "funding": [ + { + "url": "https://github.com/localheinz", + "type": "github" + } + ], + "time": "2021-03-06T13:33:57+00:00" + }, + { + "name": "ergebnis/json-printer", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/ergebnis/json-printer.git", + "reference": "e4190dadd9937a77d8afcaf2b6c42a528ab367d6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/e4190dadd9937a77d8afcaf2b6c42a528ab367d6", + "reference": "e4190dadd9937a77d8afcaf2b6c42a528ab367d6", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-mbstring": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "ergebnis/license": "^1.0.0", + "ergebnis/php-cs-fixer-config": "^2.2.1", + "ergebnis/phpstan-rules": "~0.15.2", + "ergebnis/test-util": "^1.1.0", + "infection/infection": "~0.15.3", + "phpstan/extension-installer": "^1.0.4", + "phpstan/phpstan": "~0.12.40", + "phpstan/phpstan-deprecation-rules": "~0.12.5", + "phpstan/phpstan-phpunit": "~0.12.16", + "phpstan/phpstan-strict-rules": "~0.12.4", + "phpunit/phpunit": "^8.5.8", + "psalm/plugin-phpunit": "~0.11.0", + "vimeo/psalm": "^3.14.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Ergebnis\\Json\\Printer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Andreas Möller", + "email": "am@localheinz.com" + } + ], + "description": "Provides a JSON printer, allowing for flexible indentation.", + "homepage": "https://github.com/ergebnis/json-printer", + "keywords": [ + "formatter", + "json", + "printer" + ], + "support": { + "issues": "https://github.com/ergebnis/json-printer/issues", + "source": "https://github.com/ergebnis/json-printer" + }, + "funding": [ + { + "url": "https://github.com/localheinz", + "type": "github" + } + ], + "time": "2020-08-30T12:17:03+00:00" + }, + { + "name": "johnkary/phpunit-speedtrap", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/johnkary/phpunit-speedtrap.git", + "reference": "9ba81d42676da31366c85d3ff8c10a8352d02030" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/johnkary/phpunit-speedtrap/zipball/9ba81d42676da31366c85d3ff8c10a8352d02030", + "reference": "9ba81d42676da31366c85d3ff8c10a8352d02030", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.0-dev" + } + }, + "autoload": { + "psr-4": { + "JohnKary\\PHPUnit\\Listener\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Kary", + "email": "john@johnkary.net" + } + ], + "description": "Find and report on slow tests in your PHPUnit test suite", + "homepage": "https://github.com/johnkary/phpunit-speedtrap", + "keywords": [ + "phpunit", + "profile", + "slow" + ], + "support": { + "issues": "https://github.com/johnkary/phpunit-speedtrap/issues", + "source": "https://github.com/johnkary/phpunit-speedtrap/tree/v3.3.0" + }, + "time": "2020-12-18T16:20:16+00:00" + }, + { + "name": "justinrainbow/json-schema", + "version": "5.2.10", + "source": { + "type": "git", + "url": "https://github.com/justinrainbow/json-schema.git", + "reference": "2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b", + "reference": "2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", + "json-schema/json-schema-test-suite": "1.2.0", + "phpunit/phpunit": "^4.8.35" + }, + "bin": [ + "bin/validate-json" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "JsonSchema\\": "src/JsonSchema/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bruno Prieto Reis", + "email": "bruno.p.reis@gmail.com" + }, + { + "name": "Justin Rainbow", + "email": "justin.rainbow@gmail.com" + }, + { + "name": "Igor Wiedler", + "email": "igor@wiedler.ch" + }, + { + "name": "Robert Schönthal", + "email": "seroscho@googlemail.com" + } + ], + "description": "A library to validate a json schema.", + "homepage": "https://github.com/justinrainbow/json-schema", + "keywords": [ + "json", + "schema" + ], + "support": { + "issues": "https://github.com/justinrainbow/json-schema/issues", + "source": "https://github.com/justinrainbow/json-schema/tree/5.2.10" + }, + "time": "2020-05-27T16:41:55+00:00" + }, + { + "name": "localheinz/diff", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/localheinz/diff.git", + "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/localheinz/diff/zipball/851bb20ea8358c86f677f5f111c4ab031b1c764c", + "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^4.2 || ^5" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Fork of sebastian/diff for use with ergebnis/composer-normalize", + "homepage": "https://github.com/localheinz/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "source": "https://github.com/localheinz/diff/tree/main" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-07-06T04:49:32+00:00" + }, + { + "name": "mikey179/vfsstream", + "version": "v1.6.8", + "source": { + "type": "git", + "url": "https://github.com/bovigo/vfsStream.git", + "reference": "231c73783ebb7dd9ec77916c10037eff5a2b6efe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/231c73783ebb7dd9ec77916c10037eff5a2b6efe", + "reference": "231c73783ebb7dd9ec77916c10037eff5a2b6efe", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "org\\bovigo\\vfs\\": "src/main/php" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Frank Kleine", + "homepage": "http://frankkleine.de/", + "role": "Developer" + } + ], + "description": "Virtual file system to mock the real file system in unit tests.", + "homepage": "http://vfs.bovigo.org/", + "support": { + "issues": "https://github.com/bovigo/vfsStream/issues", + "source": "https://github.com/bovigo/vfsStream/tree/master", + "wiki": "https://github.com/bovigo/vfsStream/wiki" + }, + "time": "2019-10-30T15:31:00+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.10.2", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", + "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2020-11-13T09:40:50+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/master" + }, + "time": "2020-06-27T14:33:11+00:00" + }, + { + "name": "phar-io/version", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "bae7c545bef187884426f042434e561ab1ddb182" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", + "reference": "bae7c545bef187884426f042434e561ab1ddb182", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.1.0" + }, + "time": "2021-02-23T14:00:09+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-2.x": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + }, + "time": "2020-06-27T09:03:43+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "5.2.2", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "support": { + "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + }, + "time": "2020-09-03T19:13:55+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.4.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "support": { + "issues": "https://github.com/phpDocumentor/TypeResolver/issues", + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + }, + "time": "2020-09-17T18:55:26+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "1.13.0", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", + "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.2", + "php": "^7.2 || ~8.0, <8.1", + "phpdocumentor/reflection-docblock": "^5.2", + "sebastian/comparator": "^3.0 || ^4.0", + "sebastian/recursion-context": "^3.0 || ^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^6.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.11.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "support": { + "issues": "https://github.com/phpspec/prophecy/issues", + "source": "https://github.com/phpspec/prophecy/tree/1.13.0" + }, + "time": "2021-03-17T13:42:18+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "1.5.4", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan.git", + "reference": "bbf68cae24f6dc023c607ea0f87da55dd9d55c2b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/bbf68cae24f6dc023c607ea0f87da55dd9d55c2b", + "reference": "bbf68cae24f6dc023c607ea0f87da55dd9d55c2b", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "support": { + "issues": "https://github.com/phpstan/phpstan/issues", + "source": "https://github.com/phpstan/phpstan/tree/1.5.4" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpstan", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2022-04-03T12:39:00+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "7.0.14", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "bb7c9a210c72e4709cdde67f8b7362f672f2225c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/bb7c9a210c72e4709cdde67f8b7362f672f2225c", + "reference": "bb7c9a210c72e4709cdde67f8b7362f672f2225c", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": ">=7.2", + "phpunit/php-file-iterator": "^2.0.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^3.1.1 || ^4.0", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^4.2.2", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1.3" + }, + "require-dev": { + "phpunit/phpunit": "^8.2.2" + }, + "suggest": { + "ext-xdebug": "^2.7.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "7.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.14" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-12-02T13:39:03+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "2.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4b49fb70f067272b659ef0174ff9ca40fdaa6357", + "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:25:21+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + }, + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "2.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:20:02+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "3.1.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "472b687829041c24b25f475e14c2f38a09edf1c2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/472b687829041c24b25f475e14c2f38a09edf1c2", + "reference": "472b687829041c24b25f475e14c2f38a09edf1c2", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", + "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "abandoned": true, + "time": "2020-11-30T08:38:46+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "8.5.16", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "cc66f2fc61296be66c99931a862200e7456b9a01" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/cc66f2fc61296be66c99931a862200e7456b9a01", + "reference": "cc66f2fc61296be66c99931a862200e7456b9a01", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.3.1", + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.0", + "phar-io/manifest": "^2.0.1", + "phar-io/version": "^3.0.2", + "php": ">=7.2", + "phpspec/prophecy": "^1.10.3", + "phpunit/php-code-coverage": "^7.0.12", + "phpunit/php-file-iterator": "^2.0.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^2.1.2", + "sebastian/comparator": "^3.0.2", + "sebastian/diff": "^3.0.2", + "sebastian/environment": "^4.2.3", + "sebastian/exporter": "^3.1.2", + "sebastian/global-state": "^3.0.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^2.0.1", + "sebastian/type": "^1.1.3", + "sebastian/version": "^2.0.1" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-soap": "*", + "ext-xdebug": "*", + "phpunit/php-invoker": "^2.0.0" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.5-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.16" + }, + "funding": [ + { + "url": "https://phpunit.de/donate.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2021-06-05T04:46:20+00:00" + }, + { + "name": "prestashop/phpstan-prestashop", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/PrestaShop/phpstan-prestashop.git", + "reference": "8e915210f8071f517fcbcbcc2fde6078ce7fbc36" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PrestaShop/phpstan-prestashop/zipball/8e915210f8071f517fcbcbcc2fde6078ce7fbc36", + "reference": "8e915210f8071f517fcbcbcc2fde6078ce7fbc36", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0", + "phpstan/phpstan": "^1.2.0" + }, + "require-dev": { + "nikic/php-parser": "^4.10", + "phpstan/phpstan-phpunit": "^1.0.0", + "phpstan/phpstan-strict-rules": "^1.1.0", + "phpunit/phpunit": "^8.5", + "symfony/console": "^5.2" + }, + "type": "phpstan-extension", + "extra": { + "branch-alias": { + "dev-master": "0.12-dev" + }, + "phpstan": { + "includes": [ + "extension.neon", + "rules.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStanForPrestaShop\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PrestaShop SA", + "email": "contact@prestashop.com" + } + ], + "description": "PrestaShop extension for PHPStan", + "support": { + "issues": "https://github.com/PrestaShop/phpstan-prestashop/issues", + "source": "https://github.com/PrestaShop/phpstan-prestashop/tree/2.0.0" + }, + "time": "2021-11-23T09:22:24+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:15:22+00:00" + }, + { + "name": "sebastian/comparator", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", + "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "sebastian/diff": "^3.0", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^8.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T08:04:30+00:00" + }, + { + "name": "sebastian/diff", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5 || ^8.0", + "symfony/process": "^2 || ^3.3 || ^4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:59:04+00:00" + }, + { + "name": "sebastian/environment", + "version": "4.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^7.5" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:53:42+00:00" + }, + { + "name": "sebastian/exporter", + "version": "3.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e", + "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e", + "shasum": "" + }, + "require": { + "php": ">=7.0", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:47:53+00:00" + }, + { + "name": "sebastian/global-state", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/474fb9edb7ab891665d3bfc6317f42a0a150454b", + "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b", + "shasum": "" + }, + "require": { + "php": ">=7.2", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^8.0" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:43:24+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "3.0.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "shasum": "" + }, + "require": { + "php": ">=7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:40:27+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "shasum": "" + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:37:18+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", + "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", + "shasum": "" + }, + "require": { + "php": ">=7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:34:24+00:00" + }, + { + "name": "sebastian/resource-operations", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "support": { + "issues": "https://github.com/sebastianbergmann/resource-operations/issues", + "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:30:19+00:00" + }, + { + "name": "sebastian/type", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/1.1.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-30T07:25:11+00:00" + }, + { + "name": "sebastian/version", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/master" + }, + "time": "2016-10-03T07:35:21+00:00" + }, + { + "name": "symfony/phpunit-bridge", + "version": "v3.4.47", + "source": { + "type": "git", + "url": "https://github.com/symfony/phpunit-bridge.git", + "reference": "120273ad5d03a8deee08ca9260e2598f288f2bac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/120273ad5d03a8deee08ca9260e2598f288f2bac", + "reference": "120273ad5d03a8deee08ca9260e2598f288f2bac", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "conflict": { + "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0|<6.4,>=6.0|9.1.2" + }, + "suggest": { + "symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader" + }, + "bin": [ + "bin/simple-phpunit" + ], + "type": "symfony-bridge", + "extra": { + "thanks": { + "name": "phpunit/phpunit", + "url": "https://github.com/sebastianbergmann/phpunit" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Bridge\\PhpUnit\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony PHPUnit Bridge", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/phpunit-bridge/tree/v3.4.47" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-11-13T16:28:59+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "75a63c33a8577608444246075ea0af0d052e452a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", + "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/master" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2020-07-12T23:59:07+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.10.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", + "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.10.0" + }, + "time": "2021-03-09T10:59:23+00:00" + } + ], + "aliases": [], + "minimum-stability": "dev", + "stability-flags": { + "prestashop/classic": 20 + }, + "prefer-stable": true, + "prefer-lowest": false, + "platform": { + "php": ">=7.2.5", + "ext-curl": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-intl": "*", + "ext-json": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "ext-zip": "*" + }, + "platform-dev": [], + "platform-overrides": { + "php": "7.2.5" + }, + "plugin-api-version": "2.2.0" +} From 15809107a122aebb76258dbc9a8df47074bfec3f Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Tue, 3 May 2022 16:32:20 +0200 Subject: [PATCH 068/128] Removed unuseful file --- tests/unit/Resources/composer.lock | 12787 --------------------------- 1 file changed, 12787 deletions(-) delete mode 100644 tests/unit/Resources/composer.lock diff --git a/tests/unit/Resources/composer.lock b/tests/unit/Resources/composer.lock deleted file mode 100644 index a0fb911c5..000000000 --- a/tests/unit/Resources/composer.lock +++ /dev/null @@ -1,12787 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "7cdbb5f44bee9dae840f726098cd6d2e", - "packages": [ - { - "name": "beberlei/doctrineextensions", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/beberlei/DoctrineExtensions.git", - "reference": "008f162f191584a6c37c03a803f718802ba9dd9a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/beberlei/DoctrineExtensions/zipball/008f162f191584a6c37c03a803f718802ba9dd9a", - "reference": "008f162f191584a6c37c03a803f718802ba9dd9a", - "shasum": "" - }, - "require": { - "doctrine/orm": "^2.7", - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.14", - "nesbot/carbon": "*", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", - "symfony/yaml": "^4.2 || ^5.0", - "zf1/zend-date": "^1.12", - "zf1/zend-registry": "^1.12" - }, - "type": "library", - "autoload": { - "psr-4": { - "DoctrineExtensions\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Steve Lacey", - "email": "steve@steve.ly" - } - ], - "description": "A set of extensions to Doctrine 2 that add support for additional query functions available in MySQL, Oracle, PostgreSQL and SQLite.", - "keywords": [ - "database", - "doctrine", - "orm" - ], - "support": { - "source": "https://github.com/beberlei/DoctrineExtensions/tree/v1.3.0" - }, - "time": "2020-11-29T07:37:23+00:00" - }, - { - "name": "composer/ca-bundle", - "version": "1.2.9", - "source": { - "type": "git", - "url": "https://github.com/composer/ca-bundle.git", - "reference": "78a0e288fdcebf92aa2318a8d3656168da6ac1a5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/78a0e288fdcebf92aa2318a8d3656168da6ac1a5", - "reference": "78a0e288fdcebf92aa2318a8d3656168da6ac1a5", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "ext-pcre": "*", - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.55", - "psr/log": "^1.0", - "symfony/phpunit-bridge": "^4.2 || ^5", - "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\CaBundle\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla CA bundle.", - "keywords": [ - "cabundle", - "cacert", - "certificate", - "ssl", - "tls" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.2.9" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-01-12T12:10:35+00:00" - }, - { - "name": "composer/installers", - "version": "v1.11.0", - "source": { - "type": "git", - "url": "https://github.com/composer/installers.git", - "reference": "ae03311f45dfe194412081526be2e003960df74b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/installers/zipball/ae03311f45dfe194412081526be2e003960df74b", - "reference": "ae03311f45dfe194412081526be2e003960df74b", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.0 || ^2.0" - }, - "replace": { - "roundcube/plugin-installer": "*", - "shama/baton": "*" - }, - "require-dev": { - "composer/composer": "1.6.* || ^2.0", - "composer/semver": "^1 || ^3", - "phpstan/phpstan": "^0.12.55", - "phpstan/phpstan-phpunit": "^0.12.16", - "symfony/phpunit-bridge": "^4.2 || ^5", - "symfony/process": "^2.3" - }, - "type": "composer-plugin", - "extra": { - "class": "Composer\\Installers\\Plugin", - "branch-alias": { - "dev-main": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Installers\\": "src/Composer/Installers" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kyle Robinson Young", - "email": "kyle@dontkry.com", - "homepage": "https://github.com/shama" - } - ], - "description": "A multi-framework Composer library installer", - "homepage": "https://composer.github.io/installers/", - "keywords": [ - "Craft", - "Dolibarr", - "Eliasis", - "Hurad", - "ImageCMS", - "Kanboard", - "Lan Management System", - "MODX Evo", - "MantisBT", - "Mautic", - "Maya", - "OXID", - "Plentymarkets", - "Porto", - "RadPHP", - "SMF", - "Starbug", - "Thelia", - "Whmcs", - "WolfCMS", - "agl", - "aimeos", - "annotatecms", - "attogram", - "bitrix", - "cakephp", - "chef", - "cockpit", - "codeigniter", - "concrete5", - "croogo", - "dokuwiki", - "drupal", - "eZ Platform", - "elgg", - "expressionengine", - "fuelphp", - "grav", - "installer", - "itop", - "joomla", - "known", - "kohana", - "laravel", - "lavalite", - "lithium", - "magento", - "majima", - "mako", - "mediawiki", - "miaoxing", - "modulework", - "modx", - "moodle", - "osclass", - "phpbb", - "piwik", - "ppi", - "processwire", - "puppet", - "pxcms", - "reindex", - "roundcube", - "shopware", - "silverstripe", - "sydes", - "sylius", - "symfony", - "tastyigniter", - "typo3", - "wordpress", - "yawik", - "zend", - "zikula" - ], - "support": { - "issues": "https://github.com/composer/installers/issues", - "source": "https://github.com/composer/installers/tree/v1.11.0" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-04-28T06:42:17+00:00" - }, - { - "name": "composer/package-versions-deprecated", - "version": "1.11.99.2", - "source": { - "type": "git", - "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "c6522afe5540d5fc46675043d3ed5a45a740b27c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/c6522afe5540d5fc46675043d3ed5a45a740b27c", - "reference": "c6522afe5540d5fc46675043d3ed5a45a740b27c", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0", - "php": "^7 || ^8" - }, - "replace": { - "ocramius/package-versions": "1.11.99" - }, - "require-dev": { - "composer/composer": "^1.9.3 || ^2.0@dev", - "ext-zip": "^1.13", - "phpunit/phpunit": "^6.5 || ^7" - }, - "type": "composer-plugin", - "extra": { - "class": "PackageVersions\\Installer", - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "PackageVersions\\": "src/PackageVersions" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be" - } - ], - "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", - "support": { - "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.2" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-05-24T07:46:03+00:00" - }, - { - "name": "composer/semver", - "version": "3.2.4", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", - "reference": "a02fdf930a3c1c3ed3a49b5f63859c0c20e10464", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.54", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.2.4" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2020-11-13T08:59:24+00:00" - }, - { - "name": "composer/xdebug-handler", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/composer/xdebug-handler.git", - "reference": "964adcdd3a28bf9ed5d9ac6450064e0d71ed7496" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/964adcdd3a28bf9ed5d9ac6450064e0d71ed7496", - "reference": "964adcdd3a28bf9ed5d9ac6450064e0d71ed7496", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.55", - "symfony/phpunit-bridge": "^4.2 || ^5" - }, - "type": "library", - "autoload": { - "psr-4": { - "Composer\\XdebugHandler\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Stevenson", - "email": "john-stevenson@blueyonder.co.uk" - } - ], - "description": "Restarts a process without Xdebug.", - "keywords": [ - "Xdebug", - "performance" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/2.0.1" - }, - "funding": [ - { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" - } - ], - "time": "2021-05-05T19:37:51+00:00" - }, - { - "name": "cssjanus/cssjanus", - "version": "v2.1.0", - "source": { - "type": "git", - "url": "https://github.com/cssjanus/php-cssjanus.git", - "reference": "de7483c0805750a6462b372eab55d022d555df02" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/cssjanus/php-cssjanus/zipball/de7483c0805750a6462b372eab55d022d555df02", - "reference": "de7483c0805750a6462b372eab55d022d555df02", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "require-dev": { - "mediawiki/mediawiki-phan-config": "0.10.6", - "php-parallel-lint/php-parallel-lint": "^1.3.0", - "phpunit/phpunit": "^8.5.15", - "squizlabs/php_codesniffer": "^3.6.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Roan Kattouw" - }, - { - "name": "Trevor Parscal" - }, - { - "name": "Timo Tijhof" - } - ], - "description": "Convert CSS stylesheets between left-to-right and right-to-left.", - "support": { - "issues": "https://github.com/cssjanus/php-cssjanus/issues", - "source": "https://github.com/cssjanus/php-cssjanus/tree/v2.1.0" - }, - "time": "2021-09-09T17:58:26+00:00" - }, - { - "name": "curl/curl", - "version": "2.3.2", - "source": { - "type": "git", - "url": "https://github.com/php-mod/curl.git", - "reference": "8a3e3f1cb6061180c53cb18e2ad823f68ff91ac0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-mod/curl/zipball/8a3e3f1cb6061180c53cb18e2ad823f68ff91ac0", - "reference": "8a3e3f1cb6061180c53cb18e2ad823f68ff91ac0", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "php": "^5.6 | ^7.0 | ^8.0" - }, - "require-dev": { - "yoast/phpunit-polyfills": "^0.2.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Curl": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "php-curl-class", - "homepage": "https://github.com/php-curl-class" - }, - { - "name": "Hassan Amouhzi", - "email": "hassan@anezi.net", - "homepage": "http://hassan.amouhzi.com" - }, - { - "name": "user52", - "homepage": "https://github.com/user52" - } - ], - "description": "cURL class for PHP", - "homepage": "https://github.com/php-mod/curl", - "keywords": [ - "curl", - "dot" - ], - "support": { - "issues": "https://github.com/php-mod/curl/issues", - "source": "https://github.com/php-mod/curl/tree/2.3.2" - }, - "time": "2021-04-11T19:00:09+00:00" - }, - { - "name": "defuse/php-encryption", - "version": "v2.3.1", - "source": { - "type": "git", - "url": "https://github.com/defuse/php-encryption.git", - "reference": "77880488b9954b7884c25555c2a0ea9e7053f9d2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/defuse/php-encryption/zipball/77880488b9954b7884c25555c2a0ea9e7053f9d2", - "reference": "77880488b9954b7884c25555c2a0ea9e7053f9d2", - "shasum": "" - }, - "require": { - "ext-openssl": "*", - "paragonie/random_compat": ">= 2", - "php": ">=5.6.0" - }, - "require-dev": { - "phpunit/phpunit": "^4|^5|^6|^7|^8|^9" - }, - "bin": [ - "bin/generate-defuse-key" - ], - "type": "library", - "autoload": { - "psr-4": { - "Defuse\\Crypto\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Hornby", - "email": "taylor@defuse.ca", - "homepage": "https://defuse.ca/" - }, - { - "name": "Scott Arciszewski", - "email": "info@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "Secure PHP Encryption Library", - "keywords": [ - "aes", - "authenticated encryption", - "cipher", - "crypto", - "cryptography", - "encrypt", - "encryption", - "openssl", - "security", - "symmetric key cryptography" - ], - "support": { - "issues": "https://github.com/defuse/php-encryption/issues", - "source": "https://github.com/defuse/php-encryption/tree/v2.3.1" - }, - "time": "2021-04-09T23:57:26+00:00" - }, - { - "name": "doctrine/annotations", - "version": "1.13.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f", - "reference": "e6e7b7d5b45a2f2abc5460cc6396480b2b1d321f", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "ext-tokenizer": "*", - "php": "^7.1 || ^8.0", - "psr/cache": "^1 || ^2 || ^3" - }, - "require-dev": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^0.12.20", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", - "symfony/cache": "^4.4 || ^5.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Docblock Annotations Parser", - "homepage": "https://www.doctrine-project.org/projects/annotations.html", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "support": { - "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.13.1" - }, - "time": "2021-05-16T18:07:53+00:00" - }, - { - "name": "doctrine/cache", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/cache.git", - "reference": "c9622c6820d3ede1e2315a6a377ea1076e421d88" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/c9622c6820d3ede1e2315a6a377ea1076e421d88", - "reference": "c9622c6820d3ede1e2315a6a377ea1076e421d88", - "shasum": "" - }, - "require": { - "php": "~7.1 || ^8.0" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4", - "psr/cache": ">=3" - }, - "require-dev": { - "alcaeus/mongo-php-adapter": "^1.1", - "cache/integration-tests": "dev-master", - "doctrine/coding-standard": "^8.0", - "mongodb/mongodb": "^1.1", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", - "predis/predis": "~1.0", - "psr/cache": "^1.0 || ^2.0", - "symfony/cache": "^4.4 || ^5.2" - }, - "suggest": { - "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.", - "homepage": "https://www.doctrine-project.org/projects/cache.html", - "keywords": [ - "abstraction", - "apcu", - "cache", - "caching", - "couchdb", - "memcached", - "php", - "redis", - "xcache" - ], - "support": { - "issues": "https://github.com/doctrine/cache/issues", - "source": "https://github.com/doctrine/cache/tree/2.0.3" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcache", - "type": "tidelift" - } - ], - "time": "2021-05-25T09:43:04+00:00" - }, - { - "name": "doctrine/collections", - "version": "1.6.7", - "source": { - "type": "git", - "url": "https://github.com/doctrine/collections.git", - "reference": "55f8b799269a1a472457bd1a41b4f379d4cfba4a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/55f8b799269a1a472457bd1a41b4f379d4cfba4a", - "reference": "55f8b799269a1a472457bd1a41b4f379d4cfba4a", - "shasum": "" - }, - "require": { - "php": "^7.1.3 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpstan/phpstan-shim": "^0.9.2", - "phpunit/phpunit": "^7.0", - "vimeo/psalm": "^3.8.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.", - "homepage": "https://www.doctrine-project.org/projects/collections.html", - "keywords": [ - "array", - "collections", - "iterators", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/collections/issues", - "source": "https://github.com/doctrine/collections/tree/1.6.7" - }, - "time": "2020-07-27T17:53:49+00:00" - }, - { - "name": "doctrine/common", - "version": "3.1.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/common.git", - "reference": "a036d90c303f3163b5be8b8fde9b6755b2be4a3a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/a036d90c303f3163b5be8b8fde9b6755b2be4a3a", - "reference": "a036d90c303f3163b5be8b8fde9b6755b2be4a3a", - "shasum": "" - }, - "require": { - "doctrine/persistence": "^2.0", - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0 || ^8.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.5.20 || ^8.5 || ^9.0", - "squizlabs/php_codesniffer": "^3.0", - "symfony/phpunit-bridge": "^4.0.5", - "vimeo/psalm": "^4.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, proxies and much more.", - "homepage": "https://www.doctrine-project.org/projects/common.html", - "keywords": [ - "common", - "doctrine", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/common/issues", - "source": "https://github.com/doctrine/common/tree/3.1.2" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcommon", - "type": "tidelift" - } - ], - "time": "2021-02-10T20:18:51+00:00" - }, - { - "name": "doctrine/dbal", - "version": "2.13.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/dbal.git", - "reference": "8dd39d2ead4409ce652fd4f02621060f009ea5e4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/8dd39d2ead4409ce652fd4f02621060f009ea5e4", - "reference": "8dd39d2ead4409ce652fd4f02621060f009ea5e4", - "shasum": "" - }, - "require": { - "doctrine/cache": "^1.0|^2.0", - "doctrine/deprecations": "^0.5.3", - "doctrine/event-manager": "^1.0", - "ext-pdo": "*", - "php": "^7.1 || ^8" - }, - "require-dev": { - "doctrine/coding-standard": "9.0.0", - "jetbrains/phpstorm-stubs": "2020.2", - "phpstan/phpstan": "0.12.81", - "phpunit/phpunit": "^7.5.20|^8.5|9.5.5", - "squizlabs/php_codesniffer": "3.6.0", - "symfony/cache": "^4.4", - "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", - "vimeo/psalm": "4.6.4" - }, - "suggest": { - "symfony/console": "For helpful console commands such as SQL execution and import of files." - }, - "bin": [ - "bin/doctrine-dbal" - ], - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\DBAL\\": "lib/Doctrine/DBAL" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - } - ], - "description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.", - "homepage": "https://www.doctrine-project.org/projects/dbal.html", - "keywords": [ - "abstraction", - "database", - "db2", - "dbal", - "mariadb", - "mssql", - "mysql", - "oci8", - "oracle", - "pdo", - "pgsql", - "postgresql", - "queryobject", - "sasql", - "sql", - "sqlanywhere", - "sqlite", - "sqlserver", - "sqlsrv" - ], - "support": { - "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/2.13.2" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", - "type": "tidelift" - } - ], - "time": "2021-06-18T21:48:39+00:00" - }, - { - "name": "doctrine/deprecations", - "version": "v0.5.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "9504165960a1f83cc1480e2be1dd0a0478561314" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/9504165960a1f83cc1480e2be1dd0a0478561314", - "reference": "9504165960a1f83cc1480e2be1dd0a0478561314", - "shasum": "" - }, - "require": { - "php": "^7.1|^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0|^7.0|^8.0", - "phpunit/phpunit": "^7.0|^8.0|^9.0", - "psr/log": "^1.0" - }, - "suggest": { - "psr/log": "Allows logging deprecations via PSR-3 logger implementation" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", - "homepage": "https://www.doctrine-project.org/", - "support": { - "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/v0.5.3" - }, - "time": "2021-03-21T12:59:47+00:00" - }, - { - "name": "doctrine/doctrine-bundle", - "version": "2.4.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/DoctrineBundle.git", - "reference": "4202ce675d29e70a8b9ee763bec021b6f44caccb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/4202ce675d29e70a8b9ee763bec021b6f44caccb", - "reference": "4202ce675d29e70a8b9ee763bec021b6f44caccb", - "shasum": "" - }, - "require": { - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/dbal": "^2.9.0|^3.0", - "doctrine/persistence": "^1.3.3|^2.0", - "doctrine/sql-formatter": "^1.0.1", - "php": "^7.1 || ^8.0", - "symfony/cache": "^4.3.3|^5.0|^6.0", - "symfony/config": "^4.4.3|^5.0|^6.0", - "symfony/console": "^3.4.30|^4.3.3|^5.0|^6.0", - "symfony/dependency-injection": "^4.3.3|^5.0|^6.0", - "symfony/deprecation-contracts": "^2.1", - "symfony/doctrine-bridge": "^4.4.22|^5.2.7|^6.0", - "symfony/framework-bundle": "^3.4.30|^4.3.3|^5.0|^6.0", - "symfony/service-contracts": "^1.1.1|^2.0" - }, - "conflict": { - "doctrine/orm": "<2.9", - "twig/twig": "<1.34|>=2.0,<2.4" - }, - "require-dev": { - "doctrine/coding-standard": "^9.0", - "doctrine/orm": "^2.9", - "friendsofphp/proxy-manager-lts": "^1.0", - "phpunit/phpunit": "^7.5 || ^8.0 || ^9.3", - "psalm/plugin-phpunit": "^0.15.1", - "psalm/plugin-symfony": "^2.3.0", - "symfony/phpunit-bridge": "^5.2|^6.0", - "symfony/property-info": "^4.3.3|^5.0|^6.0", - "symfony/proxy-manager-bridge": "^3.4|^4.3.3|^5.0|^6.0", - "symfony/security-bundle": "^4.4|^5.0|^6.0", - "symfony/twig-bridge": "^3.4.30|^4.3.3|^5.0|^6.0", - "symfony/validator": "^3.4.30|^4.3.3|^5.0|^6.0", - "symfony/web-profiler-bundle": "^3.4.30|^4.3.3|^5.0|^6.0", - "symfony/yaml": "^3.4.30|^4.3.3|^5.0|^6.0", - "twig/twig": "^1.34|^2.12|^3.0", - "vimeo/psalm": "^4.7" - }, - "suggest": { - "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", - "ext-pdo": "*", - "symfony/web-profiler-bundle": "To use the data collector." - }, - "type": "symfony-bundle", - "autoload": { - "psr-4": { - "Doctrine\\Bundle\\DoctrineBundle\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Doctrine Project", - "homepage": "http://www.doctrine-project.org/" - } - ], - "description": "Symfony DoctrineBundle", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "database", - "dbal", - "orm", - "persistence" - ], - "support": { - "issues": "https://github.com/doctrine/DoctrineBundle/issues", - "source": "https://github.com/doctrine/DoctrineBundle/tree/2.4.2" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdoctrine-bundle", - "type": "tidelift" - } - ], - "time": "2021-06-05T13:40:39+00:00" - }, - { - "name": "doctrine/event-manager", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/event-manager.git", - "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/event-manager/zipball/41370af6a30faa9dc0368c4a6814d596e81aba7f", - "reference": "41370af6a30faa9dc0368c4a6814d596e81aba7f", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/common": "<2.9@dev" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", - "homepage": "https://www.doctrine-project.org/projects/event-manager.html", - "keywords": [ - "event", - "event dispatcher", - "event manager", - "event system", - "events" - ], - "support": { - "issues": "https://github.com/doctrine/event-manager/issues", - "source": "https://github.com/doctrine/event-manager/tree/1.1.x" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fevent-manager", - "type": "tidelift" - } - ], - "time": "2020-05-29T18:28:51+00:00" - }, - { - "name": "doctrine/inflector", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/9cf661f4eb38f7c881cac67c75ea9b00bf97b210", - "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^7.0", - "phpstan/phpstan": "^0.11", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-strict-rules": "^0.11", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", - "homepage": "https://www.doctrine-project.org/projects/inflector.html", - "keywords": [ - "inflection", - "inflector", - "lowercase", - "manipulation", - "php", - "plural", - "singular", - "strings", - "uppercase", - "words" - ], - "support": { - "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.x" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", - "type": "tidelift" - } - ], - "time": "2020-05-29T15:13:26+00:00" - }, - { - "name": "doctrine/instantiator", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/instantiator.git", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", - "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^8.0", - "ext-pdo": "*", - "ext-phar": "*", - "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "https://ocramius.github.io/" - } - ], - "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", - "homepage": "https://www.doctrine-project.org/projects/instantiator.html", - "keywords": [ - "constructor", - "instantiate" - ], - "support": { - "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.0" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", - "type": "tidelift" - } - ], - "time": "2020-11-10T18:47:58+00:00" - }, - { - "name": "doctrine/lexer", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/lexer.git", - "reference": "e864bbf5904cb8f5bb334f99209b48018522f042" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/e864bbf5904cb8f5bb334f99209b48018522f042", - "reference": "e864bbf5904cb8f5bb334f99209b48018522f042", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^6.0", - "phpstan/phpstan": "^0.11.8", - "phpunit/phpunit": "^8.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", - "homepage": "https://www.doctrine-project.org/projects/lexer.html", - "keywords": [ - "annotations", - "docblock", - "lexer", - "parser", - "php" - ], - "support": { - "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/1.2.1" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", - "type": "tidelift" - } - ], - "time": "2020-05-25T17:44:05+00:00" - }, - { - "name": "doctrine/orm", - "version": "2.9.3", - "source": { - "type": "git", - "url": "https://github.com/doctrine/orm.git", - "reference": "82e77cf5089a1303733f75f0f0ed01be3ab9ec22" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/orm/zipball/82e77cf5089a1303733f75f0f0ed01be3ab9ec22", - "reference": "82e77cf5089a1303733f75f0f0ed01be3ab9ec22", - "shasum": "" - }, - "require": { - "composer/package-versions-deprecated": "^1.8", - "doctrine/annotations": "^1.13", - "doctrine/cache": "^1.11.3|^2.0.3", - "doctrine/collections": "^1.5", - "doctrine/common": "^3.0.3", - "doctrine/dbal": "^2.13.0", - "doctrine/deprecations": "^0.5.3", - "doctrine/event-manager": "^1.1", - "doctrine/inflector": "^1.4|^2.0", - "doctrine/instantiator": "^1.3", - "doctrine/lexer": "^1.0", - "doctrine/persistence": "^2.2", - "ext-pdo": "*", - "php": "^7.1|^8.0", - "psr/cache": "^1 || ^2 || ^3", - "symfony/console": "^3.0|^4.0|^5.0|^6.0" - }, - "require-dev": { - "doctrine/coding-standard": "^9.0", - "phpstan/phpstan": "^0.12.83", - "phpunit/phpunit": "^7.5|^8.5|^9.4", - "squizlabs/php_codesniffer": "3.6.0", - "symfony/cache": "^4.4|^5.2", - "symfony/yaml": "^3.4|^4.0|^5.0|^6.0", - "vimeo/psalm": "4.7.0" - }, - "suggest": { - "symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0", - "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" - }, - "bin": [ - "bin/doctrine" - ], - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\ORM\\": "lib/Doctrine/ORM" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "Object-Relational-Mapper for PHP", - "homepage": "https://www.doctrine-project.org/projects/orm.html", - "keywords": [ - "database", - "orm" - ], - "support": { - "issues": "https://github.com/doctrine/orm/issues", - "source": "https://github.com/doctrine/orm/tree/2.9.3" - }, - "time": "2021-06-13T10:29:22+00:00" - }, - { - "name": "doctrine/persistence", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/persistence.git", - "reference": "d138f3ab5f761055cab1054070377cfd3222e368" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/persistence/zipball/d138f3ab5f761055cab1054070377cfd3222e368", - "reference": "d138f3ab5f761055cab1054070377cfd3222e368", - "shasum": "" - }, - "require": { - "doctrine/annotations": "^1.0", - "doctrine/cache": "^1.11 || ^2.0", - "doctrine/collections": "^1.0", - "doctrine/deprecations": "^0.5.3", - "doctrine/event-manager": "^1.0", - "php": "^7.1 || ^8.0", - "psr/cache": "^1.0|^2.0|^3.0" - }, - "conflict": { - "doctrine/common": "<2.10@dev" - }, - "require-dev": { - "composer/package-versions-deprecated": "^1.11", - "doctrine/coding-standard": "^6.0 || ^9.0", - "doctrine/common": "^3.0", - "phpstan/phpstan": "0.12.84", - "phpunit/phpunit": "^7.5.20 || ^8.0 || ^9.0", - "symfony/cache": "^4.4|^5.0", - "vimeo/psalm": "4.7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Common\\": "lib/Doctrine/Common", - "Doctrine\\Persistence\\": "lib/Doctrine/Persistence" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com" - } - ], - "description": "The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.", - "homepage": "https://doctrine-project.org/projects/persistence.html", - "keywords": [ - "mapper", - "object", - "odm", - "orm", - "persistence" - ], - "support": { - "issues": "https://github.com/doctrine/persistence/issues", - "source": "https://github.com/doctrine/persistence/tree/2.2.1" - }, - "time": "2021-05-19T07:07:01+00:00" - }, - { - "name": "doctrine/sql-formatter", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/sql-formatter.git", - "reference": "56070bebac6e77230ed7d306ad13528e60732871" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/sql-formatter/zipball/56070bebac6e77230ed7d306ad13528e60732871", - "reference": "56070bebac6e77230ed7d306ad13528e60732871", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.4" - }, - "bin": [ - "bin/sql-formatter" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Doctrine\\SqlFormatter\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jeremy Dorn", - "email": "jeremy@jeremydorn.com", - "homepage": "http://jeremydorn.com/" - } - ], - "description": "a PHP SQL highlighting library", - "homepage": "https://github.com/doctrine/sql-formatter/", - "keywords": [ - "highlight", - "sql" - ], - "support": { - "issues": "https://github.com/doctrine/sql-formatter/issues", - "source": "https://github.com/doctrine/sql-formatter/tree/1.1.x" - }, - "time": "2020-07-30T16:57:33+00:00" - }, - { - "name": "egulias/email-validator", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/egulias/EmailValidator.git", - "reference": "c81f18a3efb941d8c4d2e025f6183b5c6d697307" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/c81f18a3efb941d8c4d2e025f6183b5c6d697307", - "reference": "c81f18a3efb941d8c4d2e025f6183b5c6d697307", - "shasum": "" - }, - "require": { - "doctrine/lexer": "^1.2", - "php": ">=7.2", - "symfony/polyfill-intl-idn": "^1.15" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^8.5.8|^9.3.3", - "vimeo/psalm": "^4" - }, - "suggest": { - "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Egulias\\EmailValidator\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Eduardo Gulias Davis" - } - ], - "description": "A library for validating emails against several RFCs", - "homepage": "https://github.com/egulias/EmailValidator", - "keywords": [ - "email", - "emailvalidation", - "emailvalidator", - "validation", - "validator" - ], - "support": { - "issues": "https://github.com/egulias/EmailValidator/issues", - "source": "https://github.com/egulias/EmailValidator/tree/3.1.1" - }, - "funding": [ - { - "url": "https://github.com/egulias", - "type": "github" - } - ], - "time": "2021-04-01T18:37:14+00:00" - }, - { - "name": "ezyang/htmlpurifier", - "version": "v4.13.0", - "source": { - "type": "git", - "url": "https://github.com/ezyang/htmlpurifier.git", - "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/08e27c97e4c6ed02f37c5b2b20488046c8d90d75", - "reference": "08e27c97e4c6ed02f37c5b2b20488046c8d90d75", - "shasum": "" - }, - "require": { - "php": ">=5.2" - }, - "require-dev": { - "simpletest/simpletest": "dev-master#72de02a7b80c6bb8864ef9bf66d41d2f58f826bd" - }, - "type": "library", - "autoload": { - "files": [ - "library/HTMLPurifier.composer.php" - ], - "psr-0": { - "HTMLPurifier": "library/" - }, - "exclude-from-classmap": [ - "/library/HTMLPurifier/Language/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1-or-later" - ], - "authors": [ - { - "name": "Edward Z. Yang", - "email": "admin@htmlpurifier.org", - "homepage": "http://ezyang.com" - } - ], - "description": "Standards compliant HTML filter written in PHP", - "homepage": "http://htmlpurifier.org/", - "keywords": [ - "html" - ], - "support": { - "issues": "https://github.com/ezyang/htmlpurifier/issues", - "source": "https://github.com/ezyang/htmlpurifier/tree/master" - }, - "time": "2020-06-29T00:56:53+00:00" - }, - { - "name": "friendsofphp/php-cs-fixer", - "version": "v2.19.0", - "source": { - "type": "git", - "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "d5b8a9d852b292c2f8a035200fa6844b1f82300b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/d5b8a9d852b292c2f8a035200fa6844b1f82300b", - "reference": "d5b8a9d852b292c2f8a035200fa6844b1f82300b", - "shasum": "" - }, - "require": { - "composer/semver": "^1.4 || ^2.0 || ^3.0", - "composer/xdebug-handler": "^1.2 || ^2.0", - "doctrine/annotations": "^1.2", - "ext-json": "*", - "ext-tokenizer": "*", - "php": "^5.6 || ^7.0 || ^8.0", - "php-cs-fixer/diff": "^1.3", - "symfony/console": "^3.4.43 || ^4.1.6 || ^5.0", - "symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0", - "symfony/filesystem": "^3.0 || ^4.0 || ^5.0", - "symfony/finder": "^3.0 || ^4.0 || ^5.0", - "symfony/options-resolver": "^3.0 || ^4.0 || ^5.0", - "symfony/polyfill-php70": "^1.0", - "symfony/polyfill-php72": "^1.4", - "symfony/process": "^3.0 || ^4.0 || ^5.0", - "symfony/stopwatch": "^3.0 || ^4.0 || ^5.0" - }, - "require-dev": { - "justinrainbow/json-schema": "^5.0", - "keradus/cli-executor": "^1.4", - "mikey179/vfsstream": "^1.6", - "php-coveralls/php-coveralls": "^2.4.2", - "php-cs-fixer/accessible-object": "^1.0", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1", - "phpspec/prophecy-phpunit": "^1.1 || ^2.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.5", - "phpunitgoodpractices/polyfill": "^1.5", - "phpunitgoodpractices/traits": "^1.9.1", - "sanmai/phpunit-legacy-adapter": "^6.4 || ^8.2.1", - "symfony/phpunit-bridge": "^5.2.1", - "symfony/yaml": "^3.0 || ^4.0 || ^5.0" - }, - "suggest": { - "ext-dom": "For handling output formats in XML", - "ext-mbstring": "For handling non-UTF8 characters.", - "php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.", - "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.", - "symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible." - }, - "bin": [ - "php-cs-fixer" - ], - "type": "application", - "extra": { - "branch-alias": { - "dev-master": "2.19-dev" - } - }, - "autoload": { - "psr-4": { - "PhpCsFixer\\": "src/" - }, - "classmap": [ - "tests/Test/AbstractFixerTestCase.php", - "tests/Test/AbstractIntegrationCaseFactory.php", - "tests/Test/AbstractIntegrationTestCase.php", - "tests/Test/Assert/AssertTokensTrait.php", - "tests/Test/IntegrationCase.php", - "tests/Test/IntegrationCaseFactory.php", - "tests/Test/IntegrationCaseFactoryInterface.php", - "tests/Test/InternalIntegrationCaseFactory.php", - "tests/Test/IsIdenticalConstraint.php", - "tests/Test/TokensWithObservedTransformers.php", - "tests/TestCase.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Dariusz RumiÅ„ski", - "email": "dariusz.ruminski@gmail.com" - } - ], - "description": "A tool to automatically fix PHP code style", - "support": { - "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.19.0" - }, - "funding": [ - { - "url": "https://github.com/keradus", - "type": "github" - } - ], - "time": "2021-05-03T21:43:24+00:00" - }, - { - "name": "friendsofphp/proxy-manager-lts", - "version": "v1.0.3", - "source": { - "type": "git", - "url": "https://github.com/FriendsOfPHP/proxy-manager-lts.git", - "reference": "121af47c9aee9c03031bdeca3fac0540f59aa5c3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/proxy-manager-lts/zipball/121af47c9aee9c03031bdeca3fac0540f59aa5c3", - "reference": "121af47c9aee9c03031bdeca3fac0540f59aa5c3", - "shasum": "" - }, - "require": { - "laminas/laminas-code": "~3.4.1|^4.0", - "php": ">=7.1", - "symfony/filesystem": "^4.4.17|^5.0" - }, - "conflict": { - "laminas/laminas-stdlib": "<3.2.1", - "zendframework/zend-stdlib": "<3.2.1" - }, - "replace": { - "ocramius/proxy-manager": "^2.1" - }, - "require-dev": { - "ext-phar": "*", - "symfony/phpunit-bridge": "^5.2" - }, - "type": "library", - "extra": { - "thanks": { - "name": "ocramius/proxy-manager", - "url": "https://github.com/Ocramius/ProxyManager" - } - }, - "autoload": { - "psr-4": { - "ProxyManager\\": "src/ProxyManager" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.io/" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - } - ], - "description": "Adding support for a wider range of PHP versions to ocramius/proxy-manager", - "homepage": "https://github.com/FriendsOfPHP/proxy-manager-lts", - "keywords": [ - "aop", - "lazy loading", - "proxy", - "proxy pattern", - "service proxies" - ], - "support": { - "issues": "https://github.com/FriendsOfPHP/proxy-manager-lts/issues", - "source": "https://github.com/FriendsOfPHP/proxy-manager-lts/tree/v1.0.3" - }, - "funding": [ - { - "url": "https://github.com/Ocramius", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/ocramius/proxy-manager", - "type": "tidelift" - } - ], - "time": "2021-01-14T21:52:44+00:00" - }, - { - "name": "friendsofsymfony/jsrouting-bundle", - "version": "2.7.0", - "source": { - "type": "git", - "url": "https://github.com/FriendsOfSymfony/FOSJsRoutingBundle.git", - "reference": "d56600542504148bf2faa2b6bd7571a6adf6799e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/FriendsOfSymfony/FOSJsRoutingBundle/zipball/d56600542504148bf2faa2b6bd7571a6adf6799e", - "reference": "d56600542504148bf2faa2b6bd7571a6adf6799e", - "shasum": "" - }, - "require": { - "php": "^7.1|^8.0", - "symfony/console": "~3.3|^4.0|^5.0", - "symfony/framework-bundle": "~3.3|^4.0|^5.0", - "symfony/serializer": "~3.3|^4.0|^5.0", - "willdurand/jsonp-callback-validator": "~1.0" - }, - "require-dev": { - "symfony/expression-language": "~3.3|^4.0|^5.0", - "symfony/phpunit-bridge": "^5.1" - }, - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "FOS\\JsRoutingBundle\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "William Durand", - "email": "will+git@drnd.me" - }, - { - "name": "FriendsOfSymfony Community", - "homepage": "https://github.com/friendsofsymfony/FOSJsRoutingBundle/contributors" - } - ], - "description": "A pretty nice way to expose your Symfony2 routing to client applications.", - "homepage": "http://friendsofsymfony.github.com", - "keywords": [ - "Js Routing", - "javascript", - "routing" - ], - "support": { - "issues": "https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/issues", - "source": "https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/tree/2.7.0" - }, - "time": "2020-11-20T10:38:12+00:00" - }, - { - "name": "geoip2/geoip2", - "version": "v2.4.5", - "source": { - "type": "git", - "url": "https://github.com/maxmind/GeoIP2-php.git", - "reference": "b28a0ed0190cd76c878ed7002a5d1bb8c5f4c175" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/maxmind/GeoIP2-php/zipball/b28a0ed0190cd76c878ed7002a5d1bb8c5f4c175", - "reference": "b28a0ed0190cd76c878ed7002a5d1bb8c5f4c175", - "shasum": "" - }, - "require": { - "maxmind-db/reader": "~1.0", - "maxmind/web-service-common": "~0.3", - "php": ">=5.3.1" - }, - "require-dev": { - "phpunit/phpunit": "4.2.*", - "squizlabs/php_codesniffer": "2.*" - }, - "type": "library", - "autoload": { - "psr-4": { - "GeoIp2\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Gregory J. Oschwald", - "email": "goschwald@maxmind.com", - "homepage": "http://www.maxmind.com/" - } - ], - "description": "MaxMind GeoIP2 PHP API", - "homepage": "https://github.com/maxmind/GeoIP2-php", - "keywords": [ - "IP", - "geoip", - "geoip2", - "geolocation", - "maxmind" - ], - "support": { - "issues": "https://github.com/maxmind/GeoIP2-php/issues", - "source": "https://github.com/maxmind/GeoIP2-php/tree/master" - }, - "time": "2017-01-31T17:28:48+00:00" - }, - { - "name": "greenlion/php-sql-parser", - "version": "v4.4.0", - "source": { - "type": "git", - "url": "https://github.com/greenlion/PHP-SQL-Parser.git", - "reference": "e38d6f0f500d4d86bee7722e2e89262eeaab7e59" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/greenlion/PHP-SQL-Parser/zipball/e38d6f0f500d4d86bee7722e2e89262eeaab7e59", - "reference": "e38d6f0f500d4d86bee7722e2e89262eeaab7e59", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "analog/analog": "^1.0.6", - "phpunit/phpunit": "^4.0.14", - "squizlabs/php_codesniffer": "^1.5.1" - }, - "type": "library", - "autoload": { - "psr-0": { - "PHPSQLParser\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Justin Swanhart", - "email": "greenlion@gmail.com", - "homepage": "http://code.google.com/u/greenlion@gmail.com/", - "role": "Owner" - }, - { - "name": "André Rothe", - "email": "phosco@gmx.de", - "homepage": "https://www.phosco.info", - "role": "Committer" - } - ], - "description": "A pure PHP SQL (non validating) parser w/ focus on MySQL dialect of SQL", - "homepage": "https://github.com/greenlion/PHP-SQL-Parser", - "keywords": [ - "creator", - "mysql", - "parser", - "sql" - ], - "support": { - "issues": "https://github.com/greenlion/PHP-SQL-Parser/issues", - "source": "https://github.com/greenlion/PHP-SQL-Parser" - }, - "time": "2021-03-28T23:13:55+00:00" - }, - { - "name": "guzzlehttp/guzzle", - "version": "7.3.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "7008573787b430c1c1f650e3722d9bba59967628" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7008573787b430c1c1f650e3722d9bba59967628", - "reference": "7008573787b430c1c1f650e3722d9bba59967628", - "shasum": "" - }, - "require": { - "ext-json": "*", - "guzzlehttp/promises": "^1.4", - "guzzlehttp/psr7": "^1.7 || ^2.0", - "php": "^7.2.5 || ^8.0", - "psr/http-client": "^1.0" - }, - "provide": { - "psr/http-client-implementation": "1.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "ext-curl": "*", - "php-http/client-integration-tests": "^3.0", - "phpunit/phpunit": "^8.5.5 || ^9.3.5", - "psr/log": "^1.1" - }, - "suggest": { - "ext-curl": "Required for CURL handler support", - "ext-intl": "Required for Internationalized Domain Name (IDN) support", - "psr/log": "Required for using the Log middleware" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.3-dev" - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "psr-18", - "psr-7", - "rest", - "web service" - ], - "support": { - "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.3.0" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://github.com/alexeyshockov", - "type": "github" - }, - { - "url": "https://github.com/gmponos", - "type": "github" - } - ], - "time": "2021-03-23T11:33:13+00:00" - }, - { - "name": "guzzlehttp/promises", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", - "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", - "shasum": "" - }, - "require": { - "php": ">=5.5" - }, - "require-dev": { - "symfony/phpunit-bridge": "^4.4 || ^5.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "support": { - "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.4.1" - }, - "time": "2021-03-07T09:25:29+00:00" - }, - { - "name": "guzzlehttp/psr7", - "version": "2.2.1", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/c94a94f120803a18554c1805ef2e539f8285f9a2", - "reference": "c94a94f120803a18554c1805ef2e539f8285f9a2", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.0", - "ralouphie/getallheaders": "^3.0" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.4.1", - "http-interop/http-factory-tests": "^0.9", - "phpunit/phpunit": "^8.5.8 || ^9.3.10" - }, - "suggest": { - "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ], - "support": { - "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.2.1" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", - "type": "tidelift" - } - ], - "time": "2022-03-20T21:55:58+00:00" - }, - { - "name": "incenteev/composer-parameter-handler", - "version": "v2.1.4", - "source": { - "type": "git", - "url": "https://github.com/Incenteev/ParameterHandler.git", - "reference": "084befb11ec21faeadcddefb88b66132775ff59b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Incenteev/ParameterHandler/zipball/084befb11ec21faeadcddefb88b66132775ff59b", - "reference": "084befb11ec21faeadcddefb88b66132775ff59b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/yaml": "^2.3 || ^3.0 || ^4.0 || ^5.0" - }, - "require-dev": { - "composer/composer": "^1.0@dev", - "symfony/filesystem": "^2.3 || ^3 || ^4 || ^5", - "symfony/phpunit-bridge": "^4.0 || ^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Incenteev\\ParameterHandler\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christophe Coevoet", - "email": "stof@notk.org" - } - ], - "description": "Composer script handling your ignored parameter file", - "homepage": "https://github.com/Incenteev/ParameterHandler", - "keywords": [ - "parameters management" - ], - "support": { - "issues": "https://github.com/Incenteev/ParameterHandler/issues", - "source": "https://github.com/Incenteev/ParameterHandler/tree/v2.1.4" - }, - "time": "2020-03-17T21:10:00+00:00" - }, - { - "name": "intervention/httpauth", - "version": "3.0.1", - "source": { - "type": "git", - "url": "https://github.com/Intervention/httpauth.git", - "reference": "825202e88c0918f5249bd5af6ff1fb8ef6e3271e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Intervention/httpauth/zipball/825202e88c0918f5249bd5af6ff1fb8ef6e3271e", - "reference": "825202e88c0918f5249bd5af6ff1fb8ef6e3271e", - "shasum": "" - }, - "require": { - "php": "^7.2" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.11", - "phpunit/phpunit": "^8.0" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "Intervention\\HttpAuth\\Laravel\\HttpAuthServiceProvider" - ], - "aliases": { - "HttpAuth": "Intervention\\HttpAuth\\Laravel\\Facades\\HttpAuth" - } - } - }, - "autoload": { - "psr-4": { - "Intervention\\HttpAuth\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Oliver Vogel", - "email": "oliver@olivervogel.com", - "homepage": "https://olivervogel.com/" - } - ], - "description": "HTTP authentication (Basic & Digest) including ServiceProviders for easy Laravel integration", - "homepage": "https://github.com/Intervention/httpauth", - "keywords": [ - "Authentication", - "http", - "laravel" - ], - "support": { - "issues": "https://github.com/Intervention/httpauth/issues", - "source": "https://github.com/Intervention/httpauth/tree/3.0.1" - }, - "time": "2020-03-09T16:18:28+00:00" - }, - { - "name": "ircmaxell/password-compat", - "version": "v1.0.4", - "source": { - "type": "git", - "url": "https://github.com/ircmaxell/password_compat.git", - "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ircmaxell/password_compat/zipball/5c5cde8822a69545767f7c7f3058cb15ff84614c", - "reference": "5c5cde8822a69545767f7c7f3058cb15ff84614c", - "shasum": "" - }, - "require-dev": { - "phpunit/phpunit": "4.*" - }, - "type": "library", - "autoload": { - "files": [ - "lib/password.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Anthony Ferrara", - "email": "ircmaxell@php.net", - "homepage": "http://blog.ircmaxell.com" - } - ], - "description": "A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash", - "homepage": "https://github.com/ircmaxell/password_compat", - "keywords": [ - "hashing", - "password" - ], - "support": { - "issues": "https://github.com/ircmaxell/password_compat/issues", - "source": "https://github.com/ircmaxell/password_compat/tree/v1.0" - }, - "time": "2014-11-20T16:49:30+00:00" - }, - { - "name": "ircmaxell/random-lib", - "version": "v1.2.0", - "source": { - "type": "git", - "url": "https://github.com/ircmaxell/RandomLib.git", - "reference": "e9e0204f40e49fa4419946c677eccd3fa25b8cf4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ircmaxell/RandomLib/zipball/e9e0204f40e49fa4419946c677eccd3fa25b8cf4", - "reference": "e9e0204f40e49fa4419946c677eccd3fa25b8cf4", - "shasum": "" - }, - "require": { - "ircmaxell/security-lib": "^1.1", - "php": ">=5.3.2" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^1.11", - "mikey179/vfsstream": "^1.6", - "phpunit/phpunit": "^4.8|^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-0": { - "RandomLib": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Anthony Ferrara", - "email": "ircmaxell@ircmaxell.com", - "homepage": "http://blog.ircmaxell.com" - } - ], - "description": "A Library For Generating Secure Random Numbers", - "homepage": "https://github.com/ircmaxell/RandomLib", - "keywords": [ - "cryptography", - "random", - "random-numbers", - "random-strings" - ], - "support": { - "issues": "https://github.com/ircmaxell/RandomLib/issues", - "source": "https://github.com/ircmaxell/RandomLib/tree/master" - }, - "time": "2016-09-07T15:52:06+00:00" - }, - { - "name": "ircmaxell/security-lib", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/ircmaxell/SecurityLib.git", - "reference": "f3db6de12c20c9bcd1aa3db4353a1bbe0e44e1b5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ircmaxell/SecurityLib/zipball/f3db6de12c20c9bcd1aa3db4353a1bbe0e44e1b5", - "reference": "f3db6de12c20c9bcd1aa3db4353a1bbe0e44e1b5", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "mikey179/vfsstream": "1.1.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "SecurityLib": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Anthony Ferrara", - "email": "ircmaxell@ircmaxell.com", - "homepage": "http://blog.ircmaxell.com" - } - ], - "description": "A Base Security Library", - "homepage": "https://github.com/ircmaxell/SecurityLib", - "support": { - "issues": "https://github.com/ircmaxell/SecurityLib/issues", - "source": "https://github.com/ircmaxell/SecurityLib/tree/master" - }, - "time": "2015-03-20T14:31:23+00:00" - }, - { - "name": "jakeasmith/http_build_url", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/jakeasmith/http_build_url.git", - "reference": "93c273e77cb1edead0cf8bcf8cd2003428e74e37" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jakeasmith/http_build_url/zipball/93c273e77cb1edead0cf8bcf8cd2003428e74e37", - "reference": "93c273e77cb1edead0cf8bcf8cd2003428e74e37", - "shasum": "" - }, - "type": "library", - "autoload": { - "files": [ - "src/http_build_url.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jake A. Smith", - "email": "theman@jakeasmith.com" - } - ], - "description": "Provides functionality for http_build_url() to environments without pecl_http.", - "support": { - "issues": "https://github.com/jakeasmith/http_build_url/issues", - "source": "https://github.com/jakeasmith/http_build_url" - }, - "time": "2017-05-01T15:36:40+00:00" - }, - { - "name": "laminas/laminas-code", - "version": "3.4.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-code.git", - "reference": "1cb8f203389ab1482bf89c0e70a04849bacd7766" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-code/zipball/1cb8f203389ab1482bf89c0e70a04849bacd7766", - "reference": "1cb8f203389ab1482bf89c0e70a04849bacd7766", - "shasum": "" - }, - "require": { - "laminas/laminas-eventmanager": "^2.6 || ^3.0", - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^7.1" - }, - "conflict": { - "phpspec/prophecy": "<1.9.0" - }, - "replace": { - "zendframework/zend-code": "self.version" - }, - "require-dev": { - "doctrine/annotations": "^1.7", - "ext-phar": "*", - "laminas/laminas-coding-standard": "^1.0", - "laminas/laminas-stdlib": "^2.7 || ^3.0", - "phpunit/phpunit": "^7.5.16 || ^8.4" - }, - "suggest": { - "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features", - "laminas/laminas-stdlib": "Laminas\\Stdlib component" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4.x-dev", - "dev-develop": "3.5.x-dev", - "dev-dev-4.0": "4.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Laminas\\Code\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Extensions to the PHP Reflection API, static code scanning, and code generation", - "homepage": "https://laminas.dev", - "keywords": [ - "code", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-code/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-code/issues", - "rss": "https://github.com/laminas/laminas-code/releases.atom", - "source": "https://github.com/laminas/laminas-code" - }, - "time": "2019-12-31T16:28:24+00:00" - }, - { - "name": "laminas/laminas-eventmanager", - "version": "3.2.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-eventmanager.git", - "reference": "ce4dc0bdf3b14b7f9815775af9dfee80a63b4748" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/ce4dc0bdf3b14b7f9815775af9dfee80a63b4748", - "reference": "ce4dc0bdf3b14b7f9815775af9dfee80a63b4748", - "shasum": "" - }, - "require": { - "laminas/laminas-zendframework-bridge": "^1.0", - "php": "^5.6 || ^7.0" - }, - "replace": { - "zendframework/zend-eventmanager": "self.version" - }, - "require-dev": { - "athletic/athletic": "^0.1", - "container-interop/container-interop": "^1.1.0", - "laminas/laminas-coding-standard": "~1.0.0", - "laminas/laminas-stdlib": "^2.7.3 || ^3.0", - "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2" - }, - "suggest": { - "container-interop/container-interop": "^1.1.0, to use the lazy listeners feature", - "laminas/laminas-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.2-dev", - "dev-develop": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Laminas\\EventManager\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Trigger and listen to events within a PHP application", - "homepage": "https://laminas.dev", - "keywords": [ - "event", - "eventmanager", - "events", - "laminas" - ], - "support": { - "chat": "https://laminas.dev/chat", - "docs": "https://docs.laminas.dev/laminas-eventmanager/", - "forum": "https://discourse.laminas.dev", - "issues": "https://github.com/laminas/laminas-eventmanager/issues", - "rss": "https://github.com/laminas/laminas-eventmanager/releases.atom", - "source": "https://github.com/laminas/laminas-eventmanager" - }, - "time": "2019-12-31T16:44:52+00:00" - }, - { - "name": "laminas/laminas-zendframework-bridge", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/laminas/laminas-zendframework-bridge.git", - "reference": "6ede70583e101030bcace4dcddd648f760ddf642" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6ede70583e101030bcace4dcddd648f760ddf642", - "reference": "6ede70583e101030bcace4dcddd648f760ddf642", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3", - "squizlabs/php_codesniffer": "^3.5" - }, - "type": "library", - "extra": { - "laminas": { - "module": "Laminas\\ZendFrameworkBridge" - } - }, - "autoload": { - "files": [ - "src/autoload.php" - ], - "psr-4": { - "Laminas\\ZendFrameworkBridge\\": "src//" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Alias legacy ZF class names to Laminas Project equivalents.", - "keywords": [ - "ZendFramework", - "autoloading", - "laminas", - "zf" - ], - "support": { - "forum": "https://discourse.laminas.dev/", - "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", - "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", - "source": "https://github.com/laminas/laminas-zendframework-bridge" - }, - "funding": [ - { - "url": "https://funding.communitybridge.org/projects/laminas-project", - "type": "community_bridge" - } - ], - "time": "2020-09-14T14:23:00+00:00" - }, - { - "name": "league/tactician", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/tactician.git", - "reference": "e79f763170f3d5922ec29e85cffca0bac5cd8975" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/tactician/zipball/e79f763170f3d5922ec29e85cffca0bac5cd8975", - "reference": "e79f763170f3d5922ec29e85cffca0bac5cd8975", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "mockery/mockery": "^1.3", - "phpunit/phpunit": "^7.5.20 || ^9.3.8", - "squizlabs/php_codesniffer": "^3.5.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Tactician\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ross Tuck", - "homepage": "http://tactician.thephpleague.com" - } - ], - "description": "A small, flexible command bus. Handy for building service layers.", - "keywords": [ - "command", - "command bus", - "service layer" - ], - "support": { - "issues": "https://github.com/thephpleague/tactician/issues", - "source": "https://github.com/thephpleague/tactician/tree/v1.1.0" - }, - "time": "2021-02-14T15:29:04+00:00" - }, - { - "name": "league/tactician-bundle", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/tactician-bundle.git", - "reference": "89c51277423ac485b62580c38322426c3ec6ad47" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/tactician-bundle/zipball/89c51277423ac485b62580c38322426c3ec6ad47", - "reference": "89c51277423ac485b62580c38322426c3ec6ad47", - "shasum": "" - }, - "require": { - "league/tactician": "^1.0", - "league/tactician-container": "^2.0", - "league/tactician-logger": "^0.10.0", - "php": ">=7.2", - "symfony/config": "^3.4|^4.4|^5.0", - "symfony/dependency-injection": "^3.4|^4.4|^5.0", - "symfony/http-kernel": "^3.4|^4.4|^5.0", - "symfony/yaml": "^3.4|^4.4|^5.0" - }, - "require-dev": { - "matthiasnoback/symfony-config-test": "^4.2.1", - "matthiasnoback/symfony-dependency-injection-test": "^4.2.1", - "mockery/mockery": "~1.0", - "phpunit/phpunit": "~8.5", - "symfony/console": "^3.4|^4.4|^5.0", - "symfony/framework-bundle": "^3.4.31|^4.4|^5.0", - "symfony/security-bundle": "^3.4|^4.4|^5.0", - "symfony/security-core": "^3.4|^4.4|^5.0", - "symfony/validator": "^3.4|^4.4|^5.0" - }, - "suggest": { - "league/tactician-doctrine": "For doctrine transaction middleware", - "symfony/console": "For debugging command-to-handler routing using the tactician:debug console command", - "symfony/security": "For command security middleware", - "symfony/validator": "For command validator middleware" - }, - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "League\\Tactician\\Bundle\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Rafael Dohms", - "homepage": "http://doh.ms" - }, - { - "name": "Richard Tuin", - "homepage": "http://www.rtuin.nl/" - }, - { - "name": "Xander Smalbil", - "email": "xander@videofunk.nl" - }, - { - "name": "Ross Tuck", - "email": "me@rosstuck.com" - } - ], - "description": "Bundle to integrate Tactician with Symfony projects", - "keywords": [ - "bundle", - "symfony", - "tactician" - ], - "support": { - "issues": "https://github.com/thephpleague/tactician-bundle/issues", - "source": "https://github.com/thephpleague/tactician-bundle/tree/v1.3.0" - }, - "time": "2021-01-31T17:06:29+00:00" - }, - { - "name": "league/tactician-container", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/tactician-container.git", - "reference": "d1a5d884e072b8cafbff802d07766076eb2ffcb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/tactician-container/zipball/d1a5d884e072b8cafbff802d07766076eb2ffcb0", - "reference": "d1a5d884e072b8cafbff802d07766076eb2ffcb0", - "shasum": "" - }, - "require": { - "league/tactician": "^1.0", - "php": ">=5.5", - "psr/container": "^1.0" - }, - "require-dev": { - "league/container": "~2.3", - "phpunit/phpunit": "~4.3", - "squizlabs/php_codesniffer": "~2.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "League\\Tactician\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nigel Greenway", - "homepage": "http://futurepixels.co.uk" - } - ], - "description": "Tactician integration for any container implementing PSR-11", - "keywords": [ - "container", - "container-interop", - "di", - "interoperable", - "league", - "tactician" - ], - "support": { - "issues": "https://github.com/thephpleague/tactician-container/issues", - "source": "https://github.com/thephpleague/tactician-container/tree/master" - }, - "time": "2017-04-13T06:27:12+00:00" - }, - { - "name": "league/tactician-logger", - "version": "v0.10.0", - "source": { - "type": "git", - "url": "https://github.com/thephpleague/tactician-logger.git", - "reference": "3ff9ee04e4cbec100af827f829ed4c7ff7c08442" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/thephpleague/tactician-logger/zipball/3ff9ee04e4cbec100af827f829ed4c7ff7c08442", - "reference": "3ff9ee04e4cbec100af827f829ed4c7ff7c08442", - "shasum": "" - }, - "require": { - "league/tactician": "^1.0", - "php": ">=5.5.0", - "psr/log": "~1.0" - }, - "require-dev": { - "mockery/mockery": "^0.9", - "phpunit/phpunit": "4.*", - "squizlabs/php_codesniffer": "~2.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "League\\Tactician\\Logger\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ross Tuck" - } - ], - "description": "Adds PSR-3 logging support to the Tactician command bus", - "homepage": "https://github.com/thephpleague/tactician-logger", - "keywords": [ - "log", - "logging", - "tactician" - ], - "support": { - "issues": "https://github.com/thephpleague/tactician-logger/issues", - "source": "https://github.com/thephpleague/tactician-logger/tree/master" - }, - "time": "2016-08-23T05:50:38+00:00" - }, - { - "name": "maennchen/zipstream-php", - "version": "2.1.0", - "source": { - "type": "git", - "url": "https://github.com/maennchen/ZipStream-PHP.git", - "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/c4c5803cc1f93df3d2448478ef79394a5981cc58", - "reference": "c4c5803cc1f93df3d2448478ef79394a5981cc58", - "shasum": "" - }, - "require": { - "myclabs/php-enum": "^1.5", - "php": ">= 7.1", - "psr/http-message": "^1.0", - "symfony/polyfill-mbstring": "^1.0" - }, - "require-dev": { - "ext-zip": "*", - "guzzlehttp/guzzle": ">= 6.3", - "mikey179/vfsstream": "^1.6", - "phpunit/phpunit": ">= 7.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "ZipStream\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paul Duncan", - "email": "pabs@pablotron.org" - }, - { - "name": "Jonatan Männchen", - "email": "jonatan@maennchen.ch" - }, - { - "name": "Jesse Donat", - "email": "donatj@gmail.com" - }, - { - "name": "András Kolesár", - "email": "kolesar@kolesar.hu" - } - ], - "description": "ZipStream is a library for dynamically streaming dynamic zip files from PHP without writing to the disk at all on the server.", - "keywords": [ - "stream", - "zip" - ], - "support": { - "issues": "https://github.com/maennchen/ZipStream-PHP/issues", - "source": "https://github.com/maennchen/ZipStream-PHP/tree/master" - }, - "funding": [ - { - "url": "https://opencollective.com/zipstream", - "type": "open_collective" - } - ], - "time": "2020-05-30T13:11:16+00:00" - }, - { - "name": "marcusschwarz/lesserphp", - "version": "v0.5.5", - "source": { - "type": "git", - "url": "https://github.com/MarcusSchwarz/lesserphp.git", - "reference": "77ba82b5218ff228267d3b0e5ec8697be75e86a7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/MarcusSchwarz/lesserphp/zipball/77ba82b5218ff228267d3b0e5ec8697be75e86a7", - "reference": "77ba82b5218ff228267d3b0e5ec8697be75e86a7", - "shasum": "" - }, - "require-dev": { - "phpunit/phpunit": ">=4.8.35 <8" - }, - "bin": [ - "plessc" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.5.1-dev" - } - }, - "autoload": { - "classmap": [ - "lessc.inc.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT", - "GPL-3.0" - ], - "authors": [ - { - "name": "Leaf Corcoran", - "email": "leafot@gmail.com", - "homepage": "http://leafo.net" - }, - { - "name": "Marcus Schwarz", - "email": "github@maswaba.de", - "homepage": "https://www.maswaba.de" - } - ], - "description": "lesserphp is a compiler for LESS written in PHP based on leafo's lessphp.", - "homepage": "http://leafo.net/lessphp/", - "support": { - "issues": "https://github.com/MarcusSchwarz/lesserphp/issues", - "source": "https://github.com/MarcusSchwarz/lesserphp/tree/v0.5.5" - }, - "time": "2021-03-10T17:56:57+00:00" - }, - { - "name": "markbaker/complex", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/MarkBaker/PHPComplex.git", - "reference": "9999f1432fae467bc93c53f357105b4c31bb994c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/9999f1432fae467bc93c53f357105b4c31bb994c", - "reference": "9999f1432fae467bc93c53f357105b4c31bb994c", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "phpcompatibility/php-compatibility": "^9.0", - "phpdocumentor/phpdocumentor": "2.*", - "phploc/phploc": "^4.0", - "phpmd/phpmd": "2.*", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.3", - "sebastian/phpcpd": "^4.0", - "squizlabs/php_codesniffer": "^3.4" - }, - "type": "library", - "autoload": { - "files": [ - "classes/src/functions/abs.php", - "classes/src/functions/acos.php", - "classes/src/functions/acosh.php", - "classes/src/functions/acot.php", - "classes/src/functions/acoth.php", - "classes/src/functions/acsc.php", - "classes/src/functions/acsch.php", - "classes/src/functions/argument.php", - "classes/src/functions/asec.php", - "classes/src/functions/asech.php", - "classes/src/functions/asin.php", - "classes/src/functions/asinh.php", - "classes/src/functions/atan.php", - "classes/src/functions/atanh.php", - "classes/src/functions/conjugate.php", - "classes/src/functions/cos.php", - "classes/src/functions/cosh.php", - "classes/src/functions/cot.php", - "classes/src/functions/coth.php", - "classes/src/functions/csc.php", - "classes/src/functions/csch.php", - "classes/src/functions/exp.php", - "classes/src/functions/inverse.php", - "classes/src/functions/ln.php", - "classes/src/functions/log2.php", - "classes/src/functions/log10.php", - "classes/src/functions/negative.php", - "classes/src/functions/pow.php", - "classes/src/functions/rho.php", - "classes/src/functions/sec.php", - "classes/src/functions/sech.php", - "classes/src/functions/sin.php", - "classes/src/functions/sinh.php", - "classes/src/functions/sqrt.php", - "classes/src/functions/tan.php", - "classes/src/functions/tanh.php", - "classes/src/functions/theta.php", - "classes/src/operations/add.php", - "classes/src/operations/subtract.php", - "classes/src/operations/multiply.php", - "classes/src/operations/divideby.php", - "classes/src/operations/divideinto.php" - ], - "psr-4": { - "Complex\\": "classes/src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mark Baker", - "email": "mark@lange.demon.co.uk" - } - ], - "description": "PHP Class for working with complex numbers", - "homepage": "https://github.com/MarkBaker/PHPComplex", - "keywords": [ - "complex", - "mathematics" - ], - "support": { - "issues": "https://github.com/MarkBaker/PHPComplex/issues", - "source": "https://github.com/MarkBaker/PHPComplex/tree/PHP8" - }, - "time": "2020-08-26T10:42:07+00:00" - }, - { - "name": "markbaker/matrix", - "version": "2.1.2", - "source": { - "type": "git", - "url": "https://github.com/MarkBaker/PHPMatrix.git", - "reference": "361c0f545c3172ee26c3d596a0aa03f0cef65e6a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/361c0f545c3172ee26c3d596a0aa03f0cef65e6a", - "reference": "361c0f545c3172ee26c3d596a0aa03f0cef65e6a", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", - "phpcompatibility/php-compatibility": "^9.0", - "phpdocumentor/phpdocumentor": "2.*", - "phploc/phploc": "^4.0", - "phpmd/phpmd": "2.*", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.3", - "sebastian/phpcpd": "^4.0", - "squizlabs/php_codesniffer": "^3.4" - }, - "type": "library", - "autoload": { - "files": [ - "classes/src/Functions/adjoint.php", - "classes/src/Functions/antidiagonal.php", - "classes/src/Functions/cofactors.php", - "classes/src/Functions/determinant.php", - "classes/src/Functions/diagonal.php", - "classes/src/Functions/identity.php", - "classes/src/Functions/inverse.php", - "classes/src/Functions/minors.php", - "classes/src/Functions/trace.php", - "classes/src/Functions/transpose.php", - "classes/src/Operations/add.php", - "classes/src/Operations/directsum.php", - "classes/src/Operations/subtract.php", - "classes/src/Operations/multiply.php", - "classes/src/Operations/divideby.php", - "classes/src/Operations/divideinto.php" - ], - "psr-4": { - "Matrix\\": "classes/src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mark Baker", - "email": "mark@demon-angel.eu" - } - ], - "description": "PHP Class for working with matrices", - "homepage": "https://github.com/MarkBaker/PHPMatrix", - "keywords": [ - "mathematics", - "matrix", - "vector" - ], - "support": { - "issues": "https://github.com/MarkBaker/PHPMatrix/issues", - "source": "https://github.com/MarkBaker/PHPMatrix/tree/2.1.2" - }, - "time": "2021-01-23T16:37:31+00:00" - }, - { - "name": "martinlindhe/php-mb-helpers", - "version": "0.1.7", - "source": { - "type": "git", - "url": "https://github.com/martinlindhe/php-mb-helpers.git", - "reference": "d12570aff7f44f17c1e8b2da59795fe847a7a7c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/martinlindhe/php-mb-helpers/zipball/d12570aff7f44f17c1e8b2da59795fe847a7a7c6", - "reference": "d12570aff7f44f17c1e8b2da59795fe847a7a7c6", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.6" - }, - "type": "library", - "autoload": { - "files": [ - "src/mb_helpers.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Martin Lindhe", - "email": "martin@ubique.se" - } - ], - "description": "Provides mb_ucwords(), mb_ucfirst(), mb_strrev(), mb_str_pad(), mb_count_chars(), mb_str_split()", - "homepage": "https://github.com/martinlindhe/php-mb-helpers", - "support": { - "issues": "https://github.com/martinlindhe/php-mb-helpers/issues", - "source": "https://github.com/martinlindhe/php-mb-helpers/tree/0.1.7" - }, - "time": "2021-03-17T22:34:41+00:00" - }, - { - "name": "matthiasmullie/minify", - "version": "1.3.66", - "source": { - "type": "git", - "url": "https://github.com/matthiasmullie/minify.git", - "reference": "45fd3b0f1dfa2c965857c6d4a470bea52adc31a6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/minify/zipball/45fd3b0f1dfa2c965857c6d4a470bea52adc31a6", - "reference": "45fd3b0f1dfa2c965857c6d4a470bea52adc31a6", - "shasum": "" - }, - "require": { - "ext-pcre": "*", - "matthiasmullie/path-converter": "~1.1", - "php": ">=5.3.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~2.0", - "matthiasmullie/scrapbook": "dev-master", - "phpunit/phpunit": ">=4.8" - }, - "suggest": { - "psr/cache-implementation": "Cache implementation to use with Minify::cache" - }, - "bin": [ - "bin/minifycss", - "bin/minifyjs" - ], - "type": "library", - "autoload": { - "psr-4": { - "MatthiasMullie\\Minify\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matthias Mullie", - "email": "minify@mullie.eu", - "homepage": "http://www.mullie.eu", - "role": "Developer" - } - ], - "description": "CSS & JavaScript minifier, in PHP. Removes whitespace, strips comments, combines files (incl. @import statements and small assets in CSS files), and optimizes/shortens a few common programming patterns.", - "homepage": "http://www.minifier.org", - "keywords": [ - "JS", - "css", - "javascript", - "minifier", - "minify" - ], - "support": { - "issues": "https://github.com/matthiasmullie/minify/issues", - "source": "https://github.com/matthiasmullie/minify/tree/1.3.66" - }, - "funding": [ - { - "url": "https://github.com/[user1", - "type": "github" - }, - { - "url": "https://github.com/matthiasmullie] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g.", - "type": "github" - }, - { - "url": "https://github.com/user2", - "type": "github" - } - ], - "time": "2021-01-06T15:18:10+00:00" - }, - { - "name": "matthiasmullie/path-converter", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/matthiasmullie/path-converter.git", - "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/matthiasmullie/path-converter/zipball/e7d13b2c7e2f2268e1424aaed02085518afa02d9", - "reference": "e7d13b2c7e2f2268e1424aaed02085518afa02d9", - "shasum": "" - }, - "require": { - "ext-pcre": "*", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.8" - }, - "type": "library", - "autoload": { - "psr-4": { - "MatthiasMullie\\PathConverter\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matthias Mullie", - "email": "pathconverter@mullie.eu", - "homepage": "http://www.mullie.eu", - "role": "Developer" - } - ], - "description": "Relative path converter", - "homepage": "http://github.com/matthiasmullie/path-converter", - "keywords": [ - "converter", - "path", - "paths", - "relative" - ], - "support": { - "issues": "https://github.com/matthiasmullie/path-converter/issues", - "source": "https://github.com/matthiasmullie/path-converter/tree/1.1.3" - }, - "time": "2019-02-05T23:41:09+00:00" - }, - { - "name": "maxmind-db/reader", - "version": "v1.10.1", - "source": { - "type": "git", - "url": "https://github.com/maxmind/MaxMind-DB-Reader-php.git", - "reference": "569bd44d97d30a4ec12c7793a33004a76d4caf18" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/maxmind/MaxMind-DB-Reader-php/zipball/569bd44d97d30a4ec12c7793a33004a76d4caf18", - "reference": "569bd44d97d30a4ec12c7793a33004a76d4caf18", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "conflict": { - "ext-maxminddb": "<1.10.1,>=2.0.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "*", - "php-coveralls/php-coveralls": "^2.1", - "phpstan/phpstan": "*", - "phpunit/phpcov": ">=6.0.0", - "phpunit/phpunit": ">=8.0.0,<10.0.0", - "squizlabs/php_codesniffer": "3.*" - }, - "suggest": { - "ext-bcmath": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder", - "ext-gmp": "bcmath or gmp is required for decoding larger integers with the pure PHP decoder", - "ext-maxminddb": "A C-based database decoder that provides significantly faster lookups" - }, - "type": "library", - "autoload": { - "psr-4": { - "MaxMind\\Db\\": "src/MaxMind/Db" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Gregory J. Oschwald", - "email": "goschwald@maxmind.com", - "homepage": "https://www.maxmind.com/" - } - ], - "description": "MaxMind DB Reader API", - "homepage": "https://github.com/maxmind/MaxMind-DB-Reader-php", - "keywords": [ - "database", - "geoip", - "geoip2", - "geolocation", - "maxmind" - ], - "support": { - "issues": "https://github.com/maxmind/MaxMind-DB-Reader-php/issues", - "source": "https://github.com/maxmind/MaxMind-DB-Reader-php/tree/v1.10.1" - }, - "time": "2021-04-14T17:49:35+00:00" - }, - { - "name": "maxmind/web-service-common", - "version": "v0.8.1", - "source": { - "type": "git", - "url": "https://github.com/maxmind/web-service-common-php.git", - "reference": "32f274051c543fc865e5a84d3a2c703913641ea8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/maxmind/web-service-common-php/zipball/32f274051c543fc865e5a84d3a2c703913641ea8", - "reference": "32f274051c543fc865e5a84d3a2c703913641ea8", - "shasum": "" - }, - "require": { - "composer/ca-bundle": "^1.0.3", - "ext-curl": "*", - "ext-json": "*", - "php": ">=7.2" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "2.*", - "phpunit/phpunit": "^8.0 || ^9.0", - "squizlabs/php_codesniffer": "3.*" - }, - "type": "library", - "autoload": { - "psr-4": { - "MaxMind\\Exception\\": "src/Exception", - "MaxMind\\WebService\\": "src/WebService" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Gregory Oschwald", - "email": "goschwald@maxmind.com" - } - ], - "description": "Internal MaxMind Web Service API", - "homepage": "https://github.com/maxmind/web-service-common-php", - "support": { - "issues": "https://github.com/maxmind/web-service-common-php/issues", - "source": "https://github.com/maxmind/web-service-common-php/tree/v0.8.1" - }, - "time": "2020-11-02T17:00:53+00:00" - }, - { - "name": "mobiledetect/mobiledetectlib", - "version": "2.8.37", - "source": { - "type": "git", - "url": "https://github.com/serbanghita/Mobile-Detect.git", - "reference": "9841e3c46f5bd0739b53aed8ac677fa712943df7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/9841e3c46f5bd0739b53aed8ac677fa712943df7", - "reference": "9841e3c46f5bd0739b53aed8ac677fa712943df7", - "shasum": "" - }, - "require": { - "php": ">=5.0.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.8.35||~5.7" - }, - "type": "library", - "autoload": { - "psr-0": { - "Detection": "namespaced/" - }, - "classmap": [ - "Mobile_Detect.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Serban Ghita", - "email": "serbanghita@gmail.com", - "homepage": "http://mobiledetect.net", - "role": "Developer" - } - ], - "description": "Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.", - "homepage": "https://github.com/serbanghita/Mobile-Detect", - "keywords": [ - "detect mobile devices", - "mobile", - "mobile detect", - "mobile detector", - "php mobile detect" - ], - "support": { - "issues": "https://github.com/serbanghita/Mobile-Detect/issues", - "source": "https://github.com/serbanghita/Mobile-Detect/tree/2.8.37" - }, - "funding": [ - { - "url": "https://github.com/serbanghita", - "type": "github" - } - ], - "time": "2021-02-19T21:22:57+00:00" - }, - { - "name": "monolog/monolog", - "version": "1.26.0", - "source": { - "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "2209ddd84e7ef1256b7af205d0717fb62cfc9c33" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/2209ddd84e7ef1256b7af205d0717fb62cfc9c33", - "reference": "2209ddd84e7ef1256b7af205d0717fb62cfc9c33", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" - }, - "provide": { - "psr/log-implementation": "1.0.0" - }, - "require-dev": { - "aws/aws-sdk-php": "^2.4.9 || ^3.0", - "doctrine/couchdb": "~1.0@dev", - "graylog2/gelf-php": "~1.0", - "php-amqplib/php-amqplib": "~2.4", - "php-console/php-console": "^3.1.3", - "phpstan/phpstan": "^0.12.59", - "phpunit/phpunit": "~4.5", - "ruflin/elastica": ">=0.90 <3.0", - "sentry/sentry": "^0.13", - "swiftmailer/swiftmailer": "^5.3|^6.0" - }, - "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", - "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", - "php-console/php-console": "Allow sending log messages to Google Chrome", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server", - "sentry/sentry": "Allow sending log messages to a Sentry server" - }, - "type": "library", - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "support": { - "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/1.26.0" - }, - "funding": [ - { - "url": "https://github.com/Seldaek", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/monolog/monolog", - "type": "tidelift" - } - ], - "time": "2020-12-14T12:56:38+00:00" - }, - { - "name": "mrclay/jsmin-php", - "version": "2.4.0", - "source": { - "type": "git", - "url": "https://github.com/mrclay/jsmin-php.git", - "reference": "bb05febc9440852d39899255afd5569b7f21a72c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mrclay/jsmin-php/zipball/bb05febc9440852d39899255afd5569b7f21a72c", - "reference": "bb05febc9440852d39899255afd5569b7f21a72c", - "shasum": "" - }, - "require": { - "ext-pcre": "*", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "4.2" - }, - "type": "library", - "autoload": { - "psr-0": { - "JSMin\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Stephen Clay", - "email": "steve@mrclay.org", - "role": "Developer" - }, - { - "name": "Ryan Grove", - "email": "ryan@wonko.com", - "role": "Developer" - } - ], - "description": "Provides a modified port of Douglas Crockford's jsmin.c, which removes unnecessary whitespace from JavaScript files.", - "homepage": "https://github.com/mrclay/jsmin-php/", - "keywords": [ - "compress", - "jsmin", - "minify" - ], - "support": { - "email": "minify@googlegroups.com", - "issues": "https://github.com/mrclay/jsmin-php/issues", - "source": "https://github.com/mrclay/jsmin-php/tree/master" - }, - "time": "2018-12-06T15:03:38+00:00" - }, - { - "name": "mrclay/minify", - "version": "3.0.11", - "source": { - "type": "git", - "url": "https://github.com/mrclay/minify.git", - "reference": "f1572a580a8ab29c5c7df4319c4787c74f7dcb3e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mrclay/minify/zipball/f1572a580a8ab29c5c7df4319c4787c74f7dcb3e", - "reference": "f1572a580a8ab29c5c7df4319c4787c74f7dcb3e", - "shasum": "" - }, - "require": { - "ext-pcre": "*", - "intervention/httpauth": "^2.0|^3.0", - "marcusschwarz/lesserphp": "^0.5.1", - "monolog/monolog": "~1.1|~2.0", - "mrclay/jsmin-php": "~2", - "mrclay/props-dic": "^2.2|^3.0", - "php": "^5.3.0 || ^7.0 || ^8.0", - "tubalmartin/cssmin": "~4" - }, - "require-dev": { - "firephp/firephp-core": "~0.4.0", - "leafo/scssphp": "^0.3 || ^0.6 || ^0.7", - "meenie/javascript-packer": "~1.1", - "phpunit/phpunit": "^4.8.36", - "tedivm/jshrink": "~1.1.0" - }, - "suggest": { - "firephp/firephp-core": "Use FirePHP for Log messages", - "meenie/javascript-packer": "Keep track of the Packer PHP port using Composer" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "lib/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Stephen Clay", - "email": "steve@mrclay.org", - "role": "Developer" - } - ], - "description": "Minify is a PHP app that helps you follow several rules for client-side performance. It combines multiple CSS or Javascript files, removes unnecessary whitespace and comments, and serves them with gzip encoding and optimal client-side cache headers", - "homepage": "https://github.com/mrclay/minify", - "support": { - "email": "minify@googlegroups.com", - "issues": "https://github.com/mrclay/minify/issues", - "source": "https://github.com/mrclay/minify/tree/3.0.11", - "wiki": "https://github.com/mrclay/minify/blob/master/docs" - }, - "time": "2021-03-11T11:58:14+00:00" - }, - { - "name": "mrclay/props-dic", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/mrclay/Props.git", - "reference": "0b0fd254e33e2d60bc2bcd7867f2ab3cdd05a843" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mrclay/Props/zipball/0b0fd254e33e2d60bc2bcd7867f2ab3cdd05a843", - "reference": "0b0fd254e33e2d60bc2bcd7867f2ab3cdd05a843", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "pimple/pimple": "~3.0", - "psr/container": "^1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.8" - }, - "type": "library", - "autoload": { - "psr-0": { - "Props\\": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Steve Clay", - "email": "steve@mrclay.org", - "homepage": "http://www.mrclay.org/" - } - ], - "description": "Props is a simple DI container that allows retrieving values via custom property and method names", - "keywords": [ - "container", - "dependency injection", - "dependency injection container", - "di", - "di container" - ], - "support": { - "issues": "https://github.com/mrclay/Props/issues", - "source": "https://github.com/mrclay/Props/tree/master" - }, - "time": "2019-11-26T17:56:10+00:00" - }, - { - "name": "myclabs/php-enum", - "version": "1.7.7", - "source": { - "type": "git", - "url": "https://github.com/myclabs/php-enum.git", - "reference": "d178027d1e679832db9f38248fcc7200647dc2b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/php-enum/zipball/d178027d1e679832db9f38248fcc7200647dc2b7", - "reference": "d178027d1e679832db9f38248fcc7200647dc2b7", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7", - "squizlabs/php_codesniffer": "1.*", - "vimeo/psalm": "^3.8" - }, - "type": "library", - "autoload": { - "psr-4": { - "MyCLabs\\Enum\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP Enum contributors", - "homepage": "https://github.com/myclabs/php-enum/graphs/contributors" - } - ], - "description": "PHP Enum implementation", - "homepage": "http://github.com/myclabs/php-enum", - "keywords": [ - "enum" - ], - "support": { - "issues": "https://github.com/myclabs/php-enum/issues", - "source": "https://github.com/myclabs/php-enum/tree/1.7.7" - }, - "funding": [ - { - "url": "https://github.com/mnapoli", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/php-enum", - "type": "tidelift" - } - ], - "time": "2020-11-14T18:14:52+00:00" - }, - { - "name": "nikic/php-parser", - "version": "v4.10.5", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4432ba399e47c66624bc73c8c0f811e5c109576f", - "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.0" - }, - "require-dev": { - "ircmaxell/php-yacc": "^0.0.7", - "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" - }, - "bin": [ - "bin/php-parse" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpParser\\": "lib/PhpParser" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Nikita Popov" - } - ], - "description": "A PHP parser written in PHP", - "keywords": [ - "parser", - "php" - ], - "support": { - "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.5" - }, - "time": "2021-05-03T19:11:20+00:00" - }, - { - "name": "paragonie/random_compat", - "version": "v9.99.100", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/996434e5492cb4c3edcb9168db6fbb1359ef965a", - "reference": "996434e5492cb4c3edcb9168db6fbb1359ef965a", - "shasum": "" - }, - "require": { - "php": ">= 7" - }, - "require-dev": { - "phpunit/phpunit": "4.*|5.*", - "vimeo/psalm": "^1" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "polyfill", - "pseudorandom", - "random" - ], - "support": { - "email": "info@paragonie.com", - "issues": "https://github.com/paragonie/random_compat/issues", - "source": "https://github.com/paragonie/random_compat" - }, - "time": "2020-10-15T08:29:30+00:00" - }, - { - "name": "pear/archive_tar", - "version": "1.4.13", - "source": { - "type": "git", - "url": "https://github.com/pear/Archive_Tar.git", - "reference": "2b87b41178cc6d4ad3cba678a46a1cae49786011" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pear/Archive_Tar/zipball/2b87b41178cc6d4ad3cba678a46a1cae49786011", - "reference": "2b87b41178cc6d4ad3cba678a46a1cae49786011", - "shasum": "" - }, - "require": { - "pear/pear-core-minimal": "^1.10.0alpha2", - "php": ">=5.2.0" - }, - "require-dev": { - "phpunit/phpunit": "*" - }, - "suggest": { - "ext-bz2": "Bz2 compression support.", - "ext-xz": "Lzma2 compression support.", - "ext-zlib": "Gzip compression support." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "Archive_Tar": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "./" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Vincent Blavet", - "email": "vincent@phpconcept.net" - }, - { - "name": "Greg Beaver", - "email": "greg@chiaraquartet.net" - }, - { - "name": "Michiel Rook", - "email": "mrook@php.net" - } - ], - "description": "Tar file management class with compression support (gzip, bzip2, lzma2)", - "homepage": "https://github.com/pear/Archive_Tar", - "keywords": [ - "archive", - "tar" - ], - "support": { - "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Archive_Tar", - "source": "https://github.com/pear/Archive_Tar" - }, - "funding": [ - { - "url": "https://github.com/mrook", - "type": "github" - }, - { - "url": "https://www.patreon.com/michielrook", - "type": "patreon" - } - ], - "time": "2021-02-16T10:50:50+00:00" - }, - { - "name": "pear/console_getopt", - "version": "v1.4.3", - "source": { - "type": "git", - "url": "https://github.com/pear/Console_Getopt.git", - "reference": "a41f8d3e668987609178c7c4a9fe48fecac53fa0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pear/Console_Getopt/zipball/a41f8d3e668987609178c7c4a9fe48fecac53fa0", - "reference": "a41f8d3e668987609178c7c4a9fe48fecac53fa0", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "Console": "./" - } - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "./" - ], - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Andrei Zmievski", - "email": "andrei@php.net", - "role": "Lead" - }, - { - "name": "Stig Bakken", - "email": "stig@php.net", - "role": "Developer" - }, - { - "name": "Greg Beaver", - "email": "cellog@php.net", - "role": "Helper" - } - ], - "description": "More info available on: http://pear.php.net/package/Console_Getopt", - "support": { - "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=Console_Getopt", - "source": "https://github.com/pear/Console_Getopt" - }, - "time": "2019-11-20T18:27:48+00:00" - }, - { - "name": "pear/pear-core-minimal", - "version": "v1.10.10", - "source": { - "type": "git", - "url": "https://github.com/pear/pear-core-minimal.git", - "reference": "625a3c429d9b2c1546438679074cac1b089116a7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pear/pear-core-minimal/zipball/625a3c429d9b2c1546438679074cac1b089116a7", - "reference": "625a3c429d9b2c1546438679074cac1b089116a7", - "shasum": "" - }, - "require": { - "pear/console_getopt": "~1.4", - "pear/pear_exception": "~1.0" - }, - "replace": { - "rsky/pear-core-min": "self.version" - }, - "type": "library", - "autoload": { - "psr-0": { - "": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "src/" - ], - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Christian Weiske", - "email": "cweiske@php.net", - "role": "Lead" - } - ], - "description": "Minimal set of PEAR core files to be used as composer dependency", - "support": { - "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR", - "source": "https://github.com/pear/pear-core-minimal" - }, - "time": "2019-11-19T19:00:24+00:00" - }, - { - "name": "pear/pear_exception", - "version": "v1.0.2", - "source": { - "type": "git", - "url": "https://github.com/pear/PEAR_Exception.git", - "reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pear/PEAR_Exception/zipball/b14fbe2ddb0b9f94f5b24cf08783d599f776fff0", - "reference": "b14fbe2ddb0b9f94f5b24cf08783d599f776fff0", - "shasum": "" - }, - "require": { - "php": ">=5.2.0" - }, - "require-dev": { - "phpunit/phpunit": "<9" - }, - "type": "class", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "PEAR/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "." - ], - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Helgi Thormar", - "email": "dufuz@php.net" - }, - { - "name": "Greg Beaver", - "email": "cellog@php.net" - } - ], - "description": "The PEAR Exception base class.", - "homepage": "https://github.com/pear/PEAR_Exception", - "keywords": [ - "exception" - ], - "support": { - "issues": "http://pear.php.net/bugs/search.php?cmd=display&package_name[]=PEAR_Exception", - "source": "https://github.com/pear/PEAR_Exception" - }, - "time": "2021-03-21T15:43:46+00:00" - }, - { - "name": "pelago/emogrifier", - "version": "v5.0.1", - "source": { - "type": "git", - "url": "https://github.com/MyIntervals/emogrifier.git", - "reference": "37595a9bb62c3c25969bdd9e8d7dd24c3ac62bc9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/MyIntervals/emogrifier/zipball/37595a9bb62c3c25969bdd9e8d7dd24c3ac62bc9", - "reference": "37595a9bb62c3c25969bdd9e8d7dd24c3ac62bc9", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "php": "~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0", - "symfony/css-selector": "^3.4.32 || ^4.4 || ^5.1" - }, - "require-dev": { - "php-parallel-lint/php-parallel-lint": "^1.2.0", - "rawr/cross-data-providers": "^2.3.0", - "slevomat/coding-standard": "^6.4.1", - "squizlabs/php_codesniffer": "^3.5.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "6.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Pelago\\Emogrifier\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Oliver Klee", - "email": "github@oliverklee.de" - }, - { - "name": "Zoli Szabó", - "email": "zoli.szabo+github@gmail.com" - }, - { - "name": "John Reeve", - "email": "jreeve@pelagodesign.com" - }, - { - "name": "Jake Hotson", - "email": "jake@qzdesign.co.uk" - }, - { - "name": "Cameron Brooks" - }, - { - "name": "Jaime Prado" - } - ], - "description": "Converts CSS styles into inline style attributes in your HTML code", - "homepage": "https://www.myintervals.com/emogrifier.php", - "keywords": [ - "css", - "email", - "pre-processing" - ], - "support": { - "issues": "https://github.com/MyIntervals/emogrifier/issues", - "source": "https://github.com/MyIntervals/emogrifier" - }, - "time": "2021-04-06T08:18:22+00:00" - }, - { - "name": "php-cs-fixer/diff", - "version": "v1.3.1", - "source": { - "type": "git", - "url": "https://github.com/PHP-CS-Fixer/diff.git", - "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/dbd31aeb251639ac0b9e7e29405c1441907f5759", - "reference": "dbd31aeb251639ac0b9e7e29405c1441907f5759", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0", - "symfony/process": "^3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - }, - { - "name": "SpacePossum" - } - ], - "description": "sebastian/diff v2 backport support for PHP5.6", - "homepage": "https://github.com/PHP-CS-Fixer", - "keywords": [ - "diff" - ], - "support": { - "issues": "https://github.com/PHP-CS-Fixer/diff/issues", - "source": "https://github.com/PHP-CS-Fixer/diff/tree/v1.3.1" - }, - "time": "2020-10-14T08:39:05+00:00" - }, - { - "name": "phpoffice/phpspreadsheet", - "version": "1.17.1", - "source": { - "type": "git", - "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "c55269cb06911575a126dc225a05c0e4626e5fb4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/c55269cb06911575a126dc225a05c0e4626e5fb4", - "reference": "c55269cb06911575a126dc225a05c0e4626e5fb4", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-dom": "*", - "ext-fileinfo": "*", - "ext-gd": "*", - "ext-iconv": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-simplexml": "*", - "ext-xml": "*", - "ext-xmlreader": "*", - "ext-xmlwriter": "*", - "ext-zip": "*", - "ext-zlib": "*", - "ezyang/htmlpurifier": "^4.13", - "maennchen/zipstream-php": "^2.1", - "markbaker/complex": "^1.5||^2.0", - "markbaker/matrix": "^1.2||^2.0", - "php": "^7.2||^8.0", - "psr/http-client": "^1.0", - "psr/http-factory": "^1.0", - "psr/simple-cache": "^1.0" - }, - "require-dev": { - "dompdf/dompdf": "^0.8.5", - "friendsofphp/php-cs-fixer": "^2.18", - "jpgraph/jpgraph": "^4.0", - "mpdf/mpdf": "^8.0", - "phpcompatibility/php-compatibility": "^9.3", - "phpunit/phpunit": "^8.5||^9.3", - "squizlabs/php_codesniffer": "^3.5", - "tecnickcom/tcpdf": "^6.3" - }, - "suggest": { - "dompdf/dompdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)", - "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", - "mpdf/mpdf": "Option for rendering PDF with PDF Writer", - "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)" - }, - "type": "library", - "autoload": { - "psr-4": { - "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Maarten Balliauw", - "homepage": "https://blog.maartenballiauw.be" - }, - { - "name": "Mark Baker", - "homepage": "https://markbakeruk.net" - }, - { - "name": "Franck Lefevre", - "homepage": "https://rootslabs.net" - }, - { - "name": "Erik Tilt" - }, - { - "name": "Adrien Crivelli" - } - ], - "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", - "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", - "keywords": [ - "OpenXML", - "excel", - "gnumeric", - "ods", - "php", - "spreadsheet", - "xls", - "xlsx" - ], - "support": { - "issues": "https://github.com/PHPOffice/PhpSpreadsheet/issues", - "source": "https://github.com/PHPOffice/PhpSpreadsheet/tree/1.17.1" - }, - "time": "2021-03-02T17:54:11+00:00" - }, - { - "name": "pimple/pimple", - "version": "v3.4.0", - "source": { - "type": "git", - "url": "https://github.com/silexphp/Pimple.git", - "reference": "86406047271859ffc13424a048541f4531f53601" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/silexphp/Pimple/zipball/86406047271859ffc13424a048541f4531f53601", - "reference": "86406047271859ffc13424a048541f4531f53601", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "psr/container": "^1.1" - }, - "require-dev": { - "symfony/phpunit-bridge": "^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "Pimple": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Pimple, a simple Dependency Injection Container", - "homepage": "https://pimple.symfony.com", - "keywords": [ - "container", - "dependency injection" - ], - "support": { - "source": "https://github.com/silexphp/Pimple/tree/v3.4.0" - }, - "time": "2021-03-06T08:28:00+00:00" - }, - { - "name": "prestashop/blockreassurance", - "version": "v5.1.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/blockreassurance.git", - "reference": "7ec28ecf52fcc0ca9787a81edb00f9e7e85d4400" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/blockreassurance/zipball/7ec28ecf52fcc0ca9787a81edb00f9e7e85d4400", - "reference": "7ec28ecf52fcc0ca9787a81edb00f9e7e85d4400", - "shasum": "" - }, - "require": { - "php": ">=5.6.0" - }, - "require-dev": { - "prestashop/php-dev-tools": "^3.4" - }, - "type": "prestashop-module", - "autoload": { - "psr-4": { - "PrestaShop\\Module\\BlockReassurance\\": "src/" - }, - "classmap": [ - "blockreassurance.php", - "classes/ReassuranceActivity.php" - ], - "exclude-from-classmap": [] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module blockreassurance", - "homepage": "https://github.com/PrestaShop/blockreassurance", - "support": { - "source": "https://github.com/PrestaShop/blockreassurance/tree/v5.1.1" - }, - "time": "2022-04-08T15:28:20+00:00" - }, - { - "name": "prestashop/blockwishlist", - "version": "v2.1.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/blockwishlist.git", - "reference": "4feccca6f5f01baa8cc2d70afa71e2da898c9207" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/blockwishlist/zipball/4feccca6f5f01baa8cc2d70afa71e2da898c9207", - "reference": "4feccca6f5f01baa8cc2d70afa71e2da898c9207", - "shasum": "" - }, - "require-dev": { - "prestashop/php-dev-tools": "~3.0" - }, - "type": "prestashop-module", - "autoload": { - "psr-4": { - "PrestaShop\\Module\\BlockWishList\\": "src/" - }, - "classmap": [ - "blockwishlist.php", - "controllers", - "classes" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module blockwishlist", - "homepage": "https://github.com/PrestaShop/blockwishlist", - "support": { - "source": "https://github.com/PrestaShop/blockwishlist/tree/v2.1.0" - }, - "time": "2022-04-25T16:13:04+00:00" - }, - { - "name": "prestashop/circuit-breaker", - "version": "v4.0.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/circuit-breaker.git", - "reference": "9744f98f5f5a3c678fd14cd60b70d2872d9295f2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/circuit-breaker/zipball/9744f98f5f5a3c678fd14cd60b70d2872d9295f2", - "reference": "9744f98f5f5a3c678fd14cd60b70d2872d9295f2", - "shasum": "" - }, - "require": { - "guzzlehttp/guzzle": "^7.3", - "prestashop/php-dev-tools": "^4.0" - }, - "require-dev": { - "doctrine/cache": "^1.10.2", - "phpunit/phpunit": "^8", - "psr/simple-cache": "^1.0", - "symfony/cache": "^4.4", - "symfony/event-dispatcher": "^4.4" - }, - "suggest": { - "doctrine/cache": "Allows use of Doctrine Cache adapters to store transactions", - "ext-apcu": "Allows use of APCu adapter (performant) to store transactions", - "symfony/cache": "Allows use of Symfony Cache adapters to store transactions" - }, - "type": "library", - "autoload": { - "psr-4": { - "PrestaShop\\CircuitBreaker\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - }, - { - "name": "PrestaShop Community", - "homepage": "http://contributors.prestashop.com/" - } - ], - "description": "A circuit breaker implementation for PHP", - "support": { - "issues": "https://github.com/PrestaShop/circuit-breaker/issues", - "source": "https://github.com/PrestaShop/circuit-breaker/tree/v4.0.0" - }, - "time": "2021-04-20T14:48:25+00:00" - }, - { - "name": "prestashop/classic", - "version": "dev-develop", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/classic-theme.git", - "reference": "d16d146271c6fe0902988e32fe0745fbbf8133ef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/classic-theme/zipball/d16d146271c6fe0902988e32fe0745fbbf8133ef", - "reference": "d16d146271c6fe0902988e32fe0745fbbf8133ef", - "shasum": "" - }, - "require-dev": { - "symfony/console": "~4.4 || ^5.0", - "symfony/yaml": "~4.4 || ^5.0" - }, - "default-branch": true, - "type": "prestashop-theme", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - }, - { - "name": "PrestaShop Community", - "homepage": "https://contributors.prestashop.com/" - } - ], - "description": "Classic theme for PrestaShop 1.7", - "support": { - "source": "https://github.com/PrestaShop/classic-theme/tree/develop" - }, - "time": "2022-03-11T17:10:37+00:00" - }, - { - "name": "prestashop/contactform", - "version": "v4.3.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/contactform.git", - "reference": "849aae54ec564aca94877b9bee50e71bb0468edb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/contactform/zipball/849aae54ec564aca94877b9bee50e71bb0468edb", - "reference": "849aae54ec564aca94877b9bee50e71bb0468edb", - "shasum": "" - }, - "require": { - "jakeasmith/http_build_url": "^1", - "php": ">=5.4.0" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module contactform", - "homepage": "https://github.com/PrestaShop/contactform", - "support": { - "source": "https://github.com/PrestaShop/contactform/tree/v4.3.0" - }, - "time": "2020-09-15T09:37:15+00:00" - }, - { - "name": "prestashop/dashactivity", - "version": "v2.0.2", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/dashactivity.git", - "reference": "8d41fab7a58cdaeabc0248f6fd571da32d7615d4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/dashactivity/zipball/8d41fab7a58cdaeabc0248f6fd571da32d7615d4", - "reference": "8d41fab7a58cdaeabc0248f6fd571da32d7615d4", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL - Academic Free License (AFL 3.0)" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module dashactivity", - "homepage": "https://github.com/PrestaShop/dashactivity", - "support": { - "source": "https://github.com/PrestaShop/dashactivity/tree/master" - }, - "time": "2017-12-08T11:06:01+00:00" - }, - { - "name": "prestashop/dashgoals", - "version": "v2.0.2", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/dashgoals.git", - "reference": "2a8d41bcc9f2b09924b5e82407bcd6d61ea61ab6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/dashgoals/zipball/2a8d41bcc9f2b09924b5e82407bcd6d61ea61ab6", - "reference": "2a8d41bcc9f2b09924b5e82407bcd6d61ea61ab6", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module dashgoals", - "homepage": "https://github.com/PrestaShop/dashgoals", - "support": { - "source": "https://github.com/PrestaShop/dashgoals/tree/v2.0.2" - }, - "time": "2018-01-29T17:51:57+00:00" - }, - { - "name": "prestashop/dashproducts", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/dashproducts.git", - "reference": "22652ff141bfc3d5563918210f9b58305c80f4d7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/dashproducts/zipball/22652ff141bfc3d5563918210f9b58305c80f4d7", - "reference": "22652ff141bfc3d5563918210f9b58305c80f4d7", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module dashproducts", - "homepage": "https://github.com/PrestaShop/dashproducts", - "support": { - "source": "https://github.com/PrestaShop/dashproducts/tree/v2.1.1" - }, - "time": "2020-09-28T11:23:29+00:00" - }, - { - "name": "prestashop/dashtrends", - "version": "v2.0.3", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/dashtrends.git", - "reference": "da68ea81c2d0d13d9fd851934c75927fe222d5e3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/dashtrends/zipball/da68ea81c2d0d13d9fd851934c75927fe222d5e3", - "reference": "da68ea81c2d0d13d9fd851934c75927fe222d5e3", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "prestashop/php-dev-tools": "~3.0" - }, - "type": "prestashop-module", - "autoload": { - "classmap": [ - "dashtrends.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module dashtrends", - "homepage": "https://github.com/PrestaShop/dashtrends", - "support": { - "source": "https://github.com/PrestaShop/dashtrends/tree/v2.0.3" - }, - "time": "2020-10-14T13:35:03+00:00" - }, - { - "name": "prestashop/decimal", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/decimal.git", - "reference": "b5afdcc4b03140f838bb7b256aec6c21fd83951b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/decimal/zipball/b5afdcc4b03140f838bb7b256aec6c21fd83951b", - "reference": "b5afdcc4b03140f838bb7b256aec6c21fd83951b", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.99", - "phpunit/phpunit": "8.*", - "prestashop/php-dev-tools": "^4.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "PrestaShop\\Decimal\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "Object-oriented wrapper/shim for BC Math PHP extension. Allows for arbitrary-precision math operations.", - "homepage": "https://github.com/prestashop/decimal", - "keywords": [ - "bcmath", - "decimal", - "math", - "precision", - "prestashop" - ], - "support": { - "issues": "https://github.com/PrestaShop/decimal/issues", - "source": "https://github.com/PrestaShop/decimal/tree/1.5.0" - }, - "time": "2022-02-02T09:04:37+00:00" - }, - { - "name": "prestashop/graphnvd3", - "version": "v2.0.2", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/graphnvd3.git", - "reference": "ba9d68f6a66aca7b8750977d034e2adcceaa4167" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/graphnvd3/zipball/ba9d68f6a66aca7b8750977d034e2adcceaa4167", - "reference": "ba9d68f6a66aca7b8750977d034e2adcceaa4167", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module graphnvd3", - "homepage": "https://github.com/PrestaShop/graphnvd3", - "support": { - "source": "https://github.com/PrestaShop/graphnvd3/tree/v2.0.2" - }, - "time": "2021-11-19T14:55:33+00:00" - }, - { - "name": "prestashop/gridhtml", - "version": "v2.0.2", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/gridhtml.git", - "reference": "184ed2be93b84dea56c98a9042cafd66ac48458b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/gridhtml/zipball/184ed2be93b84dea56c98a9042cafd66ac48458b", - "reference": "184ed2be93b84dea56c98a9042cafd66ac48458b", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "prestashop/php-dev-tools": "^3.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module gridhtml", - "homepage": "https://github.com/PrestaShop/gridhtml", - "support": { - "source": "https://github.com/PrestaShop/gridhtml/tree/v2.0.2" - }, - "time": "2021-11-19T15:48:55+00:00" - }, - { - "name": "prestashop/gsitemap", - "version": "v4.2.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/gsitemap.git", - "reference": "b67dda02a8b6488eb4e2a67080357ac3f9e57057" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/gsitemap/zipball/b67dda02a8b6488eb4e2a67080357ac3f9e57057", - "reference": "b67dda02a8b6488eb4e2a67080357ac3f9e57057", - "shasum": "" - }, - "require": { - "php": ">=5.6.0" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module gsitemap", - "homepage": "https://github.com/PrestaShop/gsitemap", - "support": { - "source": "https://github.com/PrestaShop/gsitemap/tree/v4.2.0" - }, - "time": "2020-06-23T05:58:30+00:00" - }, - { - "name": "prestashop/header-stamp", - "version": "v2.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShopCorp/header-stamp.git", - "reference": "db3d7d4604e6ef2ac9cf5d88b66601b96d2b9977" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShopCorp/header-stamp/zipball/db3d7d4604e6ef2ac9cf5d88b66601b96d2b9977", - "reference": "db3d7d4604e6ef2ac9cf5d88b66601b96d2b9977", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4.10", - "php": ">=7.2.5", - "symfony/console": "^3.4 || ~4.0 || ~5.0", - "symfony/finder": "^3.4 || ~4.0 || ~5.0" - }, - "require-dev": { - "phpstan/phpstan": "^0.12.83", - "prestashop/php-dev-tools": "1.*" - }, - "bin": [ - "bin/header-stamp" - ], - "type": "library", - "autoload": { - "psr-4": { - "PrestaShop\\HeaderStamp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "Rewrite your file headers to add the license or to make them up-to-date", - "homepage": "https://github.com/PrestaShopCorp/header-stamp", - "support": { - "issues": "https://github.com/PrestaShopCorp/header-stamp/issues", - "source": "https://github.com/PrestaShopCorp/header-stamp/tree/v2.0" - }, - "time": "2021-04-16T13:04:37+00:00" - }, - { - "name": "prestashop/pagesnotfound", - "version": "v2.0.2", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/pagesnotfound.git", - "reference": "ac5b640daa39356c8ca96679cbe58e83964b41d2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/pagesnotfound/zipball/ac5b640daa39356c8ca96679cbe58e83964b41d2", - "reference": "ac5b640daa39356c8ca96679cbe58e83964b41d2", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module pagesnotfound", - "homepage": "https://github.com/PrestaShop/pagesnotfound", - "support": { - "source": "https://github.com/PrestaShop/pagesnotfound/tree/v2.0.2" - }, - "time": "2022-01-11T07:53:21+00:00" - }, - { - "name": "prestashop/php-dev-tools", - "version": "v4.0.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/php-dev-tools.git", - "reference": "f675c0c296b8399cdd99ac9c09f414ae4a2e72b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/php-dev-tools/zipball/f675c0c296b8399cdd99ac9c09f414ae4a2e72b2", - "reference": "f675c0c296b8399cdd99ac9c09f414ae4a2e72b2", - "shasum": "" - }, - "require": { - "friendsofphp/php-cs-fixer": "^2.14", - "php": ">=7.2.5", - "prestashop/header-stamp": "^2.0", - "squizlabs/php_codesniffer": "^3.4", - "symfony/console": "~3.2 || ~4.0 || ~5.0", - "symfony/filesystem": "~3.2 || ~4.0 || ~5.0" - }, - "conflict": { - "friendsofphp/php-cs-fixer": "2.18.3" - }, - "bin": [ - "bin/prestashop-coding-standards" - ], - "type": "library", - "autoload": { - "psr-4": { - "PrestaShop\\CodingStandards\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PrestaShop coding standards", - "support": { - "issues": "https://github.com/PrestaShop/php-dev-tools/issues", - "source": "https://github.com/PrestaShop/php-dev-tools/tree/v4.0.1" - }, - "time": "2021-05-10T09:33:33+00:00" - }, - { - "name": "prestashop/productcomments", - "version": "v5.0.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/productcomments.git", - "reference": "b2586beb1283ee037273a6cab2a911d0379f00a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/productcomments/zipball/b2586beb1283ee037273a6cab2a911d0379f00a8", - "reference": "b2586beb1283ee037273a6cab2a911d0379f00a8", - "shasum": "" - }, - "require": { - "php": ">=5.6.0" - }, - "require-dev": { - "prestashop/php-dev-tools": "^3.4" - }, - "type": "prestashop-module", - "autoload": { - "psr-4": { - "PrestaShop\\Module\\ProductComment\\": "src/" - }, - "classmap": [ - "productcomments.php" - ], - "exclude-from-classmap": [] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module productcomments", - "homepage": "https://github.com/PrestaShop/productcomments", - "support": { - "source": "https://github.com/PrestaShop/productcomments/tree/v5.0.1" - }, - "time": "2022-02-10T15:06:39+00:00" - }, - { - "name": "prestashop/ps_banner", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_banner.git", - "reference": "020a0ef7fc5732e18ede2a42ab1e8328fe98168e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_banner/zipball/020a0ef7fc5732e18ede2a42ab1e8328fe98168e", - "reference": "020a0ef7fc5732e18ede2a42ab1e8328fe98168e", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module ps_banner", - "homepage": "https://github.com/PrestaShop/ps_banner", - "support": { - "source": "https://github.com/PrestaShop/ps_banner/tree/v2.1.1" - }, - "time": "2021-02-08T08:29:06+00:00" - }, - { - "name": "prestashop/ps_bestsellers", - "version": "v1.0.3", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_bestsellers.git", - "reference": "202054bc2f0fa320fba7a14354d5532618466245" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_bestsellers/zipball/202054bc2f0fa320fba7a14354d5532618466245", - "reference": "202054bc2f0fa320fba7a14354d5532618466245", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL - Academic Free License (AFL 3.0)" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop - Best Sellers", - "homepage": "https://github.com/PrestaShop/ps_bestsellers", - "support": { - "issues": "https://github.com/PrestaShop/ps_bestsellers/issues", - "source": "https://github.com/PrestaShop/ps_bestsellers/tree/v1.0.3" - }, - "time": "2016-11-15T10:30:43+00:00" - }, - { - "name": "prestashop/ps_brandlist", - "version": "v1.0.2", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_brandlist.git", - "reference": "b9c5bf3af0652371b1664f7e3eaf7fff2bb65ed3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_brandlist/zipball/b9c5bf3af0652371b1664f7e3eaf7fff2bb65ed3", - "reference": "b9c5bf3af0652371b1664f7e3eaf7fff2bb65ed3", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL - Academic Free License (AFL 3.0)" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop - Brand list", - "homepage": "https://github.com/PrestaShop/ps_brandlist", - "support": { - "issues": "https://github.com/PrestaShop/ps_brandlist/issues", - "source": "https://github.com/PrestaShop/ps_brandlist/tree/v1.0.2" - }, - "time": "2016-12-21T13:44:23+00:00" - }, - { - "name": "prestashop/ps_cashondelivery", - "version": "v1.0.6", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_cashondelivery.git", - "reference": "7d503ff1f573ab5400fac6dcf0d50be971154af5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_cashondelivery/zipball/7d503ff1f573ab5400fac6dcf0d50be971154af5", - "reference": "7d503ff1f573ab5400fac6dcf0d50be971154af5", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL - Academic Free License (AFL 3.0)" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module ps_cashondelivery", - "homepage": "https://github.com/PrestaShop/ps_cashondelivery", - "support": { - "source": "https://github.com/PrestaShop/ps_cashondelivery/tree/dev" - }, - "time": "2017-03-16T10:24:54+00:00" - }, - { - "name": "prestashop/ps_categoryproducts", - "version": "v1.0.4", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_categoryproducts.git", - "reference": "84c308c249bfd8ecb710450614c4d291e8799d3a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_categoryproducts/zipball/84c308c249bfd8ecb710450614c4d291e8799d3a", - "reference": "84c308c249bfd8ecb710450614c4d291e8799d3a", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL - Academic Free License (AFL 3.0)" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module ps_categoryproducts", - "homepage": "https://github.com/PrestaShop/ps_categoryproducts", - "support": { - "issues": "https://github.com/PrestaShop/ps_categoryproducts/issues", - "source": "https://github.com/PrestaShop/ps_categoryproducts/tree/master" - }, - "time": "2018-12-13T11:37:48+00:00" - }, - { - "name": "prestashop/ps_categorytree", - "version": "v2.0.2", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_categorytree.git", - "reference": "70a8504d2fd1396359efa0184497c4082afe2ebd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_categorytree/zipball/70a8504d2fd1396359efa0184497c4082afe2ebd", - "reference": "70a8504d2fd1396359efa0184497c4082afe2ebd", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "prestashop/php-dev-tools": "~3.0" - }, - "type": "prestashop-module", - "autoload": { - "classmap": [ - "ps_categorytree.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop category tree links", - "homepage": "https://github.com/PrestaShop/ps_categorytree", - "support": { - "source": "https://github.com/PrestaShop/ps_categorytree/tree/v2.0.2" - }, - "time": "2021-02-16T14:53:25+00:00" - }, - { - "name": "prestashop/ps_checkpayment", - "version": "v2.0.5", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_checkpayment.git", - "reference": "6239ecbe75c427f81536ed2df8b56421ab2fa9b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_checkpayment/zipball/6239ecbe75c427f81536ed2df8b56421ab2fa9b2", - "reference": "6239ecbe75c427f81536ed2df8b56421ab2fa9b2", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "prestashop/php-dev-tools": "~3.0" - }, - "type": "prestashop-module", - "autoload": { - "classmap": [ - "ps_checkpayment.php", - "controllers/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module ps_checkpayment", - "homepage": "https://github.com/PrestaShop/ps_checkpayment", - "support": { - "source": "https://github.com/PrestaShop/ps_checkpayment/tree/v2.0.5" - }, - "time": "2020-10-16T07:20:00+00:00" - }, - { - "name": "prestashop/ps_contactinfo", - "version": "v3.3.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_contactinfo.git", - "reference": "1c74f18a12118cbb7622e79044c48aaa55ce93c3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_contactinfo/zipball/1c74f18a12118cbb7622e79044c48aaa55ce93c3", - "reference": "1c74f18a12118cbb7622e79044c48aaa55ce93c3", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module ps_contactinfo", - "homepage": "https://github.com/PrestaShop/ps_contactinfo", - "support": { - "source": "https://github.com/PrestaShop/ps_contactinfo/tree/master" - }, - "time": "2020-05-28T12:57:52+00:00" - }, - { - "name": "prestashop/ps_crossselling", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_crossselling.git", - "reference": "0912b4eddef88ca2b3f23bccdee168ebd6bf507f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_crossselling/zipball/0912b4eddef88ca2b3f23bccdee168ebd6bf507f", - "reference": "0912b4eddef88ca2b3f23bccdee168ebd6bf507f", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "prestashop/php-dev-tools": "~3.0" - }, - "type": "prestashop-module", - "autoload": { - "classmap": [ - "ps_crossselling.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop - Cross selling", - "homepage": "https://github.com/PrestaShop/ps_crossselling", - "support": { - "source": "https://github.com/PrestaShop/ps_crossselling/tree/v2.0.1" - }, - "time": "2021-01-07T15:27:15+00:00" - }, - { - "name": "prestashop/ps_currencyselector", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_currencyselector.git", - "reference": "6e2b87c4fbddf757af0233ab419e8a4a76d4daf0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_currencyselector/zipball/6e2b87c4fbddf757af0233ab419e8a4a76d4daf0", - "reference": "6e2b87c4fbddf757af0233ab419e8a4a76d4daf0", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.15.1", - "prestashop/php-dev-tools": "^2" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module ps_currencyselector", - "homepage": "https://github.com/PrestaShop/ps_currencyselector", - "support": { - "source": "https://github.com/PrestaShop/ps_currencyselector/tree/master" - }, - "time": "2019-12-31T16:04:31+00:00" - }, - { - "name": "prestashop/ps_customeraccountlinks", - "version": "v3.1.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_customeraccountlinks.git", - "reference": "d11934ba345af11e51ed7ebc82d1cb4593d21379" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_customeraccountlinks/zipball/d11934ba345af11e51ed7ebc82d1cb4593d21379", - "reference": "d11934ba345af11e51ed7ebc82d1cb4593d21379", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "prestashop/php-dev-tools": "~3.0" - }, - "type": "prestashop-module", - "autoload": { - "classmap": [ - "ps_customeraccountlinks.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module ps_customeraccountlinks", - "homepage": "https://github.com/PrestaShop/ps_customeraccountlinks", - "support": { - "source": "https://github.com/PrestaShop/ps_customeraccountlinks/tree/v3.1.1" - }, - "time": "2021-01-08T13:24:35+00:00" - }, - { - "name": "prestashop/ps_customersignin", - "version": "v2.0.4", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_customersignin.git", - "reference": "a7c1ebb033bf893a057438121b4c664c5f6cc3cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_customersignin/zipball/a7c1ebb033bf893a057438121b4c664c5f6cc3cf", - "reference": "a7c1ebb033bf893a057438121b4c664c5f6cc3cf", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "prestashop/php-dev-tools": "~3.0" - }, - "type": "prestashop-module", - "autoload": { - "classmap": [ - "ps_customersignin.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop - Customer 'Sign in' link", - "homepage": "https://github.com/PrestaShop/ps_customersignin", - "support": { - "source": "https://github.com/PrestaShop/ps_customersignin/tree/v2.0.4" - }, - "time": "2021-02-08T09:21:08+00:00" - }, - { - "name": "prestashop/ps_customtext", - "version": "v4.2.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_customtext.git", - "reference": "fb555e29708a3b94784da48f6e2c3fcea8bf9480" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_customtext/zipball/fb555e29708a3b94784da48f6e2c3fcea8bf9480", - "reference": "fb555e29708a3b94784da48f6e2c3fcea8bf9480", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "prestashop/php-dev-tools": "~3.0" - }, - "type": "prestashop-module", - "autoload": { - "classmap": [ - "ps_customtext.php", - "classes/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module ps_customtext", - "homepage": "https://github.com/PrestaShop/ps_customtext", - "support": { - "source": "https://github.com/PrestaShop/ps_customtext/tree/v4.2.0" - }, - "time": "2021-10-26T13:46:46+00:00" - }, - { - "name": "prestashop/ps_dataprivacy", - "version": "v2.1.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_dataprivacy.git", - "reference": "0a1380ea25c2b1285788cb2d5d6246b374500bd2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_dataprivacy/zipball/0a1380ea25c2b1285788cb2d5d6246b374500bd2", - "reference": "0a1380ea25c2b1285788cb2d5d6246b374500bd2", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "prestashop/php-dev-tools": "^3.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop - Data privacy", - "homepage": "https://github.com/PrestaShop/ps_dataprivacy", - "support": { - "source": "https://github.com/PrestaShop/ps_dataprivacy/tree/v2.1.0" - }, - "time": "2021-12-31T10:42:45+00:00" - }, - { - "name": "prestashop/ps_emailalerts", - "version": "v2.3.3", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_emailalerts.git", - "reference": "654f9509da88dda9e5e1703fc0b34ad8b4622c29" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_emailalerts/zipball/654f9509da88dda9e5e1703fc0b34ad8b4622c29", - "reference": "654f9509da88dda9e5e1703fc0b34ad8b4622c29", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "prestashop/php-dev-tools": "^3.16" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module ps_emailalerts", - "homepage": "https://github.com/PrestaShop/ps_emailalerts", - "support": { - "source": "https://github.com/PrestaShop/ps_emailalerts/tree/v2.3.3" - }, - "time": "2022-03-11T08:17:10+00:00" - }, - { - "name": "prestashop/ps_emailsubscription", - "version": "v2.7.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_emailsubscription.git", - "reference": "db945167758ec163b9db60b99c3fe4ca363155c2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_emailsubscription/zipball/db945167758ec163b9db60b99c3fe4ca363155c2", - "reference": "db945167758ec163b9db60b99c3fe4ca363155c2", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "prestashop/php-dev-tools": "^3.4" - }, - "type": "prestashop-module", - "autoload": { - "classmap": [ - "ps_emailsubscription.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module ps_emailsubscription", - "homepage": "https://github.com/PrestaShop/ps_emailsubscription", - "support": { - "source": "https://github.com/PrestaShop/ps_emailsubscription/tree/v2.7.0" - }, - "time": "2021-07-08T15:24:45+00:00" - }, - { - "name": "prestashop/ps_facetedsearch", - "version": "v3.7.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_facetedsearch.git", - "reference": "5d7b80bf767d002c37b281e3598069aa5fdbf6ff" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_facetedsearch/zipball/5d7b80bf767d002c37b281e3598069aa5fdbf6ff", - "reference": "5d7b80bf767d002c37b281e3598069aa5fdbf6ff", - "shasum": "" - }, - "require": { - "doctrine/collections": "^1.4", - "php": ">=5.6" - }, - "require-dev": { - "mockery/mockery": "^1.2", - "phpunit/phpunit": "~5.7", - "prestashop/php-dev-tools": "^3.4" - }, - "type": "prestashop-module", - "autoload": { - "psr-4": { - "PrestaShop\\Module\\FacetedSearch\\": "src/", - "PrestaShop\\Module\\FacetedSearch\\Tests\\": "tests/php/FacetedSearch", - "PrestaShop\\Module\\FacetedSearch\\Controller\\": "src/Controller/" - }, - "classmap": [ - "ps_facetedsearch.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module ps_facetedsearch", - "homepage": "https://github.com/PrestaShop/ps_facetedsearch", - "support": { - "source": "https://github.com/PrestaShop/ps_facetedsearch/tree/v3.7.1" - }, - "time": "2021-03-15T07:56:51+00:00" - }, - { - "name": "prestashop/ps_faviconnotificationbo", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_faviconnotificationbo.git", - "reference": "47f67bbcf2ee3802d2ed492821a056b9513200d8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_faviconnotificationbo/zipball/47f67bbcf2ee3802d2ed492821a056b9513200d8", - "reference": "47f67bbcf2ee3802d2ed492821a056b9513200d8", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "prestashop/php-dev-tools": "^3.4" - }, - "type": "prestashop-module", - "autoload": { - "classmap": [ - "controllers", - "ps_faviconnotificationbo.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop - Favicon notification BO", - "homepage": "https://github.com/PrestaShop/ps_faviconnotificationbo", - "support": { - "source": "https://github.com/PrestaShop/ps_faviconnotificationbo/tree/v2.1.1" - }, - "time": "2021-10-22T18:08:46+00:00" - }, - { - "name": "prestashop/ps_featuredproducts", - "version": "v2.1.2", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_featuredproducts.git", - "reference": "44e6567bd0419537d61389741c7e68ef90d8caf3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_featuredproducts/zipball/44e6567bd0419537d61389741c7e68ef90d8caf3", - "reference": "44e6567bd0419537d61389741c7e68ef90d8caf3", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "prestashop/php-dev-tools": "^3.4" - }, - "type": "prestashop-module", - "autoload": { - "classmap": [ - "ps_featuredproducts.php" - ], - "exclude-from-classmap": [] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop - Featured products", - "homepage": "https://github.com/PrestaShop/ps_featuredproducts", - "support": { - "source": "https://github.com/PrestaShop/ps_featuredproducts/tree/v2.1.2" - }, - "time": "2021-12-14T09:04:39+00:00" - }, - { - "name": "prestashop/ps_googleanalytics", - "version": "v4.1.2", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_googleanalytics.git", - "reference": "ced588980dcc3eeff06a2a8e275cf76c27a35e9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_googleanalytics/zipball/ced588980dcc3eeff06a2a8e275cf76c27a35e9e", - "reference": "ced588980dcc3eeff06a2a8e275cf76c27a35e9e", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "prestashop/php-dev-tools": "3.*" - }, - "type": "prestashop-module", - "autoload": { - "classmap": [ - "ps_googleanalytics.php", - "controllers", - "classes" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module ps_googleanalytics", - "homepage": "https://github.com/PrestaShop/ps_googleanalytics", - "support": { - "source": "https://github.com/PrestaShop/ps_googleanalytics/tree/v4.1.2" - }, - "time": "2022-03-24T08:50:37+00:00" - }, - { - "name": "prestashop/ps_imageslider", - "version": "v3.1.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_imageslider.git", - "reference": "52e9d1a068e3b2879ce2184f00c083c8190c7ce7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_imageslider/zipball/52e9d1a068e3b2879ce2184f00c083c8190c7ce7", - "reference": "52e9d1a068e3b2879ce2184f00c083c8190c7ce7", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop - Image slider", - "homepage": "https://github.com/PrestaShop/ps_imageslider", - "support": { - "source": "https://github.com/PrestaShop/ps_imageslider/tree/master" - }, - "time": "2020-06-01T13:57:45+00:00" - }, - { - "name": "prestashop/ps_languageselector", - "version": "v2.1.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_languageselector.git", - "reference": "22d69b4dbc1a12ab2692d91962d8993d6e64557f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_languageselector/zipball/22d69b4dbc1a12ab2692d91962d8993d6e64557f", - "reference": "22d69b4dbc1a12ab2692d91962d8993d6e64557f", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module ps_languageselector", - "homepage": "https://github.com/PrestaShop/ps_languageselector", - "support": { - "source": "https://github.com/PrestaShop/ps_languageselector/tree/v2.1.0" - }, - "time": "2020-06-26T07:00:29+00:00" - }, - { - "name": "prestashop/ps_linklist", - "version": "v5.0.4", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_linklist.git", - "reference": "5cbfe0566d7273cb15e199915cdf2a7c912ebcda" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_linklist/zipball/5cbfe0566d7273cb15e199915cdf2a7c912ebcda", - "reference": "5cbfe0566d7273cb15e199915cdf2a7c912ebcda", - "shasum": "" - }, - "require": { - "php": ">=5.6.0" - }, - "require-dev": { - "prestashop/php-dev-tools": "^3.4" - }, - "type": "prestashop-module", - "autoload": { - "psr-4": { - "PrestaShop\\Module\\LinkList\\": "src/" - }, - "classmap": [ - "ps_linklist.php" - ], - "exclude-from-classmap": [] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop - Link list", - "homepage": "https://github.com/PrestaShop/ps_linklist", - "support": { - "source": "https://github.com/PrestaShop/ps_linklist/tree/v5.0.4" - }, - "time": "2021-07-27T09:07:29+00:00" - }, - { - "name": "prestashop/ps_mainmenu", - "version": "v2.3.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_mainmenu.git", - "reference": "64dcfbdad19ee20b644b32ea19dafb90c0a66cc2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_mainmenu/zipball/64dcfbdad19ee20b644b32ea19dafb90c0a66cc2", - "reference": "64dcfbdad19ee20b644b32ea19dafb90c0a66cc2", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "prestashop/php-dev-tools": "^3.4" - }, - "type": "prestashop-module", - "autoload": { - "classmap": [ - "ps_mainmenu.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop - Main menu", - "homepage": "https://github.com/PrestaShop/ps_mainmenu", - "support": { - "source": "https://github.com/PrestaShop/ps_mainmenu/tree/v2.3.1" - }, - "time": "2021-10-27T13:44:04+00:00" - }, - { - "name": "prestashop/ps_newproducts", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_newproducts.git", - "reference": "e092cccc304d3ac5a2566db3adacf22c27fc7c51" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_newproducts/zipball/e092cccc304d3ac5a2566db3adacf22c27fc7c51", - "reference": "e092cccc304d3ac5a2566db3adacf22c27fc7c51", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL - Academic Free License (AFL 3.0)" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop - New products", - "homepage": "https://github.com/PrestaShop/ps_newproducts", - "support": { - "issues": "https://github.com/PrestaShop/ps_newproducts/issues", - "source": "https://github.com/PrestaShop/ps_newproducts/tree/v1.0.1" - }, - "time": "2016-11-15T10:46:28+00:00" - }, - { - "name": "prestashop/ps_searchbar", - "version": "v2.1.2", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_searchbar.git", - "reference": "68221f79c163e356765a1cfeda7d623e49d54f73" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_searchbar/zipball/68221f79c163e356765a1cfeda7d623e49d54f73", - "reference": "68221f79c163e356765a1cfeda7d623e49d54f73", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "prestashop/php-dev-tools": "^3.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module ps_searchbar", - "homepage": "https://github.com/PrestaShop/ps_searchbar", - "support": { - "source": "https://github.com/PrestaShop/ps_searchbar/tree/v2.1.2" - }, - "time": "2021-10-29T14:08:07+00:00" - }, - { - "name": "prestashop/ps_sharebuttons", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_sharebuttons.git", - "reference": "698f3875c5040f16ff6b2a2e549efc306f9d920e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_sharebuttons/zipball/698f3875c5040f16ff6b2a2e549efc306f9d920e", - "reference": "698f3875c5040f16ff6b2a2e549efc306f9d920e", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module ps_sharebuttons", - "homepage": "https://github.com/PrestaShop/ps_sharebuttons", - "support": { - "source": "https://github.com/PrestaShop/ps_sharebuttons/tree/v2.1.1" - }, - "time": "2021-04-01T13:36:26+00:00" - }, - { - "name": "prestashop/ps_shoppingcart", - "version": "v2.0.5", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_shoppingcart.git", - "reference": "114e39589e84536af46cc344e05c0e8bc37355e3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_shoppingcart/zipball/114e39589e84536af46cc344e05c0e8bc37355e3", - "reference": "114e39589e84536af46cc344e05c0e8bc37355e3", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "prestashop/php-dev-tools": "~3.0" - }, - "type": "prestashop-module", - "autoload": { - "classmap": [ - "ps_shoppingcart.php", - "controllers/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module ps_shoppingcart", - "homepage": "https://github.com/PrestaShop/ps_shoppingcart", - "support": { - "source": "https://github.com/PrestaShop/ps_shoppingcart/tree/v2.0.5" - }, - "time": "2021-12-15T08:46:24+00:00" - }, - { - "name": "prestashop/ps_socialfollow", - "version": "v2.2.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_socialfollow.git", - "reference": "3b537198d70f935e8c658d57f3e0c98306125838" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_socialfollow/zipball/3b537198d70f935e8c658d57f3e0c98306125838", - "reference": "3b537198d70f935e8c658d57f3e0c98306125838", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module ps_socialfollow", - "homepage": "https://github.com/PrestaShop/ps_socialfollow", - "support": { - "issues": "https://github.com/PrestaShop/ps_socialfollow/issues", - "source": "https://github.com/PrestaShop/ps_socialfollow/tree/v2.2.0" - }, - "time": "2021-07-28T07:38:05+00:00" - }, - { - "name": "prestashop/ps_specials", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_specials.git", - "reference": "536b20a64a8aa7c4eec096ae2adbeb414a94c5ca" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_specials/zipball/536b20a64a8aa7c4eec096ae2adbeb414a94c5ca", - "reference": "536b20a64a8aa7c4eec096ae2adbeb414a94c5ca", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL - Academic Free License (AFL 3.0)" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop - Specials", - "homepage": "https://github.com/PrestaShop/ps_specials", - "support": { - "issues": "https://github.com/PrestaShop/ps_specials/issues", - "source": "https://github.com/PrestaShop/ps_specials/tree/v1.0.1" - }, - "time": "2016-11-15T10:55:06+00:00" - }, - { - "name": "prestashop/ps_supplierlist", - "version": "v1.0.4", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_supplierlist.git", - "reference": "b2848891f60f5343e4a0f0231d75ad777c2c5dbf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_supplierlist/zipball/b2848891f60f5343e4a0f0231d75ad777c2c5dbf", - "reference": "b2848891f60f5343e4a0f0231d75ad777c2c5dbf", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop - Supplier List", - "homepage": "https://github.com/PrestaShop/ps_supplierlist", - "support": { - "issues": "https://github.com/PrestaShop/ps_supplierlist/issues", - "source": "https://github.com/PrestaShop/ps_supplierlist/tree/v1.0.4" - }, - "time": "2021-11-25T10:48:12+00:00" - }, - { - "name": "prestashop/ps_themecusto", - "version": "v1.2.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_themecusto.git", - "reference": "f9e401ed96a4f4f7f60811a7110d6fe5127d9305" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_themecusto/zipball/f9e401ed96a4f4f7f60811a7110d6fe5127d9305", - "reference": "f9e401ed96a4f4f7f60811a7110d6fe5127d9305", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "prestashop/php-dev-tools": "^3.4" - }, - "type": "prestashop-module", - "autoload": { - "classmap": [ - "ps_themecusto.php", - "controllers", - "classes" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module ps_themecusto", - "homepage": "https://github.com/PrestaShop/ps_themecusto", - "support": { - "source": "https://github.com/PrestaShop/ps_themecusto/tree/v1.2.1" - }, - "time": "2021-01-19T08:41:00+00:00" - }, - { - "name": "prestashop/ps_viewedproduct", - "version": "v1.2.2", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_viewedproduct.git", - "reference": "2ea78388b13a49c18ce409870f32a44e88934456" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_viewedproduct/zipball/2ea78388b13a49c18ce409870f32a44e88934456", - "reference": "2ea78388b13a49c18ce409870f32a44e88934456", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop - Viewed Products", - "homepage": "https://github.com/PrestaShop/ps_viewedproduct", - "support": { - "source": "https://github.com/PrestaShop/ps_viewedproduct/tree/v1.2.2" - }, - "time": "2021-10-26T14:04:09+00:00" - }, - { - "name": "prestashop/ps_wirepayment", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/ps_wirepayment.git", - "reference": "2c228b7050674d673d515baaedfaf469232a5e9e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/ps_wirepayment/zipball/2c228b7050674d673d515baaedfaf469232a5e9e", - "reference": "2c228b7050674d673d515baaedfaf469232a5e9e", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "prestashop/php-dev-tools": "^3.4" - }, - "type": "prestashop-module", - "autoload": { - "classmap": [ - "ps_wirepayment.php" - ], - "exclude-from-classmap": [] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module ps_wirepayment", - "homepage": "https://github.com/PrestaShop/ps_wirepayment", - "support": { - "source": "https://github.com/PrestaShop/ps_wirepayment/tree/v2.1.1" - }, - "time": "2021-12-28T16:47:05+00:00" - }, - { - "name": "prestashop/psgdpr", - "version": "v1.4.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/psgdpr.git", - "reference": "3266aee66e4853920d17551e3c33259b3970bd62" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/psgdpr/zipball/3266aee66e4853920d17551e3c33259b3970bd62", - "reference": "3266aee66e4853920d17551e3c33259b3970bd62", - "shasum": "" - }, - "require-dev": { - "prestashop/php-dev-tools": "^3.4" - }, - "type": "prestashop-module", - "autoload": { - "classmap": [ - "classes", - "controllers", - "psgdpr.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module psgdpr", - "homepage": "https://github.com/PrestaShopCorp/psgdpr", - "support": { - "source": "https://github.com/PrestaShop/psgdpr/tree/v1.4.1" - }, - "time": "2022-04-06T14:40:30+00:00" - }, - { - "name": "prestashop/statsbestcategories", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/statsbestcategories.git", - "reference": "fee7b7c679ec6cdec8fe643f8dbc4399f6008e60" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/statsbestcategories/zipball/fee7b7c679ec6cdec8fe643f8dbc4399f6008e60", - "reference": "fee7b7c679ec6cdec8fe643f8dbc4399f6008e60", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module statsbestcategories", - "homepage": "https://github.com/PrestaShop/statsbestcategories", - "support": { - "source": "https://github.com/PrestaShop/statsbestcategories/tree/v2.0.1" - }, - "time": "2022-01-06T18:39:43+00:00" - }, - { - "name": "prestashop/statsbestcustomers", - "version": "v2.0.3", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/statsbestcustomers.git", - "reference": "979518b00f321f1429ca8e251416bf2d2281a931" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/statsbestcustomers/zipball/979518b00f321f1429ca8e251416bf2d2281a931", - "reference": "979518b00f321f1429ca8e251416bf2d2281a931", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "prestashop/php-dev-tools": "^3.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module statsbestcustomers", - "homepage": "https://github.com/PrestaShop/statsbestcustomers", - "support": { - "source": "https://github.com/PrestaShop/statsbestcustomers/tree/v2.0.3" - }, - "time": "2021-11-26T08:43:37+00:00" - }, - { - "name": "prestashop/statsbestmanufacturers", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/statsbestmanufacturers.git", - "reference": "b9897beda6084d08f489d4d00995a085b8e76739" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/statsbestmanufacturers/zipball/b9897beda6084d08f489d4d00995a085b8e76739", - "reference": "b9897beda6084d08f489d4d00995a085b8e76739", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL - Academic Free License (AFL 3.0)" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module statsbestmanufacturers", - "homepage": "https://github.com/PrestaShop/statsbestmanufacturers", - "support": { - "source": "https://github.com/PrestaShop/statsbestmanufacturers/tree/dev" - }, - "time": "2017-01-31T17:03:07+00:00" - }, - { - "name": "prestashop/statsbestproducts", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/statsbestproducts.git", - "reference": "0f5e03455cce6f6b0798948a67c26b413227d25a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/statsbestproducts/zipball/0f5e03455cce6f6b0798948a67c26b413227d25a", - "reference": "0f5e03455cce6f6b0798948a67c26b413227d25a", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module statsbestproducts", - "homepage": "https://github.com/PrestaShop/statsbestproducts", - "support": { - "source": "https://github.com/PrestaShop/statsbestproducts/tree/v2.0.1" - }, - "time": "2022-01-11T07:52:37+00:00" - }, - { - "name": "prestashop/statsbestsuppliers", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/statsbestsuppliers.git", - "reference": "7e46e732b8a77dc989f5891ff9d3616d1c5fd46f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/statsbestsuppliers/zipball/7e46e732b8a77dc989f5891ff9d3616d1c5fd46f", - "reference": "7e46e732b8a77dc989f5891ff9d3616d1c5fd46f", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL - Academic Free License (AFL 3.0)" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module statsbestsuppliers", - "homepage": "https://github.com/PrestaShop/statsbestsuppliers", - "support": { - "source": "https://github.com/PrestaShop/statsbestsuppliers/tree/dev" - }, - "time": "2017-01-30T16:34:19+00:00" - }, - { - "name": "prestashop/statsbestvouchers", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/statsbestvouchers.git", - "reference": "9b9a8e1af451541e021c2af17c60e943fe594559" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/statsbestvouchers/zipball/9b9a8e1af451541e021c2af17c60e943fe594559", - "reference": "9b9a8e1af451541e021c2af17c60e943fe594559", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module statsbestvouchers", - "homepage": "https://github.com/PrestaShop/statsbestvouchers", - "support": { - "source": "https://github.com/PrestaShop/statsbestvouchers/tree/v2.0.1" - }, - "time": "2022-01-10T14:25:22+00:00" - }, - { - "name": "prestashop/statscarrier", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/statscarrier.git", - "reference": "9f4cc5c7dbcc6f08be0aa2e7e6dc333d1ea665dc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/statscarrier/zipball/9f4cc5c7dbcc6f08be0aa2e7e6dc333d1ea665dc", - "reference": "9f4cc5c7dbcc6f08be0aa2e7e6dc333d1ea665dc", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module statscarrier", - "homepage": "https://github.com/PrestaShop/statscarrier", - "support": { - "source": "https://github.com/PrestaShop/statscarrier/tree/v2.0.1" - }, - "time": "2022-01-11T07:50:23+00:00" - }, - { - "name": "prestashop/statscatalog", - "version": "v2.0.2", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/statscatalog.git", - "reference": "eea71b6b598c27fe4de71956ff9b485ec78de97e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/statscatalog/zipball/eea71b6b598c27fe4de71956ff9b485ec78de97e", - "reference": "eea71b6b598c27fe4de71956ff9b485ec78de97e", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "require-dev": { - "prestashop/php-dev-tools": "^3.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module statscatalog", - "homepage": "https://github.com/PrestaShop/statscatalog", - "support": { - "source": "https://github.com/PrestaShop/statscatalog/tree/v2.0.2" - }, - "time": "2021-10-27T15:24:39+00:00" - }, - { - "name": "prestashop/statscheckup", - "version": "v2.0.2", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/statscheckup.git", - "reference": "ef485adc627745c7e0fa25ad8082c6f4b96dc3cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/statscheckup/zipball/ef485adc627745c7e0fa25ad8082c6f4b96dc3cf", - "reference": "ef485adc627745c7e0fa25ad8082c6f4b96dc3cf", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module statscheckup", - "homepage": "https://github.com/PrestaShop/statscheckup", - "support": { - "source": "https://github.com/PrestaShop/statscheckup/tree/v2.0.2" - }, - "time": "2022-01-04T15:20:35+00:00" - }, - { - "name": "prestashop/statsdata", - "version": "v2.1.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/statsdata.git", - "reference": "4de78d4c0b096f2d6768f5c96856ea8eabd8358c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/statsdata/zipball/4de78d4c0b096f2d6768f5c96856ea8eabd8358c", - "reference": "4de78d4c0b096f2d6768f5c96856ea8eabd8358c", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module statsdata", - "homepage": "https://github.com/PrestaShop/statsdata", - "support": { - "source": "https://github.com/PrestaShop/statsdata/tree/master" - }, - "time": "2020-07-15T13:10:39+00:00" - }, - { - "name": "prestashop/statsforecast", - "version": "v2.0.4", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/statsforecast.git", - "reference": "9f2ab9f6ca1bf35ee5f108c5f2ed346d3f8b9b73" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/statsforecast/zipball/9f2ab9f6ca1bf35ee5f108c5f2ed346d3f8b9b73", - "reference": "9f2ab9f6ca1bf35ee5f108c5f2ed346d3f8b9b73", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module statsforecast", - "homepage": "https://github.com/PrestaShop/statsforecast", - "support": { - "source": "https://github.com/PrestaShop/statsforecast/tree/v2.0.4" - }, - "time": "2022-02-03T14:49:26+00:00" - }, - { - "name": "prestashop/statsnewsletter", - "version": "v2.0.3", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/statsnewsletter.git", - "reference": "cca041983fee792469f865c9709f8f1a4cd4591c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/statsnewsletter/zipball/cca041983fee792469f865c9709f8f1a4cd4591c", - "reference": "cca041983fee792469f865c9709f8f1a4cd4591c", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module statsnewsletter", - "homepage": "https://github.com/PrestaShop/statsnewsletter", - "support": { - "source": "https://github.com/PrestaShop/statsnewsletter/tree/v2.0.3" - }, - "time": "2022-01-11T16:01:42+00:00" - }, - { - "name": "prestashop/statspersonalinfos", - "version": "v2.0.4", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/statspersonalinfos.git", - "reference": "f0dfeccf98e831287db9a66bee6785135fbba643" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/statspersonalinfos/zipball/f0dfeccf98e831287db9a66bee6785135fbba643", - "reference": "f0dfeccf98e831287db9a66bee6785135fbba643", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module statspersonalinfos", - "homepage": "https://github.com/PrestaShop/statspersonalinfos", - "support": { - "source": "https://github.com/PrestaShop/statspersonalinfos/tree/v2.0.4" - }, - "time": "2022-01-10T14:47:14+00:00" - }, - { - "name": "prestashop/statsproduct", - "version": "v2.1.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/statsproduct.git", - "reference": "804f5a33ac45e41525613a1c87ff73928a2a4126" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/statsproduct/zipball/804f5a33ac45e41525613a1c87ff73928a2a4126", - "reference": "804f5a33ac45e41525613a1c87ff73928a2a4126", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module statsproduct", - "homepage": "https://github.com/PrestaShop/statsproduct", - "support": { - "source": "https://github.com/PrestaShop/statsproduct/tree/v2.1.1" - }, - "time": "2022-01-04T12:54:39+00:00" - }, - { - "name": "prestashop/statsregistrations", - "version": "v2.0.1", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/statsregistrations.git", - "reference": "efdc328afa96ffed859fb8333a3a18b9a86e1c4a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/statsregistrations/zipball/efdc328afa96ffed859fb8333a3a18b9a86e1c4a", - "reference": "efdc328afa96ffed859fb8333a3a18b9a86e1c4a", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module statsregistrations", - "homepage": "https://github.com/PrestaShop/statsregistrations", - "support": { - "source": "https://github.com/PrestaShop/statsregistrations/tree/v2.0.1" - }, - "time": "2022-01-04T13:38:03+00:00" - }, - { - "name": "prestashop/statssales", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/statssales.git", - "reference": "6e28ce4ea2eb1a4a8b6b76bfb6b56e1b02ef651a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/statssales/zipball/6e28ce4ea2eb1a4a8b6b76bfb6b56e1b02ef651a", - "reference": "6e28ce4ea2eb1a4a8b6b76bfb6b56e1b02ef651a", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL - Academic Free License (AFL 3.0)" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module statssales", - "homepage": "https://github.com/PrestaShop/statssales", - "support": { - "source": "https://github.com/PrestaShop/statssales/tree/dev" - }, - "time": "2017-01-31T17:23:19+00:00" - }, - { - "name": "prestashop/statssearch", - "version": "v2.0.2", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/statssearch.git", - "reference": "10fe164304f1cf3d230f04c917d53e8859fed203" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/statssearch/zipball/10fe164304f1cf3d230f04c917d53e8859fed203", - "reference": "10fe164304f1cf3d230f04c917d53e8859fed203", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL-3.0" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module statssearch", - "homepage": "https://github.com/PrestaShop/statssearch", - "support": { - "source": "https://github.com/PrestaShop/statssearch/tree/v2.0.2" - }, - "time": "2022-01-11T07:51:12+00:00" - }, - { - "name": "prestashop/statsstock", - "version": "v2.0.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/statsstock.git", - "reference": "1b60aae430151943d6e4b0068a3e30ab2cc5843e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/statsstock/zipball/1b60aae430151943d6e4b0068a3e30ab2cc5843e", - "reference": "1b60aae430151943d6e4b0068a3e30ab2cc5843e", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "type": "prestashop-module", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AFL - Academic Free License (AFL 3.0)" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop module statsstock", - "homepage": "https://github.com/PrestaShop/statsstock", - "support": { - "source": "https://github.com/PrestaShop/statsstock/tree/dev" - }, - "time": "2017-01-31T17:24:06+00:00" - }, - { - "name": "prestashop/translationtools-bundle", - "version": "v5.0.2", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/TranslationToolsBundle.git", - "reference": "b4ebf59ec6a7598da010b8ef1a4f2b954ccd2db7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/TranslationToolsBundle/zipball/b4ebf59ec6a7598da010b8ef1a4f2b954ccd2db7", - "reference": "b4ebf59ec6a7598da010b8ef1a4f2b954ccd2db7", - "shasum": "" - }, - "require": { - "nikic/php-parser": "^4", - "php": ">=7.2", - "smarty/smarty": "^3.1", - "symfony/twig-bridge": "^3.4 || ^4.4 || ^5.0", - "twig/twig": "^1.38 || ^2.7 || ^3.0" - }, - "require-dev": { - "doctrine/common": "^2.10.0", - "friendsofphp/php-cs-fixer": "^3.2", - "phpunit/phpunit": "^7.5 || ^8.5", - "symfony/framework-bundle": "^3.4 || ^4.4 || ^5.0", - "symfony/symfony": "^4", - "symfony/translation": "^3.4 || ^4.4 || ^5.0", - "symfony/twig-bundle": "^4" - }, - "type": "bundle", - "autoload": { - "psr-4": { - "PrestaShop\\TranslationToolsBundle\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - }, - { - "name": "PrestaShop Community", - "homepage": "https://contributors.prestashop.com/" - } - ], - "description": "Translation tools for PrestaShop", - "keywords": [ - "parser", - "prestashop", - "translation" - ], - "support": { - "issues": "https://github.com/PrestaShop/TranslationToolsBundle/issues", - "source": "https://github.com/PrestaShop/TranslationToolsBundle/tree/v5.0.2" - }, - "time": "2021-11-19T15:01:56+00:00" - }, - { - "name": "psr/cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/cache.git", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", - "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Cache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for caching libraries", - "keywords": [ - "cache", - "psr", - "psr-6" - ], - "support": { - "source": "https://github.com/php-fig/cache/tree/master" - }, - "time": "2016-08-06T20:24:11+00:00" - }, - { - "name": "psr/container", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", - "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", - "shasum": "" - }, - "require": { - "php": ">=7.2.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.1" - }, - "time": "2021-03-05T17:36:06+00:00" - }, - { - "name": "psr/http-client", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-client.git", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP clients", - "homepage": "https://github.com/php-fig/http-client", - "keywords": [ - "http", - "http-client", - "psr", - "psr-18" - ], - "support": { - "source": "https://github.com/php-fig/http-client/tree/master" - }, - "time": "2020-06-29T06:28:15+00:00" - }, - { - "name": "psr/http-factory", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", - "shasum": "" - }, - "require": { - "php": ">=7.0.0", - "psr/http-message": "^1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-factory/tree/master" - }, - "time": "2019-04-30T12:38:16+00:00" - }, - { - "name": "psr/http-message", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", - "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/master" - }, - "time": "2016-08-06T14:39:51+00:00" - }, - { - "name": "psr/link", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/link.git", - "reference": "eea8e8662d5cd3ae4517c9b864493f59fca95562" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/link/zipball/eea8e8662d5cd3ae4517c9b864493f59fca95562", - "reference": "eea8e8662d5cd3ae4517c9b864493f59fca95562", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Link\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for HTTP links", - "keywords": [ - "http", - "http-link", - "link", - "psr", - "psr-13", - "rest" - ], - "support": { - "source": "https://github.com/php-fig/link/tree/master" - }, - "time": "2016-10-28T16:06:13+00:00" - }, - { - "name": "psr/log", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" - }, - "time": "2021-05-03T11:20:27+00:00" - }, - { - "name": "psr/simple-cache", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ], - "support": { - "source": "https://github.com/php-fig/simple-cache/tree/master" - }, - "time": "2017-10-23T01:57:42+00:00" - }, - { - "name": "ralouphie/getallheaders", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" - }, - "type": "library", - "autoload": { - "files": [ - "src/getallheaders.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "description": "A polyfill for getallheaders.", - "support": { - "issues": "https://github.com/ralouphie/getallheaders/issues", - "source": "https://github.com/ralouphie/getallheaders/tree/develop" - }, - "time": "2019-03-08T08:55:37+00:00" - }, - { - "name": "sensio/framework-extra-bundle", - "version": "v5.6.1", - "source": { - "type": "git", - "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git", - "reference": "430d14c01836b77c28092883d195a43ce413ee32" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/430d14c01836b77c28092883d195a43ce413ee32", - "reference": "430d14c01836b77c28092883d195a43ce413ee32", - "shasum": "" - }, - "require": { - "doctrine/annotations": "^1.0", - "php": ">=7.2.5", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/framework-bundle": "^4.4|^5.0", - "symfony/http-kernel": "^4.4|^5.0" - }, - "conflict": { - "doctrine/doctrine-cache-bundle": "<1.3.1", - "doctrine/persistence": "<1.3" - }, - "require-dev": { - "doctrine/dbal": "^2.10|^3.0", - "doctrine/doctrine-bundle": "^1.11|^2.0", - "doctrine/orm": "^2.5", - "nyholm/psr7": "^1.1", - "symfony/browser-kit": "^4.4|^5.0", - "symfony/doctrine-bridge": "^4.4|^5.0", - "symfony/dom-crawler": "^4.4|^5.0", - "symfony/expression-language": "^4.4|^5.0", - "symfony/finder": "^4.4|^5.0", - "symfony/monolog-bridge": "^4.0|^5.0", - "symfony/monolog-bundle": "^3.2", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9", - "symfony/psr-http-message-bridge": "^1.1", - "symfony/security-bundle": "^4.4|^5.0", - "symfony/twig-bundle": "^4.4|^5.0", - "symfony/yaml": "^4.4|^5.0", - "twig/twig": "^1.34|^2.4|^3.0" - }, - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "5.6.x-dev" - } - }, - "autoload": { - "psr-4": { - "Sensio\\Bundle\\FrameworkExtraBundle\\": "src/" - }, - "exclude-from-classmap": [ - "/tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "This bundle provides a way to configure your controllers with annotations", - "keywords": [ - "annotations", - "controllers" - ], - "support": { - "issues": "https://github.com/sensiolabs/SensioFrameworkExtraBundle/issues", - "source": "https://github.com/sensiolabs/SensioFrameworkExtraBundle/tree/v5.6.1" - }, - "time": "2020-08-25T19:10:18+00:00" - }, - { - "name": "smarty/smarty", - "version": "v3.1.43", - "source": { - "type": "git", - "url": "https://github.com/smarty-php/smarty.git", - "reference": "273f7e00fec034f6d61112552e9caf08d19565b7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/smarty-php/smarty/zipball/273f7e00fec034f6d61112552e9caf08d19565b7", - "reference": "273f7e00fec034f6d61112552e9caf08d19565b7", - "shasum": "" - }, - "require": { - "php": ">=5.2" - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^6.5 || ^5.7 || ^4.8", - "smarty/smarty-lexer": "^3.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "libs/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0" - ], - "authors": [ - { - "name": "Monte Ohrt", - "email": "monte@ohrt.com" - }, - { - "name": "Uwe Tews", - "email": "uwe.tews@googlemail.com" - }, - { - "name": "Rodney Rehm", - "email": "rodney.rehm@medialize.de" - } - ], - "description": "Smarty - the compiling PHP template engine", - "homepage": "http://www.smarty.net", - "keywords": [ - "templating" - ], - "support": { - "forum": "http://www.smarty.net/forums/", - "irc": "irc://irc.freenode.org/smarty", - "issues": "https://github.com/smarty-php/smarty/issues", - "source": "https://github.com/smarty-php/smarty/tree/v3.1.43" - }, - "time": "2022-01-10T09:52:40+00:00" - }, - { - "name": "soundasleep/html2text", - "version": "0.5.0", - "source": { - "type": "git", - "url": "https://github.com/soundasleep/html2text.git", - "reference": "cdb89f6ffa2c4cc78f8ed9ea6ee0594a9133ccad" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/soundasleep/html2text/zipball/cdb89f6ffa2c4cc78f8ed9ea6ee0594a9133ccad", - "reference": "cdb89f6ffa2c4cc78f8ed9ea6ee0594a9133ccad", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": ">=4.0", - "soundasleep/component-tests": "dev-master" - }, - "type": "library", - "autoload": { - "psr-4": { - "Html2Text\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "EPL-1.0" - ], - "authors": [ - { - "name": "Jevon Wright", - "homepage": "https://jevon.org", - "role": "Developer" - } - ], - "description": "A PHP script to convert HTML into a plain text format", - "homepage": "https://github.com/soundasleep/html2text", - "keywords": [ - "email", - "html", - "php", - "text" - ], - "support": { - "email": "support@jevon.org", - "issues": "https://github.com/soundasleep/html2text/issues", - "source": "https://github.com/soundasleep/html2text/tree/master" - }, - "time": "2017-04-19T22:01:50+00:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "3.6.0", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/ffced0d2c8fa8e6cdc4d695a743271fab6c38625", - "reference": "ffced0d2c8fa8e6cdc4d695a743271fab6c38625", - "shasum": "" - }, - "require": { - "ext-simplexml": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" - }, - "bin": [ - "bin/phpcs", - "bin/phpcbf" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", - "keywords": [ - "phpcs", - "standards" - ], - "support": { - "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues", - "source": "https://github.com/squizlabs/PHP_CodeSniffer", - "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki" - }, - "time": "2021-04-09T00:54:41+00:00" - }, - { - "name": "swiftmailer/swiftmailer", - "version": "v6.2.7", - "source": { - "type": "git", - "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "15f7faf8508e04471f666633addacf54c0ab5933" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/15f7faf8508e04471f666633addacf54c0ab5933", - "reference": "15f7faf8508e04471f666633addacf54c0ab5933", - "shasum": "" - }, - "require": { - "egulias/email-validator": "^2.0|^3.1", - "php": ">=7.0.0", - "symfony/polyfill-iconv": "^1.0", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "^1.0" - }, - "require-dev": { - "mockery/mockery": "^1.0", - "symfony/phpunit-bridge": "^4.4|^5.0" - }, - "suggest": { - "ext-intl": "Needed to support internationalized email addresses" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "6.2-dev" - } - }, - "autoload": { - "files": [ - "lib/swift_required.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Chris Corbyn" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Swiftmailer, free feature-rich PHP mailer", - "homepage": "https://swiftmailer.symfony.com", - "keywords": [ - "email", - "mail", - "mailer" - ], - "support": { - "issues": "https://github.com/swiftmailer/swiftmailer/issues", - "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.7" - }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/swiftmailer/swiftmailer", - "type": "tidelift" - } - ], - "abandoned": "symfony/mailer", - "time": "2021-03-09T12:30:35+00:00" - }, - { - "name": "symfony/contracts", - "version": "v1.1.10", - "source": { - "type": "git", - "url": "https://github.com/symfony/contracts.git", - "reference": "011c20407c4b99d454f44021d023fb39ce23b73d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/contracts/zipball/011c20407c4b99d454f44021d023fb39ce23b73d", - "reference": "011c20407c4b99d454f44021d023fb39ce23b73d", - "shasum": "" - }, - "require": { - "php": ">=7.1.3", - "psr/cache": "^1.0", - "psr/container": "^1.0" - }, - "replace": { - "symfony/cache-contracts": "self.version", - "symfony/event-dispatcher-contracts": "self.version", - "symfony/http-client-contracts": "self.version", - "symfony/service-contracts": "self.version", - "symfony/translation-contracts": "self.version" - }, - "require-dev": { - "symfony/polyfill-intl-idn": "^1.10" - }, - "suggest": { - "psr/event-dispatcher": "When using the EventDispatcher contracts", - "symfony/cache-implementation": "", - "symfony/event-dispatcher-implementation": "", - "symfony/http-client-implementation": "", - "symfony/service-implementation": "", - "symfony/translation-implementation": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\": "" - }, - "exclude-from-classmap": [ - "**/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A set of abstractions extracted out of the Symfony components", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/contracts/tree/v1.1.10" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-09-02T16:08:58+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v2.4.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", - "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "2.4-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-03-23T23:28:01+00:00" - }, - { - "name": "symfony/monolog-bundle", - "version": "v3.7.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/monolog-bundle.git", - "reference": "4054b2e940a25195ae15f0a49ab0c51718922eb4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/4054b2e940a25195ae15f0a49ab0c51718922eb4", - "reference": "4054b2e940a25195ae15f0a49ab0c51718922eb4", - "shasum": "" - }, - "require": { - "monolog/monolog": "~1.22 || ~2.0", - "php": ">=7.1.3", - "symfony/config": "~4.4 || ^5.0", - "symfony/dependency-injection": "^4.4 || ^5.0", - "symfony/http-kernel": "~4.4 || ^5.0", - "symfony/monolog-bridge": "~4.4 || ^5.0" - }, - "require-dev": { - "symfony/console": "~4.4 || ^5.0", - "symfony/phpunit-bridge": "^5.1", - "symfony/yaml": "~4.4 || ^5.0" - }, - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Bundle\\MonologBundle\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony MonologBundle", - "homepage": "https://symfony.com", - "keywords": [ - "log", - "logging" - ], - "support": { - "issues": "https://github.com/symfony/monolog-bundle/issues", - "source": "https://github.com/symfony/monolog-bundle/tree/v3.7.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-03-31T07:20:47+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-02-19T12:13:01+00:00" - }, - { - "name": "symfony/polyfill-iconv", - "version": "v1.22.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "06fb361659649bcfd6a208a0f1fcaf4e827ad342" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/06fb361659649bcfd6a208a0f1fcaf4e827ad342", - "reference": "06fb361659649bcfd6a208a0f1fcaf4e827ad342", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-iconv": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.22-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Iconv\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Iconv extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "iconv", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-iconv/tree/v1.22.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-01-22T09:19:47+00:00" - }, - { - "name": "symfony/polyfill-intl-icu", - "version": "v1.22.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-icu.git", - "reference": "af1842919c7e7364aaaa2798b29839e3ba168588" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/af1842919c7e7364aaaa2798b29839e3ba168588", - "reference": "af1842919c7e7364aaaa2798b29839e3ba168588", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance and support of other locales than \"en\"" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.22-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Icu\\": "" - }, - "classmap": [ - "Resources/stubs" - ], - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's ICU-related data and classes", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "icu", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-icu/tree/v1.22.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-01-22T09:19:47+00:00" - }, - { - "name": "symfony/polyfill-intl-idn", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65", - "reference": "65bd267525e82759e7d8c4e8ceea44f398838e65", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "symfony/polyfill-intl-normalizer": "^1.10", - "symfony/polyfill-php72": "^1.10" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Idn\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Laurent Bassin", - "email": "laurent@bassin.info" - }, - { - "name": "Trevor Rowbotham", - "email": "trevor.rowbotham@pm.me" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "idn", - "intl", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-05-27T09:27:20+00:00" - }, - { - "name": "symfony/polyfill-intl-normalizer", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", - "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-intl": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Intl\\Normalizer\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for intl's Normalizer class and related functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "intl", - "normalizer", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-02-19T12:13:01+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.23.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", - "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-05-27T12:26:48+00:00" - }, - { - "name": "symfony/polyfill-php70", - "version": "v1.20.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/5f03a781d984aae42cebd18e7912fa80f02ee644", - "reference": "5f03a781d984aae42cebd18e7912fa80f02ee644", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "metapackage", - "extra": { - "branch-alias": { - "dev-main": "1.20-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php70/tree/v1.20.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-10-23T14:02:19+00:00" - }, - { - "name": "symfony/polyfill-php72", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", - "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-05-27T09:17:38+00:00" - }, - { - "name": "symfony/polyfill-php73", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", - "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-02-19T12:13:01+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.22.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/dc3063ba22c2a1fd2f45ed856374d79114998f91", - "reference": "dc3063ba22c2a1fd2f45ed856374d79114998f91", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.22-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.22.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-01-07T16:49:33+00:00" - }, - { - "name": "symfony/polyfill-php81", - "version": "v1.23.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "e66119f3de95efc359483f810c4c3e6436279436" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/e66119f3de95efc359483f810c4c3e6436279436", - "reference": "e66119f3de95efc359483f810c4c3e6436279436", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.23-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.23.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2021-05-21T13:25:03+00:00" - }, - { - "name": "symfony/swiftmailer-bundle", - "version": "v3.5.2", - "source": { - "type": "git", - "url": "https://github.com/symfony/swiftmailer-bundle.git", - "reference": "6b72355549f02823a2209180f9c035e46ca3f178" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/swiftmailer-bundle/zipball/6b72355549f02823a2209180f9c035e46ca3f178", - "reference": "6b72355549f02823a2209180f9c035e46ca3f178", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "swiftmailer/swiftmailer": "^6.1.3", - "symfony/config": "^4.4|^5.0", - "symfony/dependency-injection": "^4.4|^5.0", - "symfony/http-kernel": "^4.4|^5.0" - }, - "conflict": { - "twig/twig": "<1.41|>=2.0,<2.10" - }, - "require-dev": { - "symfony/console": "^4.4|^5.0", - "symfony/framework-bundle": "^4.4|^5.0", - "symfony/phpunit-bridge": "^4.4|^5.0", - "symfony/yaml": "^4.4|^5.0" - }, - "type": "symfony-bundle", - "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Bundle\\SwiftmailerBundle\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony SwiftmailerBundle", - "homepage": "http://symfony.com", - "support": { - "issues": "https://github.com/symfony/swiftmailer-bundle/issues", - "source": "https://github.com/symfony/swiftmailer-bundle/tree/v3.5.2" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "abandoned": "symfony/mailer", - "time": "2021-01-25T17:31:39+00:00" - }, - { - "name": "symfony/symfony", - "version": "v4.4.40", - "source": { - "type": "git", - "url": "https://github.com/symfony/symfony.git", - "reference": "406847f8c944b577c116531cb342d2875324a2c1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/symfony/zipball/406847f8c944b577c116531cb342d2875324a2c1", - "reference": "406847f8c944b577c116531cb342d2875324a2c1", - "shasum": "" - }, - "require": { - "doctrine/event-manager": "~1.0", - "doctrine/persistence": "^1.3|^2", - "ext-xml": "*", - "friendsofphp/proxy-manager-lts": "^1.0.2", - "php": ">=7.1.3", - "psr/cache": "^1.0|^2.0", - "psr/container": "^1.0", - "psr/link": "^1.0", - "psr/log": "^1|^2", - "symfony/contracts": "^1.1.8", - "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-intl-icu": "~1.0", - "symfony/polyfill-intl-idn": "^1.10", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php72": "~1.5", - "symfony/polyfill-php73": "^1.11", - "symfony/polyfill-php80": "^1.16", - "symfony/polyfill-php81": "^1.22", - "twig/twig": "^1.43|^2.13|^3.0.4" - }, - "conflict": { - "doctrine/dbal": "<2.7", - "egulias/email-validator": "~3.0.0", - "masterminds/html5": "<2.6", - "monolog/monolog": ">=2", - "ocramius/proxy-manager": "<2.1", - "phpdocumentor/reflection-docblock": "<3.0|>=3.2.0,<3.2.2", - "phpdocumentor/type-resolver": "<0.3.0|1.3.*", - "phpunit/phpunit": "<5.4.3" - }, - "provide": { - "php-http/async-client-implementation": "*", - "php-http/client-implementation": "*", - "psr/cache-implementation": "1.0|2.0", - "psr/container-implementation": "1.0", - "psr/event-dispatcher-implementation": "1.0", - "psr/http-client-implementation": "1.0", - "psr/link-implementation": "1.0", - "psr/log-implementation": "1.0|2.0", - "psr/simple-cache-implementation": "1.0|2.0", - "symfony/cache-implementation": "1.0|2.0", - "symfony/event-dispatcher-implementation": "1.1", - "symfony/http-client-implementation": "1.1|2.0", - "symfony/service-implementation": "1.0|2.0", - "symfony/translation-implementation": "1.0|2.0" - }, - "replace": { - "symfony/amazon-mailer": "self.version", - "symfony/asset": "self.version", - "symfony/browser-kit": "self.version", - "symfony/cache": "self.version", - "symfony/config": "self.version", - "symfony/console": "self.version", - "symfony/css-selector": "self.version", - "symfony/debug": "self.version", - "symfony/debug-bundle": "self.version", - "symfony/dependency-injection": "self.version", - "symfony/doctrine-bridge": "self.version", - "symfony/dom-crawler": "self.version", - "symfony/dotenv": "self.version", - "symfony/error-handler": "self.version", - "symfony/event-dispatcher": "self.version", - "symfony/expression-language": "self.version", - "symfony/filesystem": "self.version", - "symfony/finder": "self.version", - "symfony/form": "self.version", - "symfony/framework-bundle": "self.version", - "symfony/google-mailer": "self.version", - "symfony/http-client": "self.version", - "symfony/http-foundation": "self.version", - "symfony/http-kernel": "self.version", - "symfony/inflector": "self.version", - "symfony/intl": "self.version", - "symfony/ldap": "self.version", - "symfony/lock": "self.version", - "symfony/mailchimp-mailer": "self.version", - "symfony/mailer": "self.version", - "symfony/mailgun-mailer": "self.version", - "symfony/messenger": "self.version", - "symfony/mime": "self.version", - "symfony/monolog-bridge": "self.version", - "symfony/options-resolver": "self.version", - "symfony/postmark-mailer": "self.version", - "symfony/process": "self.version", - "symfony/property-access": "self.version", - "symfony/property-info": "self.version", - "symfony/proxy-manager-bridge": "self.version", - "symfony/routing": "self.version", - "symfony/security": "self.version", - "symfony/security-bundle": "self.version", - "symfony/security-core": "self.version", - "symfony/security-csrf": "self.version", - "symfony/security-guard": "self.version", - "symfony/security-http": "self.version", - "symfony/sendgrid-mailer": "self.version", - "symfony/serializer": "self.version", - "symfony/stopwatch": "self.version", - "symfony/templating": "self.version", - "symfony/translation": "self.version", - "symfony/twig-bridge": "self.version", - "symfony/twig-bundle": "self.version", - "symfony/validator": "self.version", - "symfony/var-dumper": "self.version", - "symfony/var-exporter": "self.version", - "symfony/web-link": "self.version", - "symfony/web-profiler-bundle": "self.version", - "symfony/web-server-bundle": "self.version", - "symfony/workflow": "self.version", - "symfony/yaml": "self.version" - }, - "require-dev": { - "cache/integration-tests": "dev-master", - "composer/package-versions-deprecated": "^1.8", - "doctrine/annotations": "^1.10.4", - "doctrine/cache": "^1.6|^2.0", - "doctrine/collections": "~1.0", - "doctrine/data-fixtures": "^1.1", - "doctrine/dbal": "^2.7|^3.0", - "doctrine/orm": "^2.6.3", - "egulias/email-validator": "^2.1.10|^3.1", - "guzzlehttp/promises": "^1.4", - "masterminds/html5": "^2.6", - "monolog/monolog": "^1.25.1", - "nyholm/psr7": "^1.0", - "paragonie/sodium_compat": "^1.8", - "php-http/httplug": "^1.0|^2.0", - "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", - "predis/predis": "~1.1", - "psr/http-client": "^1.0", - "psr/simple-cache": "^1.0|^2.0", - "symfony/phpunit-bridge": "^5.2", - "symfony/security-acl": "~2.8|~3.0", - "twig/cssinliner-extra": "^2.12|^3", - "twig/inky-extra": "^2.12|^3", - "twig/markdown-extra": "^2.12|^3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Bundle\\": "src/Symfony/Bundle/", - "Symfony\\Component\\": "src/Symfony/Component/", - "Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/", - "Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/", - "Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/", - "Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/" - }, - "classmap": [ - "src/Symfony/Component/Intl/Resources/stubs" - ], - "exclude-from-classmap": [ - "**/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "The Symfony PHP framework", - "homepage": "https://symfony.com", - "keywords": [ - "framework" - ], - "support": { - "issues": "https://github.com/symfony/symfony/issues", - "source": "https://github.com/symfony/symfony/tree/v4.4.40" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-04-02T05:56:07+00:00" - }, - { - "name": "tecnickcom/tcpdf", - "version": "6.4.1", - "source": { - "type": "git", - "url": "https://github.com/tecnickcom/TCPDF.git", - "reference": "5ba838befdb37ef06a16d9f716f35eb03cb1b329" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/5ba838befdb37ef06a16d9f716f35eb03cb1b329", - "reference": "5ba838befdb37ef06a16d9f716f35eb03cb1b329", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "config", - "include", - "tcpdf.php", - "tcpdf_parser.php", - "tcpdf_import.php", - "tcpdf_barcodes_1d.php", - "tcpdf_barcodes_2d.php", - "include/tcpdf_colors.php", - "include/tcpdf_filters.php", - "include/tcpdf_font_data.php", - "include/tcpdf_fonts.php", - "include/tcpdf_images.php", - "include/tcpdf_static.php", - "include/barcodes/datamatrix.php", - "include/barcodes/pdf417.php", - "include/barcodes/qrcode.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0-only" - ], - "authors": [ - { - "name": "Nicola Asuni", - "email": "info@tecnick.com", - "role": "lead" - } - ], - "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", - "homepage": "http://www.tcpdf.org/", - "keywords": [ - "PDFD32000-2008", - "TCPDF", - "barcodes", - "datamatrix", - "pdf", - "pdf417", - "qrcode" - ], - "support": { - "issues": "https://github.com/tecnickcom/TCPDF/issues", - "source": "https://github.com/tecnickcom/TCPDF/tree/6.4.1" - }, - "funding": [ - { - "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_donations¤cy_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20tcpdf%20project", - "type": "custom" - } - ], - "time": "2021-03-27T16:00:33+00:00" - }, - { - "name": "tijsverkoyen/css-to-inline-styles", - "version": "2.2.3", - "source": { - "type": "git", - "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", - "reference": "b43b05cf43c1b6d849478965062b6ef73e223bb5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/b43b05cf43c1b6d849478965062b6ef73e223bb5", - "reference": "b43b05cf43c1b6d849478965062b6ef73e223bb5", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-libxml": "*", - "php": "^5.5 || ^7.0 || ^8.0", - "symfony/css-selector": "^2.7 || ^3.0 || ^4.0 || ^5.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0 || ^7.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.2.x-dev" - } - }, - "autoload": { - "psr-4": { - "TijsVerkoyen\\CssToInlineStyles\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Tijs Verkoyen", - "email": "css_to_inline_styles@verkoyen.eu", - "role": "Developer" - } - ], - "description": "CssToInlineStyles is a class that enables you to convert HTML-pages/files into HTML-pages/files with inline styles. This is very useful when you're sending emails.", - "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", - "support": { - "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", - "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.3" - }, - "time": "2020-07-13T06:12:54+00:00" - }, - { - "name": "tubalmartin/cssmin", - "version": "v4.1.1", - "source": { - "type": "git", - "url": "https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port.git", - "reference": "3cbf557f4079d83a06f9c3ff9b957c022d7805cf" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/tubalmartin/YUI-CSS-compressor-PHP-port/zipball/3cbf557f4079d83a06f9c3ff9b957c022d7805cf", - "reference": "3cbf557f4079d83a06f9c3ff9b957c022d7805cf", - "shasum": "" - }, - "require": { - "ext-pcre": "*", - "php": ">=5.3.2" - }, - "require-dev": { - "cogpowered/finediff": "0.3.*", - "phpunit/phpunit": "4.8.*" - }, - "bin": [ - "cssmin" - ], - "type": "library", - "autoload": { - "psr-4": { - "tubalmartin\\CssMin\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Túbal Martín", - "homepage": "http://tubalmartin.me/" - } - ], - "description": "A PHP port of the YUI CSS compressor", - "homepage": "https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port", - "keywords": [ - "compress", - "compressor", - "css", - "cssmin", - "minify", - "yui" - ], - "support": { - "issues": "https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port/issues", - "source": "https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port" - }, - "time": "2018-01-15T15:26:51+00:00" - }, - { - "name": "twig/twig", - "version": "v3.3.8", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "972d8604a92b7054828b539f2febb0211dd5945c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/972d8604a92b7054828b539f2febb0211dd5945c", - "reference": "972d8604a92b7054828b539f2febb0211dd5945c", - "shasum": "" - }, - "require": { - "php": ">=7.2.5", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3" - }, - "require-dev": { - "psr/container": "^1.0", - "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.3-dev" - } - }, - "autoload": { - "psr-4": { - "Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Twig Team", - "role": "Contributors" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "https://twig.symfony.com", - "keywords": [ - "templating" - ], - "support": { - "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.3.8" - }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/twig/twig", - "type": "tidelift" - } - ], - "time": "2022-02-04T06:59:48+00:00" - }, - { - "name": "willdurand/jsonp-callback-validator", - "version": "v1.1.0", - "source": { - "type": "git", - "url": "https://github.com/willdurand/JsonpCallbackValidator.git", - "reference": "1a7d388bb521959e612ef50c5c7b1691b097e909" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/willdurand/JsonpCallbackValidator/zipball/1a7d388bb521959e612ef50c5c7b1691b097e909", - "reference": "1a7d388bb521959e612ef50c5c7b1691b097e909", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~3.7" - }, - "type": "library", - "autoload": { - "psr-0": { - "JsonpCallbackValidator": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "William Durand", - "email": "william.durand1@gmail.com", - "homepage": "http://www.willdurand.fr" - } - ], - "description": "JSONP callback validator.", - "support": { - "issues": "https://github.com/willdurand/JsonpCallbackValidator/issues", - "source": "https://github.com/willdurand/JsonpCallbackValidator/tree/master" - }, - "time": "2014-01-20T22:35:06+00:00" - } - ], - "packages-dev": [ - { - "name": "behat/behat", - "version": "v3.8.1", - "source": { - "type": "git", - "url": "https://github.com/Behat/Behat.git", - "reference": "fbb065457d523d9856d4b50775b4151a7598b510" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Behat/Behat/zipball/fbb065457d523d9856d4b50775b4151a7598b510", - "reference": "fbb065457d523d9856d4b50775b4151a7598b510", - "shasum": "" - }, - "require": { - "behat/gherkin": "^4.6.0", - "behat/transliterator": "^1.2", - "ext-mbstring": "*", - "php": "^7.2 || ^8.0", - "psr/container": "^1.0", - "symfony/config": "^4.4 || ^5.0", - "symfony/console": "^4.4 || ^5.0", - "symfony/dependency-injection": "^4.4 || ^5.0", - "symfony/event-dispatcher": "^4.4 || ^5.0", - "symfony/translation": "^4.4 || ^5.0", - "symfony/yaml": "^4.4 || ^5.0" - }, - "require-dev": { - "container-interop/container-interop": "^1.2", - "herrera-io/box": "~1.6.1", - "phpunit/phpunit": "^8.5 || ^9.0", - "symfony/process": "^4.4 || ^5.0" - }, - "suggest": { - "ext-dom": "Needed to output test results in JUnit format." - }, - "bin": [ - "bin/behat" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.8.x-dev" - } - }, - "autoload": { - "psr-4": { - "Behat\\Behat\\": "src/Behat/Behat/", - "Behat\\Testwork\\": "src/Behat/Testwork/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - } - ], - "description": "Scenario-oriented BDD framework for PHP", - "homepage": "http://behat.org/", - "keywords": [ - "Agile", - "BDD", - "ScenarioBDD", - "Scrum", - "StoryBDD", - "User story", - "business", - "development", - "documentation", - "examples", - "symfony", - "testing" - ], - "support": { - "issues": "https://github.com/Behat/Behat/issues", - "source": "https://github.com/Behat/Behat/tree/v3.8.1" - }, - "time": "2020-11-07T15:55:18+00:00" - }, - { - "name": "behat/gherkin", - "version": "v4.8.0", - "source": { - "type": "git", - "url": "https://github.com/Behat/Gherkin.git", - "reference": "2391482cd003dfdc36b679b27e9f5326bd656acd" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Behat/Gherkin/zipball/2391482cd003dfdc36b679b27e9f5326bd656acd", - "reference": "2391482cd003dfdc36b679b27e9f5326bd656acd", - "shasum": "" - }, - "require": { - "php": "~7.2|~8.0" - }, - "require-dev": { - "cucumber/cucumber": "dev-gherkin-16.0.0", - "phpunit/phpunit": "~8|~9", - "symfony/phpunit-bridge": "~3|~4|~5", - "symfony/yaml": "~3|~4|~5" - }, - "suggest": { - "symfony/yaml": "If you want to parse features, represented in YAML files" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.4-dev" - } - }, - "autoload": { - "psr-0": { - "Behat\\Gherkin": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - } - ], - "description": "Gherkin DSL parser for PHP", - "homepage": "http://behat.org/", - "keywords": [ - "BDD", - "Behat", - "Cucumber", - "DSL", - "gherkin", - "parser" - ], - "support": { - "issues": "https://github.com/Behat/Gherkin/issues", - "source": "https://github.com/Behat/Gherkin/tree/v4.8.0" - }, - "time": "2021-02-04T12:44:21+00:00" - }, - { - "name": "behat/transliterator", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/Behat/Transliterator.git", - "reference": "3c4ec1d77c3d05caa1f0bf8fb3aae4845005c7fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Behat/Transliterator/zipball/3c4ec1d77c3d05caa1f0bf8fb3aae4845005c7fc", - "reference": "3c4ec1d77c3d05caa1f0bf8fb3aae4845005c7fc", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "chuyskywalker/rolling-curl": "^3.1", - "php-yaoi/php-yaoi": "^1.0", - "phpunit/phpunit": "^4.8.36|^6.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2-dev" - } - }, - "autoload": { - "psr-4": { - "Behat\\Transliterator\\": "src/Behat/Transliterator" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Artistic-1.0" - ], - "description": "String transliterator", - "keywords": [ - "i18n", - "slug", - "transliterator" - ], - "support": { - "issues": "https://github.com/Behat/Transliterator/issues", - "source": "https://github.com/Behat/Transliterator/tree/v1.3.0" - }, - "time": "2020-01-14T16:39:13+00:00" - }, - { - "name": "ergebnis/composer-normalize", - "version": "2.13.3", - "source": { - "type": "git", - "url": "https://github.com/ergebnis/composer-normalize.git", - "reference": "eff003890c655ee0e4b6ac5d4c5b40ce61247f7c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/eff003890c655ee0e4b6ac5d4c5b40ce61247f7c", - "reference": "eff003890c655ee0e4b6ac5d4c5b40ce61247f7c", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^1.1.0 || ^2.0.0", - "ergebnis/json-normalizer": "^1.0.3", - "ergebnis/json-printer": "^3.1.1", - "justinrainbow/json-schema": "^5.2.10", - "localheinz/diff": "^1.1.1", - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "composer/composer": "^1.10.19 || ^2.0.8", - "ergebnis/license": "^1.1.0", - "ergebnis/php-cs-fixer-config": "^2.13.0", - "ergebnis/phpstan-rules": "~0.15.3", - "ergebnis/test-util": "^1.4.0", - "phpstan/extension-installer": "^1.1.0", - "phpstan/phpstan": "~0.12.80", - "phpstan/phpstan-deprecation-rules": "~0.12.6", - "phpstan/phpstan-phpunit": "~0.12.18", - "phpstan/phpstan-strict-rules": "~0.12.9", - "phpunit/phpunit": "^8.5.14", - "psalm/plugin-phpunit": "~0.15.0", - "symfony/filesystem": "^5.2.4", - "vimeo/psalm": "^4.6.2" - }, - "type": "composer-plugin", - "extra": { - "class": "Ergebnis\\Composer\\Normalize\\NormalizePlugin", - "composer-normalize": { - "indent-size": 2, - "indent-style": "space" - } - }, - "autoload": { - "psr-4": { - "Ergebnis\\Composer\\Normalize\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Möller", - "email": "am@localheinz.com" - } - ], - "description": "Provides a composer plugin for normalizing composer.json.", - "homepage": "https://github.com/ergebnis/composer-normalize", - "keywords": [ - "composer", - "normalize", - "normalizer", - "plugin" - ], - "support": { - "issues": "https://github.com/ergebnis/composer-normalize/issues", - "source": "https://github.com/ergebnis/composer-normalize" - }, - "funding": [ - { - "url": "https://github.com/localheinz", - "type": "github" - } - ], - "time": "2021-03-06T14:00:23+00:00" - }, - { - "name": "ergebnis/json-normalizer", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/ergebnis/json-normalizer.git", - "reference": "4a7f064ce34d5a2e382564565cdd433dbc5b9494" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/4a7f064ce34d5a2e382564565cdd433dbc5b9494", - "reference": "4a7f064ce34d5a2e382564565cdd433dbc5b9494", - "shasum": "" - }, - "require": { - "ergebnis/json-printer": "^3.1.1", - "ext-json": "*", - "justinrainbow/json-schema": "^5.2.10", - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "ergebnis/license": "^1.1.0", - "ergebnis/php-cs-fixer-config": "^2.10.0", - "ergebnis/phpstan-rules": "~0.15.3", - "ergebnis/test-util": "^1.4.0", - "infection/infection": "~0.15.3", - "jangregor/phpstan-prophecy": "~0.8.1", - "phpstan/extension-installer": "^1.1.0", - "phpstan/phpstan": "~0.12.80", - "phpstan/phpstan-deprecation-rules": "~0.12.6", - "phpstan/phpstan-phpunit": "~0.12.17", - "phpstan/phpstan-strict-rules": "~0.12.9", - "phpunit/phpunit": "^8.5.14", - "psalm/plugin-phpunit": "~0.12.2", - "vimeo/psalm": "^3.18" - }, - "type": "library", - "autoload": { - "psr-4": { - "Ergebnis\\Json\\Normalizer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Möller", - "email": "am@localheinz.com" - } - ], - "description": "Provides generic and vendor-specific normalizers for normalizing JSON documents.", - "homepage": "https://github.com/ergebnis/json-normalizer", - "keywords": [ - "json", - "normalizer" - ], - "support": { - "issues": "https://github.com/ergebnis/json-normalizer/issues", - "source": "https://github.com/ergebnis/json-normalizer" - }, - "funding": [ - { - "url": "https://github.com/localheinz", - "type": "github" - } - ], - "time": "2021-03-06T13:33:57+00:00" - }, - { - "name": "ergebnis/json-printer", - "version": "3.1.1", - "source": { - "type": "git", - "url": "https://github.com/ergebnis/json-printer.git", - "reference": "e4190dadd9937a77d8afcaf2b6c42a528ab367d6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/e4190dadd9937a77d8afcaf2b6c42a528ab367d6", - "reference": "e4190dadd9937a77d8afcaf2b6c42a528ab367d6", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-mbstring": "*", - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "ergebnis/license": "^1.0.0", - "ergebnis/php-cs-fixer-config": "^2.2.1", - "ergebnis/phpstan-rules": "~0.15.2", - "ergebnis/test-util": "^1.1.0", - "infection/infection": "~0.15.3", - "phpstan/extension-installer": "^1.0.4", - "phpstan/phpstan": "~0.12.40", - "phpstan/phpstan-deprecation-rules": "~0.12.5", - "phpstan/phpstan-phpunit": "~0.12.16", - "phpstan/phpstan-strict-rules": "~0.12.4", - "phpunit/phpunit": "^8.5.8", - "psalm/plugin-phpunit": "~0.11.0", - "vimeo/psalm": "^3.14.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "Ergebnis\\Json\\Printer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Möller", - "email": "am@localheinz.com" - } - ], - "description": "Provides a JSON printer, allowing for flexible indentation.", - "homepage": "https://github.com/ergebnis/json-printer", - "keywords": [ - "formatter", - "json", - "printer" - ], - "support": { - "issues": "https://github.com/ergebnis/json-printer/issues", - "source": "https://github.com/ergebnis/json-printer" - }, - "funding": [ - { - "url": "https://github.com/localheinz", - "type": "github" - } - ], - "time": "2020-08-30T12:17:03+00:00" - }, - { - "name": "johnkary/phpunit-speedtrap", - "version": "v3.3.0", - "source": { - "type": "git", - "url": "https://github.com/johnkary/phpunit-speedtrap.git", - "reference": "9ba81d42676da31366c85d3ff8c10a8352d02030" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/johnkary/phpunit-speedtrap/zipball/9ba81d42676da31366c85d3ff8c10a8352d02030", - "reference": "9ba81d42676da31366c85d3ff8c10a8352d02030", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.0-dev" - } - }, - "autoload": { - "psr-4": { - "JohnKary\\PHPUnit\\Listener\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "John Kary", - "email": "john@johnkary.net" - } - ], - "description": "Find and report on slow tests in your PHPUnit test suite", - "homepage": "https://github.com/johnkary/phpunit-speedtrap", - "keywords": [ - "phpunit", - "profile", - "slow" - ], - "support": { - "issues": "https://github.com/johnkary/phpunit-speedtrap/issues", - "source": "https://github.com/johnkary/phpunit-speedtrap/tree/v3.3.0" - }, - "time": "2020-12-18T16:20:16+00:00" - }, - { - "name": "justinrainbow/json-schema", - "version": "5.2.10", - "source": { - "type": "git", - "url": "https://github.com/justinrainbow/json-schema.git", - "reference": "2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b", - "reference": "2ba9c8c862ecd5510ed16c6340aa9f6eadb4f31b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", - "json-schema/json-schema-test-suite": "1.2.0", - "phpunit/phpunit": "^4.8.35" - }, - "bin": [ - "bin/validate-json" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "JsonSchema\\": "src/JsonSchema/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" - }, - { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - }, - { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" - } - ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", - "keywords": [ - "json", - "schema" - ], - "support": { - "issues": "https://github.com/justinrainbow/json-schema/issues", - "source": "https://github.com/justinrainbow/json-schema/tree/5.2.10" - }, - "time": "2020-05-27T16:41:55+00:00" - }, - { - "name": "localheinz/diff", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/localheinz/diff.git", - "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/localheinz/diff/zipball/851bb20ea8358c86f677f5f111c4ab031b1c764c", - "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Fork of sebastian/diff for use with ergebnis/composer-normalize", - "homepage": "https://github.com/localheinz/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "source": "https://github.com/localheinz/diff/tree/main" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-07-06T04:49:32+00:00" - }, - { - "name": "mikey179/vfsstream", - "version": "v1.6.8", - "source": { - "type": "git", - "url": "https://github.com/bovigo/vfsStream.git", - "reference": "231c73783ebb7dd9ec77916c10037eff5a2b6efe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/bovigo/vfsStream/zipball/231c73783ebb7dd9ec77916c10037eff5a2b6efe", - "reference": "231c73783ebb7dd9ec77916c10037eff5a2b6efe", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.5|^5.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.6.x-dev" - } - }, - "autoload": { - "psr-0": { - "org\\bovigo\\vfs\\": "src/main/php" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Frank Kleine", - "homepage": "http://frankkleine.de/", - "role": "Developer" - } - ], - "description": "Virtual file system to mock the real file system in unit tests.", - "homepage": "http://vfs.bovigo.org/", - "support": { - "issues": "https://github.com/bovigo/vfsStream/issues", - "source": "https://github.com/bovigo/vfsStream/tree/master", - "wiki": "https://github.com/bovigo/vfsStream/wiki" - }, - "time": "2019-10-30T15:31:00+00:00" - }, - { - "name": "myclabs/deep-copy", - "version": "1.10.2", - "source": { - "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", - "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "doctrine/collections": "^1.0", - "doctrine/common": "^2.6", - "phpunit/phpunit": "^7.1" - }, - "type": "library", - "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], - "psr-4": { - "DeepCopy\\": "src/DeepCopy/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Create deep copies (clones) of your objects", - "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" - ], - "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.10.2" - }, - "funding": [ - { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" - } - ], - "time": "2020-11-13T09:40:50+00:00" - }, - { - "name": "phar-io/manifest", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", - "reference": "85265efd3af7ba3ca4b2a2c34dbfc5788dd29133", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "ext-xmlwriter": "*", - "phar-io/version": "^3.0.1", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/master" - }, - "time": "2020-06-27T14:33:11+00:00" - }, - { - "name": "phar-io/version", - "version": "3.1.0", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "bae7c545bef187884426f042434e561ab1ddb182" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/bae7c545bef187884426f042434e561ab1ddb182", - "reference": "bae7c545bef187884426f042434e561ab1ddb182", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/3.1.0" - }, - "time": "2021-02-23T14:00:09+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.2.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-2.x": "2.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jaap van Otterdijk", - "email": "opensource@ijaap.nl" - } - ], - "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", - "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" - ], - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" - }, - "time": "2020-06-27T09:03:43+00:00" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", - "shasum": "" - }, - "require": { - "ext-filter": "*", - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.3", - "webmozart/assert": "^1.9.1" - }, - "require-dev": { - "mockery/mockery": "~1.3.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - }, - { - "name": "Jaap van Otterdijk", - "email": "account@ijaap.nl" - } - ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" - }, - "time": "2020-09-03T19:13:55+00:00" - }, - { - "name": "phpdocumentor/type-resolver", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-1.x": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" - } - ], - "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", - "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" - }, - "time": "2020-09-17T18:55:26+00:00" - }, - { - "name": "phpspec/prophecy", - "version": "1.13.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.1", - "phpdocumentor/reflection-docblock": "^5.2", - "sebastian/comparator": "^3.0 || ^4.0", - "sebastian/recursion-context": "^3.0 || ^4.0" - }, - "require-dev": { - "phpspec/phpspec": "^6.0", - "phpunit/phpunit": "^8.0 || ^9.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.11.x-dev" - } - }, - "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" - }, - { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" - } - ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], - "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.13.0" - }, - "time": "2021-03-17T13:42:18+00:00" - }, - { - "name": "phpstan/phpstan", - "version": "1.5.4", - "source": { - "type": "git", - "url": "https://github.com/phpstan/phpstan.git", - "reference": "bbf68cae24f6dc023c607ea0f87da55dd9d55c2b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/bbf68cae24f6dc023c607ea0f87da55dd9d55c2b", - "reference": "bbf68cae24f6dc023c607ea0f87da55dd9d55c2b", - "shasum": "" - }, - "require": { - "php": "^7.2|^8.0" - }, - "conflict": { - "phpstan/phpstan-shim": "*" - }, - "bin": [ - "phpstan", - "phpstan.phar" - ], - "type": "library", - "autoload": { - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "PHPStan - PHP Static Analysis Tool", - "support": { - "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.5.4" - }, - "funding": [ - { - "url": "https://github.com/ondrejmirtes", - "type": "github" - }, - { - "url": "https://github.com/phpstan", - "type": "github" - }, - { - "url": "https://www.patreon.com/phpstan", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", - "type": "tidelift" - } - ], - "time": "2022-04-03T12:39:00+00:00" - }, - { - "name": "phpunit/php-code-coverage", - "version": "7.0.14", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "bb7c9a210c72e4709cdde67f8b7362f672f2225c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/bb7c9a210c72e4709cdde67f8b7362f672f2225c", - "reference": "bb7c9a210c72e4709cdde67f8b7362f672f2225c", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-xmlwriter": "*", - "php": ">=7.2", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.1.1 || ^4.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^4.2.2", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1.3" - }, - "require-dev": { - "phpunit/phpunit": "^8.2.2" - }, - "suggest": { - "ext-xdebug": "^2.7.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "7.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", - "keywords": [ - "coverage", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/7.0.14" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-12-02T13:39:03+00:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4b49fb70f067272b659ef0174ff9ca40fdaa6357", - "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^8.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-30T08:25:21+00:00" - }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" - }, - "time": "2015-06-21T13:50:34+00:00" - }, - { - "name": "phpunit/php-timer", - "version": "2.1.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", - "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^8.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-30T08:20:02+00:00" - }, - { - "name": "phpunit/php-token-stream", - "version": "3.1.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "472b687829041c24b25f475e14c2f38a09edf1c2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/472b687829041c24b25f475e14c2f38a09edf1c2", - "reference": "472b687829041c24b25f475e14c2f38a09edf1c2", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", - "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "abandoned": true, - "time": "2020-11-30T08:38:46+00:00" - }, - { - "name": "phpunit/phpunit", - "version": "8.5.16", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "cc66f2fc61296be66c99931a862200e7456b9a01" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/cc66f2fc61296be66c99931a862200e7456b9a01", - "reference": "cc66f2fc61296be66c99931a862200e7456b9a01", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.3.1", - "ext-dom": "*", - "ext-json": "*", - "ext-libxml": "*", - "ext-mbstring": "*", - "ext-xml": "*", - "ext-xmlwriter": "*", - "myclabs/deep-copy": "^1.10.0", - "phar-io/manifest": "^2.0.1", - "phar-io/version": "^3.0.2", - "php": ">=7.2", - "phpspec/prophecy": "^1.10.3", - "phpunit/php-code-coverage": "^7.0.12", - "phpunit/php-file-iterator": "^2.0.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1.2", - "sebastian/comparator": "^3.0.2", - "sebastian/diff": "^3.0.2", - "sebastian/environment": "^4.2.3", - "sebastian/exporter": "^3.1.2", - "sebastian/global-state": "^3.0.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0.1", - "sebastian/type": "^1.1.3", - "sebastian/version": "^2.0.1" - }, - "require-dev": { - "ext-pdo": "*" - }, - "suggest": { - "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0.0" - }, - "bin": [ - "phpunit" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "8.5-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "The PHP Unit Testing framework.", - "homepage": "https://phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/8.5.16" - }, - "funding": [ - { - "url": "https://phpunit.de/donate.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2021-06-05T04:46:20+00:00" - }, - { - "name": "prestashop/phpstan-prestashop", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/PrestaShop/phpstan-prestashop.git", - "reference": "8e915210f8071f517fcbcbcc2fde6078ce7fbc36" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PrestaShop/phpstan-prestashop/zipball/8e915210f8071f517fcbcbcc2fde6078ce7fbc36", - "reference": "8e915210f8071f517fcbcbcc2fde6078ce7fbc36", - "shasum": "" - }, - "require": { - "php": "^7.2|^8.0", - "phpstan/phpstan": "^1.2.0" - }, - "require-dev": { - "nikic/php-parser": "^4.10", - "phpstan/phpstan-phpunit": "^1.0.0", - "phpstan/phpstan-strict-rules": "^1.1.0", - "phpunit/phpunit": "^8.5", - "symfony/console": "^5.2" - }, - "type": "phpstan-extension", - "extra": { - "branch-alias": { - "dev-master": "0.12-dev" - }, - "phpstan": { - "includes": [ - "extension.neon", - "rules.neon" - ] - } - }, - "autoload": { - "psr-4": { - "PHPStanForPrestaShop\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PrestaShop SA", - "email": "contact@prestashop.com" - } - ], - "description": "PrestaShop extension for PHPStan", - "support": { - "issues": "https://github.com/PrestaShop/phpstan-prestashop/issues", - "source": "https://github.com/PrestaShop/phpstan-prestashop/tree/2.0.0" - }, - "time": "2021-11-23T09:22:24+00:00" - }, - { - "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "phpunit/phpunit": "^8.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Looks up which function or method a line of code belongs to", - "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", - "support": { - "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-30T08:15:22+00:00" - }, - { - "name": "sebastian/comparator", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" - }, - "require-dev": { - "phpunit/phpunit": "^8.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@2bepublished.at" - } - ], - "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", - "keywords": [ - "comparator", - "compare", - "equality" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-30T08:04:30+00:00" - }, - { - "name": "sebastian/diff", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Diff implementation", - "homepage": "https://github.com/sebastianbergmann/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-30T07:59:04+00:00" - }, - { - "name": "sebastian/environment", - "version": "4.2.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", - "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^7.5" - }, - "suggest": { - "ext-posix": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.2-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides functionality to handle HHVM/PHP environments", - "homepage": "http://www.github.com/sebastianbergmann/environment", - "keywords": [ - "Xdebug", - "environment", - "hhvm" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-30T07:53:42+00:00" - }, - { - "name": "sebastian/exporter", - "version": "3.1.3", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e", - "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.1.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Volker Dusch", - "email": "github@wallbash.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - }, - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", - "keywords": [ - "export", - "exporter" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.3" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-30T07:47:53+00:00" - }, - { - "name": "sebastian/global-state", - "version": "3.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/474fb9edb7ab891665d3bfc6317f42a0a150454b", - "reference": "474fb9edb7ab891665d3bfc6317f42a0a150454b", - "shasum": "" - }, - "require": { - "php": ">=7.2", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "ext-dom": "*", - "phpunit/phpunit": "^8.0" - }, - "suggest": { - "ext-uopz": "*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], - "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/3.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-30T07:43:24+00:00" - }, - { - "name": "sebastian/object-enumerator", - "version": "3.0.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", - "shasum": "" - }, - "require": { - "php": ">=7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Traverses array structures and object graphs to enumerate all referenced objects", - "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-30T07:40:27+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "1.1.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "support": { - "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-30T07:37:18+00:00" - }, - { - "name": "sebastian/recursion-context", - "version": "3.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", - "shasum": "" - }, - "require": { - "php": ">=7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Jeff Welch", - "email": "whatthejeff@gmail.com" - }, - { - "name": "Adam Harvey", - "email": "aharvey@php.net" - } - ], - "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "support": { - "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-30T07:34:24+00:00" - }, - { - "name": "sebastian/resource-operations", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", - "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Provides a list of PHP built-in functions that operate on resources", - "homepage": "https://www.github.com/sebastianbergmann/resource-operations", - "support": { - "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-30T07:30:19+00:00" - }, - { - "name": "sebastian/type", - "version": "1.1.4", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/type.git", - "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/0150cfbc4495ed2df3872fb31b26781e4e077eb4", - "reference": "0150cfbc4495ed2df3872fb31b26781e4e077eb4", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Collection of value objects that represent the types of the PHP type system", - "homepage": "https://github.com/sebastianbergmann/type", - "support": { - "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/1.1.4" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-11-30T07:25:11+00:00" - }, - { - "name": "sebastian/version", - "version": "2.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - } - ], - "description": "Library that helps with managing the version number of Git-hosted PHP projects", - "homepage": "https://github.com/sebastianbergmann/version", - "support": { - "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/master" - }, - "time": "2016-10-03T07:35:21+00:00" - }, - { - "name": "symfony/phpunit-bridge", - "version": "v3.4.47", - "source": { - "type": "git", - "url": "https://github.com/symfony/phpunit-bridge.git", - "reference": "120273ad5d03a8deee08ca9260e2598f288f2bac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/phpunit-bridge/zipball/120273ad5d03a8deee08ca9260e2598f288f2bac", - "reference": "120273ad5d03a8deee08ca9260e2598f288f2bac", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "conflict": { - "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0|<6.4,>=6.0|9.1.2" - }, - "suggest": { - "symfony/debug": "For tracking deprecated interfaces usages at runtime with DebugClassLoader" - }, - "bin": [ - "bin/simple-phpunit" - ], - "type": "symfony-bridge", - "extra": { - "thanks": { - "name": "phpunit/phpunit", - "url": "https://github.com/sebastianbergmann/phpunit" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Bridge\\PhpUnit\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony PHPUnit Bridge", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/phpunit-bridge/tree/v3.4.47" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-11-13T16:28:59+00:00" - }, - { - "name": "theseer/tokenizer", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "75a63c33a8577608444246075ea0af0d052e452a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", - "reference": "75a63c33a8577608444246075ea0af0d052e452a", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.2 || ^8.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - } - ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/master" - }, - "funding": [ - { - "url": "https://github.com/theseer", - "type": "github" - } - ], - "time": "2020-07-12T23:59:07+00:00" - }, - { - "name": "webmozart/assert", - "version": "1.10.0", - "source": { - "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/6964c76c7804814a842473e0c8fd15bab0f18e25", - "reference": "6964c76c7804814a842473e0c8fd15bab0f18e25", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0", - "symfony/polyfill-ctype": "^1.8" - }, - "conflict": { - "phpstan/phpstan": "<0.12.20", - "vimeo/psalm": "<4.6.1 || 4.6.2" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.13" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10-dev" - } - }, - "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" - } - ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], - "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.10.0" - }, - "time": "2021-03-09T10:59:23+00:00" - } - ], - "aliases": [], - "minimum-stability": "dev", - "stability-flags": { - "prestashop/classic": 20 - }, - "prefer-stable": true, - "prefer-lowest": false, - "platform": { - "php": ">=7.2.5", - "ext-curl": "*", - "ext-dom": "*", - "ext-fileinfo": "*", - "ext-gd": "*", - "ext-iconv": "*", - "ext-intl": "*", - "ext-json": "*", - "ext-mbstring": "*", - "ext-openssl": "*", - "ext-simplexml": "*", - "ext-zip": "*" - }, - "platform-dev": [], - "platform-overrides": { - "php": "7.2.5" - }, - "plugin-api-version": "2.2.0" -} From 3c88dc1746eecec267dda17728ef4270d5ae8611 Mon Sep 17 00:00:00 2001 From: matks Date: Mon, 9 May 2022 11:43:40 +0200 Subject: [PATCH 069/128] Fix typo in github workflows --- .github/workflows/e2e_nightly_upgrade.yml | 2 +- .github/workflows/{nigthly_upgrade.yml => nightly_upgrade.yml} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{nigthly_upgrade.yml => nightly_upgrade.yml} (100%) diff --git a/.github/workflows/e2e_nightly_upgrade.yml b/.github/workflows/e2e_nightly_upgrade.yml index 54eceeb69..a7728ff75 100755 --- a/.github/workflows/e2e_nightly_upgrade.yml +++ b/.github/workflows/e2e_nightly_upgrade.yml @@ -1,4 +1,4 @@ -name: Nightly upgrades with user inferfaces +name: Nightly upgrades with user interfaces on: schedule: diff --git a/.github/workflows/nigthly_upgrade.yml b/.github/workflows/nightly_upgrade.yml similarity index 100% rename from .github/workflows/nigthly_upgrade.yml rename to .github/workflows/nightly_upgrade.yml From ecb5955572db392bea1b860d30340a602efd009a Mon Sep 17 00:00:00 2001 From: Ibrahima SOW Date: Mon, 16 May 2022 11:51:50 +0000 Subject: [PATCH 070/128] Hook for alternative search panel --- upgrade/sql/8.0.0.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index c8330766b..23b24a0a6 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -26,7 +26,8 @@ INSERT IGNORE INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `po (NULL, 'displayCheckoutBeforeConfirmation', 'Show custom content before checkout confirmation', 'This hook allows you to display custom content at the end of checkout process', '1'), (NULL, 'displayCheckoutSummaryTop', 'Cart summary top', 'This hook allows you to display new elements in top of cart summary', '1'), (NULL, 'displayAdminThemesListAfter', 'BO themes list extra content', 'This hook displays content after the themes list in the back office', '1'), - (NULL, 'displayModuleConfigureExtraButtons', 'Module configuration - After toolbar buttons', 'This hook allows to add toolbar''s additional content on module configuration page', '1') + (NULL, 'displayModuleConfigureExtraButtons', 'Module configuration - After toolbar buttons', 'This hook allows to add toolbar''s additional content on module configuration page', '1'), + (NULL, 'actionGetAlternativeSearchPanels', 'Additional search panel', 'This hook allows to add an additional search panel for external providers in PrestaShop back office', '1') ; ALTER TABLE `PREFIX_employee_session` ADD `date_upd` DATETIME NOT NULL AFTER `token`; From a46b0c69fc125963105684899d15cef335590d79 Mon Sep 17 00:00:00 2001 From: Thomas BACCELLI Date: Mon, 30 May 2022 19:56:24 +0200 Subject: [PATCH 071/128] check version_num is not null --- classes/Twig/Block/UpgradeButtonBlock.php | 5 ++++- classes/Upgrader.php | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/classes/Twig/Block/UpgradeButtonBlock.php b/classes/Twig/Block/UpgradeButtonBlock.php index 3676e1e1d..8fbea7456 100644 --- a/classes/Twig/Block/UpgradeButtonBlock.php +++ b/classes/Twig/Block/UpgradeButtonBlock.php @@ -116,7 +116,10 @@ public function render() { $translator = $this->translator; - $versionCompare = version_compare(_PS_VERSION_, $this->upgrader->version_num); + $versionCompare = $this->upgrader->version_num !== null + ? version_compare(_PS_VERSION_, $this->upgrader->version_num) + : 0 + ; $channel = $this->config->get('channel'); if (!in_array($channel, ['archive', 'directory']) && !empty($this->upgrader->version_num)) { diff --git a/classes/Upgrader.php b/classes/Upgrader.php index 6bd8dfd90..0be84a553 100755 --- a/classes/Upgrader.php +++ b/classes/Upgrader.php @@ -195,7 +195,7 @@ public function checkPSVersion($refresh = false, $array_no_major = ['minor']) && version_compare($branch_name, $this->branch, '>=')) ) { // skip if $branch->num is inferior to a previous one, skip it - if (version_compare((string) $branch->num, $this->version_num, '<')) { + if ($this->version_num !== null && version_compare((string) $branch->num, $this->version_num, '<')) { continue; } // also skip if previous loop found an available upgrade and current is not @@ -225,7 +225,7 @@ public function checkPSVersion($refresh = false, $array_no_major = ['minor']) // retro-compatibility : // return array(name,link) if you don't use the last version // false otherwise - if (version_compare($this->currentPsVersion, $this->version_num, '<')) { + if ($this->version_num !== null && version_compare($this->currentPsVersion, $this->version_num, '<')) { $this->need_upgrade = true; return ['name' => $this->version_name, 'link' => $this->link]; From c0e8614445e1c0af3e184f964787336078430952 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Thu, 2 Jun 2022 17:39:36 +0200 Subject: [PATCH 072/128] add feature flag update queries --- upgrade/sql/8.0.0.sql | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index c8330766b..682486e8c 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -48,3 +48,9 @@ ALTER TABLE `PREFIX_product_shop` MODIFY COLUMN `redirect_type` ENUM( /* PHP:ps_800_add_security_tab(); */; ALTER TABLE `PREFIX_order_detail` MODIFY COLUMN `product_name` TEXT NOT NULL; + +ALTER TABLE `PREFIX_feature_flag` ADD `stability` VARCHAR(64) DEFAULT 'beta' NOT NULL; +UPDATE `PREFIX_feature_flag` SET stability = 'stable', `label_wording` = 'New product page - Single store', `description_wording` = 'This page benefits from increased performance and includes new features such as a new combination management system.' where `name` = 'product_page_V2'; + +INSERT INTO `PREFIX_feature_flag` (`name`, `state`, `label_wording`, `label_domain`, `description_wording`, `description_domain`, `stability`) +VALUES ('product_page_v2_multi_shop', '0', 'New product page - Multi store', 'Admin.Advparameters.Feature', 'Access the new product page, even in a multistore context. This is a work in progress and some features are not available.', 'Admin.Advparameters.Help', 'beta'); From 4eadb5bb266c3bbf9509bf83223e13eac30514f6 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Fri, 3 Jun 2022 10:44:26 +0200 Subject: [PATCH 073/128] add tab query for feature flag --- upgrade/sql/8.0.0.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index 682486e8c..afb6860d8 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -50,7 +50,9 @@ ALTER TABLE `PREFIX_product_shop` MODIFY COLUMN `redirect_type` ENUM( ALTER TABLE `PREFIX_order_detail` MODIFY COLUMN `product_name` TEXT NOT NULL; ALTER TABLE `PREFIX_feature_flag` ADD `stability` VARCHAR(64) DEFAULT 'beta' NOT NULL; -UPDATE `PREFIX_feature_flag` SET stability = 'stable', `label_wording` = 'New product page - Single store', `description_wording` = 'This page benefits from increased performance and includes new features such as a new combination management system.' where `name` = 'product_page_V2'; +UPDATE `PREFIX_feature_flag` SET `state` = '0', `stability` = 'stable', `label_wording` = 'New product page - Single store', `description_wording` = 'This page benefits from increased performance and includes new features such as a new combination management system.' where `name` = 'product_page_V2'; INSERT INTO `PREFIX_feature_flag` (`name`, `state`, `label_wording`, `label_domain`, `description_wording`, `description_domain`, `stability`) VALUES ('product_page_v2_multi_shop', '0', 'New product page - Multi store', 'Admin.Advparameters.Feature', 'Access the new product page, even in a multistore context. This is a work in progress and some features are not available.', 'Admin.Advparameters.Help', 'beta'); + +UPDATE `PREFIX_tab` SET wording = 'New & Experimental Features' WHERE `class_name` = 'AdminFeatureFlag'; From 59db2c2a19d2167a40a4ad070f715bbdd2a809f8 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Fri, 3 Jun 2022 10:46:03 +0200 Subject: [PATCH 074/128] put where in maj --- upgrade/sql/8.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index afb6860d8..c354a22e7 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -50,7 +50,7 @@ ALTER TABLE `PREFIX_product_shop` MODIFY COLUMN `redirect_type` ENUM( ALTER TABLE `PREFIX_order_detail` MODIFY COLUMN `product_name` TEXT NOT NULL; ALTER TABLE `PREFIX_feature_flag` ADD `stability` VARCHAR(64) DEFAULT 'beta' NOT NULL; -UPDATE `PREFIX_feature_flag` SET `state` = '0', `stability` = 'stable', `label_wording` = 'New product page - Single store', `description_wording` = 'This page benefits from increased performance and includes new features such as a new combination management system.' where `name` = 'product_page_V2'; +UPDATE `PREFIX_feature_flag` SET `state` = '0', `stability` = 'stable', `label_wording` = 'New product page - Single store', `description_wording` = 'This page benefits from increased performance and includes new features such as a new combination management system.' WHERE `name` = 'product_page_V2'; INSERT INTO `PREFIX_feature_flag` (`name`, `state`, `label_wording`, `label_domain`, `description_wording`, `description_domain`, `stability`) VALUES ('product_page_v2_multi_shop', '0', 'New product page - Multi store', 'Admin.Advparameters.Feature', 'Access the new product page, even in a multistore context. This is a work in progress and some features are not available.', 'Admin.Advparameters.Help', 'beta'); From ed9981f2431bda170981d28d8a7528d3ba5bd5f5 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Wed, 8 Jun 2022 13:58:27 +0200 Subject: [PATCH 075/128] Add SQL Query relative to Fuzzy Search --- upgrade/sql/1.7.7.0.sql | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/upgrade/sql/1.7.7.0.sql b/upgrade/sql/1.7.7.0.sql index b1ee94d39..a8757d34b 100644 --- a/upgrade/sql/1.7.7.0.sql +++ b/upgrade/sql/1.7.7.0.sql @@ -5,7 +5,10 @@ ALTER DATABASE `DB_NAME` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci; INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_DISPLAY_MANUFACTURERS', '1', NOW(), NOW()), - ('PS_ORDER_PRODUCTS_NB_PER_PAGE', '8', NOW(), NOW()) + ('PS_ORDER_PRODUCTS_NB_PER_PAGE', '8', NOW(), NOW()), + ('PS_SEARCH_FUZZY', '1', NOW(), NOW()), + ('PS_SEARCH_FUZZY_MAX_LOOP', '4', NOW(), NOW()), + ('PS_SEARCH_MAX_WORD_LENGTH', '15', NOW(), NOW()) ; /* Add field MPN to tables */ From 394126494863c2cea5a0fe11d254822715e5b5fe Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Tue, 14 Jun 2022 20:06:16 +0200 Subject: [PATCH 076/128] update translated tab names --- upgrade/php/ps_800_update_tab_lang.php | 77 ++++++++++++++++++++++++++ upgrade/sql/8.0.0.sql | 2 + 2 files changed, 79 insertions(+) create mode 100644 upgrade/php/ps_800_update_tab_lang.php diff --git a/upgrade/php/ps_800_update_tab_lang.php b/upgrade/php/ps_800_update_tab_lang.php new file mode 100644 index 000000000..2f7d89351 --- /dev/null +++ b/upgrade/php/ps_800_update_tab_lang.php @@ -0,0 +1,77 @@ + + * @copyright Since 2007 PrestaShop SA and Contributors + * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) + */ + + +/** + * Updates ps_tab_lang table for a given domain and className + * + * This method will fetch the tab from className, and update ps_tab_lang + * with translated wordings for all available languages + * + * @param string $domain + * @param string $className + */ +function ps_800_update_tab_lang($domain, $className) +{ + $translator = Context::getContext()->getTranslator(); + + // get tab ID + $tabQuery = sprintf( + 'SELECT id_tab, wording FROM `%s_tab` WHERE `class_name` = "%s"', + _DB_PREFIX_, + $className + ); + $tab = Db::getInstance()->getRow($tabQuery); + + if (empty($tab)) { + return; + } + + // get languages + $languages = Language::getLanguages(); + + // for each language, update tab_lang + foreach ($languages as $lang) { + $idLang = (int) $lang['id_lang']; + $tabName = pSQL( + $translator->trans( + $tab['wording'], + [], + $domain, + $lang['locale'] + ) + ); + + $updateQuery = sprintf( + 'UPDATE %stab_lang SET `name` = %s WHERE `id_tab` = %s AND `id_lang` = %s', + _DB_PREFIX_, + $tabName, + $tab['id_tab'], + $idLang + ); + Db::getInstance()->execute($updateQuery); + } +} diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index c354a22e7..0d028c2ee 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -56,3 +56,5 @@ INSERT INTO `PREFIX_feature_flag` (`name`, `state`, `label_wording`, `label_doma VALUES ('product_page_v2_multi_shop', '0', 'New product page - Multi store', 'Admin.Advparameters.Feature', 'Access the new product page, even in a multistore context. This is a work in progress and some features are not available.', 'Admin.Advparameters.Help', 'beta'); UPDATE `PREFIX_tab` SET wording = 'New & Experimental Features' WHERE `class_name` = 'AdminFeatureFlag'; + +/* PHP:ps_800_update_tab_lang('Admin.Navigation.Menu', 'AdminFeatureFlag'); */; From d891bd7b6f112cde2c53e5885a57c7d1946af539 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Wed, 15 Jun 2022 11:10:36 +0200 Subject: [PATCH 077/128] add missing quotation mark to update query --- upgrade/php/ps_800_update_tab_lang.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/upgrade/php/ps_800_update_tab_lang.php b/upgrade/php/ps_800_update_tab_lang.php index 2f7d89351..6b7e1de21 100644 --- a/upgrade/php/ps_800_update_tab_lang.php +++ b/upgrade/php/ps_800_update_tab_lang.php @@ -55,7 +55,6 @@ function ps_800_update_tab_lang($domain, $className) // for each language, update tab_lang foreach ($languages as $lang) { - $idLang = (int) $lang['id_lang']; $tabName = pSQL( $translator->trans( $tab['wording'], @@ -66,11 +65,11 @@ function ps_800_update_tab_lang($domain, $className) ); $updateQuery = sprintf( - 'UPDATE %stab_lang SET `name` = %s WHERE `id_tab` = %s AND `id_lang` = %s', + 'UPDATE `%stab_lang` SET `name` = "%s" WHERE `id_tab` = "%s" AND `id_lang` = "%s"', _DB_PREFIX_, $tabName, $tab['id_tab'], - $idLang + $lang['id_lang'] ); Db::getInstance()->execute($updateQuery); } From 66c56eb497bcf2a95dd18abdf273c5c7216922d8 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Wed, 15 Jun 2022 11:47:54 +0200 Subject: [PATCH 078/128] fix sprintf query mask --- upgrade/php/ps_800_update_tab_lang.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upgrade/php/ps_800_update_tab_lang.php b/upgrade/php/ps_800_update_tab_lang.php index 6b7e1de21..b8182c1bc 100644 --- a/upgrade/php/ps_800_update_tab_lang.php +++ b/upgrade/php/ps_800_update_tab_lang.php @@ -40,7 +40,7 @@ function ps_800_update_tab_lang($domain, $className) // get tab ID $tabQuery = sprintf( - 'SELECT id_tab, wording FROM `%s_tab` WHERE `class_name` = "%s"', + 'SELECT id_tab, wording FROM `%stab` WHERE `class_name` = "%s"', _DB_PREFIX_, $className ); From 7b631d63192cd0cf17e367cdeabdb7b558c578d3 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Wed, 15 Jun 2022 12:40:56 +0200 Subject: [PATCH 079/128] cs fixer --- upgrade/php/ps_800_update_tab_lang.php | 1 - 1 file changed, 1 deletion(-) diff --git a/upgrade/php/ps_800_update_tab_lang.php b/upgrade/php/ps_800_update_tab_lang.php index b8182c1bc..7c020e3be 100644 --- a/upgrade/php/ps_800_update_tab_lang.php +++ b/upgrade/php/ps_800_update_tab_lang.php @@ -24,7 +24,6 @@ * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ - /** * Updates ps_tab_lang table for a given domain and className * From 1522b6288593253facf9ada30e8b623d473b4958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Gonz=C3=A1lez=20Garza?= Date: Tue, 8 Feb 2022 02:30:40 -0600 Subject: [PATCH 080/128] Updated PREFIX_state.name field to 80 chars. --- upgrade/sql/1.7.8.4.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 upgrade/sql/1.7.8.4.sql diff --git a/upgrade/sql/1.7.8.4.sql b/upgrade/sql/1.7.8.4.sql new file mode 100644 index 000000000..c7fae3727 --- /dev/null +++ b/upgrade/sql/1.7.8.4.sql @@ -0,0 +1,4 @@ +SET SESSION sql_mode=''; +SET NAMES 'utf8mb4'; + +ALTER TABLE `PREFIX_state` MODIFY COLUMN `name` VARCHAR(80) NOT NULL; From 9bade406fb6d8fd3adc7155b57b4e0d4b7cdb4dc Mon Sep 17 00:00:00 2001 From: Krystian Podemski Date: Sat, 9 Apr 2022 19:15:07 +0200 Subject: [PATCH 081/128] State field will be longer from 1.7.8.6, not .4 --- upgrade/sql/1.7.8.4.sql | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 upgrade/sql/1.7.8.4.sql diff --git a/upgrade/sql/1.7.8.4.sql b/upgrade/sql/1.7.8.4.sql deleted file mode 100644 index c7fae3727..000000000 --- a/upgrade/sql/1.7.8.4.sql +++ /dev/null @@ -1,4 +0,0 @@ -SET SESSION sql_mode=''; -SET NAMES 'utf8mb4'; - -ALTER TABLE `PREFIX_state` MODIFY COLUMN `name` VARCHAR(80) NOT NULL; From a847fcf25405c4cd4c84b7617c46e7b80655f9a7 Mon Sep 17 00:00:00 2001 From: matks Date: Thu, 28 Apr 2022 11:21:10 +0200 Subject: [PATCH 082/128] Bump version to 4.14.1 From 7e9d1bcd8b09244c1d5610012dd8ab0ed2a57ffb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 Jun 2022 02:22:55 +0000 Subject: [PATCH 083/128] Bump jpeg-js from 0.4.3 to 0.4.4 in /tests/e2e Bumps [jpeg-js](https://github.com/eugeneware/jpeg-js) from 0.4.3 to 0.4.4. - [Release notes](https://github.com/eugeneware/jpeg-js/releases) - [Commits](https://github.com/eugeneware/jpeg-js/compare/v0.4.3...v0.4.4) --- updated-dependencies: - dependency-name: jpeg-js dependency-type: indirect ... Signed-off-by: dependabot[bot] --- tests/e2e/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/e2e/package-lock.json b/tests/e2e/package-lock.json index c0dc5bdcb..17eeb1dcb 100644 --- a/tests/e2e/package-lock.json +++ b/tests/e2e/package-lock.json @@ -1495,9 +1495,9 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "jpeg-js": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.3.tgz", - "integrity": "sha512-ru1HWKek8octvUHFHvE5ZzQ1yAsJmIvRdGWvSoKV52XKyuyYA437QWDttXT8eZXDSbuMpHlLzPDZUPd6idIz+Q==" + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.4.tgz", + "integrity": "sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==" }, "js-tokens": { "version": "4.0.0", From f12473460e2404fc282b806f1f4b20899fd56b07 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Fri, 17 Jun 2022 15:03:54 +0200 Subject: [PATCH 084/128] rename ps_update_tab_lang --- .../php/{ps_800_update_tab_lang.php => ps_update_tab_lang.php} | 2 +- upgrade/sql/8.0.0.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename upgrade/php/{ps_800_update_tab_lang.php => ps_update_tab_lang.php} (97%) diff --git a/upgrade/php/ps_800_update_tab_lang.php b/upgrade/php/ps_update_tab_lang.php similarity index 97% rename from upgrade/php/ps_800_update_tab_lang.php rename to upgrade/php/ps_update_tab_lang.php index 7c020e3be..e5631c13d 100644 --- a/upgrade/php/ps_800_update_tab_lang.php +++ b/upgrade/php/ps_update_tab_lang.php @@ -33,7 +33,7 @@ * @param string $domain * @param string $className */ -function ps_800_update_tab_lang($domain, $className) +function ps_update_tab_lang($domain, $className) { $translator = Context::getContext()->getTranslator(); diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index 0d028c2ee..a35eefd00 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -57,4 +57,4 @@ VALUES ('product_page_v2_multi_shop', '0', 'New product page - Multi store', 'Ad UPDATE `PREFIX_tab` SET wording = 'New & Experimental Features' WHERE `class_name` = 'AdminFeatureFlag'; -/* PHP:ps_800_update_tab_lang('Admin.Navigation.Menu', 'AdminFeatureFlag'); */; +/* PHP:ps_update_tab_lang('Admin.Navigation.Menu', 'AdminFeatureFlag'); */; From 2ae16e5270273b1c209a2e41e11db1db2c2aac6a Mon Sep 17 00:00:00 2001 From: Jonathan Lelievre Date: Fri, 17 Dec 2021 16:58:22 +0100 Subject: [PATCH 085/128] Add SQL upgrade queries for new unit price column --- upgrade/sql/8.0.0.sql | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index 2e4ff02fd..4736980b5 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -50,6 +50,13 @@ ALTER TABLE `PREFIX_product_shop` MODIFY COLUMN `redirect_type` ENUM( ALTER TABLE `PREFIX_order_detail` MODIFY COLUMN `product_name` TEXT NOT NULL; +ALTER TABLE `PREFIX_product` ADD `unit_price` decimal(20, 6) NOT NULL DEFAULT '0.000000' AFTER `unity`; +ALTER TABLE `PREFIX_product_shop` ADD `unit_price` decimal(20, 6) NOT NULL DEFAULT '0.000000' AFTER `unity`; + +UPDATE `PREFIX_product` SET `unit_price` = IF (`unit_price_ratio` != 0, `price` / `unit_price_ratio`, 0); +UPDATE `PREFIX_product_shop` SET `unit_price` = IF (`unit_price_ratio` != 0, `price` / `unit_price_ratio`, 0); + + ALTER TABLE `PREFIX_feature_flag` ADD `stability` VARCHAR(64) DEFAULT 'beta' NOT NULL; UPDATE `PREFIX_feature_flag` SET `state` = '0', `stability` = 'stable', `label_wording` = 'New product page - Single store', `description_wording` = 'This page benefits from increased performance and includes new features such as a new combination management system.' WHERE `name` = 'product_page_V2'; From 7cee1cb4a7e22870404d0a0c78884bbadcbdace9 Mon Sep 17 00:00:00 2001 From: Okom3pom Date: Fri, 28 Jan 2022 14:27:46 +0100 Subject: [PATCH 086/128] Updater quick access link Reabse --- upgrade/sql/8.0.0.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index 2e4ff02fd..f1f136b0b 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -59,3 +59,5 @@ VALUES ('product_page_v2_multi_shop', '0', 'New product page - Multi store', 'Ad UPDATE `PREFIX_tab` SET wording = 'New & Experimental Features' WHERE `class_name` = 'AdminFeatureFlag'; /* PHP:ps_update_tab_lang('Admin.Navigation.Menu', 'AdminFeatureFlag'); */; + +UPDATE `PREFIX_quick_access` SET `link` = 'index.php/sell/orders' WHERE `link` = 'index.php?controller=AdminOrders'; From 13659da0cc02fa3b32a125da0005d4eba07ded63 Mon Sep 17 00:00:00 2001 From: Nicolas Sorosac Date: Fri, 22 Apr 2022 12:19:34 +0200 Subject: [PATCH 087/128] Adding the PATCH method to the REST API (webservices) Need this SQL upgrade for this PR: https://github.com/PrestaShop/PrestaShop/pull/27952 --- upgrade/sql/8.0.0.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index 4736980b5..19b6de6f7 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -50,6 +50,10 @@ ALTER TABLE `PREFIX_product_shop` MODIFY COLUMN `redirect_type` ENUM( ALTER TABLE `PREFIX_order_detail` MODIFY COLUMN `product_name` TEXT NOT NULL; +ALTER TABLE `PREFIX_webservice_permission` MODIFY COLUMN `method` ENUM( + 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD' +) NOT NULL; + ALTER TABLE `PREFIX_product` ADD `unit_price` decimal(20, 6) NOT NULL DEFAULT '0.000000' AFTER `unity`; ALTER TABLE `PREFIX_product_shop` ADD `unit_price` decimal(20, 6) NOT NULL DEFAULT '0.000000' AFTER `unity`; From e2ccb2b46d941249104c383d45333dc7eae36fa7 Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Thu, 3 Mar 2022 11:44:55 +0100 Subject: [PATCH 088/128] Remove Tab for Referrers Page --- upgrade/sql/8.0.0.sql | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index 4736980b5..b78cbfcd7 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -5,6 +5,29 @@ DROP TABLE IF EXISTS `PREFIX_referrer`; DROP TABLE IF EXISTS `PREFIX_referrer_cache`; DROP TABLE IF EXISTS `PREFIX_referrer_shop`; +/* Remove page Referrers */ +## Remove Tabs +DELETE FROM `PREFIX_tab` WHERE `class_name` = 'AdminReferrers'; +DELETE FROM `PREFIX_tab_lang` WHERE `id_tab` NOT IN (SELECT id_tab FROM `PREFIX_tab`); +## Remove Roles +DELETE FROM `PREFIX_access` WHERE `id_tab` NOT IN (SELECT id_tab FROM `PREFIX_tab`); +/* For SalesMan profile, remove parent tab `Traffic & SEO` */ +DELETE FROM `PREFIX_access` + WHERE `id_authorization_role` IN (SELECT `id_authorization_role` FROM `PREFIX_authorization_role` WHERE `slug` LIKE 'ROLE_MOD_TAB_ADMINPARENTMETA_%') + AND `id_profile` = 4; +DELETE FROM `PREFIX_authorization_role` + WHERE `slug` LIKE 'ROLE_MOD_TAB_ADMINREFERRERS_%'; +## Remove Configuration +DELETE FROM `PREFIX_configuration` + WHERE `name` IN ('PS_REFERRERS_CACHE_LIKE', 'PS_REFERRERS_CACHE_DATE'); +## Remove Quick Access +DELETE FROM `PREFIX_quick_access_lang` + WHERE id_quick_access IN ( + SELECT id_quick_access FROM `PREFIX_quick_access` WHERE link LIKE '%controller=AdminReferrers%' + ); +DELETE FROM `PREFIX_quick_access` + WHERE link LIKE '%controller=AdminReferrers%'; + INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_MAIL_DKIM_ENABLE', '0', NOW(), NOW()), ('PS_MAIL_DKIM_DOMAIN', '', NOW(), NOW()), From ce1a221dd094aa258edf30a52e5b318fec37ed80 Mon Sep 17 00:00:00 2001 From: Thomas BACCELLI Date: Tue, 26 Jul 2022 15:14:46 +0200 Subject: [PATCH 089/128] Remove PS_SMARTY_CACHING_TYPE configuration in 1.7.8.8 --- upgrade/sql/1.7.8.8.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 upgrade/sql/1.7.8.8.sql diff --git a/upgrade/sql/1.7.8.8.sql b/upgrade/sql/1.7.8.8.sql new file mode 100644 index 000000000..39e391f93 --- /dev/null +++ b/upgrade/sql/1.7.8.8.sql @@ -0,0 +1,4 @@ +SET SESSION sql_mode=''; +SET NAMES 'utf8'; + +DELETE FROM `PREFIX_configuration` WHERE `name` = 'PS_SMARTY_CACHING_TYPE'; From 628b6036e6e82793509518174a040c27e454478a Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Wed, 17 Aug 2022 14:30:45 +0200 Subject: [PATCH 090/128] disabled non native modules on PS8.0 and onward --- .../CoreUpgrader/CoreUpgrader80.php | 21 +++++++++++++++++++ classes/UpgradeTools/ModuleAdapter.php | 17 +++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php index 7fa6de321..79f6951dc 100644 --- a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php +++ b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php @@ -31,6 +31,7 @@ use PrestaShop\Module\AutoUpgrade\UpgradeException; use PrestaShop\PrestaShop\Core\CommandBus\CommandBusInterface; use PrestaShop\PrestaShop\Core\Domain\MailTemplate\Command\GenerateThemeMailTemplatesCommand; +use PrestaShop\PrestaShop\Core\Domain\Module\Command\BulkToggleModuleStatusCommand; use PrestaShop\PrestaShop\Core\Exception\CoreException; class CoreUpgrader80 extends CoreUpgrader @@ -100,4 +101,24 @@ protected function upgradeLanguage($lang) // TODO: Update AdminTranslationsController::addNewTabs to install tabs translated } + + /** + * Ask the core to disable the modules not coming from PrestaShop. + */ + protected function disableCustomModules() + { + try { + $bulkToggleModuleStatusCommand = new BulkToggleModuleStatusCommand( + $this->container->getModuleAdapter()->getModuleRepository()->getNonNativeModules(), + false + ); + + /** @var CommandBusInterface $commandBus */ + $commandBus = $this->container->getModuleAdapter()->getCommandBus(); + + $commandBus->handle($bulkToggleModuleStatusCommand); + } catch (\Exception $e) { + throw new UpgradeException($e->getMessage()); + } + } } diff --git a/classes/UpgradeTools/ModuleAdapter.php b/classes/UpgradeTools/ModuleAdapter.php index b158701ef..db1021131 100644 --- a/classes/UpgradeTools/ModuleAdapter.php +++ b/classes/UpgradeTools/ModuleAdapter.php @@ -54,6 +54,8 @@ class ModuleAdapter private $commandBus; + private $moduleRepository; + public function __construct($db, $translator, $modulesPath, $tempPath, $upgradeVersion, ZipAction $zipAction, SymfonyAdapter $symfonyAdapter) { $this->db = $db; @@ -99,6 +101,21 @@ public function getCommandBus() return $this->commandBus; } + /** + * Available since PrestaShop 8.0 + */ + public function getModuleRepository() + { + if (null === $this->moduleRepository) { + $this->moduleRepository = $this->symfonyAdapter + ->initAppKernel() + ->getContainer() + ->get('prestashop.adapter.module.repository.module_repository'); + } + + return $this->moduleRepository; + } + /** * Upgrade action, disabling all modules not made by PrestaShop. * From 052b9809eed503b8b88d90f0759e7999b849df7d Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Wed, 17 Aug 2022 17:13:18 +0200 Subject: [PATCH 091/128] ignore CoreUpgrader80 in phpstan latest --- tests/phpstan/phpstan-latest.neon | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/phpstan/phpstan-latest.neon b/tests/phpstan/phpstan-latest.neon index ebbff783a..9869952bc 100644 --- a/tests/phpstan/phpstan-latest.neon +++ b/tests/phpstan/phpstan-latest.neon @@ -2,6 +2,8 @@ includes: - %currentWorkingDirectory%/tests/phpstan/phpstan.neon parameters: + excludes_analyse: + - ./../../classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php ignoreErrors: - '#Access to an undefined property Module::\$installed.#' - '#Call to method fetchLocale\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Cldr\\Update.#' From c30773c105f3c7566213c1bc4fa6a6d7e8912b85 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Wed, 17 Aug 2022 17:19:58 +0200 Subject: [PATCH 092/128] fix spaces tab thing --- tests/phpstan/phpstan-latest.neon | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpstan/phpstan-latest.neon b/tests/phpstan/phpstan-latest.neon index 9869952bc..5aba843bc 100644 --- a/tests/phpstan/phpstan-latest.neon +++ b/tests/phpstan/phpstan-latest.neon @@ -2,8 +2,8 @@ includes: - %currentWorkingDirectory%/tests/phpstan/phpstan.neon parameters: - excludes_analyse: - - ./../../classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php + excludes_analyse: + - ./../../classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php ignoreErrors: - '#Access to an undefined property Module::\$installed.#' - '#Call to method fetchLocale\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Cldr\\Update.#' From 4a68cbf0044b8c971724d90d38f39ba2a26b7b5a Mon Sep 17 00:00:00 2001 From: Julius Zukauskas Date: Mon, 22 Aug 2022 08:35:46 +0300 Subject: [PATCH 093/128] sql instert configuration values for password policy --- upgrade/sql/8.0.0.sql | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index 798568066..f84305660 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -91,3 +91,10 @@ UPDATE `PREFIX_tab` SET wording = 'New & Experimental Features' WHERE `class_nam /* PHP:ps_update_tab_lang('Admin.Navigation.Menu', 'AdminFeatureFlag'); */; UPDATE `PREFIX_quick_access` SET `link` = 'index.php/sell/orders' WHERE `link` = 'index.php?controller=AdminOrders'; + +/* Insert new password policy configuration values */ +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES + ('PS_SECURITY_PASSWORD_POLICY_MAXIMUM_LENGTH', '72', NOW(), NOW()), + ('PS_SECURITY_PASSWORD_POLICY_MINIMUM_LENGTH', '8', NOW(), NOW()), + ('PS_SECURITY_PASSWORD_POLICY_MINIMUM_SCORE', '3', NOW(), NOW()) +; From 8fbecfd96f453e9f4813d2b993d66ccb912b2a33 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Tue, 30 Aug 2022 17:02:59 +0200 Subject: [PATCH 094/128] update --- .../CoreUpgrader/CoreUpgrader80.php | 19 ++-------- classes/UpgradeTools/ModuleAdapter.php | 6 ++++ upgrade/php/deactivate_custom_modules.php | 36 +++++++++++++++++++ 3 files changed, 45 insertions(+), 16 deletions(-) diff --git a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php index 79f6951dc..30f8e9cdb 100644 --- a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php +++ b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php @@ -33,6 +33,7 @@ use PrestaShop\PrestaShop\Core\Domain\MailTemplate\Command\GenerateThemeMailTemplatesCommand; use PrestaShop\PrestaShop\Core\Domain\Module\Command\BulkToggleModuleStatusCommand; use PrestaShop\PrestaShop\Core\Exception\CoreException; +use PrestaShop\PrestaShop\Adapter\Module\Repository\ModuleRepository; class CoreUpgrader80 extends CoreUpgrader { @@ -102,23 +103,9 @@ protected function upgradeLanguage($lang) // TODO: Update AdminTranslationsController::addNewTabs to install tabs translated } - /** - * Ask the core to disable the modules not coming from PrestaShop. - */ protected function disableCustomModules() { - try { - $bulkToggleModuleStatusCommand = new BulkToggleModuleStatusCommand( - $this->container->getModuleAdapter()->getModuleRepository()->getNonNativeModules(), - false - ); - - /** @var CommandBusInterface $commandBus */ - $commandBus = $this->container->getModuleAdapter()->getCommandBus(); - - $commandBus->handle($bulkToggleModuleStatusCommand); - } catch (\Exception $e) { - throw new UpgradeException($e->getMessage()); - } + $moduleRepository = new ModuleRepository(_PS_ROOT_DIR_, _PS_MODULE_DIR_); + $this->container->getModuleAdapter()->disableNonNativeModules80($this->pathToUpgradeScripts, $moduleRepository); } } diff --git a/classes/UpgradeTools/ModuleAdapter.php b/classes/UpgradeTools/ModuleAdapter.php index db1021131..46591df89 100644 --- a/classes/UpgradeTools/ModuleAdapter.php +++ b/classes/UpgradeTools/ModuleAdapter.php @@ -129,6 +129,12 @@ public function disableNonNativeModules($pathToUpgradeScripts) deactivate_custom_modules(); } + public function disableNonNativeModules80($pathToUpgradeScripts, $moduleRepository) + { + require_once $pathToUpgradeScripts . 'php/deactivate_custom_modules.php'; + deactivate_custom_modules80($moduleRepository); + } + /** * list modules to upgrade and save them in a serialized array in $this->toUpgradeModuleList. * diff --git a/upgrade/php/deactivate_custom_modules.php b/upgrade/php/deactivate_custom_modules.php index 1a7230ae1..b9af03f79 100644 --- a/upgrade/php/deactivate_custom_modules.php +++ b/upgrade/php/deactivate_custom_modules.php @@ -95,3 +95,39 @@ function deactivate_custom_modules() return $return; } + +function deactivate_custom_modules80($moduleRepository) +{ + $nonNativeModulesList = $moduleRepository->getNonNativeModules(); + + $return = Db::getInstance()->execute( + 'UPDATE `' . _DB_PREFIX_ . 'module` SET `active` = 0 WHERE `name` IN (' . implode(',', array_map('add_quotes', $nonNativeModulesList)) . ')' + ); + + $nonNativeModules = \Db::getInstance()->executeS(' + SELECT * + FROM `' . _DB_PREFIX_ . 'module` m + WHERE name IN (' . implode(',', array_map('add_quotes', $nonNativeModulesList)) . ') '); + + if (!is_array($nonNativeModules) || empty($nonNativeModules)) { + return $return; + } + + $toBeUninstalled = []; + foreach ($nonNativeModules as $k => $aModule) { + $toBeUninstalled[] = (int) $aModule['id_module']; + } + + if (empty($toBeUninstalled)) { + return $return; + } + + $sql = 'DELETE FROM `' . _DB_PREFIX_ . 'module_shop` WHERE `id_module` IN (' . implode(',', array_map('add_quotes', $toBeUninstalled)) . ') '; + $return &= Db::getInstance()->execute($sql); + + return $return; +} + +function add_quotes($str) { + return sprintf("'%s'", $str); +} From 401323b386d13ecba7311be795f3e1fbafeb3de3 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Wed, 31 Aug 2022 11:36:02 +0200 Subject: [PATCH 095/128] ci fixes --- classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php | 3 +-- tests/phpstan/phpstan-1.7.7.neon | 1 + upgrade/php/deactivate_custom_modules.php | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php index 30f8e9cdb..1989a0a18 100644 --- a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php +++ b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php @@ -29,11 +29,10 @@ namespace PrestaShop\Module\AutoUpgrade\UpgradeTools\CoreUpgrader; use PrestaShop\Module\AutoUpgrade\UpgradeException; +use PrestaShop\PrestaShop\Adapter\Module\Repository\ModuleRepository; use PrestaShop\PrestaShop\Core\CommandBus\CommandBusInterface; use PrestaShop\PrestaShop\Core\Domain\MailTemplate\Command\GenerateThemeMailTemplatesCommand; -use PrestaShop\PrestaShop\Core\Domain\Module\Command\BulkToggleModuleStatusCommand; use PrestaShop\PrestaShop\Core\Exception\CoreException; -use PrestaShop\PrestaShop\Adapter\Module\Repository\ModuleRepository; class CoreUpgrader80 extends CoreUpgrader { diff --git a/tests/phpstan/phpstan-1.7.7.neon b/tests/phpstan/phpstan-1.7.7.neon index 5aba843bc..736333613 100644 --- a/tests/phpstan/phpstan-1.7.7.neon +++ b/tests/phpstan/phpstan-1.7.7.neon @@ -8,4 +8,5 @@ parameters: - '#Access to an undefined property Module::\$installed.#' - '#Call to method fetchLocale\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Cldr\\Update.#' - '#Function deactivate_custom_modules not found.#' + - '#Function deactivate_custom_modules80 not found.#' - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Cldr\\Update not found.#' diff --git a/upgrade/php/deactivate_custom_modules.php b/upgrade/php/deactivate_custom_modules.php index b9af03f79..0d8d8d1fc 100644 --- a/upgrade/php/deactivate_custom_modules.php +++ b/upgrade/php/deactivate_custom_modules.php @@ -128,6 +128,7 @@ function deactivate_custom_modules80($moduleRepository) return $return; } -function add_quotes($str) { +function add_quotes($str) +{ return sprintf("'%s'", $str); } From d60e1b981f07817aaa94c13cd10d85703810eee0 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Wed, 31 Aug 2022 11:43:42 +0200 Subject: [PATCH 096/128] ignore phpstan function not found error --- classes/UpgradeTools/ModuleAdapter.php | 15 --------------- tests/phpstan/phpstan-1.6.1.18.neon | 1 - tests/phpstan/phpstan-1.7.2.5.neon | 1 - tests/phpstan/phpstan-1.7.3.4.neon | 1 - tests/phpstan/phpstan-1.7.4.4.neon | 1 - tests/phpstan/phpstan-1.7.5.1.neon | 1 - tests/phpstan/phpstan-1.7.6.neon | 1 - tests/phpstan/phpstan-1.7.7.neon | 2 -- tests/phpstan/phpstan-1.7.8.neon | 1 - tests/phpstan/phpstan-latest.neon | 1 - tests/phpstan/phpstan.neon | 1 + upgrade/php/deactivate_custom_modules.php | 2 +- 12 files changed, 2 insertions(+), 26 deletions(-) diff --git a/classes/UpgradeTools/ModuleAdapter.php b/classes/UpgradeTools/ModuleAdapter.php index 46591df89..99ef95f62 100644 --- a/classes/UpgradeTools/ModuleAdapter.php +++ b/classes/UpgradeTools/ModuleAdapter.php @@ -101,21 +101,6 @@ public function getCommandBus() return $this->commandBus; } - /** - * Available since PrestaShop 8.0 - */ - public function getModuleRepository() - { - if (null === $this->moduleRepository) { - $this->moduleRepository = $this->symfonyAdapter - ->initAppKernel() - ->getContainer() - ->get('prestashop.adapter.module.repository.module_repository'); - } - - return $this->moduleRepository; - } - /** * Upgrade action, disabling all modules not made by PrestaShop. * diff --git a/tests/phpstan/phpstan-1.6.1.18.neon b/tests/phpstan/phpstan-1.6.1.18.neon index fb1b3ab9e..eaee787c9 100644 --- a/tests/phpstan/phpstan-1.6.1.18.neon +++ b/tests/phpstan/phpstan-1.6.1.18.neon @@ -19,7 +19,6 @@ parameters: - '#Call to method assign\(\) on an unknown class Smarty.#' - '#Call to method fetch\(\) on an unknown class Smarty.#' - '#Call to method getContainer\(\) on an unknown class AppKernel.#' - - '#Function deactivate_custom_modules not found.#' - '#PrestaShop\\PrestaShop\\Adapter\\Module\\ModuleDataUpdater#' - '#Property ModuleCore::\$version \(float\) does not accept string.#' - '#Return typehint of method PrestaShop\\Module\\AutoUpgrade\\UpgradeTools\\ModuleAdapter::getCommandBus\(\) has invalid type PrestaShop\\PrestaShop\\Core\\CommandBus\\TacticianCommandBusAdapter.#' diff --git a/tests/phpstan/phpstan-1.7.2.5.neon b/tests/phpstan/phpstan-1.7.2.5.neon index c89b3643a..48756f7cb 100644 --- a/tests/phpstan/phpstan-1.7.2.5.neon +++ b/tests/phpstan/phpstan-1.7.2.5.neon @@ -15,7 +15,6 @@ parameters: - '#Call to method loadClassCache\(\) on an unknown class AppKernel.#' - '#Caught class PrestaShop\\PrestaShop\\Core\\Exception\\CoreException not found.#' - '#Class AppKernel not found.#' - - '#Function deactivate_custom_modules not found.#' - '#Instantiated class AppKernel not found.#' - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Domain\\Theme\\ValueObject\\ThemeName not found.#' - '#PHPDoc tag @var for variable \$commandBus contains unknown class PrestaShop\\PrestaShop\\Core\\CommandBus\\CommandBusInterface.#' diff --git a/tests/phpstan/phpstan-1.7.3.4.neon b/tests/phpstan/phpstan-1.7.3.4.neon index c89b3643a..48756f7cb 100644 --- a/tests/phpstan/phpstan-1.7.3.4.neon +++ b/tests/phpstan/phpstan-1.7.3.4.neon @@ -15,7 +15,6 @@ parameters: - '#Call to method loadClassCache\(\) on an unknown class AppKernel.#' - '#Caught class PrestaShop\\PrestaShop\\Core\\Exception\\CoreException not found.#' - '#Class AppKernel not found.#' - - '#Function deactivate_custom_modules not found.#' - '#Instantiated class AppKernel not found.#' - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Domain\\Theme\\ValueObject\\ThemeName not found.#' - '#PHPDoc tag @var for variable \$commandBus contains unknown class PrestaShop\\PrestaShop\\Core\\CommandBus\\CommandBusInterface.#' diff --git a/tests/phpstan/phpstan-1.7.4.4.neon b/tests/phpstan/phpstan-1.7.4.4.neon index aa06b6516..a6af43d6d 100644 --- a/tests/phpstan/phpstan-1.7.4.4.neon +++ b/tests/phpstan/phpstan-1.7.4.4.neon @@ -11,7 +11,6 @@ parameters: - '#Call to method getMessage\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Exception\\CoreException.#' - '#Call to method handle\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\CommandBus\\CommandBusInterface.#' - '#Caught class PrestaShop\\PrestaShop\\Core\\Exception\\CoreException not found.#' - - '#Function deactivate_custom_modules not found.#' - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Domain\\Theme\\ValueObject\\ThemeName not found.#' - '#PHPDoc tag @var for variable \$commandBus contains unknown class PrestaShop\\PrestaShop\\Core\\CommandBus\\CommandBusInterface.#' - '#Property ModuleCore::\$version \(float\) does not accept string.#' diff --git a/tests/phpstan/phpstan-1.7.5.1.neon b/tests/phpstan/phpstan-1.7.5.1.neon index f228e2ad0..315f0a9a4 100644 --- a/tests/phpstan/phpstan-1.7.5.1.neon +++ b/tests/phpstan/phpstan-1.7.5.1.neon @@ -8,6 +8,5 @@ parameters: - '#Access to an undefined property Autoupgrade::\$bootstrap.#' - '#Access to an undefined property Module::\$installed.#' - '#Call to an undefined static method ConfigurationTest::test_memory_limit\(\).#' - - '#Function deactivate_custom_modules not found.#' - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Domain\\Theme\\ValueObject\\ThemeName not found.#' - '#Property ModuleCore::\$version \(float\) does not accept string.#' diff --git a/tests/phpstan/phpstan-1.7.6.neon b/tests/phpstan/phpstan-1.7.6.neon index 45eed3c13..94c20235c 100644 --- a/tests/phpstan/phpstan-1.7.6.neon +++ b/tests/phpstan/phpstan-1.7.6.neon @@ -9,7 +9,6 @@ parameters: - '#Access to an undefined property Module::\$installed.#' - '#Call to an undefined static method ConfigurationTest::test_memory_limit\(\).#' - '#Call to method fetchLocale\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Cldr\\Update.#' - - '#Function deactivate_custom_modules not found.#' - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Cldr\\Update not found.#' - '#Parameter \#1 \$id_hook of method ModuleCore::updatePosition\(\) expects bool, int given.#' - '#Property ModuleCore::\$version \(float\) does not accept string.#' diff --git a/tests/phpstan/phpstan-1.7.7.neon b/tests/phpstan/phpstan-1.7.7.neon index 736333613..302d07712 100644 --- a/tests/phpstan/phpstan-1.7.7.neon +++ b/tests/phpstan/phpstan-1.7.7.neon @@ -7,6 +7,4 @@ parameters: ignoreErrors: - '#Access to an undefined property Module::\$installed.#' - '#Call to method fetchLocale\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Cldr\\Update.#' - - '#Function deactivate_custom_modules not found.#' - - '#Function deactivate_custom_modules80 not found.#' - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Cldr\\Update not found.#' diff --git a/tests/phpstan/phpstan-1.7.8.neon b/tests/phpstan/phpstan-1.7.8.neon index 94bf1b5eb..f7fd6891a 100644 --- a/tests/phpstan/phpstan-1.7.8.neon +++ b/tests/phpstan/phpstan-1.7.8.neon @@ -7,6 +7,5 @@ parameters: ignoreErrors: - '#Access to an undefined property Module::\$installed.#' - '#Call to method fetchLocale\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Cldr\\Update.#' - - '#Function deactivate_custom_modules not found.#' - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Cldr\\Update not found.#' diff --git a/tests/phpstan/phpstan-latest.neon b/tests/phpstan/phpstan-latest.neon index 5aba843bc..302d07712 100644 --- a/tests/phpstan/phpstan-latest.neon +++ b/tests/phpstan/phpstan-latest.neon @@ -7,5 +7,4 @@ parameters: ignoreErrors: - '#Access to an undefined property Module::\$installed.#' - '#Call to method fetchLocale\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Cldr\\Update.#' - - '#Function deactivate_custom_modules not found.#' - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Cldr\\Update not found.#' diff --git a/tests/phpstan/phpstan.neon b/tests/phpstan/phpstan.neon index 5e9dadfe8..ca9525924 100644 --- a/tests/phpstan/phpstan.neon +++ b/tests/phpstan/phpstan.neon @@ -4,6 +4,7 @@ parameters: paths: # From PHPStan 0.12, paths to check are relative to the neon file - ./../../classes + - ./../../upgrade/php/deactivate_custom_modules.php - ./../../AdminSelfUpgrade.php - ./../../ajax-upgradetab.php - ./../../ajax-upgradetabconfig.php diff --git a/upgrade/php/deactivate_custom_modules.php b/upgrade/php/deactivate_custom_modules.php index 0d8d8d1fc..4af64577e 100644 --- a/upgrade/php/deactivate_custom_modules.php +++ b/upgrade/php/deactivate_custom_modules.php @@ -51,7 +51,7 @@ function deactivate_custom_modules() $nativeModules = $nativeModules->modules; } $arrNativeModules = []; - if (is_array($nativeModules)) { + if (!empty($nativeModules)) { foreach ($nativeModules as $nativeModulesType) { if (in_array($nativeModulesType['type'], ['native', 'partner'])) { $arrNativeModules[] = '""'; From 7bc13743f62ebfea4a784ebe2b2eafdd2711e052 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Wed, 31 Aug 2022 18:04:21 +0200 Subject: [PATCH 097/128] add phpstan configuration for beta --- .github/workflows/php.yml | 2 +- classes/UpgradeTools/ModuleAdapter.php | 2 -- tests/phpstan/phpstan-8.0-beta.1.neon | 8 ++++++++ 3 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 tests/phpstan/phpstan-8.0-beta.1.neon diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 5060b84b4..3fd3a0f62 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -91,7 +91,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - presta-versions: ['1.6.1.18', '1.7.2.5', '1.7.3.4', '1.7.4.4', '1.7.5.1', '1.7.6', '1.7.7', '1.7.8', 'latest'] + presta-versions: ['1.6.1.18', '1.7.2.5', '1.7.3.4', '1.7.4.4', '1.7.5.1', '1.7.6', '1.7.7', '1.7.8', 'latest', '8.0-beta.1'] steps: - name: Checkout uses: actions/checkout@v2.0.0 diff --git a/classes/UpgradeTools/ModuleAdapter.php b/classes/UpgradeTools/ModuleAdapter.php index 99ef95f62..d291ae713 100644 --- a/classes/UpgradeTools/ModuleAdapter.php +++ b/classes/UpgradeTools/ModuleAdapter.php @@ -54,8 +54,6 @@ class ModuleAdapter private $commandBus; - private $moduleRepository; - public function __construct($db, $translator, $modulesPath, $tempPath, $upgradeVersion, ZipAction $zipAction, SymfonyAdapter $symfonyAdapter) { $this->db = $db; diff --git a/tests/phpstan/phpstan-8.0-beta.1.neon b/tests/phpstan/phpstan-8.0-beta.1.neon new file mode 100644 index 000000000..fb0d53275 --- /dev/null +++ b/tests/phpstan/phpstan-8.0-beta.1.neon @@ -0,0 +1,8 @@ +includes: + - %currentWorkingDirectory%/tests/phpstan/phpstan.neon + +parameters: + ignoreErrors: + - '#Access to an undefined property Module::\$installed.#' + - '#Call to method fetchLocale\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Cldr\\Update.#' + - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Cldr\\Update not found.#' From d389a260e51c70a223047342ed20aa7ba6697131 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Wed, 31 Aug 2022 18:32:37 +0200 Subject: [PATCH 098/128] rename ps8 beta neon file --- .github/workflows/php.yml | 2 +- tests/phpstan/phpstan-8.0-beta.1.neon | 8 -------- tests/phpstan/phpstan-8.0.0-beta.1.neon | 8 ++++++++ 3 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 tests/phpstan/phpstan-8.0-beta.1.neon create mode 100644 tests/phpstan/phpstan-8.0.0-beta.1.neon diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 3fd3a0f62..fa832f327 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -91,7 +91,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - presta-versions: ['1.6.1.18', '1.7.2.5', '1.7.3.4', '1.7.4.4', '1.7.5.1', '1.7.6', '1.7.7', '1.7.8', 'latest', '8.0-beta.1'] + presta-versions: ['1.6.1.18', '1.7.2.5', '1.7.3.4', '1.7.4.4', '1.7.5.1', '1.7.6', '1.7.7', '1.7.8', 'latest', '8.0.0-beta.1'] steps: - name: Checkout uses: actions/checkout@v2.0.0 diff --git a/tests/phpstan/phpstan-8.0-beta.1.neon b/tests/phpstan/phpstan-8.0-beta.1.neon deleted file mode 100644 index fb0d53275..000000000 --- a/tests/phpstan/phpstan-8.0-beta.1.neon +++ /dev/null @@ -1,8 +0,0 @@ -includes: - - %currentWorkingDirectory%/tests/phpstan/phpstan.neon - -parameters: - ignoreErrors: - - '#Access to an undefined property Module::\$installed.#' - - '#Call to method fetchLocale\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Cldr\\Update.#' - - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Cldr\\Update not found.#' diff --git a/tests/phpstan/phpstan-8.0.0-beta.1.neon b/tests/phpstan/phpstan-8.0.0-beta.1.neon new file mode 100644 index 000000000..bed239fdf --- /dev/null +++ b/tests/phpstan/phpstan-8.0.0-beta.1.neon @@ -0,0 +1,8 @@ +includes: + - %currentWorkingDirectory%/tests/phpstan/phpstan.neon + +parameters: + excludes_analyse: + - ./../../classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php + - ./../../classes/Twig/TransFilterExtension.php + - ./../../classes/UpgradeContainer.php From d79651355e31cb3a989c92ee5b07dad77c5a478b Mon Sep 17 00:00:00 2001 From: Jonathan Lelievre Date: Mon, 22 Aug 2022 16:39:18 +0200 Subject: [PATCH 099/128] Add auto generated hooks via Core command for 8.0.0 --- upgrade/sql/8.0.0.sql | 130 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index f84305660..2eb9f7321 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -53,6 +53,136 @@ INSERT IGNORE INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `po (NULL, 'actionGetAlternativeSearchPanels', 'Additional search panel', 'This hook allows to add an additional search panel for external providers in PrestaShop back office', '1') ; +/* Auto generated hooks added for version 8.0.0 */ +INSERT IGNORE INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `position`) VALUES + (NULL, 'actionCreateProductFormBuilderModifier', 'Modify create product identifiable object form', 'This hook allows to modify create product identifiable object forms content by modifying form builder data or FormBuilder itself', '1'), + (NULL, 'actionCombinationListFormBuilderModifier', 'Modify combination list identifiable object form', 'This hook allows to modify combination list identifiable object forms content by modifying form builder data or FormBuilder itself', '1'), + (NULL, 'actionProductImageFormBuilderModifier', 'Modify product image identifiable object form', 'This hook allows to modify product image identifiable object forms content by modifying form builder data or FormBuilder itself', '1'), + (NULL, 'actionSearchEngineFormBuilderModifier', 'Modify search engine identifiable object form', 'This hook allows to modify search engine identifiable object forms content by modifying form builder data or FormBuilder itself', '1'), + (NULL, 'actionCategoryTreeSelectorFormBuilderModifier', 'Modify category tree selector identifiable object form', 'This hook allows to modify category tree selector identifiable object forms content by modifying form builder data or FormBuilder itself', '1'), + (NULL, 'actionSqlRequestFormDataProviderData', 'Provide sql request identifiable object form data for update', 'This hook allows to provide sql request identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionCustomerFormDataProviderData', 'Provide customer identifiable object form data for update', 'This hook allows to provide customer identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionLanguageFormDataProviderData', 'Provide language identifiable object form data for update', 'This hook allows to provide language identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionCurrencyFormDataProviderData', 'Provide currency identifiable object form data for update', 'This hook allows to provide currency identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionWebserviceKeyFormDataProviderData', 'Provide webservice key identifiable object form data for update', 'This hook allows to provide webservice key identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionMetaFormDataProviderData', 'Provide meta identifiable object form data for update', 'This hook allows to provide meta identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionCategoryFormDataProviderData', 'Provide category identifiable object form data for update', 'This hook allows to provide category identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionRootCategoryFormDataProviderData', 'Provide root category identifiable object form data for update', 'This hook allows to provide root category identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionContactFormDataProviderData', 'Provide contact identifiable object form data for update', 'This hook allows to provide contact identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionCmsPageCategoryFormDataProviderData', 'Provide cms page category identifiable object form data for update', 'This hook allows to provide cms page category identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionTaxFormDataProviderData', 'Provide tax identifiable object form data for update', 'This hook allows to provide tax identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionManufacturerFormDataProviderData', 'Provide manufacturer identifiable object form data for update', 'This hook allows to provide manufacturer identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionEmployeeFormDataProviderData', 'Provide employee identifiable object form data for update', 'This hook allows to provide employee identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionProfileFormDataProviderData', 'Provide profile identifiable object form data for update', 'This hook allows to provide profile identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionCmsPageFormDataProviderData', 'Provide cms page identifiable object form data for update', 'This hook allows to provide cms page identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionFeatureFormDataProviderData', 'Provide feature identifiable object form data for update', 'This hook allows to provide feature identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionOrderMessageFormDataProviderData', 'Provide order message identifiable object form data for update', 'This hook allows to provide order message identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionCatalogPriceRuleFormDataProviderData', 'Provide catalog price rule identifiable object form data for update', 'This hook allows to provide catalog price rule identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionAttachmentFormDataProviderData', 'Provide attachment identifiable object form data for update', 'This hook allows to provide attachment identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionOrderStateFormDataProviderData', 'Provide order state identifiable object form data for update', 'This hook allows to provide order state identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionOrderReturnStateFormDataProviderData', 'Provide order return state identifiable object form data for update', 'This hook allows to provide order return state identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionCreateProductFormDataProviderData', 'Provide create product identifiable object form data for update', 'This hook allows to provide create product identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionCombinationListFormDataProviderData', 'Provide combination list identifiable object form data for update', 'This hook allows to provide combination list identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionProductImageFormDataProviderData', 'Provide product image identifiable object form data for update', 'This hook allows to provide product image identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionZoneFormDataProviderData', 'Provide zone identifiable object form data for update', 'This hook allows to provide zone identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionSearchEngineFormDataProviderData', 'Provide search engine identifiable object form data for update', 'This hook allows to provide search engine identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionCategoryTreeSelectorFormDataProviderData', 'Provide category tree selector identifiable object form data for update', 'This hook allows to provide category tree selector identifiable object form data which will prefill the form in update/edition page', '1'), + (NULL, 'actionSqlRequestFormDataProviderDefaultData', 'Provide sql request identifiable object default form data for creation', 'This hook allows to provide sql request identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionCustomerFormDataProviderDefaultData', 'Provide customer identifiable object default form data for creation', 'This hook allows to provide customer identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionLanguageFormDataProviderDefaultData', 'Provide language identifiable object default form data for creation', 'This hook allows to provide language identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionCurrencyFormDataProviderDefaultData', 'Provide currency identifiable object default form data for creation', 'This hook allows to provide currency identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionWebserviceKeyFormDataProviderDefaultData', 'Provide webservice key identifiable object default form data for creation', 'This hook allows to provide webservice key identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionMetaFormDataProviderDefaultData', 'Provide meta identifiable object default form data for creation', 'This hook allows to provide meta identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionCategoryFormDataProviderDefaultData', 'Provide category identifiable object default form data for creation', 'This hook allows to provide category identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionRootCategoryFormDataProviderDefaultData', 'Provide root category identifiable object default form data for creation', 'This hook allows to provide root category identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionContactFormDataProviderDefaultData', 'Provide contact identifiable object default form data for creation', 'This hook allows to provide contact identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionCmsPageCategoryFormDataProviderDefaultData', 'Provide cms page category identifiable object default form data for creation', 'This hook allows to provide cms page category identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionTaxFormDataProviderDefaultData', 'Provide tax identifiable object default form data for creation', 'This hook allows to provide tax identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionManufacturerFormDataProviderDefaultData', 'Provide manufacturer identifiable object default form data for creation', 'This hook allows to provide manufacturer identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionEmployeeFormDataProviderDefaultData', 'Provide employee identifiable object default form data for creation', 'This hook allows to provide employee identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionProfileFormDataProviderDefaultData', 'Provide profile identifiable object default form data for creation', 'This hook allows to provide profile identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionCmsPageFormDataProviderDefaultData', 'Provide cms page identifiable object default form data for creation', 'This hook allows to provide cms page identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionFeatureFormDataProviderDefaultData', 'Provide feature identifiable object default form data for creation', 'This hook allows to provide feature identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionOrderMessageFormDataProviderDefaultData', 'Provide order message identifiable object default form data for creation', 'This hook allows to provide order message identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionCatalogPriceRuleFormDataProviderDefaultData', 'Provide catalog price rule identifiable object default form data for creation', 'This hook allows to provide catalog price rule identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionAttachmentFormDataProviderDefaultData', 'Provide attachment identifiable object default form data for creation', 'This hook allows to provide attachment identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionOrderStateFormDataProviderDefaultData', 'Provide order state identifiable object default form data for creation', 'This hook allows to provide order state identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionOrderReturnStateFormDataProviderDefaultData', 'Provide order return state identifiable object default form data for creation', 'This hook allows to provide order return state identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionCreateProductFormDataProviderDefaultData', 'Provide create product identifiable object default form data for creation', 'This hook allows to provide create product identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionCombinationListFormDataProviderDefaultData', 'Provide combination list identifiable object default form data for creation', 'This hook allows to provide combination list identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionProductImageFormDataProviderDefaultData', 'Provide product image identifiable object default form data for creation', 'This hook allows to provide product image identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionZoneFormDataProviderDefaultData', 'Provide zone identifiable object default form data for creation', 'This hook allows to provide zone identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionSearchEngineFormDataProviderDefaultData', 'Provide search engine identifiable object default form data for creation', 'This hook allows to provide search engine identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionCategoryTreeSelectorFormDataProviderDefaultData', 'Provide category tree selector identifiable object default form data for creation', 'This hook allows to provide category tree selector identifiable object form data which will prefill the form in creation page', '1'), + (NULL, 'actionBeforeUpdateCreateProductFormHandler', 'Modify create product identifiable object data before updating it', 'This hook allows to modify create product identifiable object forms data before it was updated', '1'), + (NULL, 'actionBeforeUpdateCombinationListFormHandler', 'Modify combination list identifiable object data before updating it', 'This hook allows to modify combination list identifiable object forms data before it was updated', '1'), + (NULL, 'actionBeforeUpdateProductImageFormHandler', 'Modify product image identifiable object data before updating it', 'This hook allows to modify product image identifiable object forms data before it was updated', '1'), + (NULL, 'actionBeforeUpdateSearchEngineFormHandler', 'Modify search engine identifiable object data before updating it', 'This hook allows to modify search engine identifiable object forms data before it was updated', '1'), + (NULL, 'actionBeforeUpdateCategoryTreeSelectorFormHandler', 'Modify category tree selector identifiable object data before updating it', 'This hook allows to modify category tree selector identifiable object forms data before it was updated', '1'), + (NULL, 'actionAfterUpdateCreateProductFormHandler', 'Modify create product identifiable object data after updating it', 'This hook allows to modify create product identifiable object forms data after it was updated', '1'), + (NULL, 'actionAfterUpdateCombinationListFormHandler', 'Modify combination list identifiable object data after updating it', 'This hook allows to modify combination list identifiable object forms data after it was updated', '1'), + (NULL, 'actionAfterUpdateSearchEngineFormHandler', 'Modify search engine identifiable object data after updating it', 'This hook allows to modify search engine identifiable object forms data after it was updated', '1'), + (NULL, 'actionAfterUpdateCategoryTreeSelectorFormHandler', 'Modify category tree selector identifiable object data after updating it', 'This hook allows to modify category tree selector identifiable object forms data after it was updated', '1'), + (NULL, 'actionBeforeCreateCreateProductFormHandler', 'Modify create product identifiable object data before creating it', 'This hook allows to modify create product identifiable object forms data before it was created', '1'), + (NULL, 'actionBeforeCreateCombinationListFormHandler', 'Modify combination list identifiable object data before creating it', 'This hook allows to modify combination list identifiable object forms data before it was created', '1'), + (NULL, 'actionBeforeCreateProductImageFormHandler', 'Modify product image identifiable object data before creating it', 'This hook allows to modify product image identifiable object forms data before it was created', '1'), + (NULL, 'actionBeforeCreateSearchEngineFormHandler', 'Modify search engine identifiable object data before creating it', 'This hook allows to modify search engine identifiable object forms data before it was created', '1'), + (NULL, 'actionBeforeCreateCategoryTreeSelectorFormHandler', 'Modify category tree selector identifiable object data before creating it', 'This hook allows to modify category tree selector identifiable object forms data before it was created', '1'), + (NULL, 'actionAfterCreateCreateProductFormHandler', 'Modify create product identifiable object data after creating it', 'This hook allows to modify create product identifiable object forms data after it was created', '1'), + (NULL, 'actionAfterCreateCombinationListFormHandler', 'Modify combination list identifiable object data after creating it', 'This hook allows to modify combination list identifiable object forms data after it was created', '1'), + (NULL, 'actionAfterCreateProductImageFormHandler', 'Modify product image identifiable object data after creating it', 'This hook allows to modify product image identifiable object forms data after it was created', '1'), + (NULL, 'actionAfterCreateSearchEngineFormHandler', 'Modify search engine identifiable object data after creating it', 'This hook allows to modify search engine identifiable object forms data after it was created', '1'), + (NULL, 'actionAfterCreateCategoryTreeSelectorFormHandler', 'Modify category tree selector identifiable object data after creating it', 'This hook allows to modify category tree selector identifiable object forms data after it was created', '1'), + (NULL, 'actionFeatureFlagStableForm', 'Modify feature flag stable options form content', 'This hook allows to modify feature flag stable options form FormBuilder', '1'), + (NULL, 'actionFeatureFlagBetaForm', 'Modify feature flag beta options form content', 'This hook allows to modify feature flag beta options form FormBuilder', '1'), + (NULL, 'actionSecurityPageGeneralForm', 'Modify security page general options form content', 'This hook allows to modify security page general options form FormBuilder', '1'), + (NULL, 'actionSecurityPagePasswordPolicyForm', 'Modify security page password policy options form content', 'This hook allows to modify security page password policy options form FormBuilder', '1'), + (NULL, 'actionFeatureFlagStableSave', 'Modify feature flag stable options form saved data', 'This hook allows to modify data of feature flag stable options form after it was saved', '1'), + (NULL, 'actionFeatureFlagBetaSave', 'Modify feature flag beta options form saved data', 'This hook allows to modify data of feature flag beta options form after it was saved', '1'), + (NULL, 'actionSecurityPageGeneralSave', 'Modify security page general options form saved data', 'This hook allows to modify data of security page general options form after it was saved', '1'), + (NULL, 'actionSecurityPagePasswordPolicySave', 'Modify security page password policy options form saved data', 'This hook allows to modify data of security page password policy options form after it was saved', '1'), + (NULL, 'actionCountryGridDefinitionModifier', 'Modify country grid definition', 'This hook allows to alter country grid columns, actions and filters', '1'), + (NULL, 'actionSearchEngineGridDefinitionModifier', 'Modify search engine grid definition', 'This hook allows to alter search engine grid columns, actions and filters', '1'), + (NULL, 'actionProductGridDefinitionModifier', 'Modify product grid definition', 'This hook allows to alter product grid columns, actions and filters', '1'), + (NULL, 'actionProductGridDefinitionModifier', 'Modify product grid definition', 'This hook allows to alter product grid columns, actions and filters', '1'), + (NULL, 'actionSecuritySessionEmployeeGridDefinitionModifier', 'Modify security session employee grid definition', 'This hook allows to alter security session employee grid columns, actions and filters', '1'), + (NULL, 'actionSecuritySessionCustomerGridDefinitionModifier', 'Modify security session customer grid definition', 'This hook allows to alter security session customer grid columns, actions and filters', '1'), + (NULL, 'actionStateGridDefinitionModifier', 'Modify state grid definition', 'This hook allows to alter state grid columns, actions and filters', '1'), + (NULL, 'actionTitleGridDefinitionModifier', 'Modify title grid definition', 'This hook allows to alter title grid columns, actions and filters', '1'), + (NULL, 'actionCountryGridQueryBuilderModifier', 'Modify country grid query builder', 'This hook allows to alter Doctrine query builder for country grid', '1'), + (NULL, 'actionSearchEngineGridQueryBuilderModifier', 'Modify search engine grid query builder', 'This hook allows to alter Doctrine query builder for search engine grid', '1'), + (NULL, 'actionProductGridQueryBuilderModifier', 'Modify product grid query builder', 'This hook allows to alter Doctrine query builder for product grid', '1'), + (NULL, 'actionProductGridQueryBuilderModifier', 'Modify product grid query builder', 'This hook allows to alter Doctrine query builder for product grid', '1'), + (NULL, 'actionSecuritySessionEmployeeGridQueryBuilderModifier', 'Modify security session employee grid query builder', 'This hook allows to alter Doctrine query builder for security session employee grid', '1'), + (NULL, 'actionSecuritySessionCustomerGridQueryBuilderModifier', 'Modify security session customer grid query builder', 'This hook allows to alter Doctrine query builder for security session customer grid', '1'), + (NULL, 'actionStateGridQueryBuilderModifier', 'Modify state grid query builder', 'This hook allows to alter Doctrine query builder for state grid', '1'), + (NULL, 'actionTitleGridQueryBuilderModifier', 'Modify title grid query builder', 'This hook allows to alter Doctrine query builder for title grid', '1'), + (NULL, 'actionCountryGridDataModifier', 'Modify country grid data', 'This hook allows to modify country grid data', '1'), + (NULL, 'actionSearchEngineGridDataModifier', 'Modify search engine grid data', 'This hook allows to modify search engine grid data', '1'), + (NULL, 'actionProductGridDataModifier', 'Modify product grid data', 'This hook allows to modify product grid data', '1'), + (NULL, 'actionProductGridDataModifier', 'Modify product grid data', 'This hook allows to modify product grid data', '1'), + (NULL, 'actionSecuritySessionEmployeeGridDataModifier', 'Modify security session employee grid data', 'This hook allows to modify security session employee grid data', '1'), + (NULL, 'actionSecuritySessionCustomerGridDataModifier', 'Modify security session customer grid data', 'This hook allows to modify security session customer grid data', '1'), + (NULL, 'actionStateGridDataModifier', 'Modify state grid data', 'This hook allows to modify state grid data', '1'), + (NULL, 'actionTitleGridDataModifier', 'Modify title grid data', 'This hook allows to modify title grid data', '1'), + (NULL, 'actionCountryGridFilterFormModifier', 'Modify country grid filters', 'This hook allows to modify filters for country grid', '1'), + (NULL, 'actionSearchEngineGridFilterFormModifier', 'Modify search engine grid filters', 'This hook allows to modify filters for search engine grid', '1'), + (NULL, 'actionProductGridFilterFormModifier', 'Modify product grid filters', 'This hook allows to modify filters for product grid', '1'), + (NULL, 'actionProductGridFilterFormModifier', 'Modify product grid filters', 'This hook allows to modify filters for product grid', '1'), + (NULL, 'actionSecuritySessionEmployeeGridFilterFormModifier', 'Modify security session employee grid filters', 'This hook allows to modify filters for security session employee grid', '1'), + (NULL, 'actionSecuritySessionCustomerGridFilterFormModifier', 'Modify security session customer grid filters', 'This hook allows to modify filters for security session customer grid', '1'), + (NULL, 'actionStateGridFilterFormModifier', 'Modify state grid filters', 'This hook allows to modify filters for state grid', '1'), + (NULL, 'actionTitleGridFilterFormModifier', 'Modify title grid filters', 'This hook allows to modify filters for title grid', '1'), + (NULL, 'actionCountryGridPresenterModifier', 'Modify country grid template data', 'This hook allows to modify data which is about to be used in template for country grid', '1'), + (NULL, 'actionSearchEngineGridPresenterModifier', 'Modify search engine grid template data', 'This hook allows to modify data which is about to be used in template for search engine grid', '1'), + (NULL, 'actionProductGridPresenterModifier', 'Modify product grid template data', 'This hook allows to modify data which is about to be used in template for product grid', '1'), + (NULL, 'actionProductGridPresenterModifier', 'Modify product grid template data', 'This hook allows to modify data which is about to be used in template for product grid', '1'), + (NULL, 'actionSecuritySessionEmployeeGridPresenterModifier', 'Modify security session employee grid template data', 'This hook allows to modify data which is about to be used in template for security session employee grid', '1'), + (NULL, 'actionSecuritySessionCustomerGridPresenterModifier', 'Modify security session customer grid template data', 'This hook allows to modify data which is about to be used in template for security session customer grid', '1'), + (NULL, 'actionStateGridPresenterModifier', 'Modify state grid template data', 'This hook allows to modify data which is about to be used in template for state grid', '1'), + (NULL, 'actionTitleGridPresenterModifier', 'Modify title grid template data', 'This hook allows to modify data which is about to be used in template for title grid', '1') +; + ALTER TABLE `PREFIX_employee_session` ADD `date_upd` DATETIME NOT NULL AFTER `token`; ALTER TABLE `PREFIX_employee_session` ADD `date_add` DATETIME NOT NULL AFTER `date_upd`; ALTER TABLE `PREFIX_customer_session` ADD `date_upd` DATETIME NOT NULL AFTER `token`; From d522546a75e6cd59711f401ed5ca9bfbf67cff86 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Thu, 8 Sep 2022 17:03:47 +0200 Subject: [PATCH 100/128] add method to recursively remove tabs --- upgrade/php/ps_remove_controller_tab.php | 115 +++++++++++++++++++++++ upgrade/sql/8.0.0.sql | 13 +-- 2 files changed, 118 insertions(+), 10 deletions(-) create mode 100644 upgrade/php/ps_remove_controller_tab.php diff --git a/upgrade/php/ps_remove_controller_tab.php b/upgrade/php/ps_remove_controller_tab.php new file mode 100644 index 000000000..cb102810e --- /dev/null +++ b/upgrade/php/ps_remove_controller_tab.php @@ -0,0 +1,115 @@ +getRow( + sprintf("SELECT id_tab, id_parent, class_name FROM %stab WHERE class_name = '%s'", _DB_PREFIX_, $className) + ); + + if (empty($tabToDelete)) { + return; + } + + // get tabs and roles that should be deleted + getElementsToBeDeleted($tabToDelete['id_tab'], $tabToDelete['id_parent'], $className, $tabsToBeDeleted, $rolesToBeDeleted); + + // delete tabs fetched by the recursive function + Db::getInstance()->execute( + sprintf( + "DELETE FROM %stab WHERE id_tab IN (%s)", + _DB_PREFIX_, + implode(', ', $tabsToBeDeleted) + ) + ); + + // delete orphan tab langs + Db::getInstance()->execute( + sprintf( + "DELETE FROM `%stab_lang` WHERE `id_tab` NOT IN (SELECT id_tab FROM `%s_tab`)", + _DB_PREFIX_, + _DB_PREFIX_ + ) + ); + + // delete orphan legacy quick access links + $sqlLegacyQuickAccessLinkDeletion = sprintf("DELETE FROM `%squick_access_lang` + WHERE id_quick_access IN (SELECT id_quick_access FROM `%squick_access` WHERE link LIKE '%%controller=%s%%')", + _DB_PREFIX_, + _DB_PREFIX_, + $className + ); + + Db::getInstance()->execute($sqlLegacyQuickAccessLinkDeletion); + Db::getInstance()->execute( + sprintf( + "DELETE FROM `%squick_access` WHERE link LIKE '%%controller=%s%%'", + _DB_PREFIX_, + $className + ) + ); + + if (!empty($quickAccessUrls)) { + // delete orphan quick access links (given links, for symfony urls) + foreach ($quickAccessUrls as &$link) { + $link = "'" . $link . "'"; + } + Db::getInstance()->execute( + sprintf( + 'DELETE FROM %squick_access WHERE link IN (%s)', + _DB_PREFIX_, + implode(', ', $quickAccessUrls) + ) + ); + } + + + // delete orphan roles + $sqlRoleDeletion = sprintf('DELETE FROM %sauthorization_role WHERE ', _DB_PREFIX_); + foreach ($rolesToBeDeleted as $key => $role) { + if ($key === 0) { + $sqlRoleDeletion .= "slug LIKE '" . $role . "'"; + continue; + } + $sqlRoleDeletion .= "OR slug LIKE '" . $role . "'"; + } + Db::getInstance()->execute($sqlRoleDeletion); +} + +function getElementsToBeDeleted($idTab, $idParent, $className, &$tabsToBeDeleted, &$rolesToBeDeleted) +{ + // add current tab to tabs that will be deleted + $tabsToBeDeleted[] = $idTab; + $rolesToBeDeleted[] = sprintf('ROLE_MOD_TAB_%s%%', strToUpper($className)); + if (empty($idParent)) { + return; + } + + // check if parent has any other children + $sibling = Db::getInstance()->getRow( + sprintf( + "SELECT id_tab FROM %stab WHERE id_parent = " . $idParent . " AND id_tab NOT IN (%s)", + _DB_PREFIX_, + implode(', ', $tabsToBeDeleted) + ) + ); + + // tab has at least one sibling, we stop here + if (!empty($sibling)) { + return; + } + + // no sibling, get parent and repeat the process recursively + $parentTab = Db::getInstance()->getRow( + sprintf("SELECT id_tab, id_parent, class_name FROM %stab WHERE id_tab = %s", _DB_PREFIX_, $idParent) + ); + + // this is just in case, it should never happen, if a tab has an id_parent, parent should exist + if (empty($parentTab)) { + return ; + } + + getElementsToBeDeleted($parentTab['id_tab'], $parentTab['id_parent'], $parentTab['class_name'], $tabsToBeDeleted, $rolesToBeDeleted); +} diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index 2eb9f7321..1bb4a3553 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -7,10 +7,10 @@ DROP TABLE IF EXISTS `PREFIX_referrer_shop`; /* Remove page Referrers */ ## Remove Tabs -DELETE FROM `PREFIX_tab` WHERE `class_name` = 'AdminReferrers'; -DELETE FROM `PREFIX_tab_lang` WHERE `id_tab` NOT IN (SELECT id_tab FROM `PREFIX_tab`); +/* PHP:ps_remove_controller_tab('AdminModulesCatalog'); */; +/* PHP:ps_remove_controller_tab('AdminAddonsCatalog'); */; +/* PHP:ps_remove_controller_tab('AdminReferrers'); */; ## Remove Roles -DELETE FROM `PREFIX_access` WHERE `id_tab` NOT IN (SELECT id_tab FROM `PREFIX_tab`); /* For SalesMan profile, remove parent tab `Traffic & SEO` */ DELETE FROM `PREFIX_access` WHERE `id_authorization_role` IN (SELECT `id_authorization_role` FROM `PREFIX_authorization_role` WHERE `slug` LIKE 'ROLE_MOD_TAB_ADMINPARENTMETA_%') @@ -20,13 +20,6 @@ DELETE FROM `PREFIX_authorization_role` ## Remove Configuration DELETE FROM `PREFIX_configuration` WHERE `name` IN ('PS_REFERRERS_CACHE_LIKE', 'PS_REFERRERS_CACHE_DATE'); -## Remove Quick Access -DELETE FROM `PREFIX_quick_access_lang` - WHERE id_quick_access IN ( - SELECT id_quick_access FROM `PREFIX_quick_access` WHERE link LIKE '%controller=AdminReferrers%' - ); -DELETE FROM `PREFIX_quick_access` - WHERE link LIKE '%controller=AdminReferrers%'; INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES ('PS_MAIL_DKIM_ENABLE', '0', NOW(), NOW()), From b7b50b41f8db37791dde92e32dfea47d5aab4191 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Fri, 9 Sep 2022 15:14:33 +0200 Subject: [PATCH 101/128] add missing tab deletion --- upgrade/php/ps_remove_controller_tab.php | 16 ++++++++-------- upgrade/sql/8.0.0.sql | 3 +-- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/upgrade/php/ps_remove_controller_tab.php b/upgrade/php/ps_remove_controller_tab.php index cb102810e..3b523004a 100644 --- a/upgrade/php/ps_remove_controller_tab.php +++ b/upgrade/php/ps_remove_controller_tab.php @@ -19,7 +19,7 @@ function ps_remove_controller_tab($className, $quickAccessUrls = []) // delete tabs fetched by the recursive function Db::getInstance()->execute( sprintf( - "DELETE FROM %stab WHERE id_tab IN (%s)", + 'DELETE FROM %stab WHERE id_tab IN (%s)', _DB_PREFIX_, implode(', ', $tabsToBeDeleted) ) @@ -28,14 +28,15 @@ function ps_remove_controller_tab($className, $quickAccessUrls = []) // delete orphan tab langs Db::getInstance()->execute( sprintf( - "DELETE FROM `%stab_lang` WHERE `id_tab` NOT IN (SELECT id_tab FROM `%s_tab`)", + 'DELETE FROM `%stab_lang` WHERE `id_tab` NOT IN (SELECT id_tab FROM `%s_tab`)', _DB_PREFIX_, _DB_PREFIX_ ) ); // delete orphan legacy quick access links - $sqlLegacyQuickAccessLinkDeletion = sprintf("DELETE FROM `%squick_access_lang` + $sqlLegacyQuickAccessLinkDeletion = sprintf( + "DELETE FROM `%squick_access_lang` WHERE id_quick_access IN (SELECT id_quick_access FROM `%squick_access` WHERE link LIKE '%%controller=%s%%')", _DB_PREFIX_, _DB_PREFIX_, @@ -65,7 +66,6 @@ function ps_remove_controller_tab($className, $quickAccessUrls = []) ); } - // delete orphan roles $sqlRoleDeletion = sprintf('DELETE FROM %sauthorization_role WHERE ', _DB_PREFIX_); foreach ($rolesToBeDeleted as $key => $role) { @@ -82,7 +82,7 @@ function getElementsToBeDeleted($idTab, $idParent, $className, &$tabsToBeDeleted { // add current tab to tabs that will be deleted $tabsToBeDeleted[] = $idTab; - $rolesToBeDeleted[] = sprintf('ROLE_MOD_TAB_%s%%', strToUpper($className)); + $rolesToBeDeleted[] = sprintf('ROLE_MOD_TAB_%s%%', strtoupper($className)); if (empty($idParent)) { return; } @@ -90,7 +90,7 @@ function getElementsToBeDeleted($idTab, $idParent, $className, &$tabsToBeDeleted // check if parent has any other children $sibling = Db::getInstance()->getRow( sprintf( - "SELECT id_tab FROM %stab WHERE id_parent = " . $idParent . " AND id_tab NOT IN (%s)", + 'SELECT id_tab FROM %stab WHERE id_parent = ' . $idParent . ' AND id_tab NOT IN (%s)', _DB_PREFIX_, implode(', ', $tabsToBeDeleted) ) @@ -103,12 +103,12 @@ function getElementsToBeDeleted($idTab, $idParent, $className, &$tabsToBeDeleted // no sibling, get parent and repeat the process recursively $parentTab = Db::getInstance()->getRow( - sprintf("SELECT id_tab, id_parent, class_name FROM %stab WHERE id_tab = %s", _DB_PREFIX_, $idParent) + sprintf('SELECT id_tab, id_parent, class_name FROM %stab WHERE id_tab = %s', _DB_PREFIX_, $idParent) ); // this is just in case, it should never happen, if a tab has an id_parent, parent should exist if (empty($parentTab)) { - return ; + return; } getElementsToBeDeleted($parentTab['id_tab'], $parentTab['id_parent'], $parentTab['class_name'], $tabsToBeDeleted, $rolesToBeDeleted); diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index 1bb4a3553..09b6a6f9d 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -7,6 +7,7 @@ DROP TABLE IF EXISTS `PREFIX_referrer_shop`; /* Remove page Referrers */ ## Remove Tabs +/* PHP:ps_remove_controller_tab('AdminThemesCatalog'); */; /* PHP:ps_remove_controller_tab('AdminModulesCatalog'); */; /* PHP:ps_remove_controller_tab('AdminAddonsCatalog'); */; /* PHP:ps_remove_controller_tab('AdminReferrers'); */; @@ -15,8 +16,6 @@ DROP TABLE IF EXISTS `PREFIX_referrer_shop`; DELETE FROM `PREFIX_access` WHERE `id_authorization_role` IN (SELECT `id_authorization_role` FROM `PREFIX_authorization_role` WHERE `slug` LIKE 'ROLE_MOD_TAB_ADMINPARENTMETA_%') AND `id_profile` = 4; -DELETE FROM `PREFIX_authorization_role` - WHERE `slug` LIKE 'ROLE_MOD_TAB_ADMINREFERRERS_%'; ## Remove Configuration DELETE FROM `PREFIX_configuration` WHERE `name` IN ('PS_REFERRERS_CACHE_LIKE', 'PS_REFERRERS_CACHE_DATE'); From b0fd5ec3e2327192f09a1294b22dde9b8c90c1e3 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Thu, 15 Sep 2022 15:38:14 +0200 Subject: [PATCH 102/128] Hardcode translation domains --- classes/UpgradePage.php | 174 ++++++++++++++++++++-------------------- 1 file changed, 87 insertions(+), 87 deletions(-) diff --git a/classes/UpgradePage.php b/classes/UpgradePage.php index fa511762b..62034eb8f 100644 --- a/classes/UpgradePage.php +++ b/classes/UpgradePage.php @@ -270,7 +270,7 @@ private function getErrorMessage() // PrestaShop demo mode if (defined('_PS_MODE_DEMO_') && true == _PS_MODE_DEMO_) { return [ - 'message' => $translator->trans('This functionality has been disabled.', [], self::TRANSLATION_DOMAIN), + 'message' => $translator->trans('This functionality has been disabled.', [], 'Modules.Autoupgrade.Admin'), ]; } @@ -280,7 +280,7 @@ private function getErrorMessage() 'message' => $translator->trans( '[TECHNICAL ERROR] ajax-upgradetab.php is missing. Please reinstall or reset the module.', [], - self::TRANSLATION_DOMAIN + 'Modules.Autoupgrade.Admin' ), ]; } @@ -315,47 +315,47 @@ private function getJsParams($ajaxResult) 'tab' => 'AdminSelfUpgrade', 'channel' => $this->config->get('channel'), 'translation' => [ - 'confirmDeleteBackup' => $translator->trans('Are you sure you want to delete this backup?', [], $translationDomain), + 'confirmDeleteBackup' => $translator->trans('Are you sure you want to delete this backup?', [], 'Modules.Autoupgrade.Admin'), 'delete' => $translator->trans('Delete', [], 'Admin.Actions'), - 'updateInProgress' => $translator->trans('An update is currently in progress... Click "OK" to abort.', [], $translationDomain), - 'upgradingPrestaShop' => $translator->trans('Upgrading PrestaShop', [], $translationDomain), - 'upgradeComplete' => $translator->trans('Upgrade complete', [], $translationDomain), - 'upgradeCompleteWithWarnings' => $translator->trans('Upgrade complete, but warning notifications has been found.', [], $translationDomain), + 'updateInProgress' => $translator->trans('An update is currently in progress... Click "OK" to abort.', [], 'Modules.Autoupgrade.Admin'), + 'upgradingPrestaShop' => $translator->trans('Upgrading PrestaShop', [], 'Modules.Autoupgrade.Admin'), + 'upgradeComplete' => $translator->trans('Upgrade complete', [], 'Modules.Autoupgrade.Admin'), + 'upgradeCompleteWithWarnings' => $translator->trans('Upgrade complete, but warning notifications has been found.', [], 'Modules.Autoupgrade.Admin'), 'todoList' => [ - $translator->trans('Cookies have changed, you will need to log in again once you refreshed the page', [], $translationDomain), - $translator->trans('Javascript and CSS files have changed, please clear your browser cache with CTRL-F5', [], $translationDomain), - $translator->trans('Please check that your front-office theme is functional (try to create an account, place an order...)', [], $translationDomain), - $translator->trans('Product images do not appear in the front-office? Try regenerating the thumbnails in Preferences > Images', [], $translationDomain), - $translator->trans('Do not forget to reactivate your shop once you have checked everything!', [], $translationDomain), + $translator->trans('Cookies have changed, you will need to log in again once you refreshed the page', [], 'Modules.Autoupgrade.Admin'), + $translator->trans('Javascript and CSS files have changed, please clear your browser cache with CTRL-F5', [], 'Modules.Autoupgrade.Admin'), + $translator->trans('Please check that your front-office theme is functional (try to create an account, place an order...)', [], 'Modules.Autoupgrade.Admin'), + $translator->trans('Product images do not appear in the front-office? Try regenerating the thumbnails in Preferences > Images', [], 'Modules.Autoupgrade.Admin'), + $translator->trans('Do not forget to reactivate your shop once you have checked everything!', [], 'Modules.Autoupgrade.Admin'), ], - 'todoListTitle' => $translator->trans('ToDo list:', [], $translationDomain), - 'startingRestore' => $translator->trans('Starting restoration...', [], $translationDomain), - 'restoreComplete' => $translator->trans('Restoration complete.', [], $translationDomain), - 'cannotDownloadFile' => $translator->trans('Your server cannot download the file. Please upload it first by ftp in your admin/autoupgrade directory', [], $translationDomain), - 'jsonParseErrorForAction' => $translator->trans('Javascript error (parseJSON) detected for action ', [], $translationDomain), - 'manuallyGoToButton' => $translator->trans('Manually go to %s button', [], $translationDomain), - 'endOfProcess' => $translator->trans('End of process', [], $translationDomain), - 'processCancelledCheckForRestore' => $translator->trans('Operation canceled. Checking for restoration...', [], $translationDomain), - 'confirmRestoreBackup' => $translator->trans('Do you want to restore %s?', [$this->backupName], $translationDomain), - 'processCancelledWithError' => $translator->trans('Operation canceled. An error happened.', [], $translationDomain), - 'missingAjaxUpgradeTab' => $translator->trans('[TECHNICAL ERROR] ajax-upgradetab.php is missing. Please reinstall the module.', [], $translationDomain), - 'clickToRefreshAndUseNewConfiguration' => $translator->trans('Click to refresh the page and use the new configuration', [], $translationDomain), - 'errorDetectedDuring' => $translator->trans('Error detected during', [], $translationDomain), - 'downloadTimeout' => $translator->trans('The request exceeded the max_time_limit. Please change your server configuration.', [], $translationDomain), - 'seeOrHideList' => $translator->trans('See or hide the list', [], $translationDomain), - 'coreFiles' => $translator->trans('Core file(s)', [], $translationDomain), - 'mailFiles' => $translator->trans('Mail file(s)', [], $translationDomain), - 'translationFiles' => $translator->trans('Translation file(s)', [], $translationDomain), - 'linkAndMd5CannotBeEmpty' => $translator->trans('Link and MD5 hash cannot be empty', [], $translationDomain), - 'needToEnterArchiveVersionNumber' => $translator->trans('You need to enter the version number associated with the archive.', [], $translationDomain), - 'noArchiveSelected' => $translator->trans('No archive has been selected.', [], $translationDomain), - 'needToEnterDirectoryVersionNumber' => $translator->trans('You need to enter the version number associated with the directory.', [], $translationDomain), - 'confirmSkipBackup' => $translator->trans('Please confirm that you want to skip the backup.', [], $translationDomain), - 'confirmPreserveFileOptions' => $translator->trans('Please confirm that you want to preserve file options.', [], $translationDomain), - 'lessOptions' => $translator->trans('Less options', [], $translationDomain), - 'moreOptions' => $translator->trans('More options (Expert mode)', [], $translationDomain), - 'filesWillBeDeleted' => $translator->trans('These files will be deleted', [], $translationDomain), - 'filesWillBeReplaced' => $translator->trans('These files will be replaced', [], $translationDomain), + 'todoListTitle' => $translator->trans('ToDo list:', [], 'Modules.Autoupgrade.Admin'), + 'startingRestore' => $translator->trans('Starting restoration...', [], 'Modules.Autoupgrade.Admin'), + 'restoreComplete' => $translator->trans('Restoration complete.', [], 'Modules.Autoupgrade.Admin'), + 'cannotDownloadFile' => $translator->trans('Your server cannot download the file. Please upload it first by ftp in your admin/autoupgrade directory', [], 'Modules.Autoupgrade.Admin'), + 'jsonParseErrorForAction' => $translator->trans('Javascript error (parseJSON) detected for action ', [], 'Modules.Autoupgrade.Admin'), + 'manuallyGoToButton' => $translator->trans('Manually go to %s button', [], 'Modules.Autoupgrade.Admin'), + 'endOfProcess' => $translator->trans('End of process', [], 'Modules.Autoupgrade.Admin'), + 'processCancelledCheckForRestore' => $translator->trans('Operation canceled. Checking for restoration...', [], 'Modules.Autoupgrade.Admin'), + 'confirmRestoreBackup' => $translator->trans('Do you want to restore %s?', [$this->backupName], 'Modules.Autoupgrade.Admin'), + 'processCancelledWithError' => $translator->trans('Operation canceled. An error happened.', [], 'Modules.Autoupgrade.Admin'), + 'missingAjaxUpgradeTab' => $translator->trans('[TECHNICAL ERROR] ajax-upgradetab.php is missing. Please reinstall the module.', [], 'Modules.Autoupgrade.Admin'), + 'clickToRefreshAndUseNewConfiguration' => $translator->trans('Click to refresh the page and use the new configuration', [], 'Modules.Autoupgrade.Admin'), + 'errorDetectedDuring' => $translator->trans('Error detected during', [], 'Modules.Autoupgrade.Admin'), + 'downloadTimeout' => $translator->trans('The request exceeded the max_time_limit. Please change your server configuration.', [], 'Modules.Autoupgrade.Admin'), + 'seeOrHideList' => $translator->trans('See or hide the list', [], 'Modules.Autoupgrade.Admin'), + 'coreFiles' => $translator->trans('Core file(s)', [], 'Modules.Autoupgrade.Admin'), + 'mailFiles' => $translator->trans('Mail file(s)', [], 'Modules.Autoupgrade.Admin'), + 'translationFiles' => $translator->trans('Translation file(s)', [], 'Modules.Autoupgrade.Admin'), + 'linkAndMd5CannotBeEmpty' => $translator->trans('Link and MD5 hash cannot be empty', [], 'Modules.Autoupgrade.Admin'), + 'needToEnterArchiveVersionNumber' => $translator->trans('You need to enter the version number associated with the archive.', [], 'Modules.Autoupgrade.Admin'), + 'noArchiveSelected' => $translator->trans('No archive has been selected.', [], 'Modules.Autoupgrade.Admin'), + 'needToEnterDirectoryVersionNumber' => $translator->trans('You need to enter the version number associated with the directory.', [], 'Modules.Autoupgrade.Admin'), + 'confirmSkipBackup' => $translator->trans('Please confirm that you want to skip the backup.', [], 'Modules.Autoupgrade.Admin'), + 'confirmPreserveFileOptions' => $translator->trans('Please confirm that you want to preserve file options.', [], 'Modules.Autoupgrade.Admin'), + 'lessOptions' => $translator->trans('Less options', [], 'Modules.Autoupgrade.Admin'), + 'moreOptions' => $translator->trans('More options (Expert mode)', [], 'Modules.Autoupgrade.Admin'), + 'filesWillBeDeleted' => $translator->trans('These files will be deleted', [], 'Modules.Autoupgrade.Admin'), + 'filesWillBeReplaced' => $translator->trans('These files will be replaced', [], 'Modules.Autoupgrade.Admin'), ], ]; @@ -370,60 +370,60 @@ private function _getJsErrorMsgs() $translationDomain = self::TRANSLATION_DOMAIN; $translator = $this->translator; $ret = [ - 0 => $translator->trans('Required field', [], $translationDomain), - 1 => $translator->trans('Too long!', [], $translationDomain), - 2 => $translator->trans('Fields are different!', [], $translationDomain), - 3 => $translator->trans('This email address is wrong!', [], $translationDomain), - 4 => $translator->trans('Impossible to send the email!', [], $translationDomain), - 5 => $translator->trans('Cannot create settings file, if /app/config/parameters.php exists, please give the public write permissions to this file, else please create a file named parameters.php in config directory.', [], $translationDomain), - 6 => $translator->trans('Cannot write settings file, please create a file named settings.inc.php in the "config" directory.', [], $translationDomain), - 7 => $translator->trans('Impossible to upload the file!', [], $translationDomain), - 8 => $translator->trans('Data integrity is not valid. Hack attempt?', [], $translationDomain), - 9 => $translator->trans('Impossible to read the content of a MySQL content file.', [], $translationDomain), - 10 => $translator->trans('Cannot access a MySQL content file.', [], $translationDomain), - 11 => $translator->trans('Error while inserting data in the database:', [], $translationDomain), + 0 => $translator->trans('Required field', [], 'Modules.Autoupgrade.Admin'), + 1 => $translator->trans('Too long!', [], 'Modules.Autoupgrade.Admin'), + 2 => $translator->trans('Fields are different!', [], 'Modules.Autoupgrade.Admin'), + 3 => $translator->trans('This email address is wrong!', [], 'Modules.Autoupgrade.Admin'), + 4 => $translator->trans('Impossible to send the email!', [], 'Modules.Autoupgrade.Admin'), + 5 => $translator->trans('Cannot create settings file, if /app/config/parameters.php exists, please give the public write permissions to this file, else please create a file named parameters.php in config directory.', [], 'Modules.Autoupgrade.Admin'), + 6 => $translator->trans('Cannot write settings file, please create a file named settings.inc.php in the "config" directory.', [], 'Modules.Autoupgrade.Admin'), + 7 => $translator->trans('Impossible to upload the file!', [], 'Modules.Autoupgrade.Admin'), + 8 => $translator->trans('Data integrity is not valid. Hack attempt?', [], 'Modules.Autoupgrade.Admin'), + 9 => $translator->trans('Impossible to read the content of a MySQL content file.', [], 'Modules.Autoupgrade.Admin'), + 10 => $translator->trans('Cannot access a MySQL content file.', [], 'Modules.Autoupgrade.Admin'), + 11 => $translator->trans('Error while inserting data in the database:', [], 'Modules.Autoupgrade.Admin'), 12 => $translator->trans('The password is incorrect (must be alphanumeric string with at least 8 characters)', [], 'Install'), 14 => $translator->trans('At least one table with same prefix was already found, please change your prefix or drop your database', [], 'Install'), - 15 => $translator->trans('This is not a valid file name.', [], $translationDomain), - 16 => $translator->trans('This is not a valid image file.', [], $translationDomain), - 17 => $translator->trans('Error while creating the /app/config/parameters.php file.', [], $translationDomain), - 18 => $translator->trans('Error:', [], $translationDomain), - 19 => $translator->trans('This PrestaShop database already exists. Please revalidate your authentication information to the database.', [], $translationDomain), - 22 => $translator->trans('An error occurred while resizing the picture.', [], $translationDomain), - 23 => $translator->trans('Database connection is available!', [], $translationDomain), - 24 => $translator->trans('Database Server is available but database is not found', [], $translationDomain), - 25 => $translator->trans('Database Server is not found. Please verify the login, password and server fields.', [], $translationDomain), - 26 => $translator->trans('An error occurred while sending email, please verify your parameters.', [], $translationDomain), + 15 => $translator->trans('This is not a valid file name.', [], 'Modules.Autoupgrade.Admin'), + 16 => $translator->trans('This is not a valid image file.', [], 'Modules.Autoupgrade.Admin'), + 17 => $translator->trans('Error while creating the /app/config/parameters.php file.', [], 'Modules.Autoupgrade.Admin'), + 18 => $translator->trans('Error:', [], 'Modules.Autoupgrade.Admin'), + 19 => $translator->trans('This PrestaShop database already exists. Please revalidate your authentication information to the database.', [], 'Modules.Autoupgrade.Admin'), + 22 => $translator->trans('An error occurred while resizing the picture.', [], 'Modules.Autoupgrade.Admin'), + 23 => $translator->trans('Database connection is available!', [], 'Modules.Autoupgrade.Admin'), + 24 => $translator->trans('Database Server is available but database is not found', [], 'Modules.Autoupgrade.Admin'), + 25 => $translator->trans('Database Server is not found. Please verify the login, password and server fields.', [], 'Modules.Autoupgrade.Admin'), + 26 => $translator->trans('An error occurred while sending email, please verify your parameters.', [], 'Modules.Autoupgrade.Admin'), // Upgrader - 27 => $translator->trans('This installer is too old.', [], $translationDomain), - 28 => $translator->trans('You already have the %s version.', [$this->installVersion], $translationDomain), - 29 => $translator->trans('There is no older version. Did you delete or rename the app/config/parameters.php file?', [], $translationDomain), - 30 => $translator->trans('The app/config/parameters.php file was not found. Did you delete or rename this file?', [], $translationDomain), - 31 => $translator->trans('Cannot find the SQL upgrade files. Please verify that the /install/upgrade/sql folder is not empty.', [], $translationDomain), - 32 => $translator->trans('No upgrade is possible.', [], $translationDomain), - 33 => $translator->trans('Error while loading SQL upgrade file.', [], $translationDomain), - 34 => $translator->trans('Error while inserting content into the database', [], $translationDomain), - 35 => $translator->trans('Unfortunately,', [], $translationDomain), - 36 => $translator->trans('SQL errors have occurred.', [], $translationDomain), - 37 => $translator->trans('The config/defines.inc.php file was not found. Where did you move it?', [], $translationDomain), + 27 => $translator->trans('This installer is too old.', [], 'Modules.Autoupgrade.Admin'), + 28 => $translator->trans('You already have the %s version.', [$this->installVersion], 'Modules.Autoupgrade.Admin'), + 29 => $translator->trans('There is no older version. Did you delete or rename the app/config/parameters.php file?', [], 'Modules.Autoupgrade.Admin'), + 30 => $translator->trans('The app/config/parameters.php file was not found. Did you delete or rename this file?', [], 'Modules.Autoupgrade.Admin'), + 31 => $translator->trans('Cannot find the SQL upgrade files. Please verify that the /install/upgrade/sql folder is not empty.', [], 'Modules.Autoupgrade.Admin'), + 32 => $translator->trans('No upgrade is possible.', [], 'Modules.Autoupgrade.Admin'), + 33 => $translator->trans('Error while loading SQL upgrade file.', [], 'Modules.Autoupgrade.Admin'), + 34 => $translator->trans('Error while inserting content into the database', [], 'Modules.Autoupgrade.Admin'), + 35 => $translator->trans('Unfortunately,', [], 'Modules.Autoupgrade.Admin'), + 36 => $translator->trans('SQL errors have occurred.', [], 'Modules.Autoupgrade.Admin'), + 37 => $translator->trans('The config/defines.inc.php file was not found. Where did you move it?', [], 'Modules.Autoupgrade.Admin'), // End of upgrader - 38 => $translator->trans('Impossible to write the image /img/logo.jpg. If this image already exists, please delete it.', [], $translationDomain), - 39 => $translator->trans('The uploaded file exceeds the upload_max_filesize directive in php.ini', [], $translationDomain), - 40 => $translator->trans('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form', [], $translationDomain), - 41 => $translator->trans('The uploaded file was only partially uploaded', [], $translationDomain), - 42 => $translator->trans('No file was uploaded.', [], $translationDomain), - 43 => $translator->trans('Missing a temporary folder', [], $translationDomain), - 44 => $translator->trans('Failed to write file to disk', [], $translationDomain), - 45 => $translator->trans('File upload stopped by extension', [], $translationDomain), - 46 => $translator->trans('Cannot convert your database\'s data to utf-8.', [], $translationDomain), + 38 => $translator->trans('Impossible to write the image /img/logo.jpg. If this image already exists, please delete it.', [], 'Modules.Autoupgrade.Admin'), + 39 => $translator->trans('The uploaded file exceeds the upload_max_filesize directive in php.ini', [], 'Modules.Autoupgrade.Admin'), + 40 => $translator->trans('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form', [], 'Modules.Autoupgrade.Admin'), + 41 => $translator->trans('The uploaded file was only partially uploaded', [], 'Modules.Autoupgrade.Admin'), + 42 => $translator->trans('No file was uploaded.', [], 'Modules.Autoupgrade.Admin'), + 43 => $translator->trans('Missing a temporary folder', [], 'Modules.Autoupgrade.Admin'), + 44 => $translator->trans('Failed to write file to disk', [], 'Modules.Autoupgrade.Admin'), + 45 => $translator->trans('File upload stopped by extension', [], 'Modules.Autoupgrade.Admin'), + 46 => $translator->trans('Cannot convert your database\'s data to utf-8.', [], 'Modules.Autoupgrade.Admin'), 47 => $translator->trans('Invalid shop name', [], 'Install'), 48 => $translator->trans('Your firstname contains some invalid characters', [], 'Install'), - 49 => $translator->trans('Your lastname contains some invalid characters', [], $translationDomain), + 49 => $translator->trans('Your lastname contains some invalid characters', [], 'Modules.Autoupgrade.Admin'), 50 => $translator->trans('Your database server does not support the utf-8 charset.', [], 'Install'), - 51 => $translator->trans('Your MySQL server does not support this engine, please use another one like MyISAM', [], $translationDomain), - 52 => $translator->trans('The file /img/logo.jpg is not writable, please CHMOD 755 this file or CHMOD 777', [], $translationDomain), - 53 => $translator->trans('Invalid catalog mode', [], $translationDomain), - 999 => $translator->trans('No error code available', [], $translationDomain), + 51 => $translator->trans('Your MySQL server does not support this engine, please use another one like MyISAM', [], 'Modules.Autoupgrade.Admin'), + 52 => $translator->trans('The file /img/logo.jpg is not writable, please CHMOD 755 this file or CHMOD 777', [], 'Modules.Autoupgrade.Admin'), + 53 => $translator->trans('Invalid catalog mode', [], 'Modules.Autoupgrade.Admin'), + 999 => $translator->trans('No error code available', [], 'Modules.Autoupgrade.Admin'), ]; return $ret; From b832e95b4b2d92178ac3bfe120207dd4bff66001 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Thu, 15 Sep 2022 15:57:51 +0200 Subject: [PATCH 103/128] hardcode translation domains in options form classes --- classes/Twig/Form/BackupOptionsForm.php | 10 +++--- classes/Twig/Form/UpgradeOptionsForm.php | 45 +++++++++++------------- 2 files changed, 25 insertions(+), 30 deletions(-) diff --git a/classes/Twig/Form/BackupOptionsForm.php b/classes/Twig/Form/BackupOptionsForm.php index 79f96afa5..41e85ba93 100644 --- a/classes/Twig/Form/BackupOptionsForm.php +++ b/classes/Twig/Form/BackupOptionsForm.php @@ -51,14 +51,12 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) $this->translator = $translator; $this->formRenderer = $formRenderer; - $translationDomain = 'Modules.Autoupgrade.Admin'; - $this->fields = [ 'PS_AUTOUP_BACKUP' => [ 'title' => $this->translator->trans( 'Back up my files and database', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), 'cast' => 'intval', 'validation' => 'isBool', @@ -67,14 +65,14 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'desc' => $this->translator->trans( 'Automatically back up your database and files in order to restore your shop if needed. This is experimental: you should still perform your own manual backup for safety.', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), ], 'PS_AUTOUP_KEEP_IMAGES' => [ 'title' => $this->translator->trans( 'Back up my images', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), 'cast' => 'intval', 'validation' => 'isBool', @@ -83,7 +81,7 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'desc' => $this->translator->trans( 'To save time, you can decide not to back your images up. In any case, always make sure you did back them up manually.', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), ], ]; diff --git a/classes/Twig/Form/UpgradeOptionsForm.php b/classes/Twig/Form/UpgradeOptionsForm.php index 305d32f64..34dfe8641 100644 --- a/classes/Twig/Form/UpgradeOptionsForm.php +++ b/classes/Twig/Form/UpgradeOptionsForm.php @@ -51,15 +51,12 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) $this->translator = $translator; $this->formRenderer = $formRenderer; - // TODO: Class const - $translationDomain = 'Modules.Autoupgrade.Admin'; - $this->fields = [ 'PS_AUTOUP_PERFORMANCE' => [ 'title' => $translator->trans( 'Server performance', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), 'cast' => 'intval', 'validation' => 'isInt', @@ -67,24 +64,24 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'type' => 'select', 'desc' => $translator->trans( 'Unless you are using a dedicated server, select "Low".', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ) . '
' . $translator->trans( 'A high value can cause the upgrade to fail if your server is not powerful enough to process the upgrade tasks in a short amount of time.', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), 'choices' => [ 1 => $translator->trans( 'Low (recommended)', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), - 2 => $translator->trans('Medium', [], $translationDomain), + 2 => $translator->trans('Medium', [], 'Modules.Autoupgrade.Admin'), 3 => $translator->trans( 'High', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), ], ], @@ -92,7 +89,7 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'title' => $translator->trans( 'Disable non-native modules', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), 'cast' => 'intval', 'validation' => 'isBool', @@ -100,19 +97,19 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'desc' => $translator->trans( 'As non-native modules can experience some compatibility issues, we recommend to disable them by default.', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ) . '
' . $translator->trans( 'Keeping them enabled might prevent you from loading the "Modules" page properly after the upgrade.', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), ], 'PS_DISABLE_OVERRIDES' => [ 'title' => $translator->trans( 'Disable all overrides', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), 'cast' => 'intval', 'validation' => 'isBool', @@ -120,14 +117,14 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'desc' => $translator->trans( 'Enable or disable all classes and controllers overrides.', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), ], 'PS_AUTOUP_UPDATE_DEFAULT_THEME' => [ 'title' => $translator->trans( 'Upgrade the default theme', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), 'cast' => 'intval', 'validation' => 'isBool', @@ -136,12 +133,12 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'desc' => $translator->trans( 'If you customized the default PrestaShop theme in its folder (folder name "classic" in 1.7), enabling this option will lose your modifications.', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ) . '
' . $translator->trans( 'If you are using your own theme, enabling this option will simply update the default theme files, and your own theme will be safe.', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), ], @@ -149,7 +146,7 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'title' => $translator->trans( 'Switch to the default theme', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), 'cast' => 'intval', 'validation' => 'isBool', @@ -158,7 +155,7 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'desc' => $translator->trans( 'This will change your theme: your shop will then use the default theme of the version of PrestaShop you are upgrading to.', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), ], @@ -166,7 +163,7 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'title' => $translator->trans( 'Regenerate RTL stylesheet', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), 'cast' => 'intval', 'validation' => 'isBool', @@ -175,7 +172,7 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'desc' => $translator->trans( 'If enabled, any RTL-specific files that you might have added to all your themes might be deleted by the created stylesheet.', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), ], @@ -183,7 +180,7 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'title' => $translator->trans( 'Keep the customized email templates', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), 'cast' => 'intval', 'validation' => 'isBool', @@ -191,12 +188,12 @@ public function __construct(Translator $translator, FormRenderer $formRenderer) 'desc' => $translator->trans( 'This will not upgrade the default PrestaShop e-mails.', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ) . '
' . $translator->trans( 'If you customized the default PrestaShop e-mail templates, enabling this option will keep your modifications.', [], - $translationDomain + 'Modules.Autoupgrade.Admin' ), ], ]; From e454ee7f083ed3525d1e21fdd2209fff2736df03 Mon Sep 17 00:00:00 2001 From: Thomas BACCELLI Date: Wed, 20 Jul 2022 17:25:20 +0200 Subject: [PATCH 104/128] Add 1.7.8.7 script --- upgrade/sql/1.7.8.7.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 upgrade/sql/1.7.8.7.sql diff --git a/upgrade/sql/1.7.8.7.sql b/upgrade/sql/1.7.8.7.sql new file mode 100644 index 000000000..9bb06c731 --- /dev/null +++ b/upgrade/sql/1.7.8.7.sql @@ -0,0 +1,4 @@ +SET SESSION sql_mode=''; +SET NAMES 'utf8mb4'; + +DELETE FROM `PREFIX_smarty_cache`; \ No newline at end of file From 5d749d1e375a38ce6d937bc36d6f62db0d2b144d Mon Sep 17 00:00:00 2001 From: Progi1984 Date: Fri, 16 Sep 2022 16:34:56 +0200 Subject: [PATCH 105/128] Removed `US/Pacific New` from timezone list --- upgrade/sql/8.1.0.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 upgrade/sql/8.1.0.sql diff --git a/upgrade/sql/8.1.0.sql b/upgrade/sql/8.1.0.sql new file mode 100644 index 000000000..94cc2b15c --- /dev/null +++ b/upgrade/sql/8.1.0.sql @@ -0,0 +1,5 @@ +SET SESSION sql_mode=''; +SET NAMES 'utf8mb4'; + +UPDATE `PREFIX_configuration` SET `value` = 'US/Pacific' WHERE `name` = 'PS_TIMEZONE' AND `value` = 'US/Pacific-New' LIMIT 1; +DELETE FROM `PREFIX_timezone` WHERE `name` = 'US/Pacific-New'; From 9d20f488c13ac2b8b291efd615c8f277bd040625 Mon Sep 17 00:00:00 2001 From: Thomas BACCELLI Date: Tue, 20 Sep 2022 16:15:25 +0200 Subject: [PATCH 106/128] Set translation theme to null is it was classic --- upgrade/sql/1.7.8.8.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/upgrade/sql/1.7.8.8.sql b/upgrade/sql/1.7.8.8.sql index 39e391f93..1880ef074 100644 --- a/upgrade/sql/1.7.8.8.sql +++ b/upgrade/sql/1.7.8.8.sql @@ -2,3 +2,4 @@ SET SESSION sql_mode=''; SET NAMES 'utf8'; DELETE FROM `PREFIX_configuration` WHERE `name` = 'PS_SMARTY_CACHING_TYPE'; +UPDATE `PREFIX_translation` set theme = null WHERE `theme` = 'classic'; From db257ddb7dd90a0197365a52c718ab163fdbc869 Mon Sep 17 00:00:00 2001 From: Fabien Papet Date: Mon, 5 Sep 2022 15:19:26 +0200 Subject: [PATCH 107/128] Fix version number (both directory and local archive) --- classes/TaskRunner/Upgrade/UpgradeDb.php | 4 ++-- js/upgrade.js | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/classes/TaskRunner/Upgrade/UpgradeDb.php b/classes/TaskRunner/Upgrade/UpgradeDb.php index 7d5e357fc..c6ecfa86e 100644 --- a/classes/TaskRunner/Upgrade/UpgradeDb.php +++ b/classes/TaskRunner/Upgrade/UpgradeDb.php @@ -60,11 +60,11 @@ public function run() public function getCoreUpgrader() { - if (version_compare($this->container->getState()->getInstallVersion(), '1.7.0.0', '<')) { + if (version_compare($this->container->getState()->getInstallVersion(), '1.7', '<')) { return new CoreUpgrader16($this->container, $this->logger); } - if (version_compare($this->container->getState()->getInstallVersion(), '8.0.0', '<')) { + if (version_compare($this->container->getState()->getInstallVersion(), '8', '<')) { return new CoreUpgrader17($this->container, $this->logger); } diff --git a/js/upgrade.js b/js/upgrade.js index fae30b0ca..a8fea6b1e 100644 --- a/js/upgrade.js +++ b/js/upgrade.js @@ -11,6 +11,7 @@ if (typeof input === 'undefined') { ajaxUpgradeTabExists: true, currentIndex: 'page.php', tab: input.tab, + versionNumberRegex: '^(1\\.(6|7)\\.(\\d)\\.(\\d+)$)|^(8\\.(\\d).(\\d)$)', channel: 'major', translation: { confirmDeleteBackup: "Are you sure you want to delete this backup?", @@ -47,7 +48,7 @@ if (typeof input === 'undefined') { linkAndMd5CannotBeEmpty: "Link and MD5 hash cannot be empty", needToEnterArchiveVersionNumber: "You need to enter the version number associated with the archive.", noArchiveSelected: "No archive has been selected.", - needToEnterDirectoryVersionNumber: "You need to enter the version number associated with the directory.", + needToEnterDirectoryVersionNumber: "You must enter the full version number of the version you want to upgrade. The full version number can be present in the zip name (ex: 1.7.8.1, 8.0.0).", confirmSkipBackup: "Please confirm that you want to skip the backup.", confirmPreserveFileOptions: "Please confirm that you want to preserve file options.", lessOptions: "Less options", @@ -801,7 +802,7 @@ $(document).ready(function() { var archive_prestashop = $("select[name=archive_prestashop]").val(); var archive_num = $("input[name=archive_num]").val(); var archive_xml = $("select[name=archive_xml]").val(); - if (archive_num == "") { + if (archive_num == "" || !archive_num.match(input.versionNumberRegex)) { showConfigResult(input.translation.needToEnterArchiveVersionNumber, "error"); return false; } @@ -816,8 +817,8 @@ $(document).ready(function() { } else if ($newChannel === "directory") { params.channel = "directory"; params.directory_prestashop = $("select[name=directory_prestashop] option:selected").val(); - var directory_num = $("input[name=directory_num]").val(); - if (directory_num == "" || directory_num.indexOf(".") == -1) { + let directory_num = $("input[name=directory_num]").val(); + if (directory_num == "" || !directory_num.match(input.versionNumberRegex)) { showConfigResult(input.translation.needToEnterDirectoryVersionNumber, "error"); return false; } From 45db41ff066bd34fc89fc199062e7acc6f02d338 Mon Sep 17 00:00:00 2001 From: Fabien Papet Date: Mon, 5 Sep 2022 16:58:14 +0200 Subject: [PATCH 108/128] Update js/upgrade.js Co-authored-by: atomiix --- js/upgrade.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/upgrade.js b/js/upgrade.js index a8fea6b1e..24d3108a1 100644 --- a/js/upgrade.js +++ b/js/upgrade.js @@ -11,7 +11,7 @@ if (typeof input === 'undefined') { ajaxUpgradeTabExists: true, currentIndex: 'page.php', tab: input.tab, - versionNumberRegex: '^(1\\.(6|7)\\.(\\d)\\.(\\d+)$)|^(8\\.(\\d).(\\d)$)', + versionNumberRegex: /^(1\\.(6|7)\\.(\\d)\\.(\\d+)$)|^(8\\.(\\d).(\\d)$)/, channel: 'major', translation: { confirmDeleteBackup: "Are you sure you want to delete this backup?", From 8537cdf333b95e14cecea3b57eda049037095037 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Thu, 15 Sep 2022 11:04:48 +0200 Subject: [PATCH 109/128] fix jquery compatibility errors --- js/upgrade.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/js/upgrade.js b/js/upgrade.js index 24d3108a1..ba669c5ac 100644 --- a/js/upgrade.js +++ b/js/upgrade.js @@ -11,7 +11,6 @@ if (typeof input === 'undefined') { ajaxUpgradeTabExists: true, currentIndex: 'page.php', tab: input.tab, - versionNumberRegex: /^(1\\.(6|7)\\.(\\d)\\.(\\d+)$)|^(8\\.(\\d).(\\d)$)/, channel: 'major', translation: { confirmDeleteBackup: "Are you sure you want to delete this backup?", @@ -669,7 +668,7 @@ $(document).ready(function() { $("#changedList").toggle(); }); - $(".toggleSublist").die().live("click", function(e) { + $('body').on().on("click", '.toggleSublist', function(e) { e.preventDefault(); $(this).parent().next().toggle(); }); @@ -727,7 +726,7 @@ $(document).ready(function() { $("#diffList").toggle(); }); - $(".toggleSublist").die().live("click", function(e) { + $('body').on().on("click", '.toggleSublist', function(e) { e.preventDefault(); // this=a, parent=h3, next=ul $(this).parent().next().toggle(); @@ -767,10 +766,13 @@ $("input[name=btn_adv]").click(function(e) { }); $(document).ready(function() { - $("input[name|=submitConf]").bind("click", function(e) { + $("input[name|=submitConf], input[name=submitConf-channel]").bind("click", function(e) { + var params = {}; var $newChannel = $("select[name=channel] option:selected").val(); var $oldChannel = $("select[name=channel] option.current").val(); + var versionNumberRegex = /^(1\\.(6|7)\\.(\\d)\\.(\\d+)$)|^(8\\.(\\d).(\\d)$)/; + $oldChannel = ""; if ($oldChannel != $newChannel) { @@ -802,7 +804,7 @@ $(document).ready(function() { var archive_prestashop = $("select[name=archive_prestashop]").val(); var archive_num = $("input[name=archive_num]").val(); var archive_xml = $("select[name=archive_xml]").val(); - if (archive_num == "" || !archive_num.match(input.versionNumberRegex)) { + if (archive_num == "" || !archive_num.match(versionNumberRegex)) { showConfigResult(input.translation.needToEnterArchiveVersionNumber, "error"); return false; } @@ -818,7 +820,7 @@ $(document).ready(function() { params.channel = "directory"; params.directory_prestashop = $("select[name=directory_prestashop] option:selected").val(); let directory_num = $("input[name=directory_num]").val(); - if (directory_num == "" || !directory_num.match(input.versionNumberRegex)) { + if (directory_num == "" || !directory_num.match(versionNumberRegex)) { showConfigResult(input.translation.needToEnterDirectoryVersionNumber, "error"); return false; } From edbdcd035178c4455b50c2968d2839978bfe17ef Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Thu, 15 Sep 2022 11:08:32 +0200 Subject: [PATCH 110/128] fix regex --- js/upgrade.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/upgrade.js b/js/upgrade.js index ba669c5ac..4c02d26e5 100644 --- a/js/upgrade.js +++ b/js/upgrade.js @@ -45,9 +45,9 @@ if (typeof input === 'undefined') { mailFiles: "Mail file(s)", translationFiles: "Translation file(s)", linkAndMd5CannotBeEmpty: "Link and MD5 hash cannot be empty", - needToEnterArchiveVersionNumber: "You need to enter the version number associated with the archive.", + needToEnterArchiveVersionNumber: "You must enter the full version number of the version you want to upgrade. The full version number can be present in the zip name (ex: 1.7.8.1, 8.0.0).", noArchiveSelected: "No archive has been selected.", - needToEnterDirectoryVersionNumber: "You must enter the full version number of the version you want to upgrade. The full version number can be present in the zip name (ex: 1.7.8.1, 8.0.0).", + needToEnterDirectoryVersionNumber: "You need to enter the version number associated with the directory.", confirmSkipBackup: "Please confirm that you want to skip the backup.", confirmPreserveFileOptions: "Please confirm that you want to preserve file options.", lessOptions: "Less options", @@ -771,7 +771,7 @@ $(document).ready(function() { var params = {}; var $newChannel = $("select[name=channel] option:selected").val(); var $oldChannel = $("select[name=channel] option.current").val(); - var versionNumberRegex = /^(1\\.(6|7)\\.(\\d)\\.(\\d+)$)|^(8\\.(\\d).(\\d)$)/; + var versionNumberRegex = /^8\.\d+\.\d+$|^1\.(6|7)\.\d+\.\d+$/; $oldChannel = ""; From 9193f15382ee2e52d9888c1685a50ddc5e536452 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Tue, 20 Sep 2022 14:58:29 +0200 Subject: [PATCH 111/128] fix undefined js error --- js/upgrade.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/upgrade.js b/js/upgrade.js index 4c02d26e5..c6224715a 100644 --- a/js/upgrade.js +++ b/js/upgrade.js @@ -804,7 +804,7 @@ $(document).ready(function() { var archive_prestashop = $("select[name=archive_prestashop]").val(); var archive_num = $("input[name=archive_num]").val(); var archive_xml = $("select[name=archive_xml]").val(); - if (archive_num == "" || !archive_num.match(versionNumberRegex)) { + if (archive_num == "" || (archive_num !== undefined && !archive_num.match(versionNumberRegex))) { showConfigResult(input.translation.needToEnterArchiveVersionNumber, "error"); return false; } @@ -820,7 +820,7 @@ $(document).ready(function() { params.channel = "directory"; params.directory_prestashop = $("select[name=directory_prestashop] option:selected").val(); let directory_num = $("input[name=directory_num]").val(); - if (directory_num == "" || !directory_num.match(versionNumberRegex)) { + if (directory_num == "" || (directory_num !== undefined && !directory_num.match(versionNumberRegex))) { showConfigResult(input.translation.needToEnterDirectoryVersionNumber, "error"); return false; } From bed3d41af328ad0efbbb38710023d47fd9f7dbba Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Wed, 21 Sep 2022 15:02:49 +0200 Subject: [PATCH 112/128] make match condition more readable --- js/upgrade.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/upgrade.js b/js/upgrade.js index c6224715a..f33a63a1e 100644 --- a/js/upgrade.js +++ b/js/upgrade.js @@ -804,7 +804,7 @@ $(document).ready(function() { var archive_prestashop = $("select[name=archive_prestashop]").val(); var archive_num = $("input[name=archive_num]").val(); var archive_xml = $("select[name=archive_xml]").val(); - if (archive_num == "" || (archive_num !== undefined && !archive_num.match(versionNumberRegex))) { + if (archive_num !== undefined && (archive_num == "" || !archive_num.match(versionNumberRegex))) { showConfigResult(input.translation.needToEnterArchiveVersionNumber, "error"); return false; } @@ -820,7 +820,7 @@ $(document).ready(function() { params.channel = "directory"; params.directory_prestashop = $("select[name=directory_prestashop] option:selected").val(); let directory_num = $("input[name=directory_num]").val(); - if (directory_num == "" || (directory_num !== undefined && !directory_num.match(versionNumberRegex))) { + if (directory_num !== undefined && (directory_num == "" || !directory_num.match(versionNumberRegex))) { showConfigResult(input.translation.needToEnterDirectoryVersionNumber, "error"); return false; } From df2f231efbc6c7c5d37bd807d7fef2d3fc1142b7 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Wed, 21 Sep 2022 15:08:26 +0200 Subject: [PATCH 113/128] remove check undefined for directory --- js/upgrade.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/upgrade.js b/js/upgrade.js index f33a63a1e..e883cacae 100644 --- a/js/upgrade.js +++ b/js/upgrade.js @@ -820,7 +820,7 @@ $(document).ready(function() { params.channel = "directory"; params.directory_prestashop = $("select[name=directory_prestashop] option:selected").val(); let directory_num = $("input[name=directory_num]").val(); - if (directory_num !== undefined && (directory_num == "" || !directory_num.match(versionNumberRegex))) { + if (directory_num == "" || !directory_num.match(versionNumberRegex)) { showConfigResult(input.translation.needToEnterDirectoryVersionNumber, "error"); return false; } From c980e01881b763efc37cfd7dc12b8b8c806f43bf Mon Sep 17 00:00:00 2001 From: Jonathan Lelievre Date: Fri, 23 Sep 2022 12:12:21 +0200 Subject: [PATCH 114/128] Add domain in all trans calls in twig templates --- views/templates/block/activityLog.twig | 8 +- views/templates/block/channelInfo.twig | 12 +-- views/templates/block/checklist.twig | 60 ++++++------- views/templates/block/rollbackForm.twig | 10 +-- views/templates/block/upgradeButtonBlock.twig | 84 +++++++++---------- views/templates/block/versionComparison.twig | 6 +- views/templates/main.twig | 6 +- 7 files changed, 93 insertions(+), 93 deletions(-) diff --git a/views/templates/block/activityLog.twig b/views/templates/block/activityLog.twig index c683e06f2..87faff16e 100644 --- a/views/templates/block/activityLog.twig +++ b/views/templates/block/activityLog.twig @@ -1,7 +1,7 @@
{{ 'PHP\'s "Safe mode" option is turned off'|trans({}, 'Modules.Autoupgrade.Admin') }}{{ 'PHP\'s "Safe mode" option is turned off'|trans({}, 'Modules.Autoupgrade.Admin')|raw }} {% if safeModeIsDisabled %} {{ icons.ok }} @@ -69,7 +69,7 @@
{{ 'PHP\'s "allow_url_fopen" option is turned on, or cURL is installed'|trans({}, 'Modules.Autoupgrade.Admin') }}{{ 'PHP\'s "allow_url_fopen" option is turned on, or cURL is installed'|trans({}, 'Modules.Autoupgrade.Admin')|raw }} {% if allowUrlFopenOrCurlIsEnabled %} {{ icons.ok }} @@ -79,7 +79,7 @@
{{ 'PHP\'s "zip" extension is enabled'|trans({}, 'Modules.Autoupgrade.Admin') }}{{ 'PHP\'s "zip" extension is enabled'|trans({}, 'Modules.Autoupgrade.Admin')|raw }} {% if zipIsEnabled %} {{ icons.ok }} From b0d221fab288ae4e5615e9c179b7efc36a4d76a0 Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Mon, 26 Sep 2022 17:37:01 +0200 Subject: [PATCH 117/128] another raw --- views/templates/block/upgradeButtonBlock.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/templates/block/upgradeButtonBlock.twig b/views/templates/block/upgradeButtonBlock.twig index be65b6a69..3bff9eff6 100644 --- a/views/templates/block/upgradeButtonBlock.twig +++ b/views/templates/block/upgradeButtonBlock.twig @@ -78,7 +78,7 @@

{{ 'Channels are offering you different ways to perform an upgrade. You can either upload the new version manually or let the 1-Click Upgrade module download it for you.'|trans({}, 'Modules.Autoupgrade.Admin') }}
{{ 'The Alpha, Beta and Private channels give you the ability to upgrade to a non-official or unstable release (for testing purposes only).'|trans({}, 'Modules.Autoupgrade.Admin') }}
- {{ 'By default, you should use the "Minor release" channel which is offering the latest stable version available.'|trans({}, 'Modules.Autoupgrade.Admin') }} + {{ 'By default, you should use the "Minor release" channel which is offering the latest stable version available.'|trans({}, 'Modules.Autoupgrade.Admin')|raw }}


From 66c5616f0abb9ebc79560fc80498bf78447d3aab Mon Sep 17 00:00:00 2001 From: matthieu-rolland Date: Mon, 3 Oct 2022 18:28:59 +0200 Subject: [PATCH 118/128] delete module catalog tab when mbo is installed --- upgrade/sql/8.0.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/upgrade/sql/8.0.0.sql b/upgrade/sql/8.0.0.sql index 09b6a6f9d..45ffecfd9 100644 --- a/upgrade/sql/8.0.0.sql +++ b/upgrade/sql/8.0.0.sql @@ -8,6 +8,7 @@ DROP TABLE IF EXISTS `PREFIX_referrer_shop`; /* Remove page Referrers */ ## Remove Tabs /* PHP:ps_remove_controller_tab('AdminThemesCatalog'); */; +/* PHP:ps_remove_controller_tab('AdminParentModulesCatalog'); */; /* PHP:ps_remove_controller_tab('AdminModulesCatalog'); */; /* PHP:ps_remove_controller_tab('AdminAddonsCatalog'); */; /* PHP:ps_remove_controller_tab('AdminReferrers'); */; From cd522abd2405a384ff1caa0adf1c3114b940f949 Mon Sep 17 00:00:00 2001 From: Hana REBAI Date: Thu, 20 Oct 2022 16:57:11 +0200 Subject: [PATCH 119/128] fix eroor1 validator --- upgrade/php/editorial_update.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upgrade/php/editorial_update.php b/upgrade/php/editorial_update.php index 184ec79d4..44cdd96b4 100644 --- a/upgrade/php/editorial_update.php +++ b/upgrade/php/editorial_update.php @@ -29,14 +29,14 @@ function editorial_update() if (Db::getInstance()->getValue('SELECT `id_module` FROM `' . _DB_PREFIX_ . 'module` WHERE `name`="editorial"')) { Db::getInstance()->execute(' - CREATE TABLE `' . _DB_PREFIX_ . 'editorial` ( + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'editorial` ( `id_editorial` int(10) unsigned NOT NULL auto_increment, `body_home_logo_link` varchar(255) NOT NULL, PRIMARY KEY (`id_editorial`)) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8'); Db::getInstance()->execute(' - CREATE TABLE `' . _DB_PREFIX_ . 'editorial_lang` ( + CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'editorial_lang` ( `id_editorial` int(10) unsigned NOT NULL, `id_lang` int(10) unsigned NOT NULL, `body_title` varchar(255) NOT NULL, From 6c0321e3c23f206e7893dc7775b6604789c3c155 Mon Sep 17 00:00:00 2001 From: Khouloud BELGUITH Date: Thu, 27 Oct 2022 11:35:53 +0100 Subject: [PATCH 120/128] Update licene header --- tests/fixtures/AppKernelExample.php.txt | 4 ++-- upgrade/install-4.10.1.php | 4 ++-- views/templates/hook/dashboard_zone_one.tpl | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/fixtures/AppKernelExample.php.txt b/tests/fixtures/AppKernelExample.php.txt index 5a57c8658..a42290493 100644 --- a/tests/fixtures/AppKernelExample.php.txt +++ b/tests/fixtures/AppKernelExample.php.txt @@ -1,6 +1,6 @@ - * @copyright 2007-2018 PrestaShop SA + * @copyright 2007-2022 PrestaShop SA * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ diff --git a/upgrade/install-4.10.1.php b/upgrade/install-4.10.1.php index 4b226f19c..f9f87e94d 100644 --- a/upgrade/install-4.10.1.php +++ b/upgrade/install-4.10.1.php @@ -1,6 +1,6 @@ - * @copyright 2007-2020 PrestaShop SA + * @copyright 2007-2022 PrestaShop SA * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) * International Registered Trademark & Property of PrestaShop SA */ diff --git a/views/templates/hook/dashboard_zone_one.tpl b/views/templates/hook/dashboard_zone_one.tpl index f4a3fe5e0..739432331 100644 --- a/views/templates/hook/dashboard_zone_one.tpl +++ b/views/templates/hook/dashboard_zone_one.tpl @@ -1,5 +1,5 @@ {** - * 2007-2020 PrestaShop and Contributors + * 2007-2022 PrestaShop and Contributors * * NOTICE OF LICENSE * @@ -12,7 +12,7 @@ * to license@prestashop.com so we can send you a copy immediately. * * @author PrestaShop SA - * @copyright 2007-2020 PrestaShop SA and Contributors + * @copyright 2007-2022 PrestaShop SA and Contributors * @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0) * International Registered Trademark & Property of PrestaShop SA *} From f632a354d74f99981cf038e86476d1ceb2cd08fb Mon Sep 17 00:00:00 2001 From: Thomas BACCELLI Date: Fri, 22 Jul 2022 12:00:45 +0200 Subject: [PATCH 121/128] Fix conflicts from master commit From 70a3a73131885d19d9d30ca2cadd35a40d7dfc36 Mon Sep 17 00:00:00 2001 From: Jonathan Lelievre Date: Tue, 1 Nov 2022 13:10:13 +0100 Subject: [PATCH 122/128] Fix PHPStan config after 8.0.0 docker release --- .github/workflows/php.yml | 2 +- .../{phpstan-8.0.0-beta.1.neon => phpstan-8.0.0.neon} | 0 tests/phpstan/phpstan-latest.neon | 8 +++----- 3 files changed, 4 insertions(+), 6 deletions(-) rename tests/phpstan/{phpstan-8.0.0-beta.1.neon => phpstan-8.0.0.neon} (100%) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index fa832f327..0cc53d64c 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -91,7 +91,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - presta-versions: ['1.6.1.18', '1.7.2.5', '1.7.3.4', '1.7.4.4', '1.7.5.1', '1.7.6', '1.7.7', '1.7.8', 'latest', '8.0.0-beta.1'] + presta-versions: ['1.6.1.18', '1.7.2.5', '1.7.3.4', '1.7.4.4', '1.7.5.1', '1.7.6', '1.7.7', '1.7.8', '8.0.0', 'latest'] steps: - name: Checkout uses: actions/checkout@v2.0.0 diff --git a/tests/phpstan/phpstan-8.0.0-beta.1.neon b/tests/phpstan/phpstan-8.0.0.neon similarity index 100% rename from tests/phpstan/phpstan-8.0.0-beta.1.neon rename to tests/phpstan/phpstan-8.0.0.neon diff --git a/tests/phpstan/phpstan-latest.neon b/tests/phpstan/phpstan-latest.neon index 302d07712..bed239fdf 100644 --- a/tests/phpstan/phpstan-latest.neon +++ b/tests/phpstan/phpstan-latest.neon @@ -3,8 +3,6 @@ includes: parameters: excludes_analyse: - - ./../../classes/UpgradeTools/CoreUpgrader/CoreUpgrader80.php - ignoreErrors: - - '#Access to an undefined property Module::\$installed.#' - - '#Call to method fetchLocale\(\) on an unknown class PrestaShop\\PrestaShop\\Core\\Cldr\\Update.#' - - '#Instantiated class PrestaShop\\PrestaShop\\Core\\Cldr\\Update not found.#' + - ./../../classes/UpgradeTools/CoreUpgrader/CoreUpgrader17.php + - ./../../classes/Twig/TransFilterExtension.php + - ./../../classes/UpgradeContainer.php From 35c20bfc44af454ce1e5e5d95afba9982a3b64f0 Mon Sep 17 00:00:00 2001 From: Daniel Hlavacek Date: Thu, 10 Nov 2022 16:34:09 +0100 Subject: [PATCH 123/128] Add sitemap hook --- upgrade/sql/8.1.0.sql | 3 +++ 1 file changed, 3 insertions(+) diff --git a/upgrade/sql/8.1.0.sql b/upgrade/sql/8.1.0.sql index 94cc2b15c..a49c7be31 100644 --- a/upgrade/sql/8.1.0.sql +++ b/upgrade/sql/8.1.0.sql @@ -3,3 +3,6 @@ SET NAMES 'utf8mb4'; UPDATE `PREFIX_configuration` SET `value` = 'US/Pacific' WHERE `name` = 'PS_TIMEZONE' AND `value` = 'US/Pacific-New' LIMIT 1; DELETE FROM `PREFIX_timezone` WHERE `name` = 'US/Pacific-New'; + +INSERT IGNORE INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `position`) VALUES + (NULL, 'actionModifyFrontendSitemap', 'Add or remove links on sitemap page', 'This hook allows to modify links on sitemap page of your shop. Useful to improve indexation of your modules.', '1'); From bd3cc75ea67ca1b2343efd40fb8cfe1d3a7b58cf Mon Sep 17 00:00:00 2001 From: boubkerbribri Date: Tue, 15 Nov 2022 12:11:39 +0100 Subject: [PATCH 124/128] Disable e2e nightly cron --- .github/workflows/e2e_nightly_upgrade.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e_nightly_upgrade.yml b/.github/workflows/e2e_nightly_upgrade.yml index a7728ff75..e334d39fb 100755 --- a/.github/workflows/e2e_nightly_upgrade.yml +++ b/.github/workflows/e2e_nightly_upgrade.yml @@ -1,8 +1,8 @@ name: Nightly upgrades with user interfaces on: - schedule: - - cron: "0 6 * * *" # Every day at 06:00Am + #schedule: + # - cron: "0 6 * * *" # Every day at 06:00Am env: reports_directory: ${{ github.workspace }}/json-reports From f609c83310569d85a2e950df4321309f112a0eab Mon Sep 17 00:00:00 2001 From: boubkerbribri Date: Tue, 15 Nov 2022 12:16:46 +0100 Subject: [PATCH 125/128] Add comment --- .github/workflows/e2e_nightly_upgrade.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/e2e_nightly_upgrade.yml b/.github/workflows/e2e_nightly_upgrade.yml index e334d39fb..83b829da8 100755 --- a/.github/workflows/e2e_nightly_upgrade.yml +++ b/.github/workflows/e2e_nightly_upgrade.yml @@ -1,6 +1,7 @@ name: Nightly upgrades with user interfaces on: + #Disabled for now : dependencies used are hard to maintain, should be fixed #schedule: # - cron: "0 6 * * *" # Every day at 06:00Am From dc1a539feecf3a36d2f835aedc649913ccf55ee3 Mon Sep 17 00:00:00 2001 From: Daniel Hlavacek Date: Thu, 10 Nov 2022 16:30:52 +0100 Subject: [PATCH 126/128] Add backorder settings --- upgrade/sql/8.1.0.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/upgrade/sql/8.1.0.sql b/upgrade/sql/8.1.0.sql index a49c7be31..21342dc65 100644 --- a/upgrade/sql/8.1.0.sql +++ b/upgrade/sql/8.1.0.sql @@ -6,3 +6,7 @@ DELETE FROM `PREFIX_timezone` WHERE `name` = 'US/Pacific-New'; INSERT IGNORE INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `position`) VALUES (NULL, 'actionModifyFrontendSitemap', 'Add or remove links on sitemap page', 'This hook allows to modify links on sitemap page of your shop. Useful to improve indexation of your modules.', '1'); + +/* Default configuration for backorder, in order to keep behavior */ +INSERT INTO `PREFIX_configuration` (`name`, `value`, `date_add`, `date_upd`) VALUES + ('PS_ENABLE_BACKORDER_STATUS', '1', NOW(), NOW()); From 5ae10a55fdd0370549b888d6c91279fae2f034b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Fran=C3=A7ois=20Viguier?= <16720275+jf-viguier@users.noreply.github.com> Date: Tue, 29 Nov 2022 10:13:14 +0100 Subject: [PATCH 127/128] Typo on module dir constant --- classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php index ad4ce735f..5eaa6b22d 100644 --- a/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php +++ b/classes/UpgradeTools/CoreUpgrader/CoreUpgrader.php @@ -461,8 +461,8 @@ protected function upgradeLanguages() if (!defined('_PS_TRANSLATIONS_DIR_')) { define('_PS_TRANSLATIONS_DIR_', _PS_ROOT_DIR_ . '/translations/'); } - if (!defined('_PS_MODULES_DIR_')) { - define('_PS_MODULES_DIR_', _PS_ROOT_DIR_ . '/modules/'); + if (!defined('_PS_MODULE_DIR_')) { + define('_PS_MODULE_DIR_', _PS_ROOT_DIR_ . '/modules/'); } if (!defined('_PS_MAILS_DIR_')) { define('_PS_MAILS_DIR_', _PS_ROOT_DIR_ . '/mails/'); From 60ad656305ce8f3ed9cb94d9d42390a41674fce8 Mon Sep 17 00:00:00 2001 From: Krystian Podemski Date: Tue, 20 Dec 2022 11:34:24 +0100 Subject: [PATCH 128/128] Update autoupgrade.php --- autoupgrade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoupgrade.php b/autoupgrade.php index 11936db7e..454ee83fb 100644 --- a/autoupgrade.php +++ b/autoupgrade.php @@ -55,7 +55,7 @@ public function __construct() $this->displayName = $this->trans('1-Click Upgrade', [], 'Modules.Autoupgrade.Admin'); $this->description = $this->trans('Upgrade to the latest version of PrestaShop in a few clicks, thanks to this automated method.', [], 'Modules.Autoupgrade.Admin'); - $this->ps_versions_compliancy = ['min' => '1.6.0.0', 'max' => _PS_VERSION_]; + $this->ps_versions_compliancy = ['min' => '1.7.0.0', 'max' => _PS_VERSION_]; } public function install()