sonata-project/SonataCoreBundle

Cannot redeclare class ManagerInterface after updating with composer!

Closed this issue · 9 comments

Hm, I've done update of my sonata admin app and get the following:

FatalErrorException: Compile Error: Cannot redeclare class Sonata\CoreBundle\Entity\ManagerInterface in /Applications/MAMP/htdocs/sonatapp/vendor/sonata-project/core-bundle/Sonata/CoreBundle/Entity/ManagerInterface.php line 21

I'm not sure what to do and how to fix the issue. Some can help?

Edit: I've figured out that the issue occurs only with the TimelineBundle and AuditBundle. So if one of this Bundle is used or included into the Dashboard so the error occurs.

If you don't use one of these 2 Bundles it should be worked as expected.

Ok I've found a solution that fix the issue at the moment for me:

  1. It seems something went wrong with the doctrine auto mapping. So I disable it: auto_mapping: false
  2. Add all necessary Entity Classes to the doctrine mapping.
  3. After that it work's as expected!

Notice: That is only a workaround. I don't find a solution why that happens.

same here... very very uncool

Can you provide a stack trace or a demo project so we can reproduce the
issue?

Thomas Rabaix
http://rabaix.net - http://sonata-project.org
On Jan 4, 2014 4:26 PM, "Mike Meier" notifications@github.com wrote:

same here... very very uncool


Reply to this email directly or view it on GitHubhttps://github.com//issues/25#issuecomment-31580612
.

Sry there is no stack trace because it fails while compiling. Only get the FatalErrorException.
Also there are two invalid entity configuration see image below. Maybe this one trigger the error:

invalid_entity

Update: I've fix the entity issue but the error still occurs.

See TimelineBundle PR: sonata-project/SonataTimelineBundle#10

@sensi Can you try to dig more into the issue ? The sonata sandbox is tested here with php 5.4 and the demo works under php 5.3. We don't have this issue at all...

@rande It seems the issue is fixed. The error doesn't occur anymore. But it is strange that since my last update (yesterday) my whole app is extreme slow. Each request takes more than 5-6sec. Sometimes 30-60sec.
Profiler shows that the most time takes the controller by rendering the twig template. Don't know why that happens.

We don't experience any slow down on our side. Can you track it down?

Sry bad news. The error occurs again after composer update.