Skip to content

Commit 663d800

Browse files
Update for php 8.4 (#148)
* update composer deps Signed-off-by: Robert Landers <[email protected]> * update code Signed-off-by: Robert Landers <[email protected]> * update workflows Signed-off-by: Robert Landers <[email protected]> * update cache actions Signed-off-by: Robert Landers <[email protected]> * update php version Signed-off-by: Robert Landers <[email protected]> * fix tests Signed-off-by: Robert Landers <[email protected]> * tests at least complete now Signed-off-by: Robert Landers <[email protected]> * add coverage to phpunit Signed-off-by: Robert Landers <[email protected]> * add coverage filter Signed-off-by: Robert Landers <[email protected]> * add missing return type Signed-off-by: Robert Landers <[email protected]> * suppress more stuff Signed-off-by: Robert Landers <[email protected]> * revert some incorrect psalm errors Signed-off-by: Robert Landers <[email protected]> * fix another incorrect assertion from psalm Signed-off-by: Robert Landers <[email protected]> * update upload artifact Signed-off-by: Robert Landers <[email protected]> * remove laravel example Signed-off-by: Robert Landers <[email protected]> * fix examples Signed-off-by: Robert Landers <[email protected]> * update download artifact Signed-off-by: Robert Landers <[email protected]> * use updated docker compose Signed-off-by: Robert Landers <[email protected]> * fix examples Signed-off-by: Robert Landers <[email protected]> * fix docker-compose calls Signed-off-by: Robert Landers <[email protected]> --------- Signed-off-by: Robert Landers <[email protected]>
1 parent f0f37c3 commit 663d800

File tree

161 files changed

+1943
-14350
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+1943
-14350
lines changed

.github/workflows/php.yml

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
runs-on: ubuntu-latest
1212
timeout-minutes: 5
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v4
1515
- uses: shivammathur/[email protected]
1616
with:
17-
php-version: 8.0
17+
php-version: 8.4
1818
extensions: xdebug
1919
- name: Validate composer.json and install tools
2020
run: |
@@ -23,7 +23,7 @@ jobs:
2323
2424
- name: Cache Composer packages
2525
id: composer-cache
26-
uses: actions/cache@v2
26+
uses: actions/cache@v3
2727
with:
2828
path: vendor
2929
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
@@ -46,17 +46,17 @@ jobs:
4646
runs-on: ubuntu-latest
4747
timeout-minutes: 5
4848
steps:
49-
- uses: actions/checkout@v2
49+
- uses: actions/checkout@v4
5050
- uses: shivammathur/[email protected]
5151
with:
52-
php-version: 8.0
52+
php-version: 8.4
5353
extensions: xdebug
5454
- name: Validate composer.json and composer.lock
5555
run: composer validate && make tools
5656

5757
- name: Cache Composer packages
5858
id: composer-cache
59-
uses: actions/cache@v2
59+
uses: actions/cache@v3
6060
with:
6161
path: vendor
6262
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
@@ -90,7 +90,6 @@ jobs:
9090
- php-secrets-http
9191
- php-secret-client-service
9292
- php-secret-client-http
93-
- sail-app
9493
include:
9594
- image: caddy
9695
dockerfile: images/caddy.Dockerfile
@@ -146,19 +145,11 @@ jobs:
146145
context: examples/secrets
147146
args: |
148147
SERVICE=client
149-
- image: sail-app
150-
context: examples/laravel/vendor/laravel/sail/runtimes/8.0
151-
dockerfile: examples/laravel/vendor/laravel/sail/runtimes/8.0/Dockerfile
152-
args: |
153-
WWWGROUP=1000
154-
pre-built: |
155-
cd examples/laravel
156-
composer install
157148
steps:
158-
- uses: actions/checkout@v2
149+
- uses: actions/checkout@v4
159150
- uses: shivammathur/[email protected]
160151
with:
161-
php-version: 8.0
152+
php-version: 8.4
162153
- name: Update examples
163154
env:
164155
GIT_BRANCH: ${{ github.head_ref || 'main' }}
@@ -172,7 +163,7 @@ jobs:
172163
with:
173164
install: true
174165
- name: Cache Docker layers
175-
uses: actions/cache@v2
166+
uses: actions/cache@v3
176167
with:
177168
path: /tmp/.${{ matrix.image }}-cache
178169
key: ${{ runner.os }}-${{ matrix.image }}-${{ github.sha }}
@@ -193,7 +184,7 @@ jobs:
193184
cache-to: type=local,mode=max,dest=/tmp/.${{ matrix.image }}-cache
194185
build-args: ${{ matrix.args || '' }}
195186
- name: upload artifact
196-
uses: actions/upload-artifact@v2
187+
uses: actions/upload-artifact@v4
197188
with:
198189
name: ${{ matrix.image }}
199190
path: /tmp/${{ matrix.image }}.tar
@@ -204,15 +195,15 @@ jobs:
204195
timeout-minutes: 5
205196
strategy:
206197
matrix:
207-
dapr-version: [ 1.5.2, 1.6.1, 1.7.0 ]
198+
dapr-version: [ 1.15.0 ]
208199
steps:
209200
- name: Download Caddy Image
210-
uses: actions/download-artifact@v2
201+
uses: actions/download-artifact@v4
211202
with:
212203
name: caddy
213204
path: /tmp
214205
- name: Download Tests Image
215-
uses: actions/download-artifact@v2
206+
uses: actions/download-artifact@v4
216207
with:
217208
name: tests
218209
path: /tmp
@@ -223,21 +214,21 @@ jobs:
223214
- uses: actions/checkout@v2
224215
- uses: shivammathur/[email protected]
225216
with:
226-
php-version: 8.0
217+
php-version: 8.4
227218
- name: Validate composer.json and composer.lock
228219
run: composer validate
229220
- name: Integration Environment Startup
230221
env:
231222
DAPR_VERSION: ${{ matrix.dapr-version }}
232-
run: docker-compose up -d
223+
run: docker compose up -d
233224
- name: Wait for environment stabilization
234225
run: sleep 10
235226
- name: Execute Tests
236227
run: |
237228
STATUSCODE=$(curl --silent --output /tmp/test-results.json --write-out "%{http_code}" -H 'dapr-api-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c' http://localhost:9502/do_tests)
238229
cat /tmp/test-results.json | jq -C .
239230
if test $STATUSCODE -ne 200; then
240-
docker-compose logs dev
231+
docker compose logs dev
241232
exit 1
242233
fi
243234
examples:
@@ -248,25 +239,22 @@ jobs:
248239
strategy:
249240
matrix:
250241
dapr-version:
251-
- 1.5.2
252-
- 1.6.1
253-
- 1.7.0
242+
- 1.15.0
254243
example:
255244
- actor
256245
- secrets
257-
- laravel
258246
steps:
259-
- uses: actions/checkout@v2
247+
- uses: actions/checkout@v4
260248
- uses: shivammathur/[email protected]
261249
with:
262-
php-version: 8.0
250+
php-version: 8.4
263251
- name: Update examples
264252
env:
265253
GIT_BRANCH: ${{ github.head_ref || 'main' }}
266254
run:
267255
php update-examples.php
268256
- name: Download images
269-
uses: actions/download-artifact@v2
257+
uses: actions/download-artifact@v4
270258
with:
271259
path: /tmp/images
272260
- name: Import images
@@ -284,7 +272,7 @@ jobs:
284272
if [ -f start.php ]; then
285273
php start.php
286274
else
287-
docker-compose -f docker-compose.yml -f ../docker-compose.common.yml up -d
275+
docker compose -f docker-compose.yml -f ../docker-compose.common.yml up -d
288276
fi
289277
- name: Wait for stability
290278
run: sleep 10

.phive/phars.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
3-
<phar name="psalm" version="^4.7" installed="4.8.1" location="./tools/psalm" copy="false"/>
3+
<phar name="psalm" version="^6.9" location="./tools/psalm" copy="false" installed="6.12.1"/>
44
</phive>

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
export GITHUB_SHA=latest
3-
export DAPR_VERSION=1.3.0-rc.1
3+
export DAPR_VERSION=1.15.0
44

55
PHIVE=$(shell which phive || echo .phive/phive)
66

composer.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@
1717
"ext-curl": "*",
1818
"ext-json": "*",
1919
"ext-mbstring": "*",
20-
"guzzlehttp/guzzle": "^7.3",
21-
"laminas/laminas-httphandlerrunner": "^1.3",
22-
"monolog/monolog": "^2.2",
23-
"nette/php-generator": "^3.5",
20+
"guzzlehttp/guzzle": "^7.9.3",
21+
"laminas/laminas-httphandlerrunner": "^2.12",
22+
"monolog/monolog": "^3.9",
23+
"nette/php-generator": "^4.1.8",
2424
"nikic/fast-route": "^1.3",
25-
"nyholm/psr7": "^1.3",
26-
"nyholm/psr7-server": "^1.0",
27-
"php": "^8.0",
28-
"php-di/invoker": "^2.3",
29-
"php-di/php-di": "^6.3",
30-
"psr/log": "^1.1|^2.0|^3.0",
31-
"psr/http-server-middleware": ">=1.0.1",
32-
"jetbrains/phpstorm-attributes": "1.0"
25+
"nyholm/psr7": "^1.8.2",
26+
"nyholm/psr7-server": "^1.1",
27+
"php": "^8.4",
28+
"php-di/invoker": "^2.3.6",
29+
"php-di/php-di": "^7.0.11",
30+
"psr/log": "^1.1|^2.0|^3.0.2",
31+
"psr/http-server-middleware": ">=1.0.2",
32+
"jetbrains/phpstorm-attributes": "1.2"
3333
},
3434
"require-dev": {
3535
"ext-xdebug": "*",
36-
"phpunit/phpunit": "^9"
36+
"phpunit/phpunit": "^12.2.7"
3737
},
3838
"autoload": {
3939
"psr-4": {
@@ -42,7 +42,7 @@
4242
}
4343
},
4444
"scripts": {
45-
"test": "./vendor/bin/phpunit --testdox tests --coverage-clover coverage.xml tests --whitelist src",
45+
"test": "./vendor/bin/phpunit --testdox tests --coverage-clover coverage.xml tests --coverage-filter src",
4646
"start": [
4747
"COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose build --pull",
4848
"docker-compose up -d"

0 commit comments

Comments
 (0)