Skip to content

Commit 28a6008

Browse files
authored
Merge pull request php-opencloud#228 from php-opencloud/backport
Bumped dependencies to remove guzzle/guzzle
2 parents af75e11 + 9ba6503 commit 28a6008

File tree

14 files changed

+73
-44
lines changed

14 files changed

+73
-44
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ before_script:
3030
after_script:
3131
- php vendor/bin/coveralls -v
3232

33+
after_success:
34+
- travis_retry php vendor/bin/php-coveralls -v
35+
3336
notifications:
3437
email:
3538
- jamie.hannaford@rackspace.com

README.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# PHP OpenStack SDK
22

33
[![Build Status](https://travis-ci.org/php-opencloud/openstack.svg?branch=master)](https://travis-ci.org/php-opencloud/openstack)
4-
[![Code Coverage](https://scrutinizer-ci.com/g/php-opencloud/openstack/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/php-opencloud/openstack/?branch=master)
4+
[![Coverage Status](https://coveralls.io/repos/github/php-opencloud/openstack/badge.svg?branch=master)](https://coveralls.io/github/php-opencloud/openstack?branch=master)
55
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/php-opencloud/openstack/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/php-opencloud/openstack/?branch=master)
66

77
`php-opencloud/openstack` is an SDK which allows PHP developers to easily connect to OpenStack APIs in a simple and
@@ -15,28 +15,31 @@ OpenStack services, and versions of services, are supported.
1515
* [Contributing guide](/CONTRIBUTING.md)
1616
* [Code of Conduct](/CODE_OF_CONDUCT.md)
1717

18-
## Backward incompatibility
18+
## Getting help
19+
20+
- Meet us on Slack: https://phpopencloud.slack.com ([Get your invitation](https://launchpass.com/phpopencloud))
21+
- Report an issue: https://github.com/php-opencloud/openstack/issues
1922

20-
Due to new [object typehint](https://wiki.php.net/rfc/object-typehint) since PHP 7.2, `Object` is a reserved keyword
21-
thus class `OpenStack\ObjectStore\v1\Models\Object` had to be renamed to
22-
`OpenStack\ObjectStore\v1\Models\StorageObject`. See [#184](https://github.com/php-opencloud/openstack/pull/184) for
23-
details.
2423

25-
### Version Guidance
24+
## Version Guidance
2625

27-
| Version | Status | PHP Version | Life span |
26+
| Version | Status | PHP Version | End of life |
2827
| --------- | --------------------------- | ------------- | ----------------------- |
29-
| `^2.0` | Maintained (Bug fixes only) | `>=7.0,<7.2` | March 2016 - March 2018 |
30-
| `^3.0` | Latest | `>=7.0` | March 2018 - March 2020 |
28+
| `^3.0` | Latest | `>=7.0` | March 2020 |
29+
| `^2.0` | Maintained (Bug fixes only) | `>=7.0,<7.2` | March 2018 |
3130

32-
## Getting help
33-
34-
- Meet us on Slack: https://phpopencloud.slack.com ([Get your invitation](https://launchpass.com/phpopencloud))
35-
- Report and issue: https://github.com/php-opencloud/openstack/issues
31+
## Upgrade from 2.x to 3.x
32+
33+
Due to new [object typehint](https://wiki.php.net/rfc/object-typehint) since PHP 7.2, `Object` is a reserved keyword
34+
thus class `OpenStack\ObjectStore\v1\Models\Object` had to be renamed to
35+
`OpenStack\ObjectStore\v1\Models\StorageObject`.
36+
37+
This change was introduced in [#184](https://github.com/php-opencloud/openstack/pull/184).
3638

3739
## Requirements
3840

3941
* PHP 7.0
42+
* `ext-curl`
4043

4144
## How to install
4245

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@
4444
"justinrainbow/json-schema": "~5.2"
4545
},
4646
"require-dev": {
47-
"phpunit/phpunit": "~4.0",
47+
"phpunit/phpunit": "^6.5",
4848
"sami/sami": "dev-master",
49-
"psr/log": "~1.0",
50-
"satooshi/php-coveralls": "~1.0",
51-
"jakub-onderka/php-parallel-lint": "0.*",
49+
"psr/log": "^1.0",
50+
"satooshi/php-coveralls": "^2.0",
51+
"jakub-onderka/php-parallel-lint": "^1.0",
5252
"friendsofphp/php-cs-fixer": "^2.9"
5353
}
5454
}

phpunit.xml.dist

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="./vendor/autoload.php" colors="true">
3-
2+
<phpunit bootstrap="./vendor/autoload.php" colors="true" strict="true">
3+
<logging>
4+
<log type="coverage-clover" target="build/logs/clover.xml"/>
5+
</logging>
46
<testsuites>
57
<testsuite name="OpenStack">
68
<directory>tests/unit</directory>
@@ -18,4 +20,4 @@
1820
</whitelist>
1921
</filter>
2022

21-
</phpunit>
23+
</phpunit>

tests/integration/Compute/v2/CoreTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,8 @@ private function attachVolumeToServer()
672672

673673
$this->volume->waitUntil('in-use');
674674

675-
$this->logStep('Attached volume {volumeId} to server {serverId} with volume attachment id {volumeAttachmentId}',
675+
$this->logStep(
676+
'Attached volume {volumeId} to server {serverId} with volume attachment id {volumeAttachmentId}',
676677
array_merge($replacements, ['{volumeAttachmentId}' => $volumeAttachment->id])
677678
);
678679
}

tests/integration/TestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use OpenStack\Common\Resource\Deletable;
66
use Psr\Log\LoggerInterface;
77

8-
abstract class TestCase extends \PHPUnit_Framework_TestCase implements TestInterface
8+
abstract class TestCase extends \PHPUnit\Framework\TestCase implements TestInterface
99
{
1010
protected $logger;
1111
private $startPoint;

tests/unit/Common/Api/OperationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use OpenStack\Common\Api\Parameter;
77
use OpenStack\Test\Fixtures\ComputeV2Api;
88

9-
class OperationTest extends \PHPUnit_Framework_TestCase
9+
class OperationTest extends \PHPUnit\Framework\TestCase
1010
{
1111
private $operation;
1212

tests/unit/Common/Api/OperatorTraitTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,17 @@ public function test_it_sends_a_request_when_operations_are_executed()
4848
$this->client->request('GET', 'test', ['headers' => []])->willReturn(new Response());
4949

5050
$this->operator->execute($this->def, []);
51+
52+
$this->addToAssertionCount(1);
5153
}
5254

5355
public function test_it_sends_a_request_when_async_operations_are_executed()
5456
{
5557
$this->client->requestAsync('GET', 'test', ['headers' => []])->willReturn(new Promise());
5658

5759
$this->operator->executeAsync($this->def, []);
60+
61+
$this->addToAssertionCount(1);
5862
}
5963

6064
public function test_it_wraps_sequential_ops_in_promise_when_async_is_appended_to_method_name()
@@ -90,10 +94,12 @@ public function test_it_returns_a_model_instance()
9094
{
9195
$this->assertInstanceOf(ResourceInterface::class, $this->operator->model(TestResource::class));
9296
}
97+
9398
public function test_it_populates_models_from_response()
9499
{
95100
$this->assertInstanceOf(ResourceInterface::class, $this->operator->model(TestResource::class, new Response(200)));
96101
}
102+
97103
public function test_it_populates_models_from_arrays()
98104
{
99105
$data = ['flavor' => [], 'image' => []];

tests/unit/Common/Api/ParameterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use OpenStack\Common\Api\Parameter;
66
use OpenStack\Test\Fixtures\ComputeV2Api;
77

8-
class ParameterTest extends \PHPUnit_Framework_TestCase
8+
class ParameterTest extends \PHPUnit\Framework\TestCase
99
{
1010
private $param;
1111
private $data;

tests/unit/Common/Error/BuilderTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
use OpenStack\Common\Error\Builder;
1414
use OpenStack\Common\Error\UserInputError;
1515

16-
class BuilderTest extends \PHPUnit_Framework_TestCase
16+
class BuilderTest extends \PHPUnit\Framework\TestCase
1717
{
1818
private $builder;
1919
private $client;
2020

21-
public function __construct()
21+
public function setUp()
2222
{
2323
$this->client = $this->prophesize(ClientInterface::class);
2424
$this->builder = new Builder($this->client->reveal());

0 commit comments

Comments
 (0)