Skip to content

Commit 00cbf8a

Browse files
feat(*) Add 2.4.8 compatibility and use it as default (#15)
* feat(*): Update default to Magento 2.4.8 and PHP 8.3 * feat(*): Use opensearch for 2.4.8 and higher * ci(end to end): Fix workflow * ci(static): Fix workflow for unit test * ci(mftf): Fix workflow * feat(*): Prepare release 4.0.0
1 parent b790582 commit 00cbf8a

File tree

9 files changed

+82
-70
lines changed

9 files changed

+82
-70
lines changed
Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1+
name: Documentation links
2+
13
on:
24
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- main
311

4-
name: Markdown files test and update
512
permissions:
6-
contents: write
7-
pull-requests: write
13+
contents: read
814
jobs:
9-
markdown-test-and-update:
10-
name: Markdown files test and update
15+
markdown-test-links:
16+
name: Markdown test links
1117
runs-on: ubuntu-latest
1218
steps:
1319

@@ -16,7 +22,7 @@ jobs:
1622
with:
1723
path: sources
1824

19-
- name: Lauch localhost server
25+
- name: Launch localhost server
2026
run: |
2127
sudo npm install --global http-server
2228
http-server ./sources &
@@ -26,16 +32,8 @@ jobs:
2632
with:
2733
ruby-version: 2.6
2834

29-
- name: Check links in Mardown files
35+
- name: Check links in Markdown files
3036
run: |
3137
gem install awesome_bot
3238
cd sources
3339
awesome_bot README.md --skip-save-results --allow-dupe --base-url http://localhost:8080/ --white-list repo.magento.com,ddev.site
34-
35-
- uses: technote-space/toc-generator@v4
36-
with:
37-
MAX_HEADER_LEVEL: 3
38-
COMMIT_NAME: Okaeli Dev Bot
39-
TARGET_PATHS: 'README.md'
40-
CHECK_ONLY_DEFAULT_BRANCH: true
41-
CREATE_PR: true

.github/workflows/mftf-tests.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
# Last version
22+
# Latest version
2323
m2-version: [ "2.4.7" ]
2424
php-version: [ "8.3" ]
2525
magento-repository: ['https://repo.magento.com/']
@@ -57,14 +57,10 @@ jobs:
5757
run: |
5858
cd .ddev && ddev nginx-config okaeli-add-on/magento2/custom_files/mftf/nginx-site.conf
5959
60-
- name: Disable some extensions for 2.4.7
61-
if: startsWith(matrix.m2-version, '2.4.7')
62-
run: |
63-
ddev magento module:disable Magento_AdminAdobeImsTwoFactorAuth
64-
6560
- name: Disable some extensions for 2.4
6661
if: startsWith(matrix.m2-version, '2.4')
6762
run: |
63+
ddev magento module:disable Magento_AdminAdobeImsTwoFactorAuth
6864
ddev magento module:disable Magento_TwoFactorAuth
6965
ddev magento module:disable Magento_AdminNotification
7066

.github/workflows/module-with-end-to-end-tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
# Last 2 patches for the current minor, and last one for the previous minor, greatest php version
22+
# Latest 2 patches for the current minor, and latest one for the previous minor, greatest php version
2323
include:
2424
- m2-version: '2.3.7-p4'
2525
php-version: '7.4'
2626
magento-repository: 'https://repo.magento.com/'
27-
- m2-version: '2.4.6'
28-
php-version: '8.2'
29-
magento-repository: 'https://mirror.mage-os.org/'
3027
- m2-version: '2.4.7'
3128
php-version: '8.3'
29+
magento-repository: 'https://mirror.mage-os.org/'
30+
- m2-version: '2.4.8'
31+
php-version: '8.4'
3232
magento-repository: 'https://repo.magento.com/'
3333

3434

@@ -57,7 +57,7 @@ jobs:
5757

5858
- name: Add playwright to DDEV
5959
run: |
60-
ddev get https://github.com/julienloizelet/ddev-playwright/archive/refs/tags/v1.0.2.tar.gz
60+
ddev add-on get https://github.com/julienloizelet/ddev-playwright/archive/refs/tags/v1.0.2.tar.gz
6161
ddev restart
6262
6363
- name: Clone M2 ${{ env.EXTENSION_NAME }} files
@@ -80,8 +80,8 @@ jobs:
8080
run: |
8181
ddev composer require ${{ env.EXTENSION_PACKAGE_NAME }}:@dev --no-interaction
8282
83-
- name: Disable some extensions for >= 2.4.6
84-
if: contains(fromJson('["2.4.6","2.4.7"]'),matrix.m2-version)
83+
- name: Disable some extensions for >= 2.4.7
84+
if: contains(fromJson('["2.4.7","2.4.8"]'),matrix.m2-version)
8585
run: |
8686
ddev magento module:disable Magento_AdminAdobeImsTwoFactorAuth
8787

.github/workflows/module-with-static-and-unit-tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
# First and last patch for the current and previous minor, greatest php version
24+
# First and latest patch for the current and previous minor, greatest php version
2525
include:
2626
- m2-version: '2.3.0'
2727
php-version: '7.2'
@@ -32,8 +32,8 @@ jobs:
3232
- m2-version: '2.4.0'
3333
php-version: '7.4'
3434
magento-repository: 'https://repo.magento.com/'
35-
- m2-version: '2.4.7'
36-
php-version: '8.3'
35+
- m2-version: '2.4.8'
36+
php-version: '8.4'
3737
magento-repository: 'https://repo.magento.com/'
3838

3939
name: Static and unit test suite
@@ -97,9 +97,9 @@ jobs:
9797
ddev exec cat dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/phpstan.neon
9898
ddev phpstan vendor/${{ env.EXTENSION_PACKAGE_NAME }} --debug
9999
100-
- name: Fix Unit Test for Magento 2.4.6
100+
- name: Fix Unit Test for Magento 2.4.8
101101
# @see https://github.com/magento/magento2/issues/36702
102-
if: contains(fromJson('["2.4.6"]'),matrix.m2-version)
102+
if: contains(fromJson('["2.4.8"]'),matrix.m2-version)
103103
run: sed -i 's/allure\/allure.config.php/dev\/tests\/unit\/allure\/allure.config.php/g' dev/tests/unit/phpunit.xml.dist
104104

105105
- name: PHP UNIT

.github/workflows/module-with-varnish-test.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
# Last one for the current and previous minor, greatest php version
28-
m2-version: [ "2.3.7-p4", "2.4.7" ]
29-
php-version: [ "7.4", "8.3" ]
27+
# Latest one for the current and previous minor, greatest php version
28+
m2-version: [ "2.3.7-p4", "2.4.8" ]
29+
php-version: [ "7.4", "8.4" ]
3030
magento-repository: [ "https://repo.magento.com/", "https://mirror.mage-os.org/" ]
3131
exclude:
32-
- { php-version: "8.3", m2-version: "2.3.7-p4" }
33-
- { php-version: "7.4", m2-version: "2.4.7" }
34-
- { php-version: "8.3", m2-version: "2.4.7", "magento-repository" : "https://mirror.mage-os.org/" }
32+
- { php-version: "8.4", m2-version: "2.3.7-p4" }
33+
- { php-version: "7.4", m2-version: "2.4.8" }
3534

3635
name: Installation and Varnish test suite
3736
# @see https://devdocs.magento.com/marketplace/sellers/installation-and-varnish-tests.html
@@ -88,8 +87,8 @@ jobs:
8887
ddev magento config:set system/full_page_cache/caching_application 2
8988
ddev magento setup:performance:generate-fixtures ./varnish-profile.xml
9089
91-
- name: Disable some extensions for 2.4.7
92-
if: startsWith(matrix.m2-version, '2.4.7')
90+
- name: Disable some extensions for 2.4.8
91+
if: startsWith(matrix.m2-version, '2.4.8')
9392
run: |
9493
ddev magento maintenance:enable
9594
ddev magento module:disable --clear-static-content Magento_AdminAdobeImsTwoFactorAuth

.github/workflows/release.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Create Release
2-
# example: gh workflow run release.yml -f tag_name=v1.1.4 -f draft=true
2+
# example: gh workflow run release.yml -f tag_name=v1.1.4
33
on:
44
workflow_dispatch:
55
branches:
@@ -8,14 +8,7 @@ on:
88
tag_name:
99
type: string
1010
required: true
11-
draft:
12-
type: boolean
13-
description: Draft release
14-
default: false
15-
prerelease:
16-
type: boolean
17-
description: Prerelease
18-
default: false
11+
1912

2013
jobs:
2114
create-release:
@@ -106,8 +99,8 @@ jobs:
10699
body_path: CHANGELOG.txt
107100
name: ${{ env.VERSION_NUMBER }}
108101
tag_name: ${{ github.event.inputs.tag_name }}
109-
draft: ${{ github.event.inputs.draft }}
110-
prerelease: ${{ github.event.inputs.prerelease }}
102+
draft: false
103+
prerelease: false
111104

112105
- name: Set outputs
113106
id: set-outputs

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,19 @@ The [public API](https://semver.org/spec/v2.0.0.html#spec-item-1) of this projec
1010

1111
---
1212

13+
## [4.0.0](https://github.com/julienloizelet/magento2-ddev-installation/releases/tag/v4.0.0) - 2025-04-10
14+
[_Compare with previous release_](https://github.com/julienloizelet/magento2-ddev-installation/compare/v3.0.0...v4.0.0)
15+
16+
### Changed
17+
18+
- **Breaking change**: Use `2.4.8` as default Magento version
19+
- **Breaking change**: Use `8.3` as default PHP version
20+
21+
### Added
22+
23+
- Use `opensearch` search engine for Magento >= `2.4.8`
24+
25+
1326
## [3.1.1](https://github.com/julienloizelet/magento2-ddev-installation/releases/tag/v3.1.1) - 2024-10-18
1427
[_Compare with previous release_](https://github.com/julienloizelet/magento2-ddev-installation/compare/v3.1.0...v3.1.1)
1528

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![End-to-end tests](https://github.com/julienloizelet/magento2-ddev-installation/actions/workflows/module-with-end-to-end-tests.yml/badge.svg)](https://github.com/julienloizelet/magento2-ddev-installation/actions/workflows/module-with-end-to-end-tests.yml)
77
[![MFTF tests](https://github.com/julienloizelet/magento2-ddev-installation/actions/workflows/mftf-tests.yml/badge.svg)](https://github.com/julienloizelet/magento2-ddev-installation/actions/workflows/mftf-tests.yml)
88

9-
A GitHub Action to install Magento 2 with [DDEV](https://github.com/ddev/ddev).
9+
A GitHub Action for installing Magento 2 with [DDEV](https://github.com/ddev/ddev).
1010

1111

1212
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
@@ -34,7 +34,7 @@ _We will suppose here that you want to test on a Magento 2.4.5 instance with PHP
3434
You can add the following step in your workflow:
3535

3636
```yaml
37-
- uses: julienloizelet/magento2-ddev-installation@v3
37+
- uses: julienloizelet/magento2-ddev-installation@v4
3838
with:
3939
php_version: "8.1"
4040
magento_version: "2.4.5"
@@ -57,9 +57,9 @@ The following keys are available as `step.with` keys:
5757

5858
PHP version to use in the web container.
5959

60-
Default: `8.2`.
60+
Default: `8.3`.
6161

62-
Allowed values are: `7.2`, `7.3`, `7.4`, `8.1`, `8.2`, `8.3`.
62+
Allowed values are: `7.2`, `7.3`, `7.4`, `8.1`, `8.2`, `8.3`, `8.4`.
6363

6464
Please choose a PHP version that is compatible with the `magento_version` below.
6565

@@ -102,7 +102,7 @@ Could be "magento/project-community-edition", "magento/project-enterprise-editio
102102

103103
The Magento release version to install.
104104

105-
Default: `2.4.7`.
105+
Default: `2.4.8`.
106106

107107
You can use `X.Y.Z` format or `X.Y.Z-pN` format for patch release.
108108

@@ -307,14 +307,16 @@ bin/magento setup:install \
307307
--currency=USD \
308308
--timezone=America/Chicago \
309309
--use-rewrites=1 \
310-
--elasticsearch-host=elasticsearch --search-engine=elasticsearch7
310+
<SEARCH_ENGINE_STRING>
311311
```
312+
where `SEARCH_ENGINE_STRING` is `--elasticsearch-host=elasticsearch --search-engine=elasticsearsh7` for Magento < 2.4.8
313+
and`--opensearch-host=elasticsearch --search-engine=opensearch` for Magento >= 2.4.8.
312314

313315

314316
The Magento 2 environment is a Docker environment created with DDEV and comes with the following services:
315317
- `web`: PHP (version depends on `php_version` input), nginx-fpm, NodeJs
316318
- `db`: Depends on the `database` input
317-
- `elastisearch`
319+
- `elastisearch` (or `opensearch` for Magento >= `2.4.8`)
318320
- `memcached`
319321
- `redis`
320322

action.yaml

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: "Magento 2 installation with DDEV"
22
author: "Julien Loizelet"
3-
description: " A Github Action for installing Magento 2 with DDEV"
3+
description: "A GitHub Action for installing Magento 2 with DDEV"
44

55
inputs:
66

77
php_version:
88
type: string
99
required: false
10-
default: "8.2"
10+
default: "8.3"
1111
description: "PHP Version to use"
1212

1313
database:
@@ -25,7 +25,7 @@ inputs:
2525
magento_version:
2626
type: string
2727
required: false
28-
default: "2.4.7"
28+
default: "2.4.8"
2929
description: "The Magento release version to install"
3030

3131
magento_repository:
@@ -102,11 +102,15 @@ runs:
102102

103103
- name: Install DDEV tools add-on
104104
shell: bash
105-
run: ddev get julienloizelet/ddev-tools
105+
run: ddev add-on get julienloizelet/ddev-tools
106106

107-
- name: Prepare Elastic search
107+
- name: Prepare Elasticsearch
108108
shell: bash
109-
run: ddev get ddev/ddev-elasticsearch
109+
run: ddev add-on get ddev/ddev-elasticsearch
110+
111+
- name: Prepare OpenSearch
112+
shell: bash
113+
run: ddev add-on get ddev/ddev-opensearch
110114

111115
- name: Set Magento 2 settings
112116
shell: bash
@@ -122,15 +126,22 @@ runs:
122126
mkdir -p .ddev/homeadditions/.composer
123127
echo "$composer_auth" > .ddev/homeadditions/.composer/auth.json
124128
125-
- name: Set ELASTIC_INSTALL_STRING env for 2.4
129+
- name: Set SEARCH_ENGINE_STRING env
126130
shell: bash
127131
if: startsWith(inputs.magento_version, '2.4')
128-
run: echo "ELASTIC_INSTALL_STRING=--elasticsearch-host=elasticsearch --search-engine=elasticsearch7" >> $GITHUB_ENV
132+
run: |
133+
magento_version="${{ inputs.magento_version }}"
134+
# Check if the version is 2.4.8 or higher
135+
if [[ "$(printf '%s\n' "$magento_version" "2.4.8" | sort -V | head -n1)" == "2.4.8" ]]; then
136+
echo "SEARCH_ENGINE_STRING=--opensearch-host=opensearch --search-engine=opensearch" >> $GITHUB_ENV
137+
else
138+
echo "SEARCH_ENGINE_STRING=--elasticsearch-host=elasticsearch --search-engine=elasticsearch7" >> $GITHUB_ENV
139+
fi
129140
130-
- name: Set ELASTIC_INSTALL_STRING env for 2.3
141+
- name: Set SEARCH_ENGINE_STRING env for 2.3
131142
shell: bash
132143
if: startsWith(inputs.magento_version, '2.3')
133-
run: echo "ELASTIC_INSTALL_STRING=" >> $GITHUB_ENV
144+
run: echo "SEARCH_ENGINE_STRING=" >> $GITHUB_ENV
134145

135146
- name: Handle PHP version
136147
shell: bash
@@ -230,7 +241,7 @@ runs:
230241
--currency=USD \
231242
--timezone=America/Chicago \
232243
--use-rewrites=1 \
233-
${{ env.ELASTIC_INSTALL_STRING }}
244+
${{ env.SEARCH_ENGINE_STRING }}
234245
235246
outputs:
236247
m2_url:

0 commit comments

Comments
 (0)