Skip to content

Commit

Permalink
Merge pull request dustin10#1343 from garak/php82
Browse files Browse the repository at this point in the history
test on php 8.2
  • Loading branch information
garak authored Jan 6, 2023
2 parents b0b17cc + ff043d9 commit afb438d
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 7 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: PHPStan
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand All @@ -26,14 +26,14 @@ jobs:
name: PHP-CS-Fixer
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Fix CS
uses: docker://oskarstark/php-cs-fixer-ga
validate-markdown:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Validate
uses: avto-dev/markdown-lint@v1
with:
Expand All @@ -45,6 +45,7 @@ jobs:
matrix:
php:
- '8.1'
- '8.2'
dependencies: [highest]
symfony: ['*']
with_imagine: [false]
Expand All @@ -64,10 +65,16 @@ jobs:
with_imagine: false
with_oneupbundle: true
max_deprecations: 0
- php: '8.2'
symfony: '6.2.*'
dependencies: highest
with_imagine: false
with_oneupbundle: false
max_deprecations: 0
name: PHP ${{ matrix.php }} with Symfony ${{ matrix.symfony }} tests with ${{ matrix.dependencies }} dependencies
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ make test TEST="Tests/Util/FilenameUtilsTest.php"

will allow testing single Test Classes.

There is only one environment available: PHP 8.1.
There are two environments available: PHP 8.1 and PHP 8.2.
Default environment is *PHP 8.1*. If you want to execute it against
other (future) PHP version, please use environment variables as this:
other PHP versions, please use environment variables as this:

```bash
make tests #PHP 8.1 env
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"symfony/dom-crawler": "^5.4 || ^6.0",
"symfony/form": "^5.4 || ^6.0",
"symfony/framework-bundle": "^5.4 || ^6.0",
"symfony/phpunit-bridge": "^6.1",
"symfony/phpunit-bridge": "^6.2",
"symfony/security-csrf": "^5.4 || ^6.0",
"symfony/translation": "^5.4 || ^6.0",
"symfony/twig-bridge": "^5.4 || ^6.0",
Expand Down
44 changes: 44 additions & 0 deletions docker/Dockerfile82
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
FROM php:8.2.0-alpine

ARG MONGODB_VERSION=1.14.0

# Install mongo
RUN set -eux; \
apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
openssl-dev \
; \
pecl install \
mongodb-${MONGODB_VERSION} \
; \
docker-php-ext-enable \
mongodb \
; \
pecl clear-cache; \
\
runDeps="$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --no-cache --virtual .api-add-phpexts-rundeps $runDeps \
curl \
;

RUN curl -s https://getcomposer.org/installer | php

RUN mv composer.phar /usr/local/bin/composer

WORKDIR /srv/vich-uploader

# prevent the reinstallation of vendors at every changes in the source code

#COPY ./docker/script/runTests.sh ./runTests.sh
COPY . ./

RUN set -eux; \
composer update --prefer-dist --ignore-platform-reqs; \
composer clear-cache

CMD ["/init"]

0 comments on commit afb438d

Please sign in to comment.