Skip to content

Commit

Permalink
Merge pull request #633 from PrestaShop/dev
Browse files Browse the repository at this point in the history
Release 4.16.4
  • Loading branch information
M0rgan01 authored Sep 19, 2023
2 parents f668dd2 + f17f38b commit 106e6eb
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 17 deletions.
35 changes: 20 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,32 @@
## About

This module allows to upgrade your shop to a more recent version of PrestaShop. It can used as a CLI tool or with a web assistant.
This module is compatible with all PrestaShop 1.7 versions.
The latest versions of the module are compatible with all PrestaShop 1.7 and higher releases.

# Branches
> [!IMPORTANT]
> This module has a specific [Release Process][release-process]. If you do release a new version, make sure to follow it.
## Branches

Branch `develop` contains code for future versions of the module, which allow upgrades from 1.7.x versions to higher.

Branch `4.14.x` contains code for `4.14.x` patch versions which allow upgrading from 1.6.x versions to 1.7.x .

If you wish to upgrade a shop powered by PrestaShop 1.6, please use the latest 4.14.x version to upgrade to a 1.7 version.
If you wish to upgrade a shop powered by PrestaShop 1.6, **please use the latest 4.14.3 version** to upgrade to a 1.7 version.
Upgrades from 1.6.x to 8.x should be done in 2 steps (1.6.x to 1.7.x then 1.7.x to 8.x).

Please note PrestaShop 1.6 and older are not maintained anymore.

# Prerequisites
## Prerequisites

* PrestaShop 1.7 or 8
* PHP 5.6+

# Installation
## Installation

All versions can be found in the [releases list](https://github.com/PrestaShop/autoupgrade/releases).

## Create a module from source code
### Create a module from source code

If you download a ZIP archive that contains the source code or if you want to use the current state of the code, you need to build the module from the sources:

Expand All @@ -39,14 +43,14 @@ If you download a ZIP archive that contains the source code or if you want to us
* Create a new ZIP archive from the of **autoupgrade** folder.
* Now you can install it in your shop. For example, you can upload it using the dropzone in Module Manager back office page.

# Running an upgrade on PrestaShop
## Running an upgrade on PrestaShop

Upgrading a shop can be done using:

* the configuration page of the module (browse the back office page provided by the module)
* in command line by calling the file *cli-upgrade.php*

## Command line parameters
### Command line parameters

Upgrade can be automated by calling *cli-upgrade.php*.
The following parameters are mandatory:
Expand All @@ -59,12 +63,12 @@ The following parameters are mandatory:
$ php cli-upgrade.php --dir=admin-dev --channel=major
```

# Rollback a shop
## Rollback a shop

If an error occurs during the upgrade process, the rollback will be suggested.
In case you lost the page from your backoffice, note it can be triggered via CLI.

## Command line parameters
### Command line parameters

Rollback can be automated by calling *cli-rollback.php*.
The following parameters are mandatory:
Expand All @@ -76,26 +80,27 @@ The following parameters are mandatory:
$ php cli-rollback.php --dir=admin-dev --backup=V1.7.5.1_20190502-191341-22e883bd
```

# Documentation
## Documentation

Documentation is hosted on [the Developer documentation][doc].

# Contributing
## Contributing

PrestaShop modules are open source extensions to the [PrestaShop e-commerce platform][prestashop]. Everyone is welcome and even encouraged to contribute with their own improvements!

Just make sure to follow our [contribution guidelines][contribution-guidelines].

## Reporting issues
### Reporting issues

You can report issues with this module in the main PrestaShop repository. [Click here to report an issue][report-issue].

# License
## License

This module is released under the [Academic Free License 3.0][AFL-3.0]

[report-issue]: https://github.com/PrestaShop/PrestaShop/issues/new/choose
[prestashop]: https://www.prestashop-project.org/
[contribution-guidelines]: https://devdocs.prestashop-project.org/8/contribute/contribution-guidelines/project-modules/
[AFL-3.0]: https://opensource.org/licenses/AFL-3.0
[doc]: https://devdocs.prestashop-project.org/8/development/upgrade-module/
[doc]: https://devdocs.prestashop-project.org/8/basics/keeping-up-to-date/upgrade-module/
[release-process]: https://www.prestashop-project.org/maintainers-guide/processes/release/autoupgrade/
2 changes: 1 addition & 1 deletion 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.3';
$this->version = '4.16.4';
$this->need_instance = 1;

$this->bootstrap = true;
Expand Down
4 changes: 4 additions & 0 deletions classes/UpgradeSelfCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,10 @@ public function isApacheModRewriteEnabled()
*/
public function checkKeyGeneration()
{
if ($this->upgrader->version_num === null) {
return true;
}

// Check if key is needed on the version we are upgrading to, if lower, not needed
if (version_compare($this->upgrader->version_num, '8.1.0', '<')) {
return true;
Expand Down
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<module>
<name>autoupgrade</name>
<displayName><![CDATA[1-Click Upgrade]]></displayName>
<version><![CDATA[4.16.3]]></version>
<version><![CDATA[4.16.4]]></version>
<description><![CDATA[Upgrade to the latest version of PrestaShop in a few clicks, thanks to this automated method.]]></description>
<author><![CDATA[PrestaShop]]></author>
<tab><![CDATA[administration]]></tab>
Expand Down
4 changes: 4 additions & 0 deletions upgrade/sql/8.1.2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ We fixed it for people installing fresh 8.1.2, but we also need to fix it for pe
UPDATE `PREFIX_tab` SET wording_domain = 'Admin.Navigation.Menu', wording = 'Security' WHERE class_name = 'AdminParentSecurity';
UPDATE `PREFIX_tab` SET wording_domain = 'Admin.Navigation.Menu', wording = 'Employee Sessions' WHERE class_name = 'AdminSecuritySessionEmployee';
UPDATE `PREFIX_tab` SET wording_domain = 'Admin.Navigation.Menu', wording = 'Customer Sessions' WHERE class_name = 'AdminSecuritySessionCustomer';

INSERT IGNORE INTO `PREFIX_hook` (`id_hook`, `name`, `title`, `description`, `position`) VALUES
(NULL, 'actionLanguageLinkParameters', 'Add parameters to language link', 'Allows modules to provide proper parameters for links in other languages.', '1'),
(NULL, 'actionAfterLoadRoutes', 'Triggers after loading routes', 'Allow modules to modify routes in any way or add their own multilanguage routes.', '1');

0 comments on commit 106e6eb

Please sign in to comment.