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 or warning for unknown options for troubleshooting.


On another note, I'd also move the 'expire' option to a separate
parameter and remove $options to $attributes.

'expire' is not a known cookie attribute; PHP uses it to calculate the
Expires and Max-Age attributes ...

The "attribute" expires (not expire) existing in the header Set-Cookie.


I liked your proposal, because it's a chance to have a shiny new API
> that doesn't come with all the legacy stuff already built into
> setcookie().

I hope to meet your expectations.


But if we want an array-based setcookie() alternative without changing
anything else, we can just change setcookie() to accept arrays.

No this is just the only the first step for additional extensions.


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to