You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If for example the entity is final, as the generated proxy make use of inheritance, this throw a FatalError when the proxy class is being used. However, this error is thrown at runtime when the proxy is being used, not when it is generated. WDYT of adding a simple include_once on the generated proxy when creating it, to throw an error as early as possible?
The text was updated successfully, but these errors were encountered:
theofidry
changed the title
ProxyFactory generates invalid proxies with no error
ProxyFactory may generate invalid proxies with no error
Feb 3, 2017
On 3 Feb 2017 10:54, "Théo FIDRY" ***@***.***> wrote:
Follow up of symfony/symfony#21509
<symfony/symfony#21509>
If for example the entity is final, as the generated proxy make use of
inheritance, this throw a FatalError when the proxy class is being used.
However, this error is thrown at runtime when the proxy is being used, not
when it is generated. WDYT of adding a simple include_once on the
generated proxy when creating it, to throw an error as early as possible?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#770>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJakObxwBtPRbyBLvsbSz5gLPthq4_0ks5rYvlngaJpZM4L2I3t>
.
The only case I've ever encountered the issue is when dealing with final classes, but I don't know and I suspect there is other cases as well where including the file ensures the generated PHP code is valid.
That said I'm fine with just doing a PR for the final case.
Follow up of symfony/symfony#21509
If for example the entity is final, as the generated proxy make use of inheritance, this throw a
FatalError
when the proxy class is being used. However, this error is thrown at runtime when the proxy is being used, not when it is generated. WDYT of adding a simpleinclude_once
on the generated proxy when creating it, to throw an error as early as possible?The text was updated successfully, but these errors were encountered: