Skip to content

Commit 7dd44fb

Browse files
Merge branch 'master' of https://github.com/porebskk/php-mongomock into porebskk-master
2 parents a7758b9 + d583a4b commit 7dd44fb

7 files changed

+35
-13
lines changed

.github/workflows/php.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
build:
1010
strategy:
1111
matrix:
12-
php: ['7.2', '7.3', '7.4']
12+
php: ['7.2', '7.3', '7.4', '8.0']
1313
phpunit: ['6.0', '7.0', '8.0', '9.0']
1414
exclude:
1515
- php: '7.2'

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ testability:
8585
To run the tests (anywhere with a running Docker installation):
8686

8787
```
88-
$ docker-compose run phpunit
88+
$ docker-compose run php7phpunit
89+
$ docker-compose run php8phpunit
8990
```
9091
9192
[mongo-collection]: http://php.net/manual/en/class.mongocollection.php

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
],
1212
"require": {
13-
"php": ">=7.1.0,<8.0",
13+
"php": "^7.1.0 || ^8.0",
1414
"ext-mongodb": "*",
1515
"mongodb/mongodb": "^1.0",
1616
"phpunit/phpunit": ">=6.0,<10.0",

docker-compose.yml

+19-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,29 @@
11
version: "3"
22
services:
3-
phpunit:
3+
php7phpunit:
44
build:
55
context: .
6-
dockerfile: phpunit.DOCKERFILE
7-
command:
6+
dockerfile: php7phpunit.DOCKERFILE
7+
command:
88
- bash
99
- -c
1010
- |
11-
composer install
11+
composer update
1212
vendor/bin/phpunit
1313
working_dir: /work
1414
volumes:
15-
- .:/work
15+
- .:/work
16+
17+
php8phpunit:
18+
build:
19+
context: .
20+
dockerfile: php8phpunit.DOCKERFILE
21+
command:
22+
- bash
23+
- -c
24+
- |
25+
composer update
26+
vendor/bin/phpunit
27+
working_dir: /work
28+
volumes:
29+
- .:/work

php7phpunit.DOCKERFILE

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM php:7.4
2+
3+
RUN pecl install --force mongodb
4+
RUN echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/mongodb.ini
5+
COPY --from=composer:2.1 /usr/bin/composer /usr/bin/composer
6+
RUN apt-get update && apt-get install -y git zip

php8phpunit.DOCKERFILE

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM php:8
2+
3+
RUN pecl install --force mongodb
4+
RUN echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/mongodb.ini
5+
COPY --from=composer:2.1 /usr/bin/composer /usr/bin/composer
6+
RUN apt-get update && apt-get install -y git zip

phpunit.DOCKERFILE

-5
This file was deleted.

0 commit comments

Comments
 (0)