Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow symfony 6 #38

Merged
merged 1 commit into from
Sep 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ env:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
symfonyVersion: ["5.4.*", "6.1.*"]
steps:
-
name: 'Check out the repo'
Expand All @@ -19,7 +23,7 @@ jobs:
run: 'docker login --username "$DOCKERHUB_USER" --password "$DOCKERHUB_TOKEN"'
-
name: 'Build image'
run: 'docker build -t $APP_IMAGE .'
run: 'docker build --build-arg SYMFONY_REQUIRE=${{ matrix.symfonyVersion }} -t $APP_IMAGE .'
-
name: 'Run tests'
run: 'docker run ${{env.APP_IMAGE}} composer ci'
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ ARG phpversion=8
FROM php:${phpversion}-cli

ARG COMPOSER_FLAGS="--prefer-dist --no-interaction"
ARG SYMFONY_REQUIRE=6.*

ARG DEBIAN_FRONTEND=noninteractive
ENV COMPOSER_ALLOW_SUPERUSER 1
ENV COMPOSER_PROCESS_TIMEOUT 3600
Expand All @@ -19,6 +21,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& chmod +x /tmp/composer-install.sh \
&& /tmp/composer-install.sh

# To enable SYMFONY_REQUIRE
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer \
&& composer global config allow-plugins.symfony/flex true \
&& composer global require --no-progress --no-scripts --no-plugins symfony/flex

## Composer - deps always cached unless changed
# First copy only composer files
COPY composer.* /code/
Expand Down
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"PHP": "^7.4|^8.0",
"ext-json": "*",
"keboola/php-temp": "^2.0",
"phpunit/phpunit": "^9.0",
"symfony/filesystem": "^5.0",
"symfony/finder": "^5.0",
"symfony/process": "^5.0"
"phpunit/phpunit": "^9.5",
"symfony/filesystem": "^5.0|^6.0",
"symfony/finder": "^5.0|^6.0",
"symfony/process": "^5.0|^6.0"
},
"require-dev": {
"php-parallel-lint/php-parallel-lint": "^1.3",
Expand All @@ -35,6 +35,7 @@
},
"config": {
"sort-packages": true,
"lock": false,
"optimize-autoloader": true,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
Expand Down