Skip to content

Commit a9c434a

Browse files
committed
fix ci + Kevin review
1 parent 0c0b1bc commit a9c434a

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

features/main/composite.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Feature: Retrieve data with Composite identifiers
133133
And the response should be in JSON
134134
And the header "Content-Type" should be equal to "application/ld+json; charset=utf-8"
135135

136-
Scenario: Get identifiers with different type
136+
Scenario: Get identifiers with different types
137137
Given there are Composite identifier objects
138138
When I send a "GET" request to "/composite_key_with_different_types/id=82133;verificationKey=7d75af772e637e45c36d041696e1128d"
139139
Then the response status code should be 200

src/Api/UriVariablesConverter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public function convert(array $uriVariables, string $class, array $context = [])
6363
}
6464
}
6565
}
66+
6667
return $uriVariables;
6768
}
6869

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the API Platform project.
5+
*
6+
* (c) Kévin Dunglas <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
declare(strict_types=1);
413

514
namespace ApiPlatform\Tests\Fixtures\TestBundle\ApiResource\Issue5396;
@@ -8,16 +17,17 @@
817
use ApiPlatform\Metadata\ApiResource;
918
use ApiPlatform\Metadata\Operation;
1019

11-
#[ApiResource(provider: [self::class, 'provide'])]
12-
class CompositeKeyWithDifferentType {
13-
20+
#[ApiResource(provider: [CompositeKeyWithDifferentType::class, 'provide'])]
21+
class CompositeKeyWithDifferentType
22+
{
1423
#[ApiProperty(identifier: true)]
15-
private ?int $id;
24+
public ?int $id;
1625

1726
#[ApiProperty(identifier: true)]
18-
private ?string $verificationKey;
27+
public ?string $verificationKey;
1928

20-
public static function provide(Operation $operation, array $uriVariables = [], array $context = []) {
29+
public static function provide(Operation $operation, array $uriVariables = [], array $context = []): array
30+
{
2131
return $context;
2232
}
2333
}

0 commit comments

Comments
 (0)