kaliop-uk / ezmigrationbundle

This bundle makes it easy to handle eZPlatform / eZPublish5 content upgrades/migrations
GNU General Public License v2.0
53 stars 81 forks source link

Fresh install is not working #251

Open StarNab opened 1 year ago

StarNab commented 1 year ago

After a fresh install of the bundle (v.6.2) on an ez Platform website (5.4), we get the following error : ` [Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException]

Circular reference detected for service "ez_migration_bundle.reference_resolver.customreference.flexible", path: "ez_migration_bundle.reference_resolver.customreference.flexible -> ez_migration_bundle.reference_resolver.expression -> ez_migration_bundle.re

ference_resolver.customreference.flexible".`

Whereas version 5.15 is working

gggeek commented 1 year ago

I will take a look. It is strange that this is not being surfaced by the CI tests... The eZ version you are using is eZPublishPlatform EE 5.4, correct?

gggeek commented 1 year ago

PS: in the meanwhile, could you try tagging the ez_migration_bundle.reference_resolver.expression service as lazy ?

EDIT: this should already be the case. I wonder why it is not enough to break the circular dependency exception...

gggeek commented 1 year ago

PPS: in case you are not interested in using eval: to create values dynamically based on references, you should also be able to work around the circular service dependency error by redefining in your app's config the following service:

    ez_migration_bundle.reference_resolver.customreference.flexible:
        class: '%ez_migration_bundle.reference_resolver.chain_prefix.class%'
        arguments:
            -
                - '@ez_migration_bundle.reference_resolver.customreference.base'
                - '@ez_migration_bundle.reference_resolver.loop'
                # comment this out
                #- '@ez_migration_bundle.reference_resolver.expression'
gggeek commented 1 year ago

Note: I tried reproducing the problem you mention by running the bundle's testsuite on eZP CP ~2014.11.1, with COMPOSER_PREFER_LOWEST=1 to try to get installed the oldest possible version of all dependencies, and I still can not reproduce it.

If this is still an issue, would it be possible for you to share the composer.lock file?

gggeek commented 1 year ago

Ping