ydb-platform / ydb-platform/ydb-php-sdk
feat: Update google/protobuf version to support PHP 8.2
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 39
- Forks
- 19
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 2
Description
Feature Request
Current version of google/protobuf is 3.15.8 which released on Apr 8, 2021:
https://github.com/protocolbuffers/protobuf-php/releases/tag/v3.15.8
There are some problems in this version, at least:
- At least in file:
src/Google/Protobuf/Internal/MapFieldIter.php
Error:Deprecated: Creation of dynamic property ...
About: https://php.watch/versions/8.2/dynamic-properties-deprecated
Fix: https://github.com/protocolbuffers/protobuf-php/commit/1fc16ac4b14107db52597c98b08a80a85a3167d5#diff-5c41e27198ffb65ea878fe448f662bb2f8193ab90801f37c850b6c582dc1294f - At least in files:
Error:src/Google/Protobuf/Internal/MapField.php src/Google/Protobuf/Internal/MapFieldIter.php src/Google/Protobuf/Internal/RepeatedField.php src/Google/Protobuf/Internal/RepeatedFieldIter.phpDeprecated: Return type of ... should either be compatible with ..., or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice ...
About: https://php.watch/versions/8.1/internal-method-return-types
Fix: https://github.com/protocolbuffers/protobuf-php/commit/1fc16ac4b14107db52597c98b08a80a85a3167d5#diff-8682cfd5d8e5b2c098e2c5d1d36e5af7f972e8b6c645b0795454315c4bd1f0d7
Fix version is 3.22.0RC3 which released on Feb 10, 2023:
https://github.com/protocolbuffers/protobuf-php/releases/tag/v3.22.0RC3)
This version updates supported version to PHP 7.0:
https://github.com/protocolbuffers/protobuf-php/commit/1fc16ac4b14107db52597c98b08a80a85a3167d5#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34
Preferred Solution
Update version of google/protobuf at least to 3.22.0 which has been released on Feb 16, 2023:
https://github.com/protocolbuffers/protobuf-php/releases/tag/v3.22.0
If the feature request is approved, would you be willing to submit a PR?
Yes if you tell me how to test it that nothing will be broken after update the version of google/protobuf.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate where this repository declares its google/protobuf dependency, then review the listed MapField, MapFieldIter, RepeatedField, and RepeatedFieldIter files against the 3.22.0 update. Update the dependency to at least 3.22.0 and verify the existing project checks cover PHP 8.1/8.2 deprecation compatibility without breaking the SDK.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100