From e20be044b72395200880640ae1e1d29d6ee274cf Mon Sep 17 00:00:00 2001 From: marcin Date: Tue, 6 Oct 2026 09:24:04 +0000 Subject: [PATCH 1/4] chore(ci): test on PHP 8.3 and 8.4 instead of 8.1 and 8.2 PHP 8.1 is end of life and 8.2 ends 31 Dec 2026. Add a PHP 8.3 stack on Magento 2.4.8-p4 with OpenSearch, run CI on 8.3 and 8.4, and default local builds to 8.4. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .github/workflows/{ci-81.yml => ci-83.yml} | 4 +-- .github/workflows/{ci-82.yml => ci-84.yml} | 4 +-- CLAUDE.md | 2 +- Dockerfile | 2 +- Makefile | 4 +-- README.md | 8 ++---- docker/83-arm64.yml | 33 ++++++++++++++++++++++ docker/83.yml | 32 +++++++++++++++++++++ 8 files changed, 76 insertions(+), 13 deletions(-) rename .github/workflows/{ci-81.yml => ci-83.yml} (93%) rename .github/workflows/{ci-82.yml => ci-84.yml} (93%) create mode 100644 docker/83-arm64.yml create mode 100644 docker/83.yml diff --git a/.github/workflows/ci-81.yml b/.github/workflows/ci-83.yml similarity index 93% rename from .github/workflows/ci-81.yml rename to .github/workflows/ci-83.yml index 7bcb9a3b..bf8bffaf 100644 --- a/.github/workflows/ci-81.yml +++ b/.github/workflows/ci-83.yml @@ -1,4 +1,4 @@ -name: Magento 2.4 CI with PHP 8.1 +name: Magento 2.4.8 CI with PHP 8.3 on: - push @@ -11,7 +11,7 @@ jobs: - name: Launch Magento test environment env: - PHP: "81" + PHP: "83" COMPOSE_INTERACTIVE_NO_CLI: "1" run: make up diff --git a/.github/workflows/ci-82.yml b/.github/workflows/ci-84.yml similarity index 93% rename from .github/workflows/ci-82.yml rename to .github/workflows/ci-84.yml index 42f93658..07ec1c7f 100644 --- a/.github/workflows/ci-82.yml +++ b/.github/workflows/ci-84.yml @@ -1,4 +1,4 @@ -name: Magento 2.4.6 CI with PHP 8.2 +name: Magento 2.4.8 CI with PHP 8.4 on: - push @@ -11,7 +11,7 @@ jobs: - name: Launch Magento test environment env: - PHP: "82" + PHP: "84" COMPOSE_INTERACTIVE_NO_CLI: "1" run: make up diff --git a/CLAUDE.md b/CLAUDE.md index fdeedcfb..ba31001e 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -19,7 +19,7 @@ make fix-session-expire # Fix session timeout (sets base URL to 127.0.0.1) make logs # Tail all Docker logs ``` -PHP version selection: `PHP=81 make up` or `PHP=82 make up` +PHP version selection: `PHP=83 make up` or `PHP=84 make up` (default 84) ### JavaScript/TypeScript Build diff --git a/Dockerfile b/Dockerfile index 580b12cd..a9e54bc0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG BASE_IMAGE=idealpostcodes/magento-test:m2.4-php8.1 +ARG BASE_IMAGE=idealpostcodes/magento-test:m2.4.8-p4-php8.4 FROM $BASE_IMAGE COPY docker/install-magento /usr/local/bin/install-magento diff --git a/Makefile b/Makefile index 91c473e7..bb11ce2d 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ -PHP ?= 81 +PHP ?= 84 PLATFORM ?= $(shell uname -m) YML_SUFFIX := $(if $(filter arm64,$(PLATFORM)),-arm64,) -SEARCH_HOST := $(if $(filter 84,$(PHP)),opensearch,elasticsearch) +SEARCH_HOST := $(if $(filter 83 84,$(PHP)),opensearch,elasticsearch) .DEFAULT_GOAL := help TAG=${git describe --tags} diff --git a/README.md b/README.md index fcaca19d..f30eccda 100644 --- a/README.md +++ b/README.md @@ -10,12 +10,10 @@ This extension enables [Ideal-Postcodes.co.uk](https://ideal-postcodes.co.uk) address validation for UK addresses on a Magento store. -Tested on Magento 2.1 - 2.4 on PHP 7.1-7.3 +Tested on Magento 2.4.8 on PHP 8.3 and 8.4. Requires PHP 7.0 or later. -![Magento 2.1 CI](https://github.com/ideal-postcodes/magento/workflows/Magento%202.1%20CI/badge.svg) -![Magento 2.2 CI](https://github.com/ideal-postcodes/magento/workflows/Magento%202.2%20CI/badge.svg) -![Magento 2.3 CI](https://github.com/ideal-postcodes/magento/workflows/Magento%202.3%20CI/badge.svg) -![Magento 2.4 CI](https://github.com/ideal-postcodes/magento/workflows/Magento%202.4%20CI/badge.svg) +![PHP 8.3 CI](https://github.com/ideal-postcodes/magento/actions/workflows/ci-83.yml/badge.svg) +![PHP 8.4 CI](https://github.com/ideal-postcodes/magento/actions/workflows/ci-84.yml/badge.svg) See our [guide](https://ideal-postcodes.co.uk/guides/magento) for installation and configuration instructions. diff --git a/docker/83-arm64.yml b/docker/83-arm64.yml new file mode 100644 index 00000000..3125a97e --- /dev/null +++ b/docker/83-arm64.yml @@ -0,0 +1,33 @@ +version: "3.0" +services: + opensearch: + image: opensearchproject/opensearch:2.12.0 + container_name: opensearch + platform: linux/arm64 + ports: + - "9200:9200" + - "9600:9600" + environment: + - discovery.type=single-node + - DISABLE_INSTALL_DEMO_CONFIG=true + - DISABLE_SECURITY_PLUGIN=true + - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + mem_limit: 1g + web: + depends_on: + - opensearch + environment: + - SEARCH_ENGINE=opensearch + - SEARCH_HOST=opensearch + build: + context: "." + dockerfile: "Dockerfile" + args: + BASE_IMAGE: idealpostcodes/magento-test:m2.4.8-p4-php8.3 diff --git a/docker/83.yml b/docker/83.yml new file mode 100644 index 00000000..7be27c48 --- /dev/null +++ b/docker/83.yml @@ -0,0 +1,32 @@ +version: "3.0" +services: + opensearch: + image: opensearchproject/opensearch:2.12.0 + container_name: opensearch + ports: + - "9200:9200" + - "9600:9600" + environment: + - discovery.type=single-node + - DISABLE_INSTALL_DEMO_CONFIG=true + - DISABLE_SECURITY_PLUGIN=true + - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m" + ulimits: + memlock: + soft: -1 + hard: -1 + nofile: + soft: 65536 + hard: 65536 + mem_limit: 1g + web: + depends_on: + - opensearch + environment: + - SEARCH_ENGINE=opensearch + - SEARCH_HOST=opensearch + build: + context: "." + dockerfile: "Dockerfile" + args: + BASE_IMAGE: idealpostcodes/magento-test:m2.4.8-p4-php8.3 From 13d4b611e55106899d38661989e069f39c78c0b7 Mon Sep 17 00:00:00 2001 From: marcin Date: Tue, 6 Oct 2026 09:24:04 +0000 Subject: [PATCH 2/4] fix(composer): drop PHP 5.x and cap the PHP constraint at 8.x Replace ~5.5.0|~5.6.0|>=7.0|>=8.0 with ^7.0||^8.0 so Composer no longer advertises PHP 5 support or unknown future majors. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5e7fffe3..c3dd8c1f 100644 --- a/composer.json +++ b/composer.json @@ -4,7 +4,7 @@ "description": "Ideal Postcodes UK address search magento extension. Ideal-Postcodes.co.uk", "type": "magento2-module", "require": { - "php": "~5.5.0|~5.6.0|>=7.0|>=8.0" + "php": "^7.0||^8.0" }, "support": { "email": "support@ideal-postcodes.co.uk", From 4d40f55507efae0358c399617d6c90a4e86e4584 Mon Sep 17 00:00:00 2001 From: marcin Date: Tue, 6 Oct 2026 09:40:34 +0000 Subject: [PATCH 3/4] fix(docker): rebuild the web image on make up Without --build, switching PHP versions reused the previously built magento-web image, so PHP=83 make up after PHP=84 still ran PHP 8.4. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bb11ce2d..07287266 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ down: ## Build and run .PHONY: build build: - docker compose -f docker-compose.yml -f docker/${PHP}${YML_SUFFIX}.yml up -d --wait + docker compose -f docker-compose.yml -f docker/${PHP}${YML_SUFFIX}.yml up -d --build --wait ## Initialise repository - run install-magento .PHONY: init From d881b1a226989c4ebab7b14172baed03da707c4f Mon Sep 17 00:00:00 2001 From: marcin Date: Tue, 6 Oct 2026 09:46:57 +0000 Subject: [PATCH 4/4] chore(ci): give the PHP 8.3 and 8.4 jobs distinct names Both jobs were named ci, so the PR showed only one of the two checks. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .github/workflows/ci-83.yml | 2 +- .github/workflows/ci-84.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-83.yml b/.github/workflows/ci-83.yml index bf8bffaf..1115f2a2 100644 --- a/.github/workflows/ci-83.yml +++ b/.github/workflows/ci-83.yml @@ -4,7 +4,7 @@ on: - push jobs: - ci: + ci-83: runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/ci-84.yml b/.github/workflows/ci-84.yml index 07ec1c7f..f06b8140 100644 --- a/.github/workflows/ci-84.yml +++ b/.github/workflows/ci-84.yml @@ -4,7 +4,7 @@ on: - push jobs: - ci: + ci-84: runs-on: blacksmith-4vcpu-ubuntu-2404 steps: - uses: actions/checkout@v4