Skip to content

Commit

Permalink
Merge pull request #634 from PrestaShop/dev
Browse files Browse the repository at this point in the history
Release 5.0.0
  • Loading branch information
Hlavtox committed Dec 13, 2023
2 parents 106e6eb + 2a6fbfe commit 5b59ba4
Show file tree
Hide file tree
Showing 319 changed files with 743 additions and 20,303 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/e2e_nightly_upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.1.0

- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 16

- name: Install dependencies
shell: bash
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
steps:

# Setup PrestaShop and Install Autoupgrade module
- uses: actions/checkout@v2
- uses: actions/checkout@v3.1.0

- run: |
cp -r .github .github_dev
Expand Down Expand Up @@ -94,9 +94,9 @@ jobs:

# Install Module with user interface
- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 12
node-version: 16

- name: Install dependencies
run: npm install
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.1.0

- uses: actions/download-artifact@v2
name: Download reports
Expand All @@ -173,7 +173,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 12
node-version: 16

- name: Install dependencies
shell: bash
Expand Down Expand Up @@ -206,7 +206,7 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.1.0

- uses: actions/download-artifact@v2
name: Download report
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/nightly_upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Set up matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.1.0
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
Expand All @@ -22,12 +22,10 @@ jobs:
strategy:
fail-fast: false
matrix:
from: ['8.0.4', '1.7.6.9', '1.7.7.0', '1.6.1.24']
from: ['8.0.4', '1.7.6.9', '1.7.7.0']
ps-versions: ${{ fromJson(needs.get_matrix.outputs.matrix) }}
branch: ['dev', 'master']
exclude:
- from: '1.6.1.24'
ps-versions: {branch: 'develop'}
- from: '1.7.6.9'
ps-versions: {branch: 'develop'}
- from: '1.7.7.0'
Expand All @@ -39,7 +37,7 @@ jobs:
outputs:
result: ${{ steps.export-result.outputs.result }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.1.0
- if: ${{ matrix.branch != 'dev' }}
run: |
cp -r .github .github_dev
Expand Down Expand Up @@ -76,7 +74,7 @@ jobs:
matrix:
ps-versions: ${{ fromJson(needs.get_matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.1.0
- uses: actions/download-artifact@v2
with:
path: ./artifacts/
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.0.0
uses: actions/checkout@v3.1.0

- name: PHP syntax checker 5.6
uses: prestashop/github-action-php-lint/5.6@master
Expand Down Expand Up @@ -50,10 +50,10 @@ jobs:
php-version: '5.6'

- name: Checkout
uses: actions/checkout@v2.0.0
uses: actions/checkout@v3.1.0

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: vendor
key: php-${{ hashFiles('composer.lock') }}
Expand All @@ -76,7 +76,7 @@ jobs:
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv, ext-zip
- uses: actions/checkout@v2
- uses: actions/checkout@v3.1.0
with:
fetch-depth: 0

Expand All @@ -89,21 +89,21 @@ 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', '8.0.0', 'latest']
presta-versions: ['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
uses: actions/checkout@v3.1.0

# Add vendor folder in cache to make next builds faster
- name: Cache vendor folder
uses: actions/cache@v1
uses: actions/cache@v3
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
uses: actions/cache@v3
with:
path: ~/.composer/cache
key: php-composer-cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ jobs:
upgrade:
strategy:
matrix:
from: ['1.6.1.11', '1.7.6.9', '1.7.6.1', '1.7.7.0']
from: ['1.7.6.9', '1.7.6.1', '1.7.7.0']
ps-versions:
- channel: minor
- channel: major
runs-on: ubuntu-latest
name: Upgrade
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3.1.0
- name: Composer Install
run: composer install
- name: Upgrade & Rollback
Expand Down
15 changes: 0 additions & 15 deletions AdminSelfUpgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -522,21 +522,6 @@ public function display()
parent::display();
}

/**
* @deprecated
* Method allowing errors on very old tabs to be displayed.
* On the next major of this module, use an admin controller and get rid of this.
*
* This method is called by functions.php available in the admin root folder.
*/
public function displayErrors()
{
if (empty($this->_errors)) {
return;
}
echo implode(' - ', $this->_errors);
}

/**
* Adapter for trans calls, existing only on PS 1.7.
* Making them available for PS 1.6 as well.
Expand Down
1 change: 0 additions & 1 deletion ajax-upgradetabconfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ function autoupgrade_init_container($callerFilePath)
}

define('AUTOUPGRADE_MODULE_DIR', _PS_MODULE_DIR_ . 'autoupgrade' . DIRECTORY_SEPARATOR);
require_once AUTOUPGRADE_MODULE_DIR . 'functions.php';
require_once AUTOUPGRADE_MODULE_DIR . 'vendor/autoload.php';

$dir = Tools14::safeOutput(Tools14::getValue('dir'));
Expand Down
4 changes: 2 additions & 2 deletions autoupgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __construct()
$this->name = 'autoupgrade';
$this->tab = 'administration';
$this->author = 'PrestaShop';
$this->version = '4.16.4';
$this->version = '5.0.0';
$this->need_instance = 1;

$this->bootstrap = true;
Expand Down Expand Up @@ -159,7 +159,7 @@ public function hookDashboardZoneOne($params)
public function getContent()
{
global $cookie;
header('Location: index.php?tab=AdminSelfUpgrade&token=' . md5(pSQL(_COOKIE_KEY_ . 'AdminSelfUpgrade' . (int) Tab::getIdFromClassName('AdminSelfUpgrade') . (int) $cookie->id_employee)));
header('Location: index.php?controller=AdminSelfUpgrade&token=' . md5(pSQL(_COOKIE_KEY_ . 'AdminSelfUpgrade' . (int) Tab::getIdFromClassName('AdminSelfUpgrade') . (int) $cookie->id_employee)));
exit;
}

Expand Down
1 change: 1 addition & 0 deletions classes/PrestashopConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public function getPrestaShopVersion()
$this->psRootDir . '/config/settings.inc.php',
$this->psRootDir . '/config/autoload.php',
$this->psRootDir . '/app/AppKernel.php',
$this->psRootDir . '/src/Core/Version.php',
];
foreach ($files as $file) {
if (!file_exists($file)) {
Expand Down
4 changes: 3 additions & 1 deletion classes/TaskRunner/Miscellaneous/CompareReleases.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
use PrestaShop\Module\AutoUpgrade\TaskRunner\AbstractTask;

/**
* get the list of all modified and deleted files between current version
* This class gets the list of all modified and deleted files between current version
* and target version (according to channel configuration).
*/
class CompareReleases extends AbstractTask
Expand Down Expand Up @@ -61,6 +61,8 @@ public function run()
$version = $upgrader->version_num;
}

// Get list of differences between these two versions. The differences will be fetched from a local
// XML file if it exists, or from PrestaShop API.
$diffFileList = $upgrader->getDiffFilesList(_PS_VERSION_, $version);
if (!is_array($diffFileList)) {
$this->nextParams['status'] = 'error';
Expand Down
7 changes: 0 additions & 7 deletions classes/TaskRunner/Upgrade/UpgradeDb.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@

use PrestaShop\Module\AutoUpgrade\TaskRunner\AbstractTask;
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\CoreUpgrader\CoreUpgrader81;
use PrestaShop\Module\AutoUpgrade\UpgradeTools\SettingsFileWriter;

class UpgradeDb extends AbstractTask
{
Expand Down Expand Up @@ -61,10 +59,6 @@ public function run()

public function getCoreUpgrader()
{
if (version_compare($this->container->getState()->getInstallVersion(), '1.7', '<')) {
return new CoreUpgrader16($this->container, $this->logger);
}

if (version_compare($this->container->getState()->getInstallVersion(), '8', '<')) {
return new CoreUpgrader17($this->container, $this->logger);
}
Expand All @@ -85,7 +79,6 @@ public function init()

// Migrating settings file
$this->container->initPrestaShopAutoloader();
(new SettingsFileWriter($this->translator))->migrateSettingsFile($this->logger);
parent::init();
}
}
Loading

0 comments on commit 5b59ba4

Please sign in to comment.