Skip to content

Commit f6cdf89

Browse files
authored
Test metadata (#4732)
* test: run 3.x metadata on php 8.1 * fix gql
1 parent 4256fa0 commit f6cdf89

18 files changed

+68
-64
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ jobs:
156156
else
157157
vendor/bin/simple-phpunit --log-junit build/logs/phpunit/junit.xml
158158
fi
159+
- name: Run PHPUnit 8.1+ tests
160+
if: (startsWith(matrix.php, '8.1'))
161+
run: ./vendor/bin/simple-phpunit --stop-on-failure tests/Metadata/Resource/Factory/
159162
- name: Upload test artifacts
160163
if: always()
161164
uses: actions/upload-artifact@v1

src/Metadata/Delete.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ public function __construct(
8888
?bool $forceEager = null,
8989
?int $priority = null,
9090
?string $name = null,
91-
?string $provider = null,
92-
?string $processor = null,
91+
$provider = null,
92+
$processor = null,
9393
array $extraProperties = []
9494
) {
9595
parent::__construct(self::METHOD_DELETE, ...\func_get_args());

src/Metadata/Get.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ public function __construct(
8888
?bool $forceEager = null,
8989
?int $priority = null,
9090
?string $name = null,
91-
?string $provider = null,
92-
?string $processor = null,
91+
$provider = null,
92+
$processor = null,
9393
array $extraProperties = []
9494
) {
9595
parent::__construct(self::METHOD_GET, ...\func_get_args());

src/Metadata/GetCollection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ public function __construct(
8888
?bool $forceEager = null,
8989
?int $priority = null,
9090
?string $name = null,
91-
?string $provider = null,
92-
?string $processor = null,
91+
$provider = null,
92+
$processor = null,
9393
array $extraProperties = []
9494
) {
9595
parent::__construct(self::METHOD_GET, ...\func_get_args());

src/Metadata/GraphQl/DeleteMutation.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use ApiPlatform\Metadata\DeleteOperationInterface;
1717

1818
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
19-
class DeleteMutation extends Operation implements DeleteOperationInterface
19+
class DeleteMutation extends Mutation implements DeleteOperationInterface
2020
{
2121
/**
2222
* {@inheritdoc}
@@ -68,8 +68,8 @@ public function __construct(
6868
?bool $forceEager = null,
6969
?int $priority = null,
7070
?string $name = null,
71-
?string $provider = null,
72-
?string $processor = null,
71+
$provider = null,
72+
$processor = null,
7373
array $extraProperties = []
7474
) {
7575
parent::__construct(...\func_get_args());

src/Metadata/GraphQl/Mutation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ public function __construct(
6666
?bool $forceEager = null,
6767
?int $priority = null,
6868
?string $name = null,
69-
?string $provider = null,
70-
?string $processor = null,
69+
$provider = null,
70+
$processor = null,
7171
array $extraProperties = []
7272
) {
7373
parent::__construct(...\func_get_args());

src/Metadata/GraphQl/Query.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ public function __construct(
6666
?bool $forceEager = null,
6767
?int $priority = null,
6868
?string $name = null,
69-
?string $provider = null,
70-
?string $processor = null,
69+
$provider = null,
70+
$processor = null,
7171
array $extraProperties = []
7272
) {
7373
parent::__construct(...\func_get_args());

src/Metadata/GraphQl/QueryCollection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ public function __construct(
6868
?bool $forceEager = null,
6969
?int $priority = null,
7070
?string $name = null,
71-
?string $provider = null,
72-
?string $processor = null,
71+
$provider = null,
72+
$processor = null,
7373
array $extraProperties = []
7474
) {
7575
parent::__construct(...\func_get_args());

src/Metadata/GraphQl/Subscription.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ public function __construct(
6666
?bool $forceEager = null,
6767
?int $priority = null,
6868
?string $name = null,
69-
?string $provider = null,
70-
?string $processor = null,
69+
$provider = null,
70+
$processor = null,
7171
array $extraProperties = []
7272
) {
7373
parent::__construct(...\func_get_args());

src/Metadata/HttpOperation.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ class HttpOperation extends Operation
117117
* @param bool|null $validate https://api-platform.com/docs/core/events/#the-event-system
118118
* @param bool|null $write https://api-platform.com/docs/core/events/#the-event-system
119119
* @param bool|null $serialize https://api-platform.com/docs/core/events/#the-event-system
120+
* @param mixed|null $provider
121+
* @param mixed|null $processor
120122
*/
121123
public function __construct(
122124
string $method = self::METHOD_GET,
@@ -189,8 +191,8 @@ public function __construct(
189191
?bool $forceEager = null,
190192
?int $priority = null,
191193
?string $name = null,
192-
?string $provider = null,
193-
?string $processor = null,
194+
$provider = null,
195+
$processor = null,
194196
array $extraProperties = []
195197
) {
196198
$this->method = $method;

0 commit comments

Comments
 (0)