Skip to content

Commit abd4047

Browse files
authored
Fix prophecy to use trait, update maintainer details (#300)
* Big rewrite to extend off a new base class so the prophecy trait can be used across the suite * Update change of ownership within Vonage * remove support for PHP7.2 + PHP7.3 * remove support for PHP7.2 + PHP7.3. Build support for 8.1 * split support for older php versions as a temporary measure until we make production catch up * Update changelog
1 parent 927d459 commit abd4047

File tree

104 files changed

+236
-212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

104 files changed

+236
-212
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-latest
99
strategy:
1010
matrix:
11-
php: [ '7.2', '7.3', '7.4', '8.0' ]
11+
php: [ '7.4', '8.0', '8.1' ]
1212
name: PHP ${{ matrix.php }} Test
1313

1414
steps:

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
# 2.10.0
2+
3+
### Fixed
4+
5+
* PHPUnit tests now no longer throw `prophesize()` depreciation notices
6+
7+
### Changed
8+
9+
* Maintainer and Contribution documents changed to reflect current ownership
10+
* All test cases now extend off a the new `VonageTestCase` class that implements the `ProphesizeTrait`
11+
112
# 2.9.3
213

314
### Fixed

CONTRIBUTORS.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
## Maintainers
22

33
If you have any problems with our library, feel free to reach out to our
4-
maintainers.
4+
maintainer.
55

6-
* [Chris Tankersley](https://github.com/dragonmantank)
7-
* [Lorna Jane Mitchell](https://github.com/lornajane)
6+
* [James Seconde](https://github.com/secondejk)
87

98
### Past Maintainers
109

10+
* [Chris Tankersley](https://github.com/dragonmantank)
11+
* [Lorna Jane Mitchell](https://github.com/lornajane)
1112
* [Tim Lytle](https://github.com/tjlytle)
1213
* [Micheal Heap](https://github.com/mheap)
1314

composer.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,9 @@
66
"license": "Apache-2.0",
77
"authors": [
88
{
9-
"name": "Chris Tankersley",
10-
"email": "[email protected]",
11-
"role": "Developer"
12-
},
13-
{
14-
"name": "Lorna Mitchell",
15-
"email": "[email protected]",
16-
"role": "Developer"
9+
"name": "James Seconde",
10+
"email": "[email protected]",
11+
"role": "PHP Developer Advocate"
1712
}
1813
],
1914
"require": {
@@ -29,14 +24,16 @@
2924
"psr/log": "^1.1"
3025
},
3126
"require-dev": {
27+
"php": ">=7.4",
3228
"guzzlehttp/guzzle": ">=6",
3329
"helmich/phpunit-json-assert": "^3.3",
3430
"php-http/mock-client": "^1.4",
3531
"phpstan/phpstan": "^0.12",
3632
"phpunit/phpunit": "^8.5|^9.4",
3733
"roave/security-advisories": "dev-latest",
3834
"squizlabs/php_codesniffer": "^3.5",
39-
"softcreatr/jsonpath": "^0.6.4"
35+
"softcreatr/jsonpath": "^0.6.4",
36+
"phpspec/prophecy-phpunit": "^2.0"
4037
},
4138
"config": {
4239
"optimize-autoloader": true,
@@ -62,6 +59,6 @@
6259
"email": "[email protected]",
6360
"issues": "https://github.com/Vonage/vonage-php-sdk-core/issues",
6461
"source": "https://github.com/Vonage/vonage-php-sdk-core",
65-
"docs": "https://developer.nexmo.com"
62+
"docs": "https://developer.vonage.com"
6663
}
6764
}

test/Account/BalanceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111

1212
namespace VonageTest\Account;
1313

14-
use PHPUnit\Framework\TestCase;
14+
use VonageTest\VonageTestCase;
1515
use Vonage\Account\Balance;
1616
use Vonage\Client\Exception\Exception as ClientException;
1717

18-
class BalanceTest extends TestCase
18+
class BalanceTest extends VonageTestCase
1919
{
2020
/**
2121
* @var Balance

test/Account/ClientFactoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
namespace VonageTest\Account;
1313

14-
use PHPUnit\Framework\TestCase;
14+
use VonageTest\VonageTestCase;
1515
use Vonage\Account\ClientFactory;
1616
use Vonage\Client;
1717
use Vonage\Client\APIResource;
1818
use Vonage\Client\Factory\MapFactory;
1919

20-
class ClientFactoryTest extends TestCase
20+
class ClientFactoryTest extends VonageTestCase
2121
{
2222
/**
2323
* @var MapFactory

test/Account/ClientTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
namespace VonageTest\Account;
1313

1414
use Laminas\Diactoros\Response;
15-
use PHPUnit\Framework\TestCase;
15+
use VonageTest\VonageTestCase;
1616
use Prophecy\Argument;
17+
use Prophecy\PhpUnit\ProphecyTrait;
1718
use Psr\Http\Client\ClientExceptionInterface;
1819
use Psr\Http\Message\RequestInterface;
1920
use Vonage\Account\Client as AccountClient;
@@ -29,10 +30,11 @@
2930

3031
use function fopen;
3132

32-
class ClientTest extends TestCase
33+
class ClientTest extends VonageTestCase
3334
{
3435
use Psr7AssertionTrait;
3536

37+
3638
protected $vonageClient;
3739

3840
/**

test/Account/ConfigTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
namespace VonageTest\Account;
1313

14-
use PHPUnit\Framework\TestCase;
14+
use VonageTest\VonageTestCase;
1515
use Vonage\Account\Config;
1616

17-
class ConfigTest extends TestCase
17+
class ConfigTest extends VonageTestCase
1818
{
1919
/**
2020
* @var Config

test/Account/PrefixPriceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
namespace VonageTest\Account;
1313

1414
use Exception;
15-
use PHPUnit\Framework\TestCase;
15+
use VonageTest\VonageTestCase;
1616
use Vonage\Account\PrefixPrice;
1717

18-
class PrefixPriceTest extends TestCase
18+
class PrefixPriceTest extends VonageTestCase
1919
{
2020
/**
2121
* @dataProvider prefixPriceProvider

test/Account/SecretCollectionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111

1212
namespace VonageTest\Account;
1313

14-
use PHPUnit\Framework\TestCase;
14+
use VonageTest\VonageTestCase;
1515
use Vonage\Account\Secret;
1616
use Vonage\Account\SecretCollection;
1717
use Vonage\InvalidResponseException;
1818

1919
use function array_map;
2020

21-
class SecretCollectionTest extends TestCase
21+
class SecretCollectionTest extends VonageTestCase
2222
{
2323
/**
2424
* @var array[]

0 commit comments

Comments
 (0)