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 compatibility with php8.2 #62

Merged
merged 1 commit into from
Oct 10, 2023
Merged

Conversation

misterxan
Copy link
Contributor

@misterxan misterxan commented Oct 9, 2023

  • I updated the necessary libraries for PHP 8.2.
  • I've eliminated errors related to Undefined key
  • I made changes to the logic in src/Optimizer/FullNameOptimizer.php in the removeNamespaceFromString method, assuming that $currentNameSpacePaths would, in one way or another, have a larger dimension than $dataNameSpacePaths. Previously, it was the other way around, which caused a warning with an undefined key 2 when I ran tests.
  • Fix in another place after phpstan and php-cs-fixer
  • It's possible that I may have inadvertently violated backward compatibility with PHP 7.4 in some places.

The question is whether to keep $method->setAccessible(true); in tests since it has no effect starting from 8.1. However, compatibility with 8.0 will be lost, so I think it's worth not removing it.

@misterxan
Copy link
Contributor Author

@nick-zh, please review.

Copy link
Member

@nick-zh nick-zh left a comment

Choose a reason for hiding this comment

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

Many thanks for this contribution! 💪

src/Registry/SchemaRegistry.php Outdated Show resolved Hide resolved
docker/dev/php/Dockerfile Outdated Show resolved Hide resolved
@misterxan misterxan force-pushed the add-php82-support branch 2 times, most recently from b81976a to 26b8718 Compare October 10, 2023 06:16
Also fix some warnings after running phpunit/php-cs-fixer/phpstan
@nick-zh nick-zh merged commit 64776fd into php-kafka:main Oct 10, 2023
3 of 4 checks passed
@nick-zh
Copy link
Member

nick-zh commented Oct 10, 2023

@misterxan thx a lot again, released as v3.0.0-beta1 🎉

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