Blocker Confusion -
The interface method:
public function withPath($path);
requires
* @throws \InvalidArgumentException for invalid paths.
However in https://tools.ietf.org/html/rfc3986#section-3.3 I do not see
what constitutes an invalid path.
Is that a bug in the interface or it it expected that the class validate
the path according to the RFCs specific to each scheme?
The problem I have with the latter interpretation is twofold:
A) It makes it impossible to create a class that is generic in scope for
scheme, which means if class A implements the interface and class B
implements the interface you can't just swap class A for B in use because
they may implement different schemes.
B) The "withScheme($scheme)" method requires producing an identical
instance where only the scheme has changed, but that may then result in a
new instance where the path is not valid for that particular scheme because
all the other properties of the class must be retained.
So... are we really suppose to validate the path according to the RFC for
the scheme or would it be better to leave validation of the the path part
of the URI to tools specific to the scheme by the software that uses the
class to build a URI?
--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/php-fig/d6ab2e81-0f1e-475d-9b70-364ffa6f91dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.