Skip to content

Commit

Permalink
remove support for php <7.4, add suport for php 8.0 (#25)
Browse files Browse the repository at this point in the history
Co-authored-by: Iosif Chiriluta <iosif.chiriluta@emag.ro>
  • Loading branch information
iosifch and Iosif Chiriluta authored Jul 6, 2021
1 parent 1d1d93d commit 362e20b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 42 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['7.2', '7.3', '7.4']
php-version: ['7.4', '8.0']
name: PHP ${{ matrix.php-version }}
steps:
- uses: actions/checkout@v2
Expand All @@ -15,8 +15,8 @@ jobs:
with:
coverage: pcov
php-version: ${{ matrix.php-version }}
tools: pecl, composer:v1
extensions: mongodb-1.6.1
tools: pecl, composer:v2
extensions: mongodb-1.9.1
- name: Composer install
run: composer install --no-interaction --no-progress --no-suggest
- name: PHPUnit
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FeMAGTechLabs%2Fmessenger-mongo-bundle%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/eMAGTechLabs/messenger-mongo-bundle/master)
This bundle offers a new type of transport for the Symfony Messenger component. While MongoDB is not the best tool to be used as a queue, sometimes it's more convenient to use the tools that your application already uses. For example, if your application already uses MongoDB and you want a persistent storage for the failed messages, I think it's quite handy to use MongoDB as a storage.

> At this moment the bundle is still not ready for production, but it will be very soon!
### Installation
The recommended way to install the bundle is through Composer:
```
Expand Down
19 changes: 7 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@
}
],
"require": {
"php": "^7.2",
"php": "^7.4|^8.0",
"ext-json": "*",
"symfony/messenger": "^4.0 || ^5.0",
"mongodb/mongodb": "^1.5.2"
"symfony/messenger": "^5.0",
"mongodb/mongodb": "^1.8"
},
"require-dev": {
"phpunit/phpunit": "^8.5",
"symfony/serializer": "^5.0",
"symfony/property-access": "^5.0",
"symfony/var-dumper": "^5.0",
"symfony/framework-bundle": "^4.3",
"phpstan/phpstan": "^0.12.25",
"infection/infection": "^0.15.3"
"symfony/framework-bundle": "^5.0",
"phpunit/phpunit": "^9.5",
"infection/infection": "^0.23.0",
"phpstan/phpstan": "^0.12.91"
},
"autoload": {
"psr-4": {
Expand All @@ -40,10 +40,5 @@
"psr-4": {
"EmagTechLabs\\MessengerMongoBundle\\Tests\\": "tests/"
}
},
"config": {
"platform": {
"ext-mongodb": "1.7"
}
}
}
7 changes: 3 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
FROM php:7.3-alpine
FROM php:8.0-alpine

WORKDIR /var/www/html

RUN apk update \
&& apk upgrade \
&& apk add --no-cache git zip make autoconf g++ openssl-dev

RUN pecl -q install mongodb-1.7.4 xdebug \
RUN pecl -q install mongodb-1.9.1 xdebug \
&& docker-php-ext-enable mongodb

ENV COMPOSER_MEMORY_LIMIT=-1

RUN curl --silent --show-error https://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/composer \
&& chmod o+x /usr/local/bin/composer \
&& composer global require hirak/prestissimo
&& chmod o+x /usr/local/bin/composer
35 changes: 14 additions & 21 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.2/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="vendor/autoload.php"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />
</php>

<testsuites>
<testsuite name="Symfony Mongo Messenger Component Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>./</directory>
<exclude>
<directory>./tests</directory>
<directory>./vendor</directory>
</exclude>
</whitelist>
</filter>
<coverage>
<include>
<directory>./src</directory>
</include>
</coverage>
<php>
<ini name="error_reporting" value="-1"/>
</php>
<testsuites>
<testsuite name="Symfony Mongo Messenger Component Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
</phpunit>

0 comments on commit 362e20b

Please sign in to comment.