Skip to content

Commit

Permalink
Missing bar field and use it
Browse files Browse the repository at this point in the history
  • Loading branch information
Prometee committed Jan 13, 2025
1 parent a371412 commit 8b8f678
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/Sylius/Bundle/ApiBundle/Tests/Application/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ parameters:
sylius_core.public_dir: '%kernel.project_dir%/public'

api_platform:
enable_swagger_ui: true
enable_re_doc: true
enable_swagger: true
enable_entrypoint: true
enable_docs: true
enable_swagger_ui: false
enable_re_doc: false
enable_swagger: false
enable_entrypoint: false
enable_docs: false
mapping:
paths:
- '%kernel.project_dir%/config/api_platform'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
</id>

<field name="foo" column="foo" type="string" />
<field name="bar" column="bar" type="string" />
</entity>
</doctrine-mapping>
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
{
public function __invoke(BarCommand $command): Bar
{
return new Bar();
$bar = new Bar();
$bar->setFoo($command->foo);
$bar->setBar($command->bar);

return $bar;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
{
public function __invoke(BazCommand $command): Bar
{
return new Bar();
$bar = new Bar();
$bar->setFoo($command->foo);

return $bar;
}
}
12 changes: 12 additions & 0 deletions src/Sylius/Bundle/ApiBundle/Tests/Application/src/Entity/Bar.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class Bar

private ?string $foo = null;

private ?string $bar = null;

public function getId(): int
{
return $this->id;
Expand All @@ -38,4 +40,14 @@ public function setFoo(?string $foo): void
{
$this->foo = $foo;
}

public function getBar(): ?string
{
return $this->bar;
}

public function setBar(?string $bar): void
{
$this->bar = $bar;
}
}

0 comments on commit 8b8f678

Please sign in to comment.