>
> It mirrors the interface, but it can’t be swapped out for a UriInterface
> instance, especially since it can’t be extended, so I wouldn’t consider it
> compatible. I would still need to write a compatibility layer that composes
> Url\Url and implements UriInterface.
>

I guess my words were slightly misleading: what I should have written is
that the methods themselves are compatible.


> Since PSRs are concerned with shared interfaces and this class is final
> and does not implement any interfaces, I’m not sure how you envision “a
> next iteration” of PSR-7 to use this directly, unless what you mean is that
> UriInterface would be deprecated and applications would type directly
> against Url\Url.
>

Yes, I meant the latter exactly. If we had a well-usable URL object
representation in the standard library, then there would be no need to have
an userland interface as well (unless they have different behavior or
purpose). Analogically, we have DateTimeImmutable, and there is no PSR for
a date time interface. (I know there is Carbon and other libraries, but
they are for convenience, not for interoperability).

Reply via email to