Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add native types to public API #225

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

Open
WyriHaximus wants to merge 1 commit into reactphp:3.x
base: 3.x
Choose a base branch
Loading
from WyriHaximus-labs:3.x-public-API-types

Conversation

@WyriHaximus
Copy link
Member

@WyriHaximus WyriHaximus commented May 27, 2024

This changeset adds native types to the public API as discussed in #219.

Once merged, I'm planning to add PHPStan in a follow-up PR which would take advantage of these types.

Builds on top of #222, #223 and reactphp/cache#60

@WyriHaximus WyriHaximus added this to the v3.0.0 milestone May 27, 2024
@WyriHaximus WyriHaximus marked this pull request as ready for review May 27, 2024 16:42
@WyriHaximus WyriHaximus changed the title (削除) [WIP] Add native types to public API (削除ここまで) (追記) Add native types to public API (追記ここまで) May 27, 2024
Copy link
Member

@SimonFrings SimonFrings left a comment
edited
Loading

Choose a reason for hiding this comment

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

First round of review is done, found a few things that I commented on. I also went through all classes to be sure we don't miss anything and noticed that these following classes are missing types on their public functions:

  • Model/Message
  • Protocol/BinaryDumper
  • Protocol/Parser
  • Query/Query
  • Query/RetryExecutor

Copy link
Member Author

WyriHaximus commented Jun 12, 2024
edited
Loading

First round of review is done, found a few things that I commented on.

Sweet, thanks! Made all the updates locally. But will push them all in one go once I've also done your other comment.

I also went through all classes to be sure we don't miss anything and noticed that these following classes are missing types on their public functions:

  • Model/Message
  • Protocol/BinaryDumper
  • Protocol/Parser
  • Query/Query
  • Query/RetryExecutor

Last time I checked, those classes aren't part of our public API, except the Query/RetryExecutor. 🤣🤐🤦(But yes I'll add public types to those as well.)

Copy link
Member

Last time I checked, those classes aren't part of our public API, except the Query/RetryExecutor. 🤣🤐🤦(But yes I'll add public types to those as well.)

@WyriHaximus Yeah, I also talked with @clue what would count as public API and I think everything that isn't marked as internal or private. Except we recommend not using certain public functions in our README, but didn't find anything about this in our documentation.

Maybe there were some decisions made back in the days but never documented, which makes it hard for me to differentiate it from the rest of the public API.

Copy link
Member Author

Last time I checked, those classes aren't part of our public API, except the Query/RetryExecutor. 🤣🤐🤦(But yes I'll add public types to those as well.)

@WyriHaximus Yeah, I also talked with @clue what would count as public API and I think everything that isn't marked as internal or private. Except we recommend not using certain public functions in our README, but didn't find anything about this in our documentation.

That was my assumption. But it's fine, it would have been added in the followup PR anyway.

Maybe there were some decisions made back in the days but never documented, which makes it hard for me to differentiate it from the rest of the public API.

Not really, it was an assumption, and the previous packages where so small everything was the public API in both ways.

@WyriHaximus WyriHaximus force-pushed the 3.x-public-API-types branch 3 times, most recently from 7e4dfbf to ab9fc67 Compare June 13, 2024 16:23
Copy link
Member

@SimonFrings SimonFrings left a comment

Choose a reason for hiding this comment

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

Thanks for the updates, found a few minor things, should be quick fixes 👍

This changeset adds native types to the public API as discussed in reactphp#219.
Once merged, I'm planning to add PHPStan in a follow-up PR which would take advantage of these types.
Builds on top of reactphp#222, reactphp#223 and reactphp/cache#60 
Copy link
Member

@SimonFrings SimonFrings left a comment

Choose a reason for hiding this comment

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

Nice work, PR looks good to me 👍

WyriHaximus reacted with hooray emoji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@SimonFrings SimonFrings SimonFrings approved these changes

@clue clue Awaiting requested review from clue

Assignees

No one assigned

Projects

None yet

Milestone

v3.0.0

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /