Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to PrestaShop 8.0 #74

Merged
merged 21 commits into from
Jul 14, 2023
Merged

Upgrade to PrestaShop 8.0 #74

merged 21 commits into from
Jul 14, 2023

Conversation

BitcoinMitchell
Copy link
Collaborator

@BitcoinMitchell BitcoinMitchell commented Jan 17, 2023

Questions Answers
Description? This MR upgrades the plugin to PHP 8 (or PHP 8.1) and PrestaShop 8.0. The amount of changes are minimal, but since we are bumping the base PrestaShop requirement (and PrestaShop being PHP 8/8.1 compatible) it would be a waste to not also update our PHP version
Type? improvement
BC breaks? yes
Deprecations? no
Fixed ticket? Fixes #70

This is currently a draft and testing version will be attached to this MR.

Versions

@BitcoinMitchell
Copy link
Collaborator Author

@powerpowera would you be able to test this? I've done some local testing and it looks good, but it would help if someone else could test it as well.

dependabot bot and others added 4 commits February 1, 2023 22:48
Bumps [symfony/symfony](https://github.com/symfony/symfony) from 4.4.47 to 4.4.50.
- [Release notes](https://github.com/symfony/symfony/releases)
- [Changelog](https://github.com/symfony/symfony/blob/v4.4.50/CHANGELOG-4.4.md)
- [Commits](symfony/symfony@v4.4.47...v4.4.50)

---
updated-dependencies:
- dependency-name: symfony/symfony
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [symfony/http-kernel](https://github.com/symfony/http-kernel) from 4.4.47 to 5.4.20.
- [Release notes](https://github.com/symfony/http-kernel/releases)
- [Changelog](https://github.com/symfony/http-kernel/blob/6.2/CHANGELOG.md)
- [Commits](symfony/http-kernel@v4.4.47...v5.4.20)

---
updated-dependencies:
- dependency-name: symfony/http-kernel
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
@powerpowera
Copy link

Page not found
The controller AdminConfigureBTCPay is missing or invalid.

I'm getting this when trying to update.

Everything's fine when I'm using fresh local env.

@BitcoinMitchell
Copy link
Collaborator Author

Page not found The controller AdminConfigureBTCPay is missing or invalid.

I'm getting this when trying to update.

Everything's fine when I'm using fresh local env.

Odd, thank you for the feedback! I'll try and figure out why that happens.

@BitcoinMitchell
Copy link
Collaborator Author

BitcoinMitchell commented Feb 20, 2023

Resolved an issue with the upgrade script that might relate to the page error. Not 100% sure, but sharing it none-the-less. Will keep looking for other issues.


6.0.0.2: btcpay.zip

Bumps [squizlabs/php_codesniffer](https://github.com/squizlabs/PHP_CodeSniffer) from 3.7.1 to 3.7.2.
- [Release notes](https://github.com/squizlabs/PHP_CodeSniffer/releases)
- [Commits](squizlabs/PHP_CodeSniffer@3.7.1...3.7.2)

---
updated-dependencies:
- dependency-name: squizlabs/php_codesniffer
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [smarty/smarty](https://github.com/smarty-php/smarty) from 4.2.1 to 4.3.1.
- [Release notes](https://github.com/smarty-php/smarty/releases)
- [Changelog](https://github.com/smarty-php/smarty/blob/master/CHANGELOG.md)
- [Commits](smarty-php/smarty@v4.2.1...v4.3.1)

---
updated-dependencies:
- dependency-name: smarty/smarty
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
@powerpowera
Copy link

An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "admin_btcpay_configure" as such route does not exist.").

@BitcoinMitchell
Copy link
Collaborator Author

An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "admin_btcpay_configure" as such route does not exist.").

Could you please provide any additional information? Was this on a fresh install? An upgraded installation? What page did you visit?

@ndeet
Copy link
Contributor

ndeet commented May 5, 2023

Hey, maybe related, when I use your 6.0.0.2 zip above on Presta 8.0.4 and I click on configure after successful install I get:

Page not found.
The controller AdminConfigureBTCPay is missing or invalid.

Looked into config/routes.yaml and maybe the legacy controller mapping does not work anymore? Any idea?

When I go to bank transfer config I see the following in browser url:
https://prestashop.ddev.site/admin-dev/index.php?controller=AdminModules&configure=ps_wirepayment

BTCPay:
https://prestashop.ddev.site/admin-dev/index.php?controller=AdminConfigureBTCPay

In the error logs I see the below error, but seems to be unrelated and only triggered because of some PHP notice breaking some template or something like that.

[05-May-2023 13:54:10] WARNING: [pool www] child 1908 said into stderr: "NOTICE: PHP message: PHP Fatal error:  Uncaught ErrorException: Warning: Undefined property: Symfony\Component\VarDumper\Caster\CutStub::$cache_locking in /var/www/html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php:737"
[05-May-2023 13:54:10] WARNING: [pool www] child 1908 said into stderr: "Stack trace:"
[05-May-2023 13:54:10] WARNING: [pool www] child 1908 said into stderr: "#0 [internal function]: Smarty_Internal_Template->__destruct()"
[05-May-2023 13:54:10] WARNING: [pool www] child 1908 said into stderr: "#1 {main}"
[05-May-2023 13:54:10] WARNING: [pool www] child 1908 said into stderr: "  thrown in /var/www/html/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php on line 737"

@BitcoinMitchell
Copy link
Collaborator Author

BitcoinMitchell commented May 5, 2023

Hmmmmm, it would be weird if they break that compatibility, since most plugins I've seen can support Prestashop 1.7 and Prestashop 8. That said, would be worth looking into, thank you for the shout @ndeet.

The warning you see seems to be unrelated yeah.

@BitcoinMitchell BitcoinMitchell changed the title Draft: Upgrade to PrestaShop 8.0 Upgrade to PrestaShop 8.0 Jul 12, 2023
@BitcoinMitchell
Copy link
Collaborator Author

We've done some more work @powerpowera, would you be willing to try this new version?

6.0.0.3: btcpay.zip

@BitcoinMitchell BitcoinMitchell marked this pull request as ready for review July 12, 2023 15:52
@powerpowera
Copy link

Sure thing, I'll keep you posted within few days. @BitcoinMitchell

@powerpowera
Copy link

So far all good! @BitcoinMitchell

@BitcoinMitchell
Copy link
Collaborator Author

So far all good! @BitcoinMitchell

Glad to hear it. I'll merge this then and make it the new default version. Thank all for the help

@BitcoinMitchell BitcoinMitchell merged commit 5a36fd0 into 6.x Jul 14, 2023
4 checks passed
@BitcoinMitchell BitcoinMitchell deleted the 6.x-dev branch July 14, 2023 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Prestashop 8 support
3 participants