Closed mariuszsienkiewicz closed 5 months ago
Hi @mariuszsienkiewicz, thanks for reporting. I've opened a pr that (re-)adds the method, and also fixes issues with it. For example, if you for some reason had a faulty API key saved in the old module, you could not upgrade until you either deleted or fixed it. Also, the module needed to be passed to the install
method.
Upgrades are definitely implemented and should work, I've added a PHPDoc comment to each upgrade method to point readers towards the implementation that hopefully clears up how this works. Small tl;dr: In the install
function of the PDK we check whether we're supposed to do a fresh install or an upgrade. If upgrading, it determines which upgrade migrations need to be run based on the previous installed version.
:tada: This issue has been resolved in version 4.0.0-beta.3 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
:tada: This issue has been resolved in version 4.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Version check
PrestaShop version
8.1.5
PHP version
8.1
What went wrong?
When I try to upgrade the module from version 1.7.1 or 1.7.2 (but any version will be problematic I think) to beta-2 I get this error:
The problem is in the upgrade scripts:
https://github.com/myparcelnl/prestashop/blob/45fd4612de21d7a86723dc0eda5ad8748efd7c5f/upgrade/upgrade-1.7.2.php#L5-L8
It uses Facade that sets the ancestor to
MyParcelNL\PrestaShop\Service\ModuleService
which of course doesn't contain the install method and because of this upgrade fails.It's quite surprising that every update script has the same content, is it because the beta version doesn't support updates for now, or why does it look like this?
Reproduction steps
Relevant log output
No response
Additional context
No response