Hi.

I'm the one who described the same problem in the above answer.
https://github.com/everzet/capifony/issues/60

This is the same problem as in this thread, but in different place.

Last time I made a command which "execute" method looks like:

--------------------------
$em = $this->getContainer()->get('doctrine.orm.entity_manager');

        $coupons = $em->getRepository('KupOkazjeOfferBundle:Coupon')-
>findAll();

        foreach ($coupons as $coupon) {
            $output->writeln($coupon->getPaymentSession());
        }
--------------------------

and the error in CLI:
--------------------------
Fatal error: Cannot redeclare Proxies
\KupOkazjeUserBundleEntityUserProxy::unserialize() in /home/bnlab/
public_html/dev.kupokazje.pl/app/releases/20111008142928/app/cache/dev/
doctrine/orm/Proxies/KupOkazjeUserBundleEntityUserProxy.php on line
393
--------------------------

I started commenting every line and then uncomment each from the first
one. The error starts showing on line:
$coupons = $em->getRepository('KupOkazjeOfferBundle:Coupon')-
>findAll();

It does not matter if I run command in production or development
enviroment.

I also have this problem trying to load fixtures. This is how error
looks from there:
--------------------------
 > purging database
  > loading KupOkazje\OfferBundle\DataFixtures\ORM\LoadRegionData
  > loading KupOkazje\UserBundle\DataFixtures\ORM\LoadPartnerData
  > loading KupOkazje\UserBundle\DataFixtures\ORM\LoadUserData
  > loading KupOkazje\UserBundle\DataFixtures\ORM\LoadAdminData
  > loading KupOkazje\OfferBundle\DataFixtures\ORM\LoadOfferData

Fatal error: Cannot redeclare Proxies
\KupOkazjeUserBundleEntityPartnerProxy::unserialize() in /home/bnlab/
public_html/dev.kupokazje.pl/app/releases/20111008142928/app/cache/dev/
doctrine/orm/Proxies/KupOkazjeUserBundleEntityPartnerProxy.php on line
489

-------------------------
But when I try loading fixtures there is different entity - "Partner"
which also is extended from FOSUserBundle:User entity. The Coupon
entity is not extened from FUB:User, but it has manyToOne relation
with FUB:User.

All the problems shows up on my production server with PHP 5.3.8
(www), but CLI is PHP 5.3.6.

If anyone has this problem not with command but running app.php,
weaverryan helped me in this thread 
https://github.com/everzet/capifony/issues/60.
In config.yml at "auto_generate_proxy_classes" set it to true. That
helped, but only when the error shows in the browser.

It would be great if we could close this thread with positive
"close" :)


-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to symfony-devs@googlegroups.com
To unsubscribe from this group, send email to
symfony-devs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to