On 24.03.2010, at 13:02, Jordi Boggiano wrote:

> Heya,
> 
> Reminder, the RFC URL since I had to go dig it up:
> http://symfony-reloaded.org/rfc/controllers
> 
>>    function __construct(User $user, $maxPerPage)
>>    {
>>    }
> 
> Just wondering, since I have tried and found that parameter names can
> match a service name, what do you do in that case?
> 
> I agree it is unlikely that this would happen, but I would like to
> request that, if there is no way to differenciate in the constructor,
> the SC builder should check for uniqueness of param/service names, so as
> to clearly avoid errors and report conflicts as early as possible to the
> developer.
> 
> It is compile time checks so I don't think it's a performance issue.
> 
> I would also like to reiterate just in case that the same should be done
> for routing vars, at compile time check for parameters and if one is
> called *Parameter or *Service, throw an exception to let the dev know,
> otherwise he will get bitten later when typing $fooParameter in his
> action, that will throw an exception foo not defined, or worse pass the
> parameter if it exists.
> 
> If all that is accepted, then my vote goes to option 4, and I will
> gladly help implement it if needed, especially if that gets me more
> voting points ;)


This ties into my attempt to diverse this thread onto the question of why 
controllers are not managed by the service container [1]. In this case the 
issue of service vs. parameter would be solved and would reduce introspection 
magic to method level injection.

regards,
Lukas Kahwe Smith
[email protected]

[1] http://groups.google.com/group/symfony-devs/msg/f35af2429c195eee

-- 
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

To unsubscribe from this group, send email to 
symfony-devs+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to