Skip to content

Commit f1337d7

Browse files
authored
Update php-amqplib (#27)
* update php-amqplib * add github action tests * drop circleci * update phpunit * drop windows, and older php * update test class * add coverage checker * update xml * phpunit 9
1 parent a0d4540 commit f1337d7

File tree

5 files changed

+40
-71
lines changed

5 files changed

+40
-71
lines changed

.circleci/config.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

.github/workflows/unit-test.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: unit-test.yml
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
10+
jobs:
11+
unit-test:
12+
strategy:
13+
matrix:
14+
os: [ 'ubuntu-latest' ]
15+
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
16+
rabbit: [ '3.10', '3.11', '3.12', '3.13', '4.0', '4.1', '4.2' ]
17+
18+
runs-on: ${{matrix.os}}
19+
services:
20+
rabbit:
21+
image: rabbitmq:${{matrix.rabbit}}-management
22+
ports:
23+
- 5672:5672
24+
steps:
25+
- uses: actions/checkout@v5
26+
- uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{matrix.php}}
29+
coverage: xdebug
30+
tools: composer, phpunit
31+
- run: composer install -n --prefer-dist
32+
- run: php vendor/phpunit/phpunit/phpunit -c phpunit.xml --coverage-clover=coverage.xml
33+
- run: php vendor/bin/coverage-check coverage.xml 10

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
"google/cloud-pubsub": "Enables using queues in Google Cloud PubSub"
2424
},
2525
"require-dev": {
26-
"phpunit/phpunit": "~4.8.0",
27-
"php-amqplib/php-amqplib": "~2.12.1",
26+
"phpunit/phpunit": "~9.0",
27+
"rregeer/phpunit-coverage-check": "^0.3.1",
28+
"php-amqplib/php-amqplib": "~3.7.3",
2829
"google/cloud-pubsub": "~1.3.0"
2930
},
3031
"autoload": {

phpunit.xml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,15 @@
77
convertNoticesToExceptions="true"
88
convertWarningsToExceptions="true"
99
processIsolation="false"
10-
stopOnFailure="false"
11-
syntaxCheck="false">
10+
stopOnFailure="false">
1211
<testsuites>
13-
<testsuite>
12+
<testsuite name="tests">
1413
<directory>tests</directory>
1514
</testsuite>
1615
</testsuites>
1716
<filter>
1817
<whitelist>
1918
<directory suffix=".php">src</directory>
2019
</whitelist>
21-
<blacklist>
22-
<directory suffix=".php">vendor</directory>
23-
<directory suffix=".php">tests</directory>
24-
</blacklist>
2520
</filter>
2621
</phpunit>

tests/Provider/AmqpTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
use Packaged\Config\ConfigSectionInterface;
55
use Packaged\Config\Provider\ConfigSection;
66
use Packaged\Queue\Tests\Provider\Mock\AmqpMockProvider;
7+
use PHPUnit\Framework\TestCase;
78

8-
class AmqpTest extends \PHPUnit_Framework_TestCase
9+
class AmqpTest extends TestCase
910
{
1011
protected function _getProvider(string $queue, ?string $exchange = null)
1112
{

0 commit comments

Comments
 (0)