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

HTTP message API #19

Merged
merged 14 commits into from
Mar 25, 2021
Merged

HTTP message API #19

merged 14 commits into from
Mar 25, 2021

Conversation

justinboswell
Copy link
Contributor

@justinboswell justinboswell commented Mar 24, 2021

Includes fixes for OS X compilation and OS X CI.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@justinboswell justinboswell requested review from SamRemis and a team March 24, 2021 18:03
@justinboswell justinboswell marked this pull request as ready for review March 24, 2021 21:55
@justinboswell justinboswell enabled auto-merge (squash) March 24, 2021 22:53
src/AWS/CRT/HTTP/Headers.php Outdated Show resolved Hide resolved
src/AWS/CRT/HTTP/Headers.php Show resolved Hide resolved
src/AWS/CRT/HTTP/Message.php Outdated Show resolved Hide resolved
src/AWS/CRT/HTTP/Message.php Outdated Show resolved Hide resolved
src/AWS/CRT/HTTP/Message.php Outdated Show resolved Hide resolved
src/AWS/CRT/HTTP/Message.php Outdated Show resolved Hide resolved
src/tests/HttpMessageTest.php Outdated Show resolved Hide resolved
$this->assertMessagesMatch($msg, $msg_copy);
}

public function testRequestMarshallingWithQueryParams() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since this test method is almost identical to the one above it, a dataprovider could be used here instead. With just two, the copy/pasted code isn't that big a deal, but if you are going to add more similar tests, that would be better

src/AWS/CRT/HTTP/Message.php Outdated Show resolved Hide resolved
src/AWS/CRT/HTTP/Message.php Show resolved Hide resolved
runs-on: macos-${{ matrix.version }}
strategy:
matrix:
version: [10.15]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add 11? Usually MacOs is quickly adopted and 11 was around for half year or more already.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No we cannot. See the commit where It took it out, because GitHub Actions fails it immediately, before even getting to our script.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add it back when they fix it.

@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we version this one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because PHP5 can't generate it.

use AWS\CRT\Internal\Encoding;

abstract class Message extends NativeResource {
private $method = "GET";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why you setting it to GET here if it is overrode in the contructor?
Same for other private variables.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a pathological hatred of uninitialized variables. In this case, it makes sense to just remove all the values, which I've done :(

src/AWS/CRT/HTTP/Message.php Outdated Show resolved Hide resolved
src/tests/HttpMessageTest.php Outdated Show resolved Hide resolved
@justinboswell justinboswell merged commit 9c9422c into main Mar 25, 2021
@justinboswell justinboswell deleted the http-message branch March 25, 2021 17:14
justinboswell pushed a commit that referenced this pull request Jun 4, 2021
* HTTP message API

* Added MacOS CI

* Grabbed fixes for mac from aws-crt-ffi
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

Successfully merging this pull request may close these issues.

None yet

3 participants