Skip to content

Commit dfa79a7

Browse files
committed
updates in progress
1 parent eb97b87 commit dfa79a7

Some content is hidden

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

42 files changed

+93
-97
lines changed

Diff for: composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010
}
1111
],
1212
"require": {
13-
"php": ">=7.1",
13+
"php": ">=7.3",
1414
"ext-json": "*",
1515
"ext-curl": "*",
16-
"guzzlehttp/guzzle": "6.3.*",
16+
"guzzlehttp/guzzle": "7.2.*",
1717
"psr/log": "1.*"
1818
},
1919
"require-dev": {
2020
"myena/default-logger": "1.1.*",
2121
"zircote/swagger-php": "3.*",
22-
"phpunit/phpunit": "7.2.*"
22+
"phpunit/phpunit": "9.3.*"
2323
},
2424
"autoload": {
2525
"psr-4": {

Diff for: phpunit.xml

+13-16
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
<?xml version="1.0" encoding="UTF-8" ?>
2-
<phpunit
3-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4-
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/7.2/phpunit.xsd"
5-
bootstrap="./vendor/autoload.php"
6-
colors="true"
7-
verbose="true"
8-
stopOnFailure="true"
9-
>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
4+
bootstrap="./vendor/autoload.php"
5+
colors="true"
6+
verbose="true"
7+
stopOnFailure="true">
8+
<coverage>
9+
<include>
10+
<directory suffix=".php">./src</directory>
11+
</include>
12+
</coverage>
1013
<testsuites>
1114
<testsuite name="user-links">
1215
<file>./tests/Chain/User/CreateParameterTest.php</file>
@@ -18,10 +21,4 @@
1821
<file>./tests/OpenApiTest.php</file>
1922
</testsuite>
2023
</testsuites>
21-
22-
<filter>
23-
<whitelist>
24-
<directory suffix=".php">./src</directory>
25-
</whitelist>
26-
</filter>
27-
</phpunit>
24+
</phpunit>

Diff for: src/Models/BucketUsage.php

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace MyENA\RGW\Models;
44

55
use MyENA\RGW\AbstractModel;
6+
use OpenApi\Annotations as OA;
67

78
/**
89
* @OA\Schema(

Diff for: src/Models/MetadataAttribute.php

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace MyENA\RGW\Models;
44

55
use MyENA\RGW\AbstractModel;
6+
use OpenApi\Annotations as OA;
67

78
/**
89
* @OA\Schema(

Diff for: src/Models/MetadataBucketInfo.php

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace MyENA\RGW\Models;
44

55
use MyENA\RGW\AbstractModel;
6+
use OpenApi\Annotations as OA;
67

78
/**
89
* @OA\Schema(

Diff for: src/Models/MetadataBucketInstanceInfo.php

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace MyENA\RGW\Models;
44

55
use MyENA\RGW\AbstractModel;
6+
use OpenApi\Annotations as OA;
67

78
/**
89
* @OA\Schema(

Diff for: src/Models/MetadataBucketInstanceResponse.php

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace MyENA\RGW\Models;
44

5+
use OpenApi\Annotations as OA;
6+
57
/**
68
* @OA\Schema(
79
* schema="RGWMetadataBucketInstanceResponse",

Diff for: src/Models/MetadataBucketInstanceResponseData.php

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace MyENA\RGW\Models;
44

55
use MyENA\RGW\AbstractModel;
6+
use OpenApi\Annotations as OA;
67

78
/**
89
* @OA\Schema(

Diff for: src/Models/MetadataBucketResponse.php

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace MyENA\RGW\Models;
44

5+
use OpenApi\Annotations as OA;
6+
57
/**
68
* @OA\Schema(
79
* schema="RGWMetadataBucketResponse",

Diff for: src/Models/MetadataBucketResponseData.php

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace MyENA\RGW\Models;
44

55
use MyENA\RGW\AbstractModel;
6+
use OpenApi\Annotations as OA;
67

78
/**
89
* @OA\Schema(

Diff for: src/Models/MetadataUserInfo.php

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace MyENA\RGW\Models;
44

5+
use OpenApi\Annotations as OA;
6+
57
/**
68
* @OA\Schema(
79
* schema="RGWMetadataUserInfo",

Diff for: src/Models/MetadataUserResponse.php

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
namespace MyENA\RGW\Models;
44

5+
use OpenApi\Annotations as OA;
6+
57
/**
68
* @OA\Schema(
79
* schema="RGWMetadataUserResponse",

Diff for: src/Models/MetadataVersion.php

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace MyENA\RGW\Models;
44

55
use MyENA\RGW\AbstractModel;
6+
use OpenApi\Annotations as OA;
67

78
/**
89
* @OA\Schema(

Diff for: src/Models/QuotaMeta.php

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace MyENA\RGW\Models;
44

55
use MyENA\RGW\AbstractModel;
6+
use OpenApi\Annotations as OA;
67

78
/**
89
* @OA\Schema(

Diff for: src/Models/Quotas.php

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace MyENA\RGW\Models;
44

55
use MyENA\RGW\AbstractModel;
6+
use OpenApi\Annotations as OA;
67

78
/**
89
* @OA\Schema(

Diff for: src/Models/StatisticsEntry.php

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace MyENA\RGW\Models;
44

55
use MyENA\RGW\AbstractModel;
6+
use OpenApi\Annotations as OA;
67

78
/**
89
* @OA\Schema(

Diff for: src/Models/SubUserInfo.php

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace MyENA\RGW\Models;
44

55
use MyENA\RGW\AbstractModel;
6+
use OpenApi\Annotations as OA;
67

78
/**
89
* @OA\Schema(

Diff for: src/Models/SubUserInfoCollection.php

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace MyENA\RGW\Models;
44

55
use MyENA\RGW\AbstractModelCollection;
6+
use OpenApi\Annotations as OA;
67

78
/**
89
* @OA\Schema(

Diff for: src/Models/SwiftKey.php

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace MyENA\RGW\Models;
44

55
use MyENA\RGW\AbstractModel;
6+
use OpenApi\Annotations as OA;
67

78
/**
89
* @OA\Schema(

Diff for: src/Models/UserCapability.php

+12-11
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace MyENA\RGW\Models;
44

55
use MyENA\RGW\AbstractModel;
6+
use OpenApi\Annotations as OA;
67

78
/**
89
* @OA\Schema(
@@ -26,19 +27,19 @@
2627
class UserCapability extends AbstractModel
2728
{
2829

29-
const KEY_TYPE = 'type';
30-
const KEY_PERM = 'perm';
30+
public const KEY_TYPE = 'type';
31+
public const KEY_PERM = 'perm';
3132

32-
const TYPE_USERS = 'users';
33-
const TYPE_BUCKETS = 'buckets';
34-
const TYPE_METADATA = 'metadata';
35-
const TYPE_USAGE = 'usage';
36-
const TYPE_ZONE = 'zone';
33+
public const TYPE_USERS = 'users';
34+
public const TYPE_BUCKETS = 'buckets';
35+
public const TYPE_METADATA = 'metadata';
36+
public const TYPE_USAGE = 'usage';
37+
public const TYPE_ZONE = 'zone';
3738

38-
const PERM_ALL = '*';
39-
const PERM_READ = 'read';
40-
const PERM_WRITE = 'write';
41-
const PERM_READ_WRITE = 'read,write';
39+
public const PERM_ALL = '*';
40+
public const PERM_READ = 'read';
41+
public const PERM_WRITE = 'write';
42+
public const PERM_READ_WRITE = 'read,write';
4243

4344
/** @var string */
4445
protected $type;

Diff for: src/Models/UserCapabilityCollection.php

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace MyENA\RGW\Models;
44

55
use MyENA\RGW\AbstractModelCollection;
6+
use OpenApi\Annotations as OA;
67

78
/**
89
* @OA\Schema(

Diff for: src/Models/UserInfo.php

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace MyENA\RGW\Models;
44

55
use MyENA\RGW\AbstractModel;
6+
use OpenApi\Annotations as OA;
67

78
/**
89
* @OA\Schema(

Diff for: src/Models/UserKey.php

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace MyENA\RGW\Models;
44

55
use MyENA\RGW\AbstractModel;
6+
use OpenApi\Annotations as OA;
67

78
/**
89
* @OA\Schema(

Diff for: src/Models/UserKeyCollection.php

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace MyENA\RGW\Models;
44

55
use MyENA\RGW\AbstractModelCollection;
6+
use OpenApi\Annotations as OA;
67

78
/**
89
* @OA\Schema(

Diff for: src/Parameter/SingleParameter.php

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
*/
1313
class SingleParameter extends AbstractParameter
1414
{
15-
1615
/** @var mixed */
1716
protected $value;
1817

Diff for: src/Validator/BooleanValidator.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
*/
1111
class BooleanValidator implements Validator
1212
{
13-
const NAME = 'boolean';
14-
const EXPECTS = 'boolean (true|false)';
13+
public const NAME = 'boolean';
14+
public const EXPECTS = 'boolean (true|false)';
1515

1616
/**
1717
* @return string

Diff for: src/Validator/BucketNameValidator.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
*/
1111
class BucketNameValidator implements Validator
1212
{
13-
const NAME = 'bucket-name';
13+
public const NAME = 'bucket-name';
1414

1515
// TODO: improve to test for ip addresses.
16-
const TEST_REGEX = '/^([a-zA-Z0-9_]+\/)?[a-z0-9][a-z0-9-\.]{2,62}$/';
16+
public const TEST_REGEX = '/^([a-zA-Z0-9_]+\/)?[a-z0-9][a-z0-9-\.]{2,62}$/';
1717

1818
/**
1919
* @return string

Diff for: src/Validator/CustomValidator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
class CustomValidator implements Validator
1212
{
13-
const NAME = 'custom';
13+
public const NAME = 'custom';
1414

1515
/** @var string */
1616
private $name;

Diff for: src/Validator/EmailValidator.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
*/
1111
class EmailValidator implements Validator
1212
{
13-
const NAME = 'email';
14-
const EXPECTS = 'string conforming to PHP email filter spec';
13+
public const NAME = 'email';
14+
public const EXPECTS = 'string conforming to PHP email filter spec';
1515

1616
/**
1717
* @return string

Diff for: src/Validator/InstanceOfValidator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
class InstanceOfValidator implements Validator
1212
{
13-
const NAME = 'instance-of';
13+
public const NAME = 'instance-of';
1414

1515
/** @var string */
1616
private $class;

Diff for: src/Validator/IntegerValidator.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
*/
1313
class IntegerValidator implements Validator
1414
{
15-
const NAME = 'integer';
16-
const EXPECTS = 'integer or string containing only numbers with optional sign prefix';
15+
public const NAME = 'integer';
16+
public const EXPECTS = 'integer or string containing only numbers with optional sign prefix';
1717

1818
/**
1919
* @return string

Diff for: src/Validator/NotEmptyValidator.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
*/
1313
class NotEmptyValidator implements Validator
1414
{
15-
const NAME = 'not-empty';
16-
const EXPECTS = 'type-specific non-empty value';
15+
public const NAME = 'not-empty';
16+
public const EXPECTS = 'type-specific non-empty value';
1717

1818
/**
1919
* @return string

Diff for: src/Validator/OneOfValidator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111
class OneOfValidator implements Validator
1212
{
13-
const NAME = 'one-of';
13+
public const NAME = 'one-of';
1414

1515
/** @var array */
1616
private $allowed = [];

Diff for: src/Validator/RequiredValidator.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
*/
1111
class RequiredValidator implements Validator
1212
{
13-
const NAME = 'required';
14-
const EXPECTS = 'value to be defined';
13+
public const NAME = 'required';
14+
public const EXPECTS = 'value to be defined';
1515

1616
/**
1717
* @return string

Diff for: src/Validator/StringValidator.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
*/
1111
class StringValidator implements Validator
1212
{
13-
const NAME = 'string';
14-
const EXPECTS = 'value to be a string';
13+
public const NAME = 'string';
14+
public const EXPECTS = 'value to be a string';
1515

1616
/**
1717
* @return string

Diff for: src/Validator/TenantNameValidator.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
*/
1111
class TenantNameValidator implements Validator
1212
{
13-
const NAME = 'tenant';
14-
const TEST_REGEX = '{^[a-zA-Z0-9_]+$}';
13+
public const NAME = 'tenant';
14+
public const TEST_REGEX = '{^[a-zA-Z0-9_]+$}';
1515

1616
/**
1717
* @return string

0 commit comments

Comments
 (0)