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

feat: implement typed function signature #141

Merged
merged 3 commits into from
Jun 8, 2023
Merged

Conversation

garethgeorge
Copy link
Contributor

Introduces a new Typed signature to the functions framework which provides automatic request deserialization and response serialization.

Copy link
Collaborator

@bshaffer bshaffer left a comment

Choose a reason for hiding this comment

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

Looks great! Here's an initial review

src/Invoker.php Show resolved Hide resolved
tests/InvokerTest.php Outdated Show resolved Hide resolved
tests/FunctionsFrameworkTest.php Show resolved Hide resolved
tests/FunctionsFrameworkTest.php Outdated Show resolved Hide resolved
src/TypedFunctionWrapper.php Outdated Show resolved Hide resolved
src/ValidatingFunctionWrapper.php Outdated Show resolved Hide resolved
bshaffer

This comment was marked as duplicate.

@garethgeorge garethgeorge force-pushed the garethgeorge/typed branch 3 times, most recently from f6a001e to ec420d8 Compare May 17, 2023 17:43
src/Invoker.php Show resolved Hide resolved
src/TypedFunctionWrapper.php Outdated Show resolved Hide resolved
tests/FunctionsFrameworkTest.php Show resolved Hide resolved
tests/FunctionsFrameworkTest.php Show resolved Hide resolved
tests/InvokerTest.php Outdated Show resolved Hide resolved
src/FunctionValidationTrait.php Outdated Show resolved Hide resolved
src/FunctionValidationTrait.php Outdated Show resolved Hide resolved
src/FunctionValidationTrait.php Outdated Show resolved Hide resolved
Copy link
Collaborator

@bshaffer bshaffer left a comment

Choose a reason for hiding this comment

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

A request for better docs and the composer autoload addition (all nits). Looks great, nice work!

src/CloudEventFunctionWrapper.php Outdated Show resolved Hide resolved
src/BadRequestError.php Outdated Show resolved Hide resolved
src/TypedFunctionWrapper.php Show resolved Hide resolved
tests/FunctionsFrameworkTest.php Show resolved Hide resolved
@garethgeorge
Copy link
Contributor Author

Thanks for your time reviewing and leaving feedback @bshaffer!

@garethgeorge garethgeorge merged commit a925ca4 into main Jun 8, 2023
@garethgeorge garethgeorge deleted the garethgeorge/typed branch June 8, 2023 01:28
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.

2 participants