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

Add @return to define the return type for non-PHP 7.2 compatible types #444

Merged
merged 1 commit into from
Sep 19, 2021

Conversation

wouterj
Copy link
Contributor

@wouterj wouterj commented Sep 18, 2021

This documents the return type for methods implementing PSR-7 interfaces, but where the return type is not compatible with PHP 7.2.

Besides making the return type more descriptive when reading the method definition, this also suppresses type deprecation notices when using guzzle/psr7 with Symfony 5.4+.

src/AppendStream.php Outdated Show resolved Hide resolved
Copy link
Member

@GrahamCampbell GrahamCampbell 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 taking the time to prepare this PR. It's much appreciated. I'll leave this for @Nyholm to review and merge. :)

@GrahamCampbell
Copy link
Member

@Nyholm I am also unsure if we want to back-port this to 1.x too. We do have another "final, actually final this time 🧌" release upcoming for that series.

Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

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

Thank you

I am fine with just adding this change to v2.

@Nyholm Nyholm merged commit a613efc into guzzle:master Sep 19, 2021
@wouterj wouterj deleted the phpdoc-return branch September 20, 2021 06:01
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