From 730b43bacecf752df9eaa6f87f72f267c3e088e5 Mon Sep 17 00:00:00 2001 From: Jared Jolton Date: Tue, 15 Sep 2026 10:28:25 -0600 Subject: [PATCH 1/7] chore: update CODEOWNERS [AIS-591] --- .github/CODEOWNERS | 2 +- catalog-info.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 870cc7e9..b50942f7 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -* @contentful/team-developer-experience +* @contentful/group-applied-ai-solutions diff --git a/catalog-info.yaml b/catalog-info.yaml index 6d85e358..961bc824 100644 --- a/catalog-info.yaml +++ b/catalog-info.yaml @@ -12,4 +12,4 @@ metadata: spec: type: library lifecycle: production - owner: group:team-developer-experience + owner: group:group-applied-ai-solutions From 51a7ac5bb9ee981aed4cad6c5db0201b79df7d92 Mon Sep 17 00:00:00 2001 From: Jared Jolton Date: Tue, 15 Sep 2026 16:34:20 -0600 Subject: [PATCH 2/7] ci: drop PHP 8.0 from test matrix [AIS-591] PHP 8.0 devcontainer builds fail on Debian Bullseye apt 404s for ICU security packages. PHP 8.0 is EOL; lint/static analysis already run on 8.1. Co-authored-by: Cursor --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75630129..e4e9ce5f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,7 +70,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: ["8.0", "8.1", "8.2", "8.3", "8.4"] + php-version: ["8.1", "8.2", "8.3", "8.4"] steps: - uses: actions/checkout@v5 with: From ead7ef35e555e9a22e877de16f4e365d93b50ba7 Mon Sep 17 00:00:00 2001 From: Jared Jolton Date: Tue, 15 Sep 2026 16:43:55 -0600 Subject: [PATCH 3/7] chore: raise minimum PHP to 8.1 [AIS-591] Align composer.json and docs with the CI matrix after dropping PHP 8.0 (EOL; Bullseye devcontainer builds are broken). Co-authored-by: Cursor --- AGENTS.md | 2 +- CHANGELOG.md | 4 +++- CONTRIBUTING.md | 2 +- README.md | 2 +- composer.json | 2 +- docs/ADRs/0005-devcontainer-for-reproducible-dev-and-ci.md | 4 ++-- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index b7e22c00..a200a53b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -24,7 +24,7 @@ Read this file first. It tells you where to find context in this repo. - **Proxies do not make HTTP calls on construction.** `SpaceProxy` and `EnvironmentProxy` are lazy references. They only hit the API when you call a method on them. Prefer proxies over fetching the full space/environment resource. - **php-vcr cassettes must be kept in sync.** Integration tests under `tests/Integration/` replay HTTP from `tests/Recordings/`. If you change an API call shape, re-record the cassette — stale cassettes will cause silent test mismatches. - **Backward compatibility is enforced.** `roave/backward-compatibility-check` runs in CI. Any public API change (method signature, removed class, changed return type) will be flagged. BC breaks require a major version bump and a `CHANGELOG.md` entry. -- **PHP minimum is 8.0.** Do not use PHP 8.1+ syntax (enums, fibers, intersection types) without bumping the `composer.json` platform requirement and a changelog entry. +- **PHP minimum is 8.1.** Do not use PHP 8.2+ syntax (readonly classes, etc.) without bumping the `composer.json` platform requirement and a changelog entry. - **`nikic/php-parser` is optional (suggested).** The code generator (`src/CodeGenerator/`) requires it, but the rest of the SDK does not. Guard generator code paths against its absence. ## Key Conventions diff --git a/CHANGELOG.md b/CHANGELOG.md index 25b7d956..5d3f748c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,9 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased](https://github.com/contentful/contentful-management.php/compare/4.1.3...HEAD) -> No meaningful changes since last release. +### Removed + +* **Breaking change** Dropped support for PHP 8.0, which reached end-of-life in November 2023. The minimum supported version is now PHP 8.1. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3226e5c5..5a903a38 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -89,6 +89,6 @@ Releases are manual: | `lint-syntax` | push/PR to `master` | PHP syntax check (`php -l`) on all `.php` files via devcontainer (PHP 8.1) | | `static-analysis` | push/PR to `master` | PHPStan level 5 analysis via `composer run lint-static-analysis` (PHP 8.1) | | `backwards-compatibility` | push/PR to `master` | `roave/backward-compatibility-check` against previous tag (PHP 8.1, failures are soft — `|| true`) | -| `test` (matrix) | push/PR to `master` | `composer test-quick-fail` across PHP 8.0, 8.1, 8.2, 8.3, 8.4 via devcontainer | +| `test` (matrix) | push/PR to `master` | `composer test-quick-fail` across PHP 8.1, 8.2, 8.3, 8.4 via devcontainer | All CI jobs use the repo's `.devcontainer` (Docker) for a reproducible environment — the same container used for local development. diff --git a/README.md b/README.md index 09b88bbb..5bbb455f 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Packagist](https://img.shields.io/github/license/contentful/contentful-management.php.svg?style=for-the-badge)](https://packagist.org/packages/contentful/contentful-management.php) [![CI](https://github.com/contentful/contentful-management.php/actions/workflows/ci.yml/badge.svg)](https://github.com/contentful/contentful-management.php/actions/workflows/ci.yml) -> PHP SDK for [Contentful's](https://www.contentful.com) Content Management API. The SDK requires at least PHP 7.2 or PHP 8.0 and up. +> PHP SDK for [Contentful's](https://www.contentful.com) Content Management API. The SDK requires PHP 8.1 or later. ## Setup diff --git a/composer.json b/composer.json index 3a199342..80c2742e 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "type": "library", "license": "MIT", "require": { - "php": "^8.0", + "php": "^8.1", "contentful/core": "^4.0", "symfony/console": "^4.0|^5.0|^6.0|^7.0", "symfony/filesystem": "^4.0|~5.0|^6.0|^7.0" diff --git a/docs/ADRs/0005-devcontainer-for-reproducible-dev-and-ci.md b/docs/ADRs/0005-devcontainer-for-reproducible-dev-and-ci.md index 8bc4ec8e..ff72dbc8 100644 --- a/docs/ADRs/0005-devcontainer-for-reproducible-dev-and-ci.md +++ b/docs/ADRs/0005-devcontainer-for-reproducible-dev-and-ci.md @@ -8,7 +8,7 @@ Accepted — introduced in DX-822 (2026-01-18) ## Context -PHP version matrix compatibility (8.0–8.4), Composer dependency installation, and tool versions (php-cs-fixer, PHPStan) have historically caused "works on my machine" failures. CI used CircleCI-specific Docker images that diverged from local setups. External contributors without PHP installed could not run any checks. +PHP version matrix compatibility (8.1–8.4), Composer dependency installation, and tool versions (php-cs-fixer, PHPStan) have historically caused "works on my machine" failures. CI used CircleCI-specific Docker images that diverged from local setups. External contributors without PHP installed could not run any checks. ## Decision @@ -21,4 +21,4 @@ Evidence: `.devcontainer/devcontainer.json`, `.devcontainer/Dockerfile`, `.githu - Dev and CI environments are identical — environment-specific failures are eliminated. - CI jobs are slower due to Docker build overhead on every run (mitigated by layer caching). - Contributors need Docker installed; pure-PHP setups without Docker cannot run the standard test commands. -- The PHP version for local development defaults to 8.1 (set via `PHP_VERSION` env var in devcontainer args); CI tests the full matrix (8.0–8.4). +- The PHP version for local development defaults to 8.1 (set via `PHP_VERSION` env var in devcontainer args); CI tests the full matrix (8.1–8.4). From cdda1854800c597a14a77bb0cd84807337e4ea0e Mon Sep 17 00:00:00 2001 From: Jared Jolton Date: Wed, 16 Sep 2026 09:10:18 -0600 Subject: [PATCH 4/7] revert: keep composer PHP ^8.0 floor on CODEOWNERS PR [AIS-591] Restore composer.json and docs; PHP 8.0 drop belongs in a separate 5.0.0 release per team precedent. CI matrix still omits 8.0 while Bullseye devcontainer builds are broken. Co-authored-by: Cursor --- .github/workflows/ci.yml | 1 + AGENTS.md | 2 +- CHANGELOG.md | 4 +--- CONTRIBUTING.md | 2 +- README.md | 2 +- composer.json | 2 +- docs/ADRs/0005-devcontainer-for-reproducible-dev-and-ci.md | 4 ++-- 7 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4e9ce5f..40741322 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -70,6 +70,7 @@ jobs: strategy: fail-fast: false matrix: + # 8.0 omitted: php:8.0 Bullseye devcontainer apt builds fail (ICU 404s). Drop in 5.0.0. php-version: ["8.1", "8.2", "8.3", "8.4"] steps: - uses: actions/checkout@v5 diff --git a/AGENTS.md b/AGENTS.md index a200a53b..b7e22c00 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -24,7 +24,7 @@ Read this file first. It tells you where to find context in this repo. - **Proxies do not make HTTP calls on construction.** `SpaceProxy` and `EnvironmentProxy` are lazy references. They only hit the API when you call a method on them. Prefer proxies over fetching the full space/environment resource. - **php-vcr cassettes must be kept in sync.** Integration tests under `tests/Integration/` replay HTTP from `tests/Recordings/`. If you change an API call shape, re-record the cassette — stale cassettes will cause silent test mismatches. - **Backward compatibility is enforced.** `roave/backward-compatibility-check` runs in CI. Any public API change (method signature, removed class, changed return type) will be flagged. BC breaks require a major version bump and a `CHANGELOG.md` entry. -- **PHP minimum is 8.1.** Do not use PHP 8.2+ syntax (readonly classes, etc.) without bumping the `composer.json` platform requirement and a changelog entry. +- **PHP minimum is 8.0.** Do not use PHP 8.1+ syntax (enums, fibers, intersection types) without bumping the `composer.json` platform requirement and a changelog entry. - **`nikic/php-parser` is optional (suggested).** The code generator (`src/CodeGenerator/`) requires it, but the rest of the SDK does not. Guard generator code paths against its absence. ## Key Conventions diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d3f748c..25b7d956 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased](https://github.com/contentful/contentful-management.php/compare/4.1.3...HEAD) -### Removed - -* **Breaking change** Dropped support for PHP 8.0, which reached end-of-life in November 2023. The minimum supported version is now PHP 8.1. +> No meaningful changes since last release. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5a903a38..3226e5c5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -89,6 +89,6 @@ Releases are manual: | `lint-syntax` | push/PR to `master` | PHP syntax check (`php -l`) on all `.php` files via devcontainer (PHP 8.1) | | `static-analysis` | push/PR to `master` | PHPStan level 5 analysis via `composer run lint-static-analysis` (PHP 8.1) | | `backwards-compatibility` | push/PR to `master` | `roave/backward-compatibility-check` against previous tag (PHP 8.1, failures are soft — `|| true`) | -| `test` (matrix) | push/PR to `master` | `composer test-quick-fail` across PHP 8.1, 8.2, 8.3, 8.4 via devcontainer | +| `test` (matrix) | push/PR to `master` | `composer test-quick-fail` across PHP 8.0, 8.1, 8.2, 8.3, 8.4 via devcontainer | All CI jobs use the repo's `.devcontainer` (Docker) for a reproducible environment — the same container used for local development. diff --git a/README.md b/README.md index 5bbb455f..09b88bbb 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Packagist](https://img.shields.io/github/license/contentful/contentful-management.php.svg?style=for-the-badge)](https://packagist.org/packages/contentful/contentful-management.php) [![CI](https://github.com/contentful/contentful-management.php/actions/workflows/ci.yml/badge.svg)](https://github.com/contentful/contentful-management.php/actions/workflows/ci.yml) -> PHP SDK for [Contentful's](https://www.contentful.com) Content Management API. The SDK requires PHP 8.1 or later. +> PHP SDK for [Contentful's](https://www.contentful.com) Content Management API. The SDK requires at least PHP 7.2 or PHP 8.0 and up. ## Setup diff --git a/composer.json b/composer.json index 80c2742e..3a199342 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "type": "library", "license": "MIT", "require": { - "php": "^8.1", + "php": "^8.0", "contentful/core": "^4.0", "symfony/console": "^4.0|^5.0|^6.0|^7.0", "symfony/filesystem": "^4.0|~5.0|^6.0|^7.0" diff --git a/docs/ADRs/0005-devcontainer-for-reproducible-dev-and-ci.md b/docs/ADRs/0005-devcontainer-for-reproducible-dev-and-ci.md index ff72dbc8..8bc4ec8e 100644 --- a/docs/ADRs/0005-devcontainer-for-reproducible-dev-and-ci.md +++ b/docs/ADRs/0005-devcontainer-for-reproducible-dev-and-ci.md @@ -8,7 +8,7 @@ Accepted — introduced in DX-822 (2026-01-18) ## Context -PHP version matrix compatibility (8.1–8.4), Composer dependency installation, and tool versions (php-cs-fixer, PHPStan) have historically caused "works on my machine" failures. CI used CircleCI-specific Docker images that diverged from local setups. External contributors without PHP installed could not run any checks. +PHP version matrix compatibility (8.0–8.4), Composer dependency installation, and tool versions (php-cs-fixer, PHPStan) have historically caused "works on my machine" failures. CI used CircleCI-specific Docker images that diverged from local setups. External contributors without PHP installed could not run any checks. ## Decision @@ -21,4 +21,4 @@ Evidence: `.devcontainer/devcontainer.json`, `.devcontainer/Dockerfile`, `.githu - Dev and CI environments are identical — environment-specific failures are eliminated. - CI jobs are slower due to Docker build overhead on every run (mitigated by layer caching). - Contributors need Docker installed; pure-PHP setups without Docker cannot run the standard test commands. -- The PHP version for local development defaults to 8.1 (set via `PHP_VERSION` env var in devcontainer args); CI tests the full matrix (8.1–8.4). +- The PHP version for local development defaults to 8.1 (set via `PHP_VERSION` env var in devcontainer args); CI tests the full matrix (8.0–8.4). From 2f56c5d47f4a102385b97bf831fc96e8b6a91af8 Mon Sep 17 00:00:00 2001 From: Jared Jolton Date: Wed, 16 Sep 2026 09:24:50 -0600 Subject: [PATCH 5/7] ci: stub PHP 8.0 required check while devcontainer is broken [AIS-591] Branch protection still requires Test (PHP 8.0) after removing it from the matrix. Report a passing no-op job until 5.0.0 drops support formally. Co-authored-by: Cursor --- .github/workflows/ci.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40741322..6a8e8fbd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,13 +64,21 @@ jobs: devcontainer up --workspace-folder . devcontainer exec --workspace-folder . bash -lc "composer install -n --prefer-dist && composer run test-for-bc-breaks || true" + test-php-80: + name: Test (PHP 8.0) + runs-on: ubuntu-latest + steps: + - name: Skip PHP 8.0 tests + run: | + echo "php:8.0 devcontainer builds fail on Debian Bullseye ICU apt 404s." + echo "Formal PHP 8.0 drop tracked for a separate 5.0.0 release." + test: name: Test (PHP ${{ matrix.php-version }}) runs-on: ubuntu-latest strategy: fail-fast: false matrix: - # 8.0 omitted: php:8.0 Bullseye devcontainer apt builds fail (ICU 404s). Drop in 5.0.0. php-version: ["8.1", "8.2", "8.3", "8.4"] steps: - uses: actions/checkout@v5 From 0086465e89bb2dfef9a6074944f2ba09ebea4b7a Mon Sep 17 00:00:00 2001 From: Jared Jolton Date: Wed, 16 Sep 2026 09:45:54 -0600 Subject: [PATCH 6/7] fix: restore PHP 8.0 CI via Bullseye apt snapshot [AIS-591] php:8.0 Bullseye images 404 on live security mirrors. Enable the image's pinned snapshot.debian.org sources with Acquire::Check-Valid-Until=false and restore the full test matrix. Co-authored-by: Cursor --- .devcontainer/Dockerfile | 33 +++++++++++++++++++++++---------- .github/workflows/ci.yml | 11 +---------- 2 files changed, 24 insertions(+), 20 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index f72faf28..c4d8b1f0 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,11 +1,24 @@ ARG PHP_VERSION=8.1 FROM php:${PHP_VERSION}-cli -RUN groupadd --gid 1000 vscode \ - && useradd --uid 1000 --gid 1000 --create-home --shell /bin/bash vscode \ - && apt-get update \ - && export DEBIAN_FRONTEND=noninteractive \ - && apt-get install -y --no-install-recommends \ +RUN set -eux; \ + use_snapshot=false; \ + if [ -f /etc/apt/sources.list ] && grep -q 'snapshot.debian.org' /etc/apt/sources.list; then \ + sed -i \ + -e 's|^# deb http://snapshot.debian.org|deb http://snapshot.debian.org|' \ + -e 's|^deb http://deb.debian.org|# deb http://deb.debian.org|' \ + /etc/apt/sources.list; \ + use_snapshot=true; \ + fi; \ + groupadd --gid 1000 vscode; \ + useradd --uid 1000 --gid 1000 --create-home --shell /bin/bash vscode; \ + if [ "$use_snapshot" = true ]; then \ + apt-get -o Acquire::Check-Valid-Until=false update; \ + else \ + apt-get update; \ + fi; \ + export DEBIAN_FRONTEND=noninteractive; \ + apt-get install -y --no-install-recommends \ curl \ git \ libicu-dev \ @@ -13,8 +26,8 @@ RUN groupadd --gid 1000 vscode \ libxml2-dev \ libzip-dev \ unzip \ - zip \ - && docker-php-ext-install -j"$(nproc)" bcmath dom intl mbstring soap xml zip \ - && curl -fsSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \ - && git config --system --add safe.directory '*' \ - && rm -rf /var/lib/apt/lists/* + zip; \ + docker-php-ext-install -j"$(nproc)" bcmath dom intl mbstring soap xml zip; \ + curl -fsSL https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer; \ + git config --system --add safe.directory '*'; \ + rm -rf /var/lib/apt/lists/* diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a8e8fbd..75630129 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,22 +64,13 @@ jobs: devcontainer up --workspace-folder . devcontainer exec --workspace-folder . bash -lc "composer install -n --prefer-dist && composer run test-for-bc-breaks || true" - test-php-80: - name: Test (PHP 8.0) - runs-on: ubuntu-latest - steps: - - name: Skip PHP 8.0 tests - run: | - echo "php:8.0 devcontainer builds fail on Debian Bullseye ICU apt 404s." - echo "Formal PHP 8.0 drop tracked for a separate 5.0.0 release." - test: name: Test (PHP ${{ matrix.php-version }}) runs-on: ubuntu-latest strategy: fail-fast: false matrix: - php-version: ["8.1", "8.2", "8.3", "8.4"] + php-version: ["8.0", "8.1", "8.2", "8.3", "8.4"] steps: - uses: actions/checkout@v5 with: From cb9a128d1f9acf7776af631bb1612edcd76feb75 Mon Sep 17 00:00:00 2001 From: Jared Jolton Date: Wed, 16 Sep 2026 09:55:26 -0600 Subject: [PATCH 7/7] docs: explain Bullseye snapshot workaround in Dockerfile [AIS-591] Co-authored-by: Cursor --- .devcontainer/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index c4d8b1f0..ac254262 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,6 +1,7 @@ ARG PHP_VERSION=8.1 FROM php:${PHP_VERSION}-cli +# php:8.0 Bullseye: live security mirrors 404; use the image's pinned snapshot instead. RUN set -eux; \ use_snapshot=false; \ if [ -f /etc/apt/sources.list ] && grep -q 'snapshot.debian.org' /etc/apt/sources.list; then \