How to update php-redis extension (and why you might need to do so during shopware updates)
Source: Dev.to
Why you might need to update the php‑redis extension during Shopware updates
The latest Shopware 6.7.7.0 version includes an upgrade to Symfony 7.4 LTS
(release notes).
- Symfony 7.3 stopped being actively supported in January 2026
(Symfony releases calendar). - Shopware 6.6 LTS will receive the same Symfony update in its next release.
While the jump from Symfony 7.3 → 7.4 is a minor version bump and does not introduce breaking changes in Symfony itself, the Symfony team raised the minimum required version of the php‑redis extension to 6.1 as part of the upgrade.
If you are still on an older php‑redis version (e.g., Ubuntu 24.04 LTS ships php‑redis 5.3), you must update the extension before you can successfully upgrade Shopware.
How can I figure out which php‑redis version I’m currently running?
Run the following command:
php --ri redis | head -1
If the output shows version 6.1 or newer, you’re ready to upgrade Shopware.
If it reports an older version, you need to update the extension first.
Note: Symfony now adds a Composer conflict for older
php‑redisversions, so the Shopware upgrade will fail with a Composer error if the extension is outdated.
Should I update my php‑redis extension now?
- Only upgrade
php‑rediswhen you plan to upgrade Shopware to a version that requires Symfony 7.4 (and thusphp‑redis ≥ 6.1). - Updating the extension in a running production environment that stays on an older Shopware version provides no benefit and can even cause incompatibilities (e.g., Shopware 6.5 may not work with the newest
php‑redis).
In short, update only if you need it for an upcoming Shopware upgrade.
How to update the php‑redis extension in Docker
-
Add the Docker PHP extension installer to your image and make it executable:
ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/ RUN chmod +x /usr/local/bin/install-php-extensions -
Install (or upgrade) the
php‑redisextension:RUN install-php-extensions redisBy default this installs the latest stable version.
-
Pin a specific version (if you need a particular release):
-RUN install-php-extensions redis-6.0 +RUN install-php-extensions redis-6.3 -
Using the official Shopware Docker image (
shopware/docker), the extension is already kept up‑to‑date. Just pull the latest image tag.
How to update the php‑redis extension on Ubuntu
Install from the default Ubuntu repository
sudo apt install -y php-redis
If the repository version is too old (e.g., Ubuntu 24.04 provides 5.3), continue with the steps below.
Install from the ondrej/php PPA (trusted source for newer PHP packages)
sudo add-apt-repository ppa:ondrej/php # Press Enter when prompted
sudo apt update
sudo apt install -y php-redis
This pulls the latest available php‑redis version from the PPA.
How to install the extension locally (with PIE)
PIE is a modern PHP extension installer that fetches the latest packages from Packagist, replacing the older PECL workflow.
Install PIE
curl -fL --output /tmp/pie.phar https://github.com/php/pie/releases/latest/download/pie.phar \
&& gh attestation verify --owner php /tmp/pie.phar \
&& sudo mv /tmp/pie.phar /usr/local/bin/pie \
&& sudo chmod +x /usr/local/bin/pie
Install (or upgrade) the php‑redis extension with PIE
pie install redis
PIE will automatically fetch the newest compatible version of the extension.
This guide is intended as a troubleshooting reference for Shopware upgrades that require a newer php‑redis extension.
Installing the php-redis extension with PIE
If PIE is already installed, you can add the php-redis extension by running:
pie install phpredis/phpredis
Installing the extension locally (with PECL)
PECL is the traditional extension installer for PHP. Setting it up is more involved than PIE, so it’s generally not recommended unless you already have PECL configured.
If PECL is available, install the latest Redis extension with:
pecl install redis