1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace ControleOnline\Entity; |
4
|
|
|
|
5
|
|
|
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter; |
|
|
|
|
6
|
|
|
use ApiPlatform\Metadata\ApiFilter; |
|
|
|
|
7
|
|
|
use ApiPlatform\Metadata\ApiResource; |
|
|
|
|
8
|
|
|
use ApiPlatform\Metadata\Delete; |
|
|
|
|
9
|
|
|
use ApiPlatform\Metadata\Get; |
|
|
|
|
10
|
|
|
use ApiPlatform\Metadata\GetCollection; |
|
|
|
|
11
|
|
|
use ApiPlatform\Metadata\Put; |
|
|
|
|
12
|
|
|
use ControleOnline\Listener\LogListener; |
|
|
|
|
13
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
|
|
|
14
|
|
|
use Symfony\Component\Serializer\Attribute\Groups; |
|
|
|
|
15
|
|
|
|
16
|
|
|
#[ApiResource( |
17
|
|
|
operations: [ |
18
|
|
|
new Get(security: 'is_granted(\'ROLE_CLIENT\')'), |
19
|
|
|
new GetCollection(security: 'is_granted(\'ROLE_CLIENT\')'), |
20
|
|
|
new Put(security: 'is_granted(\'ROLE_CLIENT\')'), |
21
|
|
|
new Delete(security: 'is_granted(\'ROLE_CLIENT\')') |
22
|
|
|
], |
23
|
|
|
formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']], |
24
|
|
|
normalizationContext: ['groups' => ['display_queue:read']], |
25
|
|
|
denormalizationContext: ['groups' => ['display_queue:write']] |
26
|
|
|
)] |
27
|
|
|
#[ApiFilter(filterClass: SearchFilter::class, properties: ['display' => 'exact', 'queue' => 'exact'])] |
28
|
|
|
#[ORM\Table(name: 'display_queue')] |
29
|
|
|
#[ORM\Index(name: 'queue_id', columns: ['queue_id'])] |
30
|
|
|
#[ORM\Index(name: 'IDX_7EAD648851A2DF33', columns: ['display_id'])] |
31
|
|
|
#[ORM\UniqueConstraint(name: 'display_id', columns: ['display_id', 'queue_id'])] |
32
|
|
|
#[ORM\EntityListeners([LogListener::class])] |
33
|
|
|
#[ORM\Entity] |
34
|
|
|
class DisplayQueue |
35
|
|
|
{ |
36
|
|
|
#[ORM\Column(name: 'id', type: 'integer', nullable: false)] |
37
|
|
|
#[ORM\Id] |
38
|
|
|
#[ORM\GeneratedValue(strategy: 'IDENTITY')] |
39
|
|
|
#[Groups(['order:read', 'order_details:read', 'order:write', 'display_queue:read', 'display_queue:write'])] |
40
|
|
|
private int $id; |
41
|
|
|
|
42
|
|
|
#[ORM\JoinColumn(name: 'display_id', referencedColumnName: 'id')] |
43
|
|
|
#[ORM\ManyToOne(targetEntity: Display::class)] |
44
|
|
|
#[Groups(['order:read', 'order_details:read', 'order:write', 'display_queue:read', 'display_queue:write'])] |
45
|
|
|
private Display $display; |
46
|
|
|
|
47
|
|
|
#[ORM\JoinColumn(name: 'queue_id', referencedColumnName: 'id')] |
48
|
|
|
#[ORM\ManyToOne(targetEntity: Queue::class)] |
49
|
|
|
#[Groups(['order:read', 'order_details:read', 'order:write', 'display_queue:read', 'display_queue:write'])] |
50
|
|
|
private Queue $queue; |
51
|
|
|
|
52
|
|
|
public function getId(): int |
53
|
|
|
{ |
54
|
|
|
return $this->id; |
55
|
|
|
} |
56
|
|
|
|
57
|
|
|
public function getDisplay(): Display |
58
|
|
|
{ |
59
|
|
|
return $this->display; |
60
|
|
|
} |
61
|
|
|
|
62
|
|
|
public function setDisplay(Display $display): self |
63
|
|
|
{ |
64
|
|
|
$this->display = $display; |
65
|
|
|
return $this; |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
public function getQueue(): Queue |
69
|
|
|
{ |
70
|
|
|
return $this->queue; |
71
|
|
|
} |
72
|
|
|
|
73
|
|
|
public function setQueue(Queue $queue): self |
74
|
|
|
{ |
75
|
|
|
$this->queue = $queue; |
76
|
|
|
return $this; |
77
|
|
|
} |
78
|
|
|
} |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths