Skip to content

Commit 6819f07

Browse files
xvilogiggseymarmichalski
authored
Add support for PHP 8.0 (#580)
Co-authored-by: Joshua Gigg <[email protected]> Co-authored-by: Marcin Michalski <[email protected]>
1 parent 423985c commit 6819f07

File tree

18 files changed

+1697
-1359
lines changed

18 files changed

+1697
-1359
lines changed

.github/workflows/security.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: "Setup PHP"
1818
uses: "shivammathur/setup-php@v2"
1919
with:
20-
php-version: '7.4.1'
20+
php-version: '7.4.2'
2121

2222
- name: "Run composer audit"
2323
run: "composer audit --no-dev --locked"

.github/workflows/tests.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,20 @@ jobs:
3030
matrix:
3131
php:
3232
- "7.4"
33+
- "8.0"
3334
postgresql:
3435
- "11"
3536
include:
3637
- php: "7.4"
37-
php-version: "7.4.1"
38+
php-version: "7.4.2"
39+
- php: "8.0"
40+
php-version: "8.0.30"
3841
- postgresql: "11"
3942
postgresql-version: "11.7"
4043

4144
steps:
4245
- name: "Install OS dependencies"
43-
run: "apk add --no-cache bash git icu-dev libzip-dev unzip zip"
46+
run: "apk add --no-cache bash git"
4447

4548
- name: "Adjust allowed PHP memory"
4649
run: echo 'memory_limit = -1' > $PHP_INI_DIR/conf.d/memory-limit.ini;
@@ -59,6 +62,7 @@ jobs:
5962
uses: "actions/checkout@v4"
6063
with:
6164
ref: ${{ github.event.pull_request.head.ref || '' }}
65+
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
6266
show-progress: false
6367

6468
- name: "Install composer dependencies"
@@ -88,11 +92,12 @@ jobs:
8892
- name: "Validate database schema"
8993
run: "bin/console doctrine:schema:validate"
9094

91-
- name: "Set git committer info"
95+
- name: "Set git committer info and configure git options"
9296
shell: bash
9397
run: |
9498
git config --global user.name "${GITHUB_ACTOR}"
9599
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"
100+
git config --global --add safe.directory '*'
96101
97102
- name: "Run unit tests"
98103
run: "composer phpunit:unit"

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.4.5-fpm-alpine
1+
FROM php:8.0.19-fpm-alpine
22

33
ARG TIMEZONE="UTC"
44

buddy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
type: "BUILD"
1010
working_directory: "/buddy/repman"
1111
docker_image_name: "library/php"
12-
docker_image_tag: "7.4.1"
12+
docker_image_tag: "8.0.19"
1313
execute_commands:
1414
- "composer validate"
1515
- "composer install"
@@ -83,7 +83,7 @@
8383
type: "BUILD"
8484
working_directory: "/buddy/repman"
8585
docker_image_name: "library/php"
86-
docker_image_tag: "7.4.1"
86+
docker_image_tag: "8.0.19"
8787
execute_commands:
8888
- "/local-php-security-checker"
8989
setup_commands:

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
],
1616
"license": "MIT",
1717
"require": {
18-
"php": "^7.4.1",
18+
"php": "^7.4.2 || ^8.0",
1919
"ext-ctype": "*",
2020
"ext-curl": "*",
2121
"ext-iconv": "*",
@@ -25,7 +25,7 @@
2525
"ext-zip": "*",
2626
"async-aws/ses": "^1.4",
2727
"bitbucket/client": "^4.0",
28-
"buddy-works/buddy-works-php-api": "1.3.0",
28+
"buddy-works/buddy-works-php-api": "^1.3",
2929
"buddy-works/oauth2-client": "^1.0",
3030
"cbschuld/browser.php": "^1.9",
3131
"clue/mq-react": "^1.2",
@@ -46,11 +46,12 @@
4646
"munusphp/munus": "^0.4.0",
4747
"nelmio/api-doc-bundle": "^4.3",
4848
"nelmio/cors-bundle": "^2.1",
49+
"nyholm/psr7": "^1.5",
4950
"omines/oauth2-gitlab": "^3.2",
5051
"ramsey/uuid-doctrine": "^1.5",
5152
"react/http": "^1.0",
5253
"sensio/framework-extra-bundle": "^5.5",
53-
"sentry/sentry-symfony": "^3.4",
54+
"sentry/sentry-symfony": "^4.0",
5455
"stevenmaguire/oauth2-bitbucket": "^3.0",
5556
"symfony/amazon-mailer": "5.4.*",
5657
"symfony/asset": "5.4.*",
@@ -87,7 +88,7 @@
8788
"symfony/symfony": "*"
8889
},
8990
"require-dev": {
90-
"coduo/php-matcher": "^4.0",
91+
"coduo/php-matcher": "^6.0",
9192
"dama/doctrine-test-bundle": "^6.3",
9293
"doctrine/doctrine-fixtures-bundle": "^3.3",
9394
"ekino/phpstan-banned-code": "^1.0.0",
@@ -111,7 +112,7 @@
111112
},
112113
"config": {
113114
"platform": {
114-
"php": "7.4.1"
115+
"php": "7.4.2"
115116
},
116117
"preferred-install": {
117118
"*": "dist"

0 commit comments

Comments
 (0)