open-telemetry / open-telemetry/opentelemetry-php

Allow dependency for google/protobuf v^5.34

Open Beginner friendly
#1,902 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
912
Forks
232
Avg merge
7d 16h
Merged PRs (30d)
4

Description

Is your feature request related to a problem?
Yes, we rely on editions proto files (2024) for our project. Currently the opentelemetry-php does not allow proto v5 library:
https://github.com/open-telemetry/opentelemetry-php/blob/main/proto/otel/composer.json

This results in a composer tree conflict.

Describe the solution you'd like
Just add the v5.0 dependency to the file mentioned above.

"google/protobuf": "^3.22 || ^4.0" || ^5.0

Describe alternatives you've considered
Tried to find a solution where the dependency tree of composer allows two different major versions. This seems to be a PHP or composer anti-pattern and is not allowed by design.

Additional context
Composer error:
- open-telemetry/exporter-otlp[1.2.0, ..., 1.4.0] require open-telemetry/gen-otlp-protobuf ^1.1 -> satisfiable by open-telemetry/gen-otlp-protobuf[1.1.0, ..., 1.8.0].
- open-telemetry/gen-otlp-protobuf[1.1.0, ..., 1.2.0] require google/protobuf ^3.3.0 -> satisfiable by google/protobuf[v3.4.0, ..., v3.25.8].
- open-telemetry/gen-otlp-protobuf[1.2.1, ..., 1.8.0] require google/protobuf ^3.22 || ^4.0 -> satisfiable by google/protobuf[v3.22.0, ..., v3.25.8, v4.26.0, ..., v4.33.5].
- You can only install one version of a package, so only one of these can be installed: google/protobuf[v3.4.0, ..., v3.25.8, v4.26.1, ..., v4.33.5, v5.34.0].

Feel free to ask for more info.

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 proto/otel/composer.json, where the google/protobuf constraint is defined, and review the existing version requirements. Update the constraint to allow the requested v5 release, then verify Composer can resolve the dependency tree without the reported conflict.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
build-system
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.