akeneo / magento2-connector-community

Akeneo Connector for Magento 2
Open Software License 3.0
85 stars 89 forks source link

Cannot install Akeneo Connector on default Magento 2.4.4 cause of system-requirement PHP 8.1 #566

Open jpwab opened 2 years ago

jpwab commented 2 years ago

Environment and configuration

  1. Default Magento 2.4.4 https://devdocs.magento.com/guides/v2.4/install-gde/system-requirements.html
  2. Tried Akeneo Connector Extension 102.6.0
  3. Akeneo Version | 5.0.90

Steps to reproduce

  1. Install Magento 2.4.4 via composer

Expected result

  1. Normal installation of Magento 2.4.4

Actual result

  1. grafik
anvanza commented 2 years ago

Same error here, but it's not because of php8.1 but a conflict in php-http/guzzle6-adapter vs guzzlehttp/guzzle 7

PieterCappelle commented 2 years ago

Yes, same problem. Please fix this issue.

anvanza commented 2 years ago

I created a patch for this.

--- /dev/null
+++ ../Helper/Authenticator.php
@@ -5,7 +5,6 @@
 use Akeneo\Pim\ApiClient\AkeneoPimClientInterface;
 use Akeneo\Pim\ApiClient\AkeneoPimClientBuilder;
 use Akeneo\Connector\Helper\Config as ConfigHelper;
-use Http\Adapter\Guzzle6\Client;
 use Http\Factory\Guzzle\StreamFactory;
 use Http\Factory\Guzzle\RequestFactory;

@@ -64,7 +63,7 @@
         /** @var AkeneoPimClientBuilder $akeneoClientBuilder */
         $akeneoClientBuilder = new AkeneoPimClientBuilder($baseUri);

-        $akeneoClientBuilder->setHttpClient(new Client());
+        $akeneoClientBuilder->setHttpClient(new \GuzzleHttp\Client());
         $akeneoClientBuilder->setStreamFactory(new StreamFactory());
         $akeneoClientBuilder->setRequestFactory(new RequestFactory());

Install the patch as

            "akeneo/module-magento2-connector-community": {
                "fix Guzzle6 Client": "patches/akeneo-module-magento2-connector-community-helper-authenticator-php.patch"
            },

And add the following in the composer replace section "php-http/guzzle6-adapter": "*"

Dnd-Gimix commented 2 years ago

Hello @jpwab , @anvanza @PieterCappelle ,

We have officially released the compatibility for Magento 2.4.4 and PHP 8.1 in the latest 103.0.0 version of the connector. Thanks a lot for your feedback on the possible issues and fixes to apply!

Regards,