IMO if we break, then we should break hard right now. But what I like even
more is the approach of keeping the public properties and only adding
convenience methods for common cases.

Some more cons:
- slower: 1 more method call on each access in a part of the framework that
is highly performance sensitive; for the same reason, ->getDeep()
functionality wasn't added to the ->get() method itself

- more verbose in some cases since it requires local cache variables

    Before:
    if ($request->attributes->has('foo') &&
$request->attributes->has('bar')) {
        // ...
    }

    After:
    $attributes = $request->getAttributes();
    if ($attributes->has('foo') && $attributes->has('bar')) {
       // ...
    }

- Hides real semantics: a cookie is a header even if we provide special
convenience methods for managing them

+1 for adding convenience methods where it makes sense
-1 for removing public properties

Kind regards,
Johannes


On Tue, Apr 26, 2011 at 10:39 AM, Jordi Boggiano <[email protected]> wrote:

> On 26.04.2011 09:26, Fabien Potencier wrote:
> > That being said, I'm not personally in favor of one or the other. I've
> > sent this email because we never really talked about it and many people
> > seems to be annoyed by that.
> >
> > Another option (BC) would be to keep the public properties and just add
> > some proxy methods.
>
> We can also add a __get() temporarily (say until final) that allows
> access to the public properties, but triggers a E_DEPRECATED warning.
> Slightly softer approach to the BC break.
>
> Anyway, I have no philosophical issue with using public properties when
> there is no reason not to, and the spread of getter/setter everywhere
> makes me feel a bit funny; so I won't push this forward, but I'm not
> really against it since the new syntax seems mostly shorter.
>
> +/-0, =, whatever.
>
> Cheers
>
> --
> Jordi Boggiano
> @seldaek :: http://seld.be/
>
> --
> 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

Reply via email to