Skip to content

"Doctrine\ORM\Mapping\Embeddable" has already been autoconfigured and merge() does not support merging autoconfiguration for the same attribute. #60543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vencakrecl opened this issue May 26, 2025 · 5 comments

Comments

@vencakrecl
Copy link

vencakrecl commented May 26, 2025

Symfony version(s) affected

7.3.0-RC1

Description

Image

It can be related to this #60392

How to reproduce

gsed -i -e 's/"[\^\~]\?7\.2.*"/"^7.3"/g' composer.json
gsed -i -e 's/"minimum-stability": "stable",/"minimum-stability": "rc",/g' composer.json 
composer update

Possible Solution

No response

Additional Context

No response

@xabbuh
Copy link
Member

xabbuh commented May 26, 2025

Can you create a small example application that allows to reproduce your issue?

@vencakrecl
Copy link
Author

@xabbuh Yes, I'm working on it https://github.com/vencakrecl/symfony_issue_60543

@vencakrecl
Copy link
Author

Unfortunately, I can not reproduce the bug :-( When I removed lines 650-658 from DoctrineExtension the container was compiled.

        $container->registerAttributeForAutoconfiguration(Embeddable::class, static function (ChildDefinition $definition) {
            $definition->setAbstract(true)->addTag('container.excluded', ['source' => sprintf('with #[%s] attribute', Embeddable::class)]);
        });
        $container->registerAttributeForAutoconfiguration(Entity::class, static function (ChildDefinition $definition) {
            $definition->setAbstract(true)->addTag('container.excluded', ['source' => sprintf('with #[%s] attribute', Entity::class)]);
        });
        $container->registerAttributeForAutoconfiguration(MappedSuperclass::class, static function (ChildDefinition $definition) {
            $definition->setAbstract(true)->addTag('container.excluded', ['source' => sprintf('with #[%s] attribute', MappedSuperclass::class)]);
        });

@GromNaN
Copy link
Member

GromNaN commented May 26, 2025

This should be already fixed by #60011.

@vencakrecl
Copy link
Author

@GromNaN Thank you. I found the issue "symfony/dependency-injection" was still on version 7.2. The solution is

composer require symfony/dependency-injection:7.3.0-RC-1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants