Skip to content

Commit cf4926d

Browse files
KingPinKingPin
authored andcommitted
deprecate: remove PHP 7.x and 8.1 from active builds
- Remove PHP 7 and 8.1 from docker-ci.yml build-and-test matrix - Remove PHP 7 and 8.1 from docker-ci.yml publish matrix - Remove PHP 7 and 8.1 from docker-image.v1.yml matrix - Remove bullseye base OS (only needed for PHP 7) - Simplify matrix exclusions (now only apache+alpine excluded) - Add deprecation notice to README with migration path - Create docs/deprecated-images.md with full deprecation details - Update docs/migration.md to reference deprecated versions - Keep PHP 8.2 and 8.3 as actively built versions Existing images for PHP 7.x and 8.1 remain available in registries for backwards compatibility but will receive no further updates.
1 parent c820d11 commit cf4926d

5 files changed

Lines changed: 232 additions & 22 deletions

File tree

.github/workflows/docker-ci.yml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
fail-fast: false
2323
matrix:
2424
variant: [v1, v2]
25-
php-version: ['8.3', '8.1']
25+
php-version: ['8.3', '8.2']
2626
php-type: [fpm, cli]
2727
php-base: [alpine, bookworm]
2828
exclude:
@@ -224,20 +224,12 @@ jobs:
224224
fail-fast: false
225225
matrix:
226226
variant: [v1, v2]
227-
php-version: ['8.3', '8.2', '8.1', '7']
227+
php-version: ['8.3', '8.2']
228228
php-type: [fpm, cli, apache]
229-
php-base: [alpine, bookworm, bullseye]
229+
php-base: [alpine, bookworm]
230230
exclude:
231231
- php-type: apache
232232
php-base: alpine
233-
- php-version: '7'
234-
php-base: bookworm
235-
- php-version: '8.3'
236-
php-base: bullseye
237-
- php-version: '8.2'
238-
php-base: bullseye
239-
- php-version: '8.1'
240-
php-base: bullseye
241233

242234
name: publish-${{ matrix.variant }}-${{ matrix.php-version }}-${{ matrix.php-type }}-${{ matrix.php-base }}
243235

.github/workflows/docker-image.v1.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,11 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
php-type: [cli, fpm, apache]
16-
php-version: ['8.3', '8.2', '8.1', '7']
17-
php-base-os: [bullseye, bookworm, alpine]
16+
php-version: ['8.3', '8.2']
17+
php-base-os: [bookworm, alpine]
1818
exclude:
1919
- php-type: apache
2020
php-base-os: alpine
21-
- php-version: '7'
22-
php-base-os: bookworm
23-
- php-version: '8.3'
24-
php-base-os: bullseye
25-
- php-version: '8.2'
26-
php-base-os: bullseye
27-
- php-version: '8.1'
28-
php-base-os: bullseye
2921

3022
steps:
3123
- name: Checkout source

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Multi-architecture PHP Docker images with extensive extensions for modern web de
55
[![Docker Pulls](https://img.shields.io/docker/pulls/kingpin/php-docker)](https://hub.docker.com/r/kingpin/php-docker)
66
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/kingpin/php-docker/docker-ci.yml?branch=main)](https://github.com/kingpin/php-docker/actions/workflows/docker-ci.yml)
77

8+
> **⚠️ Deprecation Notice**: PHP 7.x and 8.1 builds are **no longer published** as of January 2025. Existing images remain available in registries for backwards compatibility. See [Deprecated Versions](#deprecated-versions) below.
9+
810
## 🎯 Which Image Should I Use?
911

1012
**New projects or need process supervision?** → Use **v2** images (e.g., `8.3-fpm-alpine-v2`)
@@ -15,7 +17,7 @@ See [v1 vs v2 comparison](#v1-vs-v2-comparison) below for details.
1517
## Features
1618

1719
- **Multi-Architecture Support**: Works on `amd64`, `arm64/aarch64` and `arm32v7/armhf` platforms
18-
- **Multiple PHP Versions**: PHP 7.x (deprecated), 8.1, 8.2, and 8.3
20+
- **Multiple PHP Versions**: PHP 8.2 and 8.3 (actively built); PHP 7.x and 8.1 deprecated
1921
- **Multiple Server Types**: CLI, FPM, and Apache
2022
- **Base OS Options**: Alpine (lightweight) and Debian (Bookworm/Bullseye)
2123
- **Extensive Extensions**: 30+ PHP extensions pre-installed
@@ -445,6 +447,25 @@ COPY custom-php.ini /usr/local/etc/php/conf.d/
445447
RUN install-php-extensions swoole
446448
```
447449

450+
## Deprecated Versions
451+
452+
The following PHP versions are **no longer actively built** but remain available in registries for backwards compatibility:
453+
454+
### PHP 7.x (End of Life)
455+
- All PHP 7.x images (7.4 and earlier)
456+
- Last published: January 2025
457+
- Available tags: `7-cli-alpine`, `7-fpm-alpine`, `7-apache-bullseye`, etc.
458+
459+
### PHP 8.1 (End of Active Support)
460+
- All PHP 8.1 images
461+
- Last published: January 2025
462+
- Available tags: `8.1-cli-alpine`, `8.1-fpm-alpine`, `8.1-apache-bookworm`, etc.
463+
464+
**Migration Path:**
465+
- Upgrade to PHP 8.2 or 8.3 for continued security updates and new builds
466+
- See [migration guide](docs/migration.md) for upgrade assistance
467+
- Existing images will remain available in Docker Hub, GHCR, and Quay.io
468+
448469
## 🏗️ Architecture Diagram
449470
```
450471
┌───────────────┐

docs/deprecated-images.md

Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
# Deprecated PHP Docker Images
2+
3+
This document lists PHP versions that are **no longer actively built** but remain available in container registries for backwards compatibility.
4+
5+
## ⚠️ Important Notice
6+
7+
- **No new builds** will be published for these versions
8+
- **No security updates** will be applied to these images
9+
- **Existing images remain available** for download from Docker Hub, GHCR, and Quay.io
10+
- **Migration is strongly recommended** for production workloads
11+
12+
## Deprecated Versions
13+
14+
### PHP 7.x (All Variants)
15+
16+
**Status**: End of Life - No longer maintained by PHP project
17+
**Last Build**: January 2025
18+
**Reason**: PHP 7.4 reached end-of-life November 2022
19+
20+
#### Available Tags (Legacy)
21+
22+
**Alpine-based:**
23+
- `7-cli-alpine`
24+
- `7-fpm-alpine`
25+
- `7-cli-alpine-v2`
26+
- `7-fpm-alpine-v2`
27+
28+
**Debian Bullseye-based:**
29+
- `7-cli-bullseye`
30+
- `7-fpm-bullseye`
31+
- `7-apache-bullseye`
32+
- `7-cli-bullseye-v2`
33+
- `7-fpm-bullseye-v2`
34+
- `7-apache-bullseye-v2`
35+
36+
**Architectures**: linux/amd64, linux/arm64, linux/arm/v7
37+
38+
### PHP 8.1 (All Variants)
39+
40+
**Status**: End of Active Support (security-only updates until Nov 2025)
41+
**Last Build**: January 2025
42+
**Reason**: Focus maintenance on PHP 8.2+ for better resource allocation
43+
44+
#### Available Tags (Legacy)
45+
46+
**Alpine-based:**
47+
- `8.1-cli-alpine`
48+
- `8.1-fpm-alpine`
49+
- `8.1-cli-alpine-v2`
50+
- `8.1-fpm-alpine-v2`
51+
52+
**Debian Bookworm-based:**
53+
- `8.1-cli-bookworm`
54+
- `8.1-fpm-bookworm`
55+
- `8.1-apache-bookworm`
56+
- `8.1-cli-bookworm-v2`
57+
- `8.1-fpm-bookworm-v2`
58+
- `8.1-apache-bookworm-v2`
59+
60+
**Architectures**: linux/amd64, linux/arm64, linux/arm/v7
61+
62+
## Migration Recommendations
63+
64+
### From PHP 7.x → PHP 8.2 or 8.3
65+
66+
**Breaking Changes to Consider:**
67+
- Deprecated features removed in PHP 8.0+
68+
- Stricter type handling
69+
- Changes to error reporting
70+
- Removed legacy extensions
71+
72+
**Steps:**
73+
1. Review [PHP 8 migration guide](https://www.php.net/manual/en/migration80.php)
74+
2. Test your application locally with PHP 8.2 or 8.3
75+
3. Update dependencies in `composer.json`
76+
4. Run automated tests
77+
5. Update Docker image tags
78+
79+
**Example:**
80+
```bash
81+
# Old (deprecated)
82+
docker pull kingpin/php-docker:7-fpm-alpine
83+
84+
# New (recommended)
85+
docker pull kingpin/php-docker:8.3-fpm-alpine
86+
```
87+
88+
### From PHP 8.1 → PHP 8.2 or 8.3
89+
90+
**Breaking Changes:**
91+
- PHP 8.2: Deprecated dynamic properties
92+
- PHP 8.3: More readonly class features
93+
94+
**Steps:**
95+
1. Review [PHP 8.2 migration guide](https://www.php.net/manual/en/migration82.php) or [PHP 8.3 guide](https://www.php.net/manual/en/migration83.php)
96+
2. Update image tags in your deployment manifests
97+
3. Test thoroughly in staging environment
98+
4. Deploy to production
99+
100+
**Example:**
101+
```bash
102+
# Old (deprecated)
103+
docker pull kingpin/php-docker:8.1-fpm-alpine
104+
105+
# New (recommended)
106+
docker pull kingpin/php-docker:8.3-fpm-alpine
107+
```
108+
109+
### Docker Compose Migration
110+
111+
```yaml
112+
# Before (deprecated)
113+
services:
114+
app:
115+
image: kingpin/php-docker:8.1-fpm-alpine
116+
117+
# After (recommended)
118+
services:
119+
app:
120+
image: kingpin/php-docker:8.3-fpm-alpine
121+
```
122+
123+
### Kubernetes/Helm Migration
124+
125+
```yaml
126+
# Before (deprecated)
127+
containers:
128+
- name: app
129+
image: kingpin/php-docker:8.1-fpm-alpine
130+
131+
# After (recommended)
132+
containers:
133+
- name: app
134+
image: kingpin/php-docker:8.3-fpm-alpine
135+
```
136+
137+
## Long-Term Availability
138+
139+
### Registry Retention
140+
141+
These deprecated images will remain available **indefinitely** in the following registries:
142+
- **Docker Hub**: hub.docker.com/r/kingpin/php-docker
143+
- **GitHub Container Registry**: ghcr.io/kingpin/php-docker
144+
- **Quay.io**: quay.io/kingpinx1/php-docker
145+
146+
### Pulling Deprecated Images
147+
148+
You can continue to pull these images as normal:
149+
150+
```bash
151+
# PHP 7.x example
152+
docker pull kingpin/php-docker:7-fpm-alpine
153+
154+
# PHP 8.1 example
155+
docker pull kingpin/php-docker:8.1-fpm-alpine
156+
```
157+
158+
### Security Considerations
159+
160+
**Important**: Deprecated images will NOT receive:
161+
- Security patches for PHP vulnerabilities
162+
- Updates to bundled system packages
163+
- Updates to PHP extensions
164+
- Bug fixes
165+
166+
**For production use**, we strongly recommend migrating to actively supported versions (PHP 8.2 or 8.3).
167+
168+
## Support Policy
169+
170+
- **Active Builds**: PHP 8.2 and 8.3 (receive regular updates)
171+
- **Deprecated**: PHP 7.x and 8.1 (images frozen, no updates)
172+
- **Removed**: None (all previously published images remain available)
173+
174+
## Image Digests (Last Published)
175+
176+
For reproducible builds, you can pin to specific digests. Contact the maintainer or check registry APIs for exact digest values of the last published builds.
177+
178+
Example of digest pinning:
179+
```bash
180+
# Pin to specific digest (immutable)
181+
docker pull kingpin/php-docker@sha256:abcdef1234567890...
182+
```
183+
184+
## Questions or Issues?
185+
186+
If you need assistance migrating from deprecated versions:
187+
188+
1. Check the [migration guide](migration.md)
189+
2. Review [troubleshooting guide](troubleshooting.md)
190+
3. Open an issue on GitHub with:
191+
- Current deprecated version you're using
192+
- Target version you want to migrate to
193+
- Specific migration challenges
194+
195+
## Timeline
196+
197+
- **November 2024**: Announcement of deprecation plan
198+
- **January 2025**: Last builds for PHP 7.x and 8.1
199+
- **Ongoing**: Images remain available in registries indefinitely
200+
201+
---
202+
203+
Last updated: January 2025

docs/migration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
This guide helps you migrate from v1 (legacy) to v2 (modern) PHP Docker images.
44

5+
> **ℹ️ Note on Deprecated Versions**: PHP 7.x and 8.1 are no longer actively built. If you're using these versions, please also review the [deprecated images guide](deprecated-images.md) for upgrade paths to PHP 8.2 or 8.3.
6+
57
## Should You Migrate?
68

79
**Consider migrating to v2 if:**

0 commit comments

Comments
 (0)