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

Fix implicit nullable type to avoid PHP 8.4 warnings #247

Merged
merged 4 commits into from
Sep 23, 2024

Conversation

eiriksm
Copy link
Contributor

@eiriksm eiriksm commented Sep 23, 2024

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets fixes #X, partially #Y, mentioned in #Z
Documentation if this is a new feature, link to pull request in https://github.com/php-http/documentation that adds relevant documentation
License MIT

What's in this PR?

This PR makes the implicit nullable type explicit. Using implicit nullable types has been deprecated, and will emit deprecation warnings in PHP 8.4

Why?

To avoid getting deprecation warnings in PHP 8.4

Checklist

  • Updated CHANGELOG.md to describe BC breaks / deprecations | new feature | bugfix
  • Documentation pull request created (if not simply a bugfix)

@GrahamCampbell
Copy link
Contributor

Can we add PHP 8.4 to the CI, too?

@eiriksm
Copy link
Contributor Author

eiriksm commented Sep 23, 2024

Can we add PHP 8.4 to the CI, too?

done 🤓

@GrahamCampbell
Copy link
Contributor

Fixes similar to php-http/httplug#176 are needed.

@eiriksm
Copy link
Contributor Author

eiriksm commented Sep 23, 2024

added the "emulate php 8.3" part, but not sure which tweak is needed to fix phpcs. Which by the way should probably be a separate PR, as it does not relate to the changes in this PR

@GrahamCampbell
Copy link
Contributor

The tweak is needed to get it to pass, because the symfony ruleset has changed and the php-cs-fixer version is not pinned.

@dbu
Copy link
Contributor

dbu commented Sep 23, 2024

i updated the cs fixer and apply the fixes in #248. that includes the ? for nullable parameters.

can you please rebase on the 2.x branch? that should make the cs fixer green.

@eiriksm
Copy link
Contributor Author

eiriksm commented Sep 23, 2024

Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

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

thanks a lot!

@dbu dbu merged commit 83263d4 into php-http:2.x Sep 23, 2024
20 checks passed
@eiriksm eiriksm deleted the fix/nullable branch September 23, 2024 21:48
@eiriksm
Copy link
Contributor Author

eiriksm commented Sep 23, 2024

amazing. thank you so much for being so responsive 😄

Any chance we could also cut a new release with this change? 🤓

@dbu
Copy link
Contributor

dbu commented Sep 24, 2024

thanks for contributing. i tagged the release: https://github.com/php-http/client-common/releases/tag/2.7.2

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.

4 participants