[PSR-6][Errata] expiresAt() missing parameter type, take 2

50 views
Skip to first unread message

Larry Garfield

unread,
May 7, 2017, 8:08:24 PM5/7/17
to PHP Framework Interoperability Group
OK, I'm behind in this, but putting this forward again.

Last fall we discussed an Errata for PSR-6 around the handling of the
expiresAt() method, which is documented to use PHP 5.5-and-up features
but doesn't enforce it at the type hint level. The recommended solution
in the errata last time was rejected, and there was expressed desire to
use an exception instead. I therefore offer the following PR, which is
essentially the same prose as before but with a different code
recommendation:

https://github.com/php-fig/fig-standards/pull/915

I'll leave this for 2 weeks before calling a vote on it. Secretaries,
please clarify if this would be just a CC vote or a dual-vote. (Since
it's an Errata on a spec, and specs are CC vote only, I would think it's
CC only but will accept the Secretaries' decision.)

--Larry Garfield

Alessandro Lai

unread,
May 8, 2017, 3:45:44 AM5/8/17
to PHP Framework Interoperability Group
I think that in this discussion we could incorporate how we want to proceed in terms of future approaches to this standard. Since, as you said in the other thread, now PHP 5.5+ can be safely assumed, we can think of "upgrading" PSR-6 to a better typehint, but how?

I still think that this errata should be put forward, since PSR-6 is already in the wild and will not disappear the moment that we publish this "update", but IMHO having a future strategy at this could be a good thing (and a good precedent to be followed next time that an issue like this arises).

Larry Garfield

unread,
May 8, 2017, 11:29:33 AM5/8/17
to php...@googlegroups.com
See the "naming things" thread where I touch on exactly that. :-)

Given the most recent stats from Packagist[1], I would advocate for making PHP 7.0 a minimum for all future PSRs at this point.

[1] https://seld.be/notes/php-versions-stats-2017-1-edition

--Larry Garfield
--
You received this message because you are subscribed to the Google Groups "PHP Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to php-fig+u...@googlegroups.com.
To post to this group, send email to php...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/4e8c86b9-273a-439c-b698-9d320d1fb3ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages