Skip to content

Commit 76d0e52

Browse files
fix(doctrine): resource definition
1 parent 4a22ba9 commit 76d0e52

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

tests/Fixtures/TestBundle/Entity/ContainNonResource.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@
2727
#[ORM\Entity]
2828
class ContainNonResource
2929
{
30-
#[ORM\Column(type: 'integer')]
30+
/**
31+
* @var string
32+
*/
33+
#[ORM\Column(type: 'string')]
3134
#[ORM\Id]
32-
#[ORM\GeneratedValue(strategy: 'AUTO')]
3335
#[Groups('contain_non_resource')]
3436
public $id;
3537
/**

tests/Fixtures/TestBundle/State/ContainNonResourceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function provide(Operation $operation, array $uriVariables = [], array $c
3535
$resourceClass = $operation->getClass();
3636
// Retrieve the blog post item from somewhere
3737
$cnr = new $resourceClass();
38-
$cnr->id = $id;
38+
$cnr->id = (string) $id;
3939
$cnr->notAResource = new NotAResource('f1', 'b1');
4040
$cnr->nested = new $resourceClass();
4141
$cnr->nested->id = "$id-nested";

0 commit comments

Comments
 (0)