protocolbuffers / protocolbuffers/protobuf

PHP: C extension has undocumented "append" function that has no package parity.

Open Beginner friendly
#26,188 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
C++
Stars
72k
Forks
16.3k
Avg merge
1d 17h
Merged PRs (30d)
140

Description

What version of protobuf and what language are you using?
Version: Any/all. Has existed from the introduction of the package
Language: PHP

What did you do?
https://github.com/protocolbuffers/protobuf/blob/main/php/ext/google/protobuf/array.c#L245-L263

RepeatedField and the now removed Internal\RepeatedField in the C extension have an append() function that has never had a matching append() function in the php-only package, which can cause static analysis and type confusion.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with php/ext/google/protobuf/array.c at lines 245-263 and compare the C extension's RepeatedField append() with the corresponding RepeatedField implementation in the PHP-only package. Done means the PHP-only package has matching append() behavior so the two implementations no longer cause the reported static-analysis and type-confusion problem.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, php
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.