Skip to content

Commit 6e23f60

Browse files
committed
feat: migrate to PHP 8
chore: added release-please
1 parent 3eef243 commit 6e23f60

20 files changed

+5158
-2477
lines changed

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/build export-ignore
2+
/tests export-ignore
3+
/.github export-ignore

.github/workflows/php-package.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: PHP Package
2+
on:
3+
push:
4+
pull_request:
5+
workflow_call:
6+
jobs:
7+
format-check:
8+
name: Check PSR12 Standarts
9+
runs-on: ubuntu-24.04
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Setup PHP
13+
uses: shivammathur/setup-php@v2
14+
with:
15+
php-version: 8.2
16+
tools: composer:v2
17+
- run: composer install
18+
shell: bash
19+
- run: composer format:check
20+
shell: bash
21+
tests:
22+
name: Run Tests
23+
runs-on: ubuntu-24.04
24+
strategy:
25+
matrix:
26+
php-version:
27+
- 8.1
28+
- 8.2
29+
- 8.3
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: Setup PHP
33+
uses: shivammathur/setup-php@v2
34+
with:
35+
php-version: ${{ matrix.php-version }}
36+
tools: composer:v2
37+
coverage: xdebug3
38+
- run: composer install
39+
shell: bash
40+
- run: composer test
41+
shell: bash

.github/workflows/release-please.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
10+
name: Create Release
11+
12+
jobs:
13+
verify-release:
14+
uses: ./.github/workflows/php-package.yml
15+
release-please:
16+
needs: verify-release
17+
runs-on: ubuntu-24.04
18+
steps:
19+
- uses: googleapis/release-please-action@v4
20+
with:
21+
release-type: php

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
/vendor/
22
/.idea/
3+
/.phpunit.cache
4+
/.phpunit.result.cache

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "1.0.0"
3+
}

composer.json

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
"description": "Magento 2 Test Essentials",
44
"type": "library",
55
"require": {
6-
"magento/framework": "~102.0|~103.0",
7-
"magento/module-catalog": "~103.0|~104.0",
6+
"magento/framework": "~103.0",
7+
"magento/module-catalog": "~104.0",
88
"magento/module-quote": "~101.0",
9-
"magento/module-customer": "~102.0|~103.0",
9+
"magento/module-customer": "~103.0",
1010
"magento/module-store": "~101.0",
11-
"php": "~7.2|~8.0"
11+
"php": "~8.1.0||~8.2.0"
1212
},
1313
"require-dev": {
14-
"squizlabs/php_codesniffer": "^3.6.0",
15-
"phpunit/phpunit": "~9.5"
14+
"squizlabs/php_codesniffer": "^3.0",
15+
"phpunit/phpunit": "^11.5",
16+
"brianium/paratest": "^7.7"
1617
},
1718
"license": [
1819
"MIT"
@@ -40,8 +41,13 @@
4041
}
4142
},
4243
"scripts": {
43-
"phpcs": "phpcs",
44-
"phpcbf": "phpcbf",
45-
"test": "phpunit tests"
44+
"test": "XDEBUG_MODE=coverage paratest --coverage-text",
45+
"format:check": "phpcs",
46+
"format:write": "phpcbf"
47+
},
48+
"config": {
49+
"allow-plugins": {
50+
"magento/composer-dependency-version-audit-plugin": false
51+
}
4652
}
4753
}

0 commit comments

Comments
 (0)