Thanks for the good explanation guys. Two things then:

- perhaps we should turn auto-generation off in all environments to be
consistent?

- it should be well-documented that the generation tasks be run after every
model change so that proxies/hydrators aren't an afterthought

What do you guys think? If you don't generate hydrators, for example, the
error is simply a failed require call on a non-existent file in the cache
dir. It's not obvious what went wrong or how to fix it. That's really where
my concern lies.

Thanks

@weaverryan
On Jan 20, 2011 6:18 AM, "Benjamin Eberlei" <[email protected]> wrote:
> @ryan: This is a Doctrine feature to change, so Symfony couldn't even wrap
> around it at the moment. We are changing this slightly for 2.1 to allow 2
> additional proxy generation methods:
>
> 1. eval
> 2. stream wrapper + apc cache as discussed here
> http://www.whitewashing.de/blog/132
>
> Your suggested file_exists() method is dangerous in case of cache slams
> which are rather probable in case of expensive file operations.
>
> greetings,
> Benjamin
>
> On Thu, 20 Jan 2011 13:13:11 +0100, Lukas Kahwe Smith <[email protected]>
> wrote:
>> On 20.01.2011, at 00:32, ryan weaver wrote:
>>
>>> I realize the problem with generating on every request in production,
>>> but isn't there a middleground? What about the following (by default):
>>>
>>> * always generate these classes in dev
>>> * generate conditionally using a file_exists() in prod
>>> * Keep the option to never generate proxies or hydrators for advanced
>>> users (but it has to be explicitly enabled).
>>
>> that file_exists() is pretty expensive to force upon everyone and adding
>> an if to decide when to do the file_exists() is just ugly imho.
>>
>> regards,
>> Lukas Kahwe Smith
>> [email protected]
>
> --
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]<symfony-devs%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en

-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to