DDC-1197: Proxies should handle variable argument lists #1504

Closed
opened 2026-01-22 13:16:23 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Jun 5, 2011).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user @beberlei:

This is a contingency issue for https://github.com/doctrine/doctrine2/pull/60

"Fix to allow for proxy generated classes to respect methods in parent which may use func_get_args internally. Previously they would be passed nothing and thus fail. Also reduces need to build up argumentString. "

Originally created by @doctrinebot on GitHub (Jun 5, 2011). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user @beberlei: This is a contingency issue for https://github.com/doctrine/doctrine2/pull/60 "Fix to allow for proxy generated classes to respect methods in parent which may use func_get_args internally. Previously they would be passed nothing and thus fail. Also reduces need to build up argumentString. "
admin added the Improvement label 2026-01-22 13:16:23 +01:00
admin closed this issue 2026-01-22 13:16:23 +01:00
Author
Owner

@doctrinebot commented on GitHub (Apr 15, 2014):

Comment created by chrisrichard:

Could we use an annotation to indicate when a function uses variable arguments and output call_user_func_array only in that case?

@doctrinebot commented on GitHub (Apr 15, 2014): Comment created by chrisrichard: Could we use an annotation to indicate when a function uses variable arguments and output call_user_func_array only in that case?
Author
Owner

@doctrinebot commented on GitHub (Apr 15, 2014):

Comment created by @ocramius:

I won't fix this. There are some problems here that are not trivial:

1 - to make proxies always "safe", we would need to use func*get*args in every proxy call
2 - because of (1), performance will GREATLY degrade
3 - because of (1), byref parameter passing will be broken

What we could do is introspecting the contents of methods to look for func*get*args usages (requires introduction of a complex parser).

I am closing this - consider opening an issue at https://github.com/Ocramius/ProxyManager/issues instead, so we can analyze if this logic can be improved for 3.x with the replacement of the "simple" doctrine proxies with something more complete.

Also note that https://github.com/Ocramius/ProxyManager/issues/159 could also solve this without the need for complex logic.

@doctrinebot commented on GitHub (Apr 15, 2014): Comment created by @ocramius: I won't fix this. There are some problems here that are not trivial: 1 - to make proxies always "safe", we would need to use `func*get*args` in every proxy call 2 - because of (1), performance will GREATLY degrade 3 - because of (1), byref parameter passing will be broken What we **could** do is introspecting the contents of methods to look for `func*get*args` usages (requires introduction of a complex parser). I am closing this - consider opening an issue at https://github.com/Ocramius/ProxyManager/issues instead, so we can analyze if this logic can be improved for 3.x with the replacement of the "simple" doctrine proxies with something more complete. Also note that https://github.com/Ocramius/ProxyManager/issues/159 could also solve this without the need for complex logic.
Author
Owner

@doctrinebot commented on GitHub (Apr 15, 2014):

Issue was closed with resolution "Can't Fix"

@doctrinebot commented on GitHub (Apr 15, 2014): Issue was closed with resolution "Can't Fix"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1504