Skip to content

Commit 70d3c38

Browse files
authored
Merge pull request #39 from repzy/BIG-31206
update composer with php8
2 parents 278f4e3 + fce1195 commit 70d3c38

File tree

9 files changed

+99
-40
lines changed

9 files changed

+99
-40
lines changed

.circleci/config.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
version: 2.1
2+
3+
orbs:
4+
ci: bigcommerce/internal@volatile
5+
php: bigcommerce/internal-php@volatile
6+
7+
jobs:
8+
tests-unit:
9+
parameters:
10+
php-version:
11+
type: string
12+
default: 7.3-fpm
13+
executor:
14+
name: php/php
15+
php-version: << parameters.php-version >>
16+
steps:
17+
- ci/pre-setup
18+
- php/install-extensions:
19+
composer_version: ''
20+
additional_apt_packages: ''
21+
additional_php_extensions: ''
22+
additional_pecl_extensions: 'grpc'
23+
- php/composer-install
24+
- php/unit-phpunit:
25+
configuration: 'phpunit.xml.dist'
26+
codesniffer:
27+
parameters:
28+
php-version:
29+
type: string
30+
default: 7.3-fpm
31+
executor:
32+
name: php/php
33+
php-version: << parameters.php-version >>
34+
steps:
35+
- ci/pre-setup
36+
- php/install-extensions:
37+
composer_version: ''
38+
additional_apt_packages: ''
39+
additional_php_extensions: ''
40+
additional_pecl_extensions: ''
41+
- php/composer-install
42+
- run: ./vendor/bin/phpcs --standard=PSR2 --ignore=src/Grphp/grpc.stubs.php src
43+
cs-fixer:
44+
parameters:
45+
php-version:
46+
type: string
47+
default: 7.3-fpm
48+
executor:
49+
name: php/php
50+
php-version: << parameters.php-version >>
51+
steps:
52+
- ci/pre-setup
53+
- php/install-extensions:
54+
composer_version: ''
55+
additional_apt_packages: ''
56+
additional_php_extensions: ''
57+
additional_pecl_extensions: ''
58+
- php/composer-install
59+
- run: ./vendor/bin/php-cs-fixer fix --diff --dry-run -v
60+
61+
workflows:
62+
version: 2
63+
full:
64+
jobs:
65+
- tests-unit:
66+
matrix:
67+
parameters:
68+
php-version: [ "7.3-fpm", "7.4-fpm" ]
69+
- codesniffer:
70+
matrix:
71+
parameters:
72+
php-version: [ "7.3-fpm", "7.4-fpm" ]
73+
- cs-fixer:
74+
matrix:
75+
parameters:
76+
php-version: [ "7.3-fpm", "7.4-fpm" ]

.travis.yml

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

composer.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,20 @@
44
"description": "gRPC PHP Framework",
55
"license": "MIT",
66
"require": {
7+
"php": "^7.3 || ^8.0",
78
"google/protobuf": "^3.7",
89
"grpc/grpc": "^1.13"
910
},
1011
"require-dev": {
1112
"friendsofphp/php-cs-fixer": "^2.13",
12-
"phpunit/phpunit": "^6.4 || ^7.4 || ^8.0",
13-
"squizlabs/php_codesniffer": "3.*"
13+
"phpunit/phpunit": "^9.0",
14+
"squizlabs/php_codesniffer": "3.*",
15+
"phpspec/prophecy-phpunit": "^2.0"
1416
},
1517
"autoload": {
1618
"psr-4": {
1719
"Grphp\\": "src/Grphp"
1820
}
19-
}
21+
},
22+
"prefer-stable": true
2023
}

phpunit.xml.dist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
processIsolation="false"
88
backupGlobals="false"
99
stopOnFailure="false"
10-
colors="true">
10+
colors="true"
11+
failOnWarning="true">
1112

1213
<testsuites>
1314
<testsuite name="Grphp Test Suite">

tests/Unit/Grphp/Client/RequestTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@
2525
use Grphp\Test\DummyClient;
2626
use Grphp\Test\DummyClientAgainClient;
2727
use PHPUnit\Framework\TestCase;
28+
use Prophecy\PhpUnit\ProphecyTrait;
2829

2930
final class RequestTest extends TestCase
3031
{
32+
use ProphecyTrait;
33+
3134
/** @var Config */
3235
private $config;
3336
private $clientProphecy;

tests/Unit/Grphp/Client/Strategy/Grpc/StrategyTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@
3030
use Grphp\Test\GetThingResp;
3131
use Grphp\Test\ThingsClient;
3232
use PHPUnit\Framework\TestCase;
33+
use Prophecy\PhpUnit\ProphecyTrait;
3334

3435
final class StrategyTest extends TestCase
3536
{
37+
use ProphecyTrait;
38+
3639
/** @var Config */
3740
private $config;
3841
/** @var GrpcConfig */

tests/Unit/Grphp/Client/Strategy/H2Proxy/RequestFactoryTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@
2727
use Grphp\Test\ThingsClient;
2828
use PHPUnit\Framework\TestCase;
2929
use Prophecy\Argument;
30+
use Prophecy\PhpUnit\ProphecyTrait;
3031
use Prophecy\Prophecy\ObjectProphecy;
3132

3233
final class RequestFactoryTest extends TestCase
3334
{
35+
use ProphecyTrait;
36+
3437
/** @var Config */
3538
private $config;
3639

tests/Unit/Grphp/Client/Strategy/H2Proxy/StrategyTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,12 @@
3434
use Grphp\Test\ThingsClient;
3535
use PHPUnit\Framework\TestCase;
3636
use Prophecy\Argument;
37+
use Prophecy\PhpUnit\ProphecyTrait;
3738

3839
final class StrategyTest extends TestCase
3940
{
41+
use ProphecyTrait;
42+
4043
private $executorProphecy;
4144
private $config;
4245
private $h2ProxyConfig;

tests/Unit/Grphp/ClientTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@
2525
use Grphp\Client\Response;
2626
use PHPUnit\Framework\TestCase;
2727
use Grphp\Client\Interceptors\Base as BaseInterceptor;
28+
use Prophecy\PhpUnit\ProphecyTrait;
2829

2930
final class ClientTest extends TestCase
3031
{
32+
use ProphecyTrait;
33+
3134
/** @var Config $clientConfig */
3235
protected $clientConfig;
3336
/** @var Client $client */

0 commit comments

Comments
 (0)