Skip to content

ext-protobuf version outdated in PHP runtime #564

@iamacarpet

Description

@iamacarpet

Describe the bug
The protobuf.so extension within the PHP runtime image(s) is outdated, specifically on PHP8.3.

google/gax has recently been updated to require a more recent version:

    "conflict": {
        "ext-protobuf": "<4.31.0"
    },

https://github.com/googleapis/gax-php/blob/main/composer.json#L27

@jama22 , any chance of getting this updated please?

Additional context
How are you using GCP buildpacks?

  • pack and the gcr.io/buildpacks/builder
  • Cloud Functions
  • Cloud Run
  • Cloud Build
  • App Engine Standard
  • App Engine Flex
  • Firebase App Hosting

Did this used to work?

Yes

This looks to have broken within the last month.

What language is your project primarily written in?
PHP

Steps To Reproduce
Easiest way to reproduce

  1. Start with a project that has a composer.json and composer.lock, including google/cloud (latest), on PHP 8.3.
  2. Using container image europe-west1-docker.pkg.dev/serverless-runtimes/google-22-full/runtimes/php83:latest, install composer.
  3. In that container image:
    • Ensure extension=protobuf.so and extension=grpc.so are in php.ini
    • Run composer install --no-dev --no-progress -o

Expected behavior

Composer to install the packages successfully.

Actual behavior

Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - ext-protobuf is present at version 3.24.4 and cannot be modified by Composer
    - google/gax is locked to version v1.38.0 and an update of this package was not requested.
    - google/gax v1.38.0 conflicts with ext-protobuf <4.31.0.

To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php.ini
    - /srv/php.ini
You can also run `php --ini` in a terminal to see which files are used by PHP in CLI mode.
Alternatively, you can run Composer with `--ignore-platform-req=ext-protobuf` to temporarily ignore these required extensions.

This obviously goes away if you run composer update with that version of ext-protobuf installed & enabled (inside the container image), however, you then become locked / stuck on an old version of google/gax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions