Skip to content

Commit

Permalink
Add support for PHP 8.0 (#580)
Browse files Browse the repository at this point in the history
Co-authored-by: Joshua Gigg <[email protected]>
Co-authored-by: Marcin Michalski <[email protected]>
  • Loading branch information
3 people authored Dec 18, 2023
1 parent 423985c commit 6819f07
Show file tree
Hide file tree
Showing 18 changed files with 1,697 additions and 1,359 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: '7.4.1'
php-version: '7.4.2'

- name: "Run composer audit"
run: "composer audit --no-dev --locked"
11 changes: 8 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,20 @@ jobs:
matrix:
php:
- "7.4"
- "8.0"
postgresql:
- "11"
include:
- php: "7.4"
php-version: "7.4.1"
php-version: "7.4.2"
- php: "8.0"
php-version: "8.0.30"
- postgresql: "11"
postgresql-version: "11.7"

steps:
- name: "Install OS dependencies"
run: "apk add --no-cache bash git icu-dev libzip-dev unzip zip"
run: "apk add --no-cache bash git"

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

- name: "Install composer dependencies"
Expand Down Expand Up @@ -88,11 +92,12 @@ jobs:
- name: "Validate database schema"
run: "bin/console doctrine:schema:validate"

- name: "Set git committer info"
- name: "Set git committer info and configure git options"
shell: bash
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"
git config --global --add safe.directory '*'
- name: "Run unit tests"
run: "composer phpunit:unit"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:7.4.5-fpm-alpine
FROM php:8.0.19-fpm-alpine

ARG TIMEZONE="UTC"

Expand Down
4 changes: 2 additions & 2 deletions buddy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
type: "BUILD"
working_directory: "/buddy/repman"
docker_image_name: "library/php"
docker_image_tag: "7.4.1"
docker_image_tag: "8.0.19"
execute_commands:
- "composer validate"
- "composer install"
Expand Down Expand Up @@ -83,7 +83,7 @@
type: "BUILD"
working_directory: "/buddy/repman"
docker_image_name: "library/php"
docker_image_tag: "7.4.1"
docker_image_tag: "8.0.19"
execute_commands:
- "/local-php-security-checker"
setup_commands:
Expand Down
11 changes: 6 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"license": "MIT",
"require": {
"php": "^7.4.1",
"php": "^7.4.2 || ^8.0",
"ext-ctype": "*",
"ext-curl": "*",
"ext-iconv": "*",
Expand All @@ -25,7 +25,7 @@
"ext-zip": "*",
"async-aws/ses": "^1.4",
"bitbucket/client": "^4.0",
"buddy-works/buddy-works-php-api": "1.3.0",
"buddy-works/buddy-works-php-api": "^1.3",
"buddy-works/oauth2-client": "^1.0",
"cbschuld/browser.php": "^1.9",
"clue/mq-react": "^1.2",
Expand All @@ -46,11 +46,12 @@
"munusphp/munus": "^0.4.0",
"nelmio/api-doc-bundle": "^4.3",
"nelmio/cors-bundle": "^2.1",
"nyholm/psr7": "^1.5",
"omines/oauth2-gitlab": "^3.2",
"ramsey/uuid-doctrine": "^1.5",
"react/http": "^1.0",
"sensio/framework-extra-bundle": "^5.5",
"sentry/sentry-symfony": "^3.4",
"sentry/sentry-symfony": "^4.0",
"stevenmaguire/oauth2-bitbucket": "^3.0",
"symfony/amazon-mailer": "5.4.*",
"symfony/asset": "5.4.*",
Expand Down Expand Up @@ -87,7 +88,7 @@
"symfony/symfony": "*"
},
"require-dev": {
"coduo/php-matcher": "^4.0",
"coduo/php-matcher": "^6.0",
"dama/doctrine-test-bundle": "^6.3",
"doctrine/doctrine-fixtures-bundle": "^3.3",
"ekino/phpstan-banned-code": "^1.0.0",
Expand All @@ -111,7 +112,7 @@
},
"config": {
"platform": {
"php": "7.4.1"
"php": "7.4.2"
},
"preferred-install": {
"*": "dist"
Expand Down
Loading

0 comments on commit 6819f07

Please sign in to comment.