On Tue, Dec 15, 2020, at 10:45 AM, Jan Schneider wrote:
>
> Zitat von Larry Garfield <
la...@garfieldtech.com>:
>
> > We previously attempted to upgrade a few PSRs to PHP 7, in stages
> > per bylaw. However, we discovered through experimentation with
> > PSR-13 and others that the upgrades would be a lot easier if we
> > jumped straight to PHP 8, thanks to its more robust type support.
> > (Specifically, string|\Stringable and return static.)
> >
> > PHP 8 is now here, so let's get back to it.
> >
> > Here are the re-upped PSR-13 PRs to add modern typing. This
> > requires a 2/3 CC vote, I believe. Today begins the 2 week
> > discussion period, although since that puts the vote starting smack
> > in the middle of everyone's Christmas holiday I will likely not call
> > the vote to start until early January. There is still the
> > bikeshedding around whether these are 1.1/2.0 or 2.0/3.0, for which
> > I do not have enough energy to really give a damn either way.
> >
> > The vote would be to accept all 3 PRs and tag accordingly.
> >
> > Step 1:
https://github.com/php-fig/link/pull/6
>
> Why does only withHref() accept Stringable, and not the other methods
> with string parameters?
The docblock for that one specifically calls out that it allows an object, so disallowing Stringable would be an API change.
For the others (mainly relationships), they're not complex strings. They're by design trivial little labels, so there's no good reason anyone would be using a Stringable object there.
Cases like this are going to be a judgement call in each spec, which is what we concluded last year when we previously tried to add types. The above is my judgement call for this spec.