You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.
It appears the devs have done the hard work to address compatibility with Magento 2.4.x and PHP8.x, however they have not pushed a stable release (expected 1.4.6) for us to install.
Until a new version is released, we can install the development version dev-main by:
Adding this github repo to composer
Edit the composer.json in the magento root directory, find and replace this:
This change will most likely need to be reverted once a stable version has been released as the dev-main may create issues in the future.
This will most likely be in the form of:
I tried the above given solution with the 2.4.5-p1 EE version and PHP8.1. The solution works fine for the nonl-ogged in user but when the user is logged in it gives the below error. Please check and let us know.
`1 exception(s):
Exception #0 (Exception): Deprecated Functionality: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/magento/vendor/facebook/facebook-for-magento2/Helper/MagentoDataHelper.php on line 481
Exception #0 (Exception): Deprecated Functionality: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/magento/vendor/facebook/facebook-for-magento2/Helper/MagentoDataHelper.php on line 481`
@pratikvs , what I've found is that in the dev-main branch, the update from 2 weeks ago just updated the facebook/php-business-sdk 9.0.3 to >=15.0.0, so the sdk is now compatible with php8.1, but they haven't fixed the strtolower bug.
I've opened a PR for this issue: #132
Until it will be merged into, here is a patch that you can use to fix that:
Create a file like patches/composer/facebook-m2-php8fix/facebook-m2-1.4.5-1.4.6-php8.1--1.patch
--- Helper/MagentoDataHelper.php 2022-03-15 15:40:14.000000000 +0000
+++ Helper/MagentoDataHelper.php 2023-01-05 18:16:03.949331672 +0000
@@ -478,7 +478,7 @@
}
private function hashValue($string){
- return hash('sha256', strtolower($string));
+ return hash('sha256', strtolower((string)$string));
}
// TODO Remaining user/custom data methods that can be obtained using Magento.
Contact Details
[email protected]
What happened?
It appears the devs have done the hard work to address compatibility with Magento 2.4.x and PHP8.x, however they have not pushed a stable release (expected 1.4.6) for us to install.
Until a new version is released, we can install the development version dev-main by:
Edit the composer.json in the magento root directory, find and replace this:
WITH
Install with composer
Install the dev-main release with the command
composer require facebook/facebook-for-magento2:dev-main
.Upgrade
The usual commands we love and enjoy:
This change will most likely need to be reverted once a stable version has been released as the dev-main may create issues in the future.
This will most likely be in the form of:
composer remove facebook/facebook-for-magento2:dev-main
composer require facebook/facebook-for-magento2
I hope this helps you.
Magento Version
2.4.x
Plugin Version
1.4.5
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: