* Should Href be a string, or can/should we use PSR-7 URI objects? I'm very very tempted to go with the latter. * Currently, technically, URL templates would be disallowed. That's a problem for, say, HAL. How do we want to square that, especially if Href becomes an object?URI templates (see RFC 6570[1]) are a little weird. They're not a "real" relationship. Rather, they're a template for a relationship. Formats like HAL make extensive use of them. Others, like HTML, basically never use them and they're probably not legal. (I've not checked, though.) That makes supporting them problematic, as then they're valid only in some serializations and not others. Additionally, the full RFC syntax is quite involved. I've yet to see a PHP implementation that is complete. (Symfony, for instance, uses an abridged version of the syntax for placeholders but not for URI arguments.) At the same time, we could consider using a URI object rather than a string. That offers the advantage of being more formal and structured, and there's likely more tooling built up around that. As a string, it can be in any of the zillion legal formats for URIs. The URI object from PSR-7, by design, abstracts all of that messiness away. However, I don't know how that would handle a templated URI. Would that break PSR-7? I see a few options, none of which I particularly like: 1) Disallow templated URLs, and use a string URL. This keeps the spec nice and simple, but basically precludes HAL from using it. That seems a non-starter. 2) Disallow templated URLs, and use a URI object. Same points as option 1, but more formal. 3) Disallow templated URLs, use a string URL, but specifically restrict it to only a few types of URL. Specifically, either a fully qualified URL or a relative path fragment. We can lock down all of the various fiddly bits and be "conservative in what you send". Remember that we're talking only about the getter, no setter, so we have the flexibility to make the spec not flexible if it helps. :-) (That said, there's a lot of forms that could be valid, legal, and useful.) 4) Allow templated URLs, using a string. Lock it down a la option 3. Specify that a Serializer for a context where templated URLs don't make sense MUST ignore those links. I am unsure if that is safe to do. 5) Allow templated URLs, but only a subset of the spec (to make it actually possible to implement), for some definition of subset. Specify that a Serializer must ignore templated URLs when they don't make sense. 6) Use a URI object, and coax it to somehow make templated URLs legal. I am wary of whether this is even possible. We then still have to deal with the Serializer context question. And probably other combinations of the options listed above. Thoughts? Comments? Suggestions? [1] https://tools.ietf.org/html/rfc6570 --Larry Garfield