BlackbitDigitalCommerce / pimcore-data-director

Import Bundle for Pimcore
16 stars 3 forks source link

Compatibility with Pimcore 11 enterprise platform versions #126

Closed studio1gmbh-pimcore closed 8 months ago

studio1gmbh-pimcore commented 8 months ago

We attempted to install Blackbit Data Director using the following Composer command in a Pimcore Enterprise environment. In our test we completely stayed in Pimcore standard using the current platform version 2023.2.

We tried to install the Data Director using:

composer require blackbit/data-director:3.5.x-dev -W

During the installation process, we encountered version conflicts between Pimcore Core/Bundle dependencies and the Data Director.

We kindly ask, if these compatibility issues are already known and if there are plans to make Data Director explicit compatible with Pimcore 11 in the Enterprise version. Is there a rough timeline available for the completion of this compatibility work?


Error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires blackbit/data-director 3.5.x-dev -> satisfiable by blackbit/data-director[3.5.x-dev].
    - Conclusion: don't install psr/container 2.0.2 (conflict analysis result)
    - Conclusion: don't install symfony/contracts v3.3.0 (conflict analysis result)
    - Conclusion: don't install symfony/service-contracts v3.0.2 (conflict analysis result)
    - Conclusion: don't install symfony/service-contracts v3.3.0 (conflict analysis result)
    - symfony/service-contracts v2.5.0 requires symfony/deprecation-contracts ^2.1 -> satisfiable by symfony/deprecation-contracts[v2.1.0, ..., v2.5.2].
    - Conclusion: don't install symfony/deprecation-contracts v2.5.2 (conflict analysis result)
    - Conclusion: don't install symfony/deprecation-contracts v3.3.0 (conflict analysis result)
    - pimcore/admin-ui-classic-bundle v1.1.4 requires symfony/webpack-encore-bundle ^1.13.2 -> satisfiable by symfony/webpack-encore-bundle[v1.17.2].
    - pimcore/admin-ui-classic-bundle is locked to version v1.1.4 and an update of this package was not requested.
    - pimcore/backend-power-tools-bundle is locked to version v1.0.0 and an update of this package was not requested.
    - pimcore/asset-metadata-class-definitions is locked to version v2.0.2 and an update of this package was not requested.
    - pimcore/translations-provider-interfaces is locked to version v3.0.1 and an update of this package was not requested.
    - pimcore/pimcore is locked to version v11.0.12 and an update of this package was not requested.
    - symfony/webpack-encore-bundle v1.17.2 requires symfony/service-contracts ^1.0 || ^2.0 || ^3.0 -> satisfiable by symfony/contracts[v1.0.0, ..., v1.1.13, v3.2.0, v3.2.1, v3.3.0], symfony/service-contracts[v1.1.1, ..., v1.1.13, v2.0.0, ..., v2.5.2, v3.0.0, ..., v3.3.0].
    - symfony/service-contracts[v2.5.1, ..., v2.5.2] require symfony/deprecation-contracts ^2.1|^3 -> satisfiable by symfony/contracts[v3.2.0, v3.2.1, v3.3.0], symfony/deprecation-contracts[v2.1.0, ..., v2.5.2, v3.0.0, ..., v3.3.0].
    - symfony/contracts[v3.2.0, ..., v3.2.1] require psr/container ^2.0 -> satisfiable by psr/container[2.0.0, 2.0.1, 2.0.2].
    - Conclusion: don't install psr/container 2.0.1 (conflict analysis result)

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Our composer.json looks like this:

"require": {
    "chrome-php/chrome": "*",
    "cweagans/composer-patches": "*",
    "elements/process-manager-bundle": "*",
    "gotenberg/gotenberg-php": "*",
    "pimcore/admin-ui-classic-bundle": "*",
    "pimcore/advanced-object-search": "*",
    "pimcore/asset-metadata-class-definitions": "*",
    "pimcore/backend-power-tools-bundle": "*",
    "pimcore/compatibility-bridge-v10": "*",
    "pimcore/customer-management-framework-bundle": "*",
    "pimcore/data-hub": "*",
    "pimcore/data-hub-ci-hub": "*",
    "pimcore/data-hub-file-export": "*",
    "pimcore/data-hub-simple-rest": "*",
    "pimcore/data-importer": "*",
    "pimcore/data-quality-management-bundle": "*",
    "pimcore/elasticsearch-client": "*",
    "pimcore/enterprise-subscription-tools": "*",
    "pimcore/file-explorer-bundle": "*",
    "pimcore/google-marketing-bundle": "*",
    "pimcore/headless-documents": "*",
    "pimcore/object-merger": "*",
    "pimcore/openid-connect": "*",
    "pimcore/perspective-editor": "*",
    "pimcore/pimcore": "*",
    "pimcore/platform-version": "2023.2",
    "pimcore/portal-engine": "*",
    "pimcore/statistics-explorer": "*",
    "pimcore/system-info-bundle": "*",
    "pimcore/translations-provider-interfaces": "*",
    "pimcore/web-to-print-bundle": "*",
    "pimcore/web2print-tools-bundle": "*",
    "pimcore/workflow-designer": "*",
    "studio1/workflow-extend": "*",
    "symfony/amqp-messenger": "*",
    "symfony/dotenv": "*",
    "symfony/runtime": "*"
  },
BlackbitDevs commented 8 months ago

I have always problems interpreting Composer's output. Which library exactly is the problem? Data Director is compatible with Pimcore 11. Must be one of the additional libraries / bundles.

studio1gmbh-pimcore commented 8 months ago

@BlackbitDevs further investigation showed following conflicts:

Data Director requires "laminas/laminas-barcode": "2.*", which leads to following dependency chain:

├──laminas/laminas-barcode 2.*
│  ├──laminas/laminas-servicemanager ^3.10.0
│  │  ├──laminas/laminas-stdlib ^3.17
│  │  │  └──php ~8.1.0 || ~8.2.0 || ~8.3.0
│  │  ├──php ~8.1.0 || ~8.2.0 || ~8.3.0
│  │  └──psr/container ^1.0
│  │     └──php >=7.4.0
│  ├──laminas/laminas-stdlib ^3.6.0
│  │  └──php ~8.1.0 || ~8.2.0 || ~8.3.0
│  ├──laminas/laminas-validator ^2.15.1
│  │  ├──laminas/laminas-servicemanager ^3.21.0
│  │  │  ├──laminas/laminas-stdlib ^3.17
│  │  │  │  └──php ~8.1.0 || ~8.2.0 || ~8.3.0
│  │  │  ├──php ~8.1.0 || ~8.2.0 || ~8.3.0
│  │  │  └──psr/container ^1.0
│  │  │     └──php >=7.4.0
│  │  ├──laminas/laminas-stdlib ^3.13
│  │  │  └──php ~8.1.0 || ~8.2.0 || ~8.3.0
│  │  ├──php ~8.1.0 || ~8.2.0 || ~8.3.0
│  │  └──psr/http-message ^1.0.1 || ^2.0.0
│  │     └──php ^7.2 || ^8.0
│  └──php ~8.0.0 || ~8.1.0 || ~8.2.0

The problematic package here ist psr/container ^1.0, which conflicts with Pimcore 11.0.12, that requires psr/container ^2.0 because of Symfony 6.3.

composer why psr/container
symfony/contracts            v3.3.0 requires psr/container (^2.0)      
symfony/dependency-injection v6.3.5 requires psr/container (^1.1|^2.0) 
composer why symfony/contracts
pimcore/pimcore              v11.0.12 requires symfony/contracts (^3.2) 

It seems to be that laminas/laminas-servicemanager supports psr/container:2.x only in the not yet released 4.x Version: https://github.com/laminas/laminas-servicemanager/pull/188

BlackbitDevs commented 8 months ago

Have extracted laminas/barcode and modified so that it does not depend on laminas/laminas-servicemanager anymore. Think this should not be a problem because of https://github.com/laminas/laminas-barcode/blob/2.13.x/LICENSE.md

As soon as there is a version of laminas/laminas-servicemanager which is compatible with psr/container:2.x, this can be removed again.

@studio1gmbh-pimcore can you please try if it now works for your setup?

studio1gmbh-pimcore commented 8 months ago

@BlackbitDevs thx, the initial conflict is now solved.

Unfortunately there is another one with leodido/langcode-conv, which requires laminas/laminas-filter.

This package has a lot of conflicts with Pimcore bundles such as pimcore/backend-power-tools-bundle, pimcore/static-resolver-bundle, or pimcore/data-hub-simple-rest.

When we temporary remove leodido/langcode-conv from data directors composer.json, the bundle can be installed.

We already put a lot of effort into identify/analyze the conflicts but with hundreds of cross dependencies it burns a lot of time. Is there any chance to get rid of leodido/langcode-conv package?

BlackbitDevs commented 8 months ago

@studio1gmbh-pimcore I replaced the requirement for leodido/langcode-conv by a custom class. Can you please try again?

studio1gmbh-pimcore commented 8 months ago

@BlackbitDevs thanks a lot! Fortunately the data director can now be installed in our Pimcore 11 Enterprise environments without any composer issues. 🎉

Further testing will show if all functionalities work, but for now everything looks good.

BlackbitDevs commented 8 months ago

@studio1gmbh-pimcore I have to thank you for your analysis which library was responsible for the incompatibility 👍
Good work!