Skip to content

Update PHP to 8.0 #323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ matrix:
- php: 7.2
- php: 7.3
- php: 7.4
- php: 8.0
- php: nightly
allow_failures:
- php: nightly
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
}
},
"require": {
"php": "^7.2.5",
"php": "^7.2.5|8.0",
"guzzlehttp/guzzle": "^7.0",
"guzzlehttp/uri-template": "0.2",
"justinrainbow/json-schema": "^5.2"
},
"require-dev": {
"phpunit/phpunit": "^6.5",
"phpunit/phpunit": "^8.0",
"psr/log": "^1.0",
"php-coveralls/php-coveralls": "^2.0",
"jakub-onderka/php-parallel-lint": "^1.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Common/Transport/Middleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static function httpErrors(): callable
return function (callable $handler) {
return function ($request, array $options) use ($handler) {
return $handler($request, $options)->then(
function (ResponseInterface $response) use ($request, $handler) {
function (ResponseInterface $response) use ($request) {
if ($response->getStatusCode() < 400) {
return $response;
}
Expand Down
20 changes: 10 additions & 10 deletions src/OpenStack.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private function getDefaultIdentityService(array $options): Service
*
* @param array $options options that will be used in configuring the service
*/
public function computeV2(array $options = []): \OpenStack\Compute\v2\Service
public function computeV2(array $options = []): Compute\v2\Service
{
$defaults = ['catalogName' => 'nova', 'catalogType' => 'compute'];

Expand All @@ -89,7 +89,7 @@ public function computeV2(array $options = []): \OpenStack\Compute\v2\Service
*
* @param array $options options that will be used in configuring the service
*/
public function networkingV2(array $options = []): \OpenStack\Networking\v2\Service
public function networkingV2(array $options = []): Networking\v2\Service
{
$defaults = ['catalogName' => 'neutron', 'catalogType' => 'network'];

Expand All @@ -101,7 +101,7 @@ public function networkingV2(array $options = []): \OpenStack\Networking\v2\Serv
*
* @param array $options options that will be used in configuring the service
*/
public function networkingV2ExtLayer3(array $options = []): \OpenStack\Networking\v2\Extensions\Layer3\Service
public function networkingV2ExtLayer3(array $options = []): Networking\v2\Extensions\Layer3\Service
{
$defaults = ['catalogName' => 'neutron', 'catalogType' => 'network'];

Expand All @@ -113,7 +113,7 @@ public function networkingV2ExtLayer3(array $options = []): \OpenStack\Networkin
*
* @param array $options options that will be used in configuring the service
*/
public function networkingV2ExtSecGroups(array $options = []): \OpenStack\Networking\v2\Extensions\SecurityGroups\Service
public function networkingV2ExtSecGroups(array $options = []): Networking\v2\Extensions\SecurityGroups\Service
{
$defaults = ['catalogName' => 'neutron', 'catalogType' => 'network'];

Expand All @@ -125,7 +125,7 @@ public function networkingV2ExtSecGroups(array $options = []): \OpenStack\Networ
*
* @param array $options options that will be used in configuring the service
*/
public function identityV2(array $options = []): \OpenStack\Identity\v2\Service
public function identityV2(array $options = []): Identity\v2\Service
{
$defaults = ['catalogName' => 'keystone', 'catalogType' => 'identity'];

Expand All @@ -137,7 +137,7 @@ public function identityV2(array $options = []): \OpenStack\Identity\v2\Service
*
* @param array $options options that will be used in configuring the service
*/
public function identityV3(array $options = []): \OpenStack\Identity\v3\Service
public function identityV3(array $options = []): Service
{
$defaults = ['catalogName' => 'keystone', 'catalogType' => 'identity'];

Expand All @@ -149,7 +149,7 @@ public function identityV3(array $options = []): \OpenStack\Identity\v3\Service
*
* @param array $options options that will be used in configuring the service
*/
public function objectStoreV1(array $options = []): \OpenStack\ObjectStore\v1\Service
public function objectStoreV1(array $options = []): ObjectStore\v1\Service
{
$defaults = ['catalogName' => 'swift', 'catalogType' => 'object-store'];

Expand All @@ -161,7 +161,7 @@ public function objectStoreV1(array $options = []): \OpenStack\ObjectStore\v1\Se
*
* @param array $options options that will be used in configuring the service
*/
public function blockStorageV2(array $options = []): \OpenStack\BlockStorage\v2\Service
public function blockStorageV2(array $options = []): BlockStorage\v2\Service
{
$defaults = ['catalogName' => 'cinderv2', 'catalogType' => 'volumev2'];

Expand All @@ -173,7 +173,7 @@ public function blockStorageV2(array $options = []): \OpenStack\BlockStorage\v2\
*
* @param array $options options that will be used in configuring the service
*/
public function imagesV2(array $options = []): \OpenStack\Images\v2\Service
public function imagesV2(array $options = []): Images\v2\Service
{
$defaults = ['catalogName' => 'glance', 'catalogType' => 'image'];

Expand All @@ -183,7 +183,7 @@ public function imagesV2(array $options = []): \OpenStack\Images\v2\Service
/**
* Creates a new Gnocchi Metric service v1.
*/
public function metricGnocchiV1(array $options = []): \OpenStack\Metric\v1\Gnocchi\Service
public function metricGnocchiV1(array $options = []): Metric\v1\Gnocchi\Service
{
$defaults = ['catalogName' => 'gnocchi', 'catalogType' => 'metric'];

Expand Down