Skip to content

Commit 73b1616

Browse files
authored
Merge pull request #313 from jbeales/issue-312
Update Guzzle dependency to ^7.0
2 parents 5d73ff5 + 2cbfc51 commit 73b1616

Some content is hidden

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

76 files changed

+251
-111
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ cache:
1010

1111
matrix:
1212
include:
13-
- php: 7.1
1413
- php: 7.2
1514
- php: 7.3
1615
- php: 7.4

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ Additionally, integration tests require image called `cirros` exists.
239239
You interact with integration tests through a runner script:
240240

241241
```bash
242-
php ./tests/integration/run.php
242+
php ./tests/integration/run.php [-s=BlockStorage|Compute|Identity|Images|Networking|ObjectStore] [--debug=1|2]
243243
```
244244

245245
It supports these command-line flags:

README.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,45 @@
77
`php-opencloud/openstack` is an SDK which allows PHP developers to easily connect to OpenStack APIs in a simple and
88
idiomatic way. This binding is specifically designed for OpenStack APIs, but other provider SDKs are available. Multiple
99
OpenStack services, and versions of services, are supported.
10-
10+
1111
## Links
1212

1313
* [Official documentation](https://php-openstack-sdk.readthedocs.io/en/latest/)
1414
* [Reference documentation](http://refdocs.os.php-opencloud.com)
1515
* [Contributing guide](/CONTRIBUTING.md)
1616
* [Code of Conduct](/CODE_OF_CONDUCT.md)
1717

18-
## Getting help
18+
19+
## We need your help :smiley:
20+
21+
We invest a large amount of work to ensure this SDK works with many OpenStack distributions via running end-to-end
22+
integration tests with a real cluster.
23+
24+
If you or your organization are in a position that can help us access popular distributions as listed below, do reach
25+
out by open an issue in github.
26+
27+
| Distribution | |
28+
|---------------------|-------------------------|
29+
|OpenStack RDO | :white_check_mark: |
30+
|Red Hat OpenStack | Need sponsor! |
31+
|OVH OpenStack | Need sponsor! |
32+
|SUSE OpenStack | Need sponsor! |
33+
|Canonical OpenStack | Need sponsor! |
34+
|RackSpace OpenStack | Need sponsor! |
35+
36+
## Join the community
1937

2038
- Meet us on Slack: https://phpopencloud.slack.com ([Get your invitation](https://launchpass.com/phpopencloud))
2139
- Report an issue: https://github.com/php-opencloud/openstack/issues
2240

23-
2441
## Version Guidance
2542

26-
| Version | Status | PHP Version | End of life |
43+
| Version | Status | PHP Version | Support until |
2744
| --------- | --------------------------- | ------------- | ----------------------- |
28-
| `^3.0` | Latest | `>=7.0` | March 2020 |
29-
| `^2.0` | Maintained (Bug fixes only) | `>=7.0,<7.2` | March 2018 |
45+
| `^3.1` | Latest | `>=7.2.5` | Oct 2023 |
46+
| `^3.0` | Bug fixed only | `>=7.0` | Oct 2020 |
47+
| `^2.0` | EOL (Bug fixes only) | `>=7.0,<7.2` | March 2018 |
48+
3049

3150
## Upgrade from 2.x to 3.x
3251

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@
3333
}
3434
},
3535
"require": {
36-
"php": "~7.0",
37-
"guzzlehttp/guzzle": "^6.1",
36+
"php": "^7.2.5",
37+
"guzzlehttp/guzzle": "^7.0",
38+
"guzzlehttp/uri-template": "0.2",
3839
"justinrainbow/json-schema": "^5.2"
3940
},
4041
"require-dev": {

doc/services/block-storage/v2/volume-types.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Volume Types
33

44
Listing volume types
55
--------------------
6-
.. sample:: block_storage/v2/volume_types/list.php
6+
.. sample:: blockstoragev2/volume_types/list.php
77
.. refdoc:: OpenStack/BlockStorage/v2/Service.html#method_listVolumeTypes
88

99
Each iteration will return a :php:class:`VolumeType` instance <OpenStack/BlockStorage/v2/Models/VolumeType.html>.
@@ -17,7 +17,7 @@ Create volume type
1717
The only attributes that are required when creating a volume are a name. The simplest example
1818
would therefore be this:
1919

20-
.. sample:: block_storage/v2/volume_types/create.php
20+
.. sample:: blockstoragev2/volume_types/create.php
2121
.. refdoc:: OpenStack/BlockStorage/v2/Service.html#method_createVolumeType
2222

2323

@@ -27,7 +27,7 @@ Retrieve details of a volume type
2727
When retrieving a volume type, sometimes you only want to operate on it - say to update or delete it. If this is the
2828
case, then there is no need to perform an initial GET request to the API:
2929

30-
.. sample:: block_storage/v2/volume_types/get.php
30+
.. sample:: blockstoragev2/volume_types/get.php
3131

3232
If, however, you *do* want to retrieve all the details of a remote volume type from the API, you just call:
3333

@@ -46,7 +46,7 @@ Update a volume type
4646
The first step when updating a volume type is modifying the attributes you want updated. By default, only a volume
4747
type's name can be edited.
4848

49-
.. sample:: block_storage/v2/volume_types/update.php
49+
.. sample:: blockstoragev2/volume_types/update.php
5050
.. refdoc:: OpenStack/BlockStorage/v2/Models/VolumeType.html#method_update
5151

5252

@@ -55,5 +55,5 @@ Delete volume type
5555

5656
To permanently delete a volume type:
5757

58-
.. sample:: block_storage/v2/volume_types/delete.php
58+
.. sample:: blockstoragev2/volume_types/delete.php
5959
.. refdoc:: OpenStack/BlockStorage/v2/Models/VolumeType.html#method_delete

doc/services/block-storage/v2/volumes.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Volumes
44
List volumes
55
------------
66

7-
.. sample:: block_storage/v2/volumes/list.php
7+
.. sample:: blockstoragev2/volumes/list.php
88
.. refdoc:: OpenStack/BlockStorage/v2/Service.html#method_listVolumes
99

1010
Each iteration will return a php:class:`Volume` instance <OpenStack/BlockStorage/v2/Models/Volume.html>.
@@ -17,15 +17,15 @@ Detailed information
1717
By default, only the ``id``, ``links`` and ``name`` attributes are returned. To return *all* information
1818
for a flavor, you must enable detailed information, like so:
1919

20-
.. sample:: block_storage/v2/volumes/list_detail.php
20+
.. sample:: blockstoragev2/volumes/list_detail.php
2121

2222
Create volume
2323
-------------
2424

2525
The only attributes that are required when creating a volume are a size in GiB. The simplest example
2626
would therefore be this:
2727

28-
.. sample:: block_storage/v2/volumes/create.php
28+
.. sample:: blockstoragev2/volumes/create.php
2929

3030
You can further configure your new volume, however, by following the below sections, which instruct you how to add
3131
specific functionality.
@@ -35,17 +35,17 @@ specific functionality.
3535
Create from image
3636
~~~~~~~~~~~~~~~~~
3737

38-
.. sample:: block_storage/v2/volumes/create_from_image.php
38+
.. sample:: blockstoragev2/volumes/create_from_image.php
3939

4040
Create from snapshot
4141
~~~~~~~~~~~~~~~~~~~~
4242

43-
.. sample:: block_storage/v2/volumes/create_from_snapshot.php
43+
.. sample:: blockstoragev2/volumes/create_from_snapshot.php
4444

4545
Create from source volume
4646
~~~~~~~~~~~~~~~~~~~~~~~~~
4747

48-
.. sample:: block_storage/v2/volumes/create_from_source_volume.php
48+
.. sample:: blockstoragev2/volumes/create_from_source_volume.php
4949

5050

5151
Retrieve volume details
@@ -54,7 +54,7 @@ Retrieve volume details
5454
When retrieving a volume, sometimes you only want to operate on it - say to update or delete it. If this is the case,
5555
then there is no need to perform an initial GET request to the API:
5656

57-
.. sample:: block_storage/v2/volumes/get.php
57+
.. sample:: blockstoragev2/volumes/get.php
5858

5959
If, however, you *do* want to retrieve all the details of a remote volume from the API, you just call:
6060

@@ -73,13 +73,13 @@ Update volume
7373
The first step when updating a volume is modifying the attributes you want updated. By default, only a volume's name
7474
and description can be edited.
7575

76-
.. sample:: block_storage/v2/volumes/update.php
76+
.. sample:: blockstoragev2/volumes/update.php
7777
.. refdoc:: OpenStack/BlockStorage/v2/Models/Volume.html#method_update
7878

7979
Delete volume
8080
-------------
8181

8282
To permanently delete a volume:
8383

84-
.. sample:: block_storage/v2/volumes/delete.php
84+
.. sample:: blockstoragev2/volumes/delete.php
8585
.. refdoc:: OpenStack/BlockStorage/v2/Models/Volume.html#method_delete

doc/services/object-store/v1/account.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ Show account details
66

77
To work with an Object Store account, you must first retrieve an account object like so:
88

9-
.. sample:: object_store/v1/account/get.php
9+
.. sample:: objectstore/v1/account/get.php
1010
.. refdoc:: OpenStack/ObjectStore/v1/Service.html#method_getAccount
1111

1212
Get account metadata
1313
--------------------
1414

15-
.. sample:: object_store/v1/account/get_metadata.php
15+
.. sample:: objectstore/v1/account/get_metadata.php
1616
.. refdoc:: OpenStack/ObjectStore/v1/Models/Account.html#method_getMetadata
1717

1818
Replace all metadata with new values
@@ -43,7 +43,7 @@ the metadata of the account will now be:
4343

4444
To merge metadata, you must run:
4545

46-
.. sample:: object_store/v1/account/reset_metadata.php
46+
.. sample:: objectstore/v1/account/reset_metadata.php
4747
.. refdoc:: OpenStack/ObjectStore/v1/Models/Account.html#method_resetMetadata
4848

4949
Merge new metadata values with existing
@@ -75,5 +75,5 @@ the metadata of the account will now be:
7575

7676
To reset metadata, you must run:
7777

78-
.. sample:: object_store/v1/account/merge_metadata.php
78+
.. sample:: objectstore/v1/account/merge_metadata.php
7979
.. refdoc:: OpenStack/ObjectStore/v1/Models/Account.html#method_mergeMetadata

doc/services/object-store/v1/containers.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Containers
44
Show details for a container
55
----------------------------
66

7-
.. sample:: object_store/v1/containers/get.php
7+
.. sample:: objectstore/v1/containers/get.php
88
.. refdoc:: OpenStack/ObjectStore/v1/Service.html#method_getContainer
99

1010
At this point, the object returned is *empty* because we did not execute a HTTP request to receive the state of the
@@ -25,7 +25,7 @@ and all of the local properties will match those of the remote resource.
2525
List containers
2626
---------------
2727

28-
.. sample:: object_store/v1/containers/list.php
28+
.. sample:: objectstore/v1/containers/list.php
2929
.. refdoc:: OpenStack/ObjectStore/v1/Service.html#method_listContainers
3030

3131
When listing containers, you must be aware that not *all* information about a container is returned in a collection.
@@ -46,7 +46,7 @@ container.
4646
Delete container
4747
----------------
4848

49-
.. sample:: object_store/v1/containers/delete.php
49+
.. sample:: objectstore/v1/containers/delete.php
5050
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_delete
5151

5252
The API will only accept DELETE requests on containers when they are empty. If you have a container with any objects
@@ -55,7 +55,7 @@ inside, the operation will fail.
5555
Get metadata
5656
------------
5757

58-
.. sample:: object_store/v1/containers/get_metadata.php
58+
.. sample:: objectstore/v1/containers/get_metadata.php
5959
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_getMetadata
6060

6161
The returned value will be a standard associative array, or hash, containing arbitrary key/value pairs. These will
@@ -65,7 +65,7 @@ correspond to the values set either when the container was created, or when a pr
6565
Replace all metadata with new values
6666
------------------------------------
6767

68-
.. sample:: object_store/v1/containers/reset_metadata.php
68+
.. sample:: objectstore/v1/containers/reset_metadata.php
6969
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_resetMetadata
7070

7171
In order to replace all existing metadata with a set of new values, you can use this operation. Any existing metadata
@@ -95,7 +95,7 @@ the metadata of the account will now be:
9595
Merge new metadata values with existing
9696
---------------------------------------
9797

98-
.. sample:: object_store/v1/containers/merge_metadata.php
98+
.. sample:: objectstore/v1/containers/merge_metadata.php
9999
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_mergeMetadata
100100

101101
In order to merge a set of new metadata values with the existing metadata set, you can use this operation. Any existing

doc/services/object-store/v1/objects.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Objects
44
Show details for an object
55
--------------------------
66

7-
.. sample:: object_store/v1/objects/get.php
7+
.. sample:: objectstore/v1/objects/get.php
88
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_getObject
99

1010
At this point, the object returned is *empty* because we did not execute a HTTP request to receive the state of the
@@ -26,7 +26,7 @@ of the object's metadata, will not download the object's content. To do this, se
2626
Download an object
2727
------------------
2828

29-
.. sample:: object_store/v1/objects/download.php
29+
.. sample:: objectstore/v1/objects/download.php
3030
.. refdoc:: OpenStack/ObjectStore/v1/Models/StorageObject.html#method_download
3131

3232
As you will notice, a Stream_ object is returned by this call. For more information about dealing with streams, please
@@ -38,7 +38,7 @@ consult `Guzzle's docs`_.
3838
List objects
3939
------------
4040

41-
.. sample:: object_store/v1/objects/list.php
41+
.. sample:: objectstore/v1/objects/list.php
4242
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_listObjects
4343

4444
When listing objects, you must be aware that not *all* information about a container is returned in a collection.
@@ -61,13 +61,13 @@ Create an object
6161

6262
When creating an object, you can upload its content according to a string representation:
6363

64-
.. sample:: object_store/v1/objects/create.php
64+
.. sample:: objectstore/v1/objects/create.php
6565
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_createObject
6666

6767
If that is not optimal or convenient, you can use a stream instead. Any instance of ``\Psr\Http\Message\StreamInterface``
6868
is acceptable. For example, to use a normal Guzzle stream:
6969

70-
.. sample:: object_store/v1/objects/create_from_stream.php
70+
.. sample:: objectstore/v1/objects/create_from_stream.php
7171

7272
Create a large object (over 5GB)
7373
--------------------------------
@@ -81,25 +81,25 @@ uploading, this is what happens under the hood:
8181

8282
To upload a DLO, you need to call:
8383

84-
.. sample:: object_store/v1/objects/create_large_object.php
84+
.. sample:: objectstore/v1/objects/create_large_object.php
8585
.. refdoc:: OpenStack/ObjectStore/v1/Models/Container.html#method_createLargeObject
8686

8787
Copy object
8888
-----------
8989

90-
.. sample:: object_store/v1/objects/copy.php
90+
.. sample:: objectstore/v1/objects/copy.php
9191
.. refdoc:: OpenStack/ObjectStore/v1/Models/StorageObject.html#method_copy
9292

9393
Delete object
9494
-------------
9595

96-
.. sample:: object_store/v1/objects/delete.php
96+
.. sample:: objectstore/v1/objects/delete.php
9797
.. refdoc:: OpenStack/ObjectStore/v1/Models/StorageObject.html#method_delete
9898

9999
Get metadata
100100
------------
101101

102-
.. sample:: object_store/v1/objects/get_metadata.php
102+
.. sample:: objectstore/v1/objects/get_metadata.php
103103
.. refdoc:: OpenStack/ObjectStore/v1/Models/StorageObject.html#method_getMetadata
104104

105105
The returned value will be a standard associative array, or hash, containing arbitrary key/value pairs. These will
@@ -109,7 +109,7 @@ correspond to the values set either when the object was created, or when a previ
109109
Replace all metadata with new values
110110
------------------------------------
111111

112-
.. sample:: object_store/v1/objects/reset_metadata.php
112+
.. sample:: objectstore/v1/objects/reset_metadata.php
113113
.. refdoc:: OpenStack/ObjectStore/v1/Models/StorageObject.html#method_resetMetadata
114114

115115
In order to replace all existing metadata with a set of new values, you can use this operation. Any existing metadata
@@ -139,7 +139,7 @@ the metadata of the account will now be:
139139
Merge new metadata values with existing
140140
---------------------------------------
141141

142-
.. sample:: object_store/v1/objects/merge_metadata.php
142+
.. sample:: objectstore/v1/objects/merge_metadata.php
143143
.. refdoc:: OpenStack/ObjectStore/v1/Models/StorageObject.html#method_mergeMetadata
144144

145145
In order to merge a set of new metadata values with the existing metadata set, you can use this operation. Any existing

phpunit.xml.dist

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
<directory>tests/unit</directory>
99
</testsuite>
1010
</testsuites>
11-
11+
<php>
12+
<ini name="error_reporting" value=""/>
13+
<ini name="display_errors" value="On"/>
14+
<ini name="display_startup_errors" value="On"/>
15+
</php>
1216
<filter>
1317
<whitelist>
1418
<directory suffix=".php">./src</directory>
@@ -19,5 +23,4 @@
1923
</exclude>
2024
</whitelist>
2125
</filter>
22-
2326
</phpunit>

0 commit comments

Comments
 (0)