ProxyFactory was redeclaring methods in some OSs #177

Merged
merged 1 commit into from Nov 13, 2011

Conversation

Projects
None yet
4 participants
@thiagofesta
Contributor

thiagofesta commented Oct 28, 2011

The ProxyFactory was redeclaring methods serialize and unserialize (in my case) on the cache file on some OSs.

Here is the full comment with some screenshots: symfony/symfony#2501

@beberlei

This comment has been minimized.

Show comment
Hide comment
@beberlei

beberlei Oct 28, 2011

Member

On what PHP version did this happen for you?

Member

beberlei commented Oct 28, 2011

On what PHP version did this happen for you?

@thiagofesta

This comment has been minimized.

Show comment
Hide comment
@thiagofesta

thiagofesta Oct 28, 2011

Contributor

beberlei, here i mentioned the versions: symfony/symfony#2501 (comment)

As i said, it just occurs on my server, but i made some debugs there, and i noticed that on that classe the getMethods of reflection class bring the methods serialize and unserialize from my entity and from Serializable class.

My Change make sure that the reflection just get the methods from my entity, not from other entities. I read about reflection and getMethods on php documentation.

I hope that help.

Contributor

thiagofesta commented Oct 28, 2011

beberlei, here i mentioned the versions: symfony/symfony#2501 (comment)

As i said, it just occurs on my server, but i made some debugs there, and i noticed that on that classe the getMethods of reflection class bring the methods serialize and unserialize from my entity and from Serializable class.

My Change make sure that the reflection just get the methods from my entity, not from other entities. I read about reflection and getMethods on php documentation.

I hope that help.

@mvrhov

This comment has been minimized.

Show comment
Hide comment
@mvrhov

mvrhov Oct 29, 2011

Contributor

iouncube or ZendGuards fault?

Contributor

mvrhov commented Oct 29, 2011

iouncube or ZendGuards fault?

@thiagofesta

This comment has been minimized.

Show comment
Hide comment
@thiagofesta

thiagofesta Oct 29, 2011

Contributor

ZendGuard and ioncube... i don't think so... why? but can be.

Can I ask you guys a thing. The ProxyFactory should generate just the methods from my entity right? So this way we fix that.

Of course, it is some incompatibility of PHP with some module, or PHP build of my Server. But i think this way we will fix that, as well other problems with other guys that are the same as mine.

Contributor

thiagofesta commented Oct 29, 2011

ZendGuard and ioncube... i don't think so... why? but can be.

Can I ask you guys a thing. The ProxyFactory should generate just the methods from my entity right? So this way we fix that.

Of course, it is some incompatibility of PHP with some module, or PHP build of my Server. But i think this way we will fix that, as well other problems with other guys that are the same as mine.

@mvrhov

This comment has been minimized.

Show comment
Hide comment
@mvrhov

mvrhov Oct 29, 2011

Contributor

because If it's fault of one external's modules this ALSO has to go to their bugtracker. Doctrine code is probably not the only one that's not working properly.

Contributor

mvrhov commented Oct 29, 2011

because If it's fault of one external's modules this ALSO has to go to their bugtracker. Doctrine code is probably not the only one that's not working properly.

@qiulihong

This comment has been minimized.

Show comment
Hide comment
@qiulihong

qiulihong Nov 3, 2011

I got the same problem for days, I try to use php5.3.2, 5.3.6, 5.3.8,
my local(Mac, php5.3.2) works fine, but when I deploy it to the server(Debian, php5.3.6/8), the weird issue occured.

Google it, some people got same problem but there's no official resolution, thanks God, I find out @thiagofesfa's solution, it works for me.

I really hope Doctrine2.0 team can fix that, thank you guys!

I got the same problem for days, I try to use php5.3.2, 5.3.6, 5.3.8,
my local(Mac, php5.3.2) works fine, but when I deploy it to the server(Debian, php5.3.6/8), the weird issue occured.

Google it, some people got same problem but there's no official resolution, thanks God, I find out @thiagofesfa's solution, it works for me.

I really hope Doctrine2.0 team can fix that, thank you guys!

@beberlei

This comment has been minimized.

Show comment
Hide comment
@beberlei

beberlei Nov 13, 2011

Member

This PR breaks the tests in special cases with mapped superclasses, i will evaluate it a bit more.

Member

beberlei commented Nov 13, 2011

This PR breaks the tests in special cases with mapped superclasses, i will evaluate it a bit more.

@thiagofesta

This comment has been minimized.

Show comment
Hide comment
@thiagofesta

thiagofesta Nov 13, 2011

Contributor

Hi beberlei, try this solution:
symfony/symfony#2501 (comment)

Contributor

thiagofesta commented Nov 13, 2011

Hi beberlei, try this solution:
symfony/symfony#2501 (comment)

@beberlei beberlei merged commit 66d2b9e into doctrine:master Nov 13, 2011

@beberlei

This comment has been minimized.

Show comment
Hide comment
@beberlei

beberlei Nov 13, 2011

Member

I did something similar as you can see in the final commit.

Member

beberlei commented Nov 13, 2011

I did something similar as you can see in the final commit.

@thiagofesta

This comment has been minimized.

Show comment
Hide comment
@thiagofesta

thiagofesta Nov 13, 2011

Contributor

Great, Thanks!

Contributor

thiagofesta commented Nov 13, 2011

Great, Thanks!

@qiulihong

This comment has been minimized.

Show comment
Hide comment

thanks!

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