Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request has invalid documentation or invalid constructor handling #86

Closed
bradynpoulsen opened this issue May 12, 2016 · 0 comments
Closed

Comments

@bradynpoulsen
Copy link

According to https://github.com/guzzle/psr7/blob/master/src/Request.php#L28-L29 the Request class can be created using

<?php
$request = new Request(null, null);

However, the UriInterface validation will cause that to throw an InvalidArgumentException. See https://github.com/guzzle/psr7/blob/master/src/Request.php#L43-L49

Looking at the PSR-7 definition for RequestInterface, neither getMethod or getUri may return anything but a string and UriInterface respectively. My gut feeling is that the documentation should then be considered invalid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant