diff --git a/Client/AkeneoClientFactory.php b/Client/AkeneoClientFactory.php index 6dd448e8..c2c9512c 100644 --- a/Client/AkeneoClientFactory.php +++ b/Client/AkeneoClientFactory.php @@ -2,8 +2,8 @@ namespace Oro\Bundle\AkeneoBundle\Client; +use Akeneo\Pim\ApiClient\AkeneoPimClientBuilder; use Akeneo\Pim\ApiClient\AkeneoPimClientInterface; -use Akeneo\PimEnterprise\ApiClient\AkeneoPimEnterpriseClientBuilder; use Oro\Bundle\AkeneoBundle\Encoder\Crypter; use Oro\Bundle\AkeneoBundle\Entity\AkeneoSettings; use Oro\Bundle\EntityBundle\ORM\DoctrineHelper; @@ -117,9 +117,9 @@ private function createClientByToken(): AkeneoPimClientInterface return $this->client; } - private function getClientBuilder(): AkeneoPimEnterpriseClientBuilder + private function getClientBuilder(): AkeneoPimClientBuilder { - $clientBuilder = new AkeneoPimEnterpriseClientBuilder($this->akeneoUrl); + $clientBuilder = new AkeneoPimClientBuilder($this->akeneoUrl); $clientBuilder->setHttpClient($this->httpClient); $clientBuilder->setRequestFactory($this->requestFactory); $clientBuilder->setStreamFactory($this->streamFactory); diff --git a/EntityConfig/ImportexportFieldConfiguration.php b/EntityConfig/ImportexportFieldConfiguration.php new file mode 100644 index 00000000..1eb9ed2c --- /dev/null +++ b/EntityConfig/ImportexportFieldConfiguration.php @@ -0,0 +1,28 @@ +scalarNode('source') + ->info('`string` source of field.') + ->end() + ->scalarNode('source_name') + ->info('`string` source name of field.') + ->end(); + } +} diff --git a/Migrations/Schema/OroAkeneoBundleInstaller.php b/Migrations/Schema/OroAkeneoBundleInstaller.php index b2ab9168..54aa4f57 100644 --- a/Migrations/Schema/OroAkeneoBundleInstaller.php +++ b/Migrations/Schema/OroAkeneoBundleInstaller.php @@ -21,7 +21,6 @@ class OroAkeneoBundleInstaller implements Installation, ExtendExtensionAwareInte */ protected $options = [ 'extend' => [ - 'origin' => ExtendScope::OWNER_CUSTOM, 'owner' => ExtendScope::OWNER_CUSTOM, 'state' => ExtendScope::STATE_NEW, 'is_serialized' => false, diff --git a/Migrations/Schema/v1_12/OroAkeneoMigration.php b/Migrations/Schema/v1_12/OroAkeneoMigration.php index f413b642..4f8003d5 100644 --- a/Migrations/Schema/v1_12/OroAkeneoMigration.php +++ b/Migrations/Schema/v1_12/OroAkeneoMigration.php @@ -43,7 +43,6 @@ public function up(Schema $schema, QueryBag $queries) 'notnull' => false, 'oro_options' => [ 'extend' => [ - 'origin' => ExtendScope::OWNER_CUSTOM, 'owner' => ExtendScope::OWNER_CUSTOM, 'state' => ExtendScope::STATE_NEW, 'is_serialized' => false, diff --git a/README.md b/README.md index f1aa0abc..e9a659bf 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,13 @@ With this extension, you will be able to sync the following data from Akeneo to ## Compatibility -| Connector | Status | OroCommerce | Akeneo | Build | -|-----------|--------|-------------|----------------|-------| -| 1.6 | EOL | 1.6 | 2.3, 3.2, 4.0* | | -| 3.1 | EOL | 3.1 | 2.3, 3.2, 4.0* | | -| 4.1 | 2021 | 4.1 | 2.3, 3.2, 4.0* | [![Build Status](https://travis-ci.org/oroinc/OroAkeneoBundle.svg?branch=4.1)](https://travis-ci.org/oroinc/OroAkeneoBundle) | -| 4.2 | 2022 | 4.2 | 3.2, 4.0, 5.0 | [![Build Status](https://travis-ci.org/oroinc/OroAkeneoBundle.svg?branch=4.2)](https://travis-ci.org/oroinc/OroAkeneoBundle) | -| 5.0 | WIP | 5.0 | 4.0, 5.0 | | +| Connector | Status | OroCommerce | Akeneo | +|-----------|--------|-------------|----------------| +| 1.6 | EOL | 1.6 | 2.3, 3.2, 4.0* | +| 3.1 | EOL | 3.1 | 2.3, 3.2, 4.0* | +| 4.1 | EOL | 4.1 | 2.3, 3.2, 4.0* | +| 4.2 | 2022 | 4.2 | 3.2, 4.0, 5.0 | +| 5.0 | 2023 | 5.0 | 5.0+ | ** Akeneo supported using older client versions, new features are not available.** @@ -31,11 +31,7 @@ With this extension, you will be able to sync the following data from Akeneo to 1. Add composer package ``` -# Akeneo 4.0 -composer require "oro/commerce-akeneo:4.2.*" "akeneo/api-php-client-ee:5.*" - -# Akeneo 5.0 -composer require "oro/commerce-akeneo:4.2.*" "akeneo/api-php-client-ee:6.*" +composer require "oro/commerce-akeneo:5.0.*" ``` 2. Follow [Setup Guide](https://doc.oroinc.com/backend/setup/upgrade-to-new-version) diff --git a/Resources/config/importexport.yml b/Resources/config/importexport.yml index 2243189c..c6a34739 100644 --- a/Resources/config/importexport.yml +++ b/Resources/config/importexport.yml @@ -319,7 +319,8 @@ services: - [ setCacheProvider, [ '@oro_akeneo.importexport.cache' ] ] oro_akeneo.importexport.cache: - class: Doctrine\Common\Cache\ArrayCache + parent: oro_cache.array_cache + public: false calls: - [ setNamespace, [ 'oro_akeneo' ] ] diff --git a/Resources/config/services.yml b/Resources/config/services.yml index b2704326..23b1b635 100644 --- a/Resources/config/services.yml +++ b/Resources/config/services.yml @@ -400,3 +400,8 @@ services: class: 'Oro\Bundle\AkeneoBundle\EventListener\DeletedAttributeRelationListener' decorates: oro_serialized_fields.event_listener.deleted_attribute_relation_serialized parent: oro_serialized_fields.event_listener.deleted_attribute_relation_serialized + + oro_akeneo.entity_config.importexport_field_configuration: + class: Oro\Bundle\AkeneoBundle\EntityConfig\ImportexportFieldConfiguration + tags: + - oro_entity_config.validation.entity_config diff --git a/composer.json b/composer.json index d66474c5..8a435f87 100644 --- a/composer.json +++ b/composer.json @@ -19,6 +19,6 @@ }, "require": { "oro/commerce": "5.0.*", - "akeneo/api-php-client-ee": "5.* || 6.*" + "akeneo/api-php-client": "8.*" } }