Hi,
You may be right but the current approach is even more misleading:
$this->get('request')->request->get('param') will get you thinking that you
will obtain a value from the hole request
data or maybe a get param (I don't think however that this will be the
case). The ideal refactoring will be to have proper getters and
setters for the parameter bags:
$this->get('request')->getPost()->get('param')
Cheers,
Catalin
On Mon, Apr 4, 2011 at 9:37 PM, Hugo Hamon <[email protected]> wrote:
> Hello,
>
> I'm not for this changeset because you will write :
>
> $request->post->get('foo');
>
> post->get() which sounds a bit weird...
>
> My 2 cents.
>
> Hugo Hamon
> Sensio Labs Trainings Manager
>
>
> On 4 avr, 18:45, Catalin Costache <[email protected]>
> wrote:
> > Hi,
> >
> > I will like to propose a backward incompatible change to the naming of
> the
> > public $request ParameterBag
> > from the Symfony\Component\HttpFoundation\Request
> >
> > In my opinion it should be called $post instead of $request because:
> > 1. is obvious what part of the request is handled
> > 2. the current naming is deceiving (I expect to find GET, COOKIE or other
> > types of request parameters in this ParameterBag)
> > 3. finally but less important, in a controller you have to write *
> > $this->get('request')->request->get('parameter')* instead of
> > *$this->get('request')->post->get('parameter')
> > *- a superficial argument, I know.
> > *
> > *The same arguments stand also for the $query bag, but that makes more
> sense
> >
> > What do you think?
> > I will make a pull request if you think that this is ok.
> >
> > Thanks
>
> --
> 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
>
--
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