Re: [PHP-DEV] http_cookie_set and http_cookie_remove

2017-07-25 Thread Andrey Andreev
HI, On Tue, Jul 25, 2017 at 2:33 AM, Andreas Treichel wrote: > Hi Andrey, > >> 1. The wording here implies that these are the *only* attributes >> allowed. In the interest of forward-compatibility, I'd allow arbitrary >> attributes as well. > > > I just try to implement something like this, to al

Re: [PHP-DEV] http_cookie_set and http_cookie_remove

2017-07-24 Thread Andreas Treichel
Hi Andrey, 1. The wording here implies that these are the *only* attributes allowed. In the interest of forward-compatibility, I'd allow arbitrary attributes as well. I just try to implement something like this, to allow arbitrary attributes. Is this what you prefer? http_cookie_set('foobar

Re: [PHP-DEV] http_cookie_set and http_cookie_remove

2017-07-24 Thread Andrey Andreev
Hello Andreas, On Sun, Jul 23, 2017 at 9:26 PM, Andreas Treichel wrote: > Hello Andrey, > >> That's what I was afraid of, and what I suggested be changed. >> >> If we had a similar, array-of-attributes API that did NOT ignore or >> trigger warnings for unknown attributes, everybody using PHP woul

Re: [PHP-DEV] http_cookie_set and http_cookie_remove

2017-07-23 Thread Andreas Treichel
Hello Andrey, That's what I was afraid of, and what I suggested be changed. If we had a similar, array-of-attributes API that did NOT ignore or trigger warnings for unknown attributes, everybody using PHP would've been able to use SameSite already. I think it is necessary to trigger a notice

Re: [PHP-DEV] http_cookie_set and http_cookie_remove

2017-07-23 Thread Andreas Treichel
Hi Michał, As an average developer, I see providing new functions with http_ prefix more meaningful and their API more simple because of fewer parameters I need to pass. Although however, I see the naming convention you've used is rarely used. Looking in the docs, there are few other HTTP sap

Re: [PHP-DEV] http_cookie_set and http_cookie_remove

2017-07-18 Thread Michael Morris
On Tue, Jul 18, 2017 at 3:11 PM, li...@rhsoft.net wrote: > > > Am 18.07.2017 um 21:02 schrieb Michael Morris: > >> >> >> On Tue, Jul 18, 2017 at 2:56 PM, li...@rhsoft.net > li...@rhsoft.net> mailto:li...@rhsoft.net>> wrote: >> >> >> >> Am 18.07.2017 um 20:39 schrieb Michael Morris: >> >>

Re: [PHP-DEV] http_cookie_set and http_cookie_remove

2017-07-18 Thread li...@rhsoft.net
Am 18.07.2017 um 21:02 schrieb Michael Morris: On Tue, Jul 18, 2017 at 2:56 PM, li...@rhsoft.net mailto:li...@rhsoft.net>> wrote: Am 18.07.2017 um 20:39 schrieb Michael Morris: Personally, I no longer directly use these calls, preferring in

Re: [PHP-DEV] http_cookie_set and http_cookie_remove

2017-07-18 Thread Michał Brzuchalski
Hi Michael, 2017-07-18 21:02 GMT+02:00 Michael Morris : > On Tue, Jul 18, 2017 at 2:56 PM, li...@rhsoft.net > wrote: > > > > > > > Am 18.07.2017 um 20:39 schrieb Michael Morris: > > > >> Personally, I no longer directly use these calls, preferring instead to > >> use > >> Symfony's HTTP foundati

Re: [PHP-DEV] http_cookie_set and http_cookie_remove

2017-07-18 Thread Michael Morris
On Tue, Jul 18, 2017 at 2:56 PM, li...@rhsoft.net wrote: > > > Am 18.07.2017 um 20:39 schrieb Michael Morris: > >> Personally, I no longer directly use these calls, preferring instead to >> use >> Symfony's HTTP foundation classes. Those in turn are, I understand, in the >> process of being conve

Re: [PHP-DEV] http_cookie_set and http_cookie_remove

2017-07-18 Thread li...@rhsoft.net
Am 18.07.2017 um 20:56 schrieb li...@rhsoft.net: Am 18.07.2017 um 20:39 schrieb Michael Morris: Personally, I no longer directly use these calls, preferring instead to use Symfony's HTTP foundation classes. Those in turn are, I understand, in the process of being converted to implement the

Re: [PHP-DEV] http_cookie_set and http_cookie_remove

2017-07-18 Thread li...@rhsoft.net
Am 18.07.2017 um 20:39 schrieb Michael Morris: Personally, I no longer directly use these calls, preferring instead to use Symfony's HTTP foundation classes. Those in turn are, I understand, in the process of being converted to implement the common interface outlined here: http://www.php-fig.or

Re: [PHP-DEV] http_cookie_set and http_cookie_remove

2017-07-18 Thread Michael Morris
Personally, I no longer directly use these calls, preferring instead to use Symfony's HTTP foundation classes. Those in turn are, I understand, in the process of being converted to implement the common interface outlined here: http://www.php-fig.org/psr/psr-7/ I would be much more interested in se

Re: [PHP-DEV] http_cookie_set and http_cookie_remove

2017-07-18 Thread Andrey Andreev
Hi Andreas, On Tue, Jul 18, 2017 at 7:39 PM, Andreas Treichel wrote: > Hello Andrey, > >>> $options are equal to the optional parameters of setcookie and >>> setrawcookie. >>> $options may contain: >>> >>> expires: int >>> path: string >>> domain: string >>> secure: bool >>> httponly: bool > > >>

Re: [PHP-DEV] http_cookie_set and http_cookie_remove

2017-07-18 Thread Michał Brzuchalski
Hi Andreas, 2017-07-18 18:39 GMT+02:00 Andreas Treichel : > Hello Andrey, > > $options are equal to the optional parameters of setcookie and >>> setrawcookie. >>> $options may contain: >>> >>> expires: int >>> path: string >>> domain: string >>> secure: bool >>> httponly: bool >>> >> > 1. The wor

Re: [PHP-DEV] http_cookie_set and http_cookie_remove

2017-07-18 Thread Andreas Treichel
Hello Andrey, $options are equal to the optional parameters of setcookie and setrawcookie. $options may contain: expires: int path: string domain: string secure: bool httponly: bool 1. The wording here implies that these are the *only* attributes allowed. In the interest of forward-compatibi

Re: [PHP-DEV] http_cookie_set and http_cookie_remove

2017-07-18 Thread Rowan Collins
On 18 July 2017 11:08:10 BST, Dan Ackroyd wrote: >On 18 July 2017 at 00:22, Andreas Treichel wrote: >> Hi, >> >> i want some feedback, about the following idea before i write a rfc. >> >> ... Most of them >> are optional and extensions (e.g. same-site) make it even more messy. > > >Two thoughts:

Re: [PHP-DEV] http_cookie_set and http_cookie_remove

2017-07-18 Thread Andrey Andreev
Hi Dan, On Tue, Jul 18, 2017 at 1:08 PM, Dan Ackroyd wrote: > On 18 July 2017 at 00:22, Andreas Treichel wrote: >> Hi, >> >> i want some feedback, about the following idea before i write a rfc. >> >> ... Most of them >> are optional and extensions (e.g. same-site) make it even more messy. > > >

Re: [PHP-DEV] http_cookie_set and http_cookie_remove

2017-07-18 Thread Andrey Andreev
Hi Andreas, On Tue, Jul 18, 2017 at 1:22 AM, Andreas Treichel wrote: > Hi, > > i want some feedback, about the following idea before i write a rfc. > > Problem: > The functions setcookie and setrawcookie has many parameters. Most of them > are optional and extensions (e.g. same-site) make it even

Re: [PHP-DEV] http_cookie_set and http_cookie_remove

2017-07-18 Thread Dan Ackroyd
On 18 July 2017 at 00:22, Andreas Treichel wrote: > Hi, > > i want some feedback, about the following idea before i write a rfc. > > ... Most of them > are optional and extensions (e.g. same-site) make it even more messy. Two thoughts: i) Cookie functions are easily done in userland. ii) Addin