1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace ControleOnline\Entity; |
4
|
|
|
|
5
|
|
|
use ApiPlatform\Metadata\GetCollection; |
|
|
|
|
6
|
|
|
use ApiPlatform\Metadata\ApiResource; |
|
|
|
|
7
|
|
|
use ApiPlatform\Metadata\ApiProperty; |
|
|
|
|
8
|
|
|
use ApiPlatform\Metadata\ApiFilter; |
|
|
|
|
9
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
|
|
|
10
|
|
|
use ApiPlatform\Metadata\Get; |
|
|
|
|
11
|
|
|
|
12
|
|
|
|
13
|
|
|
/** |
14
|
|
|
* @ORM\EntityListeners ({ControleOnline\Listener\LogListener::class}) |
15
|
|
|
* @ORM\Table (name="config", uniqueConstraints={@ORM\UniqueConstraint (name="people_id", columns={"people_id","config_key"})}) |
16
|
|
|
* @ORM\Entity (repositoryClass="ControleOnline\Repository\ConfigRepository") |
17
|
|
|
*/ |
18
|
|
|
#[ApiResource( |
19
|
|
|
operations: [ |
20
|
|
|
new Get(security: 'is_granted(\'ROLE_ADMIN\') or is_granted(\'ROLE_CLIENT\')'), |
21
|
|
|
new GetCollection( |
22
|
|
|
security: 'is_granted(\'IS_AUTHENTICATED_ANONYMOUSLY\')', |
23
|
|
|
uriTemplate: '/configs/app-config', |
24
|
|
|
controller: \App\Controller\GetAppConfigAction::class |
25
|
|
|
) |
26
|
|
|
], |
27
|
|
|
formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']] |
28
|
|
|
)] |
29
|
|
|
class Config |
30
|
|
|
{ |
31
|
|
|
/** |
32
|
|
|
* @var integer |
33
|
|
|
* |
34
|
|
|
* @ORM\Column(name="id", type="integer", nullable=false) |
35
|
|
|
* @ORM\Id |
36
|
|
|
* @ORM\GeneratedValue(strategy="IDENTITY") |
37
|
|
|
*/ |
38
|
|
|
private $id; |
39
|
|
|
/** |
40
|
|
|
* @var \ControleOnline\Entity\People |
|
|
|
|
41
|
|
|
* |
42
|
|
|
* @ORM\ManyToOne(targetEntity="ControleOnline\Entity\People") |
43
|
|
|
* @ORM\JoinColumns({ |
44
|
|
|
* @ORM\JoinColumn(name="people_id", referencedColumnName="id") |
45
|
|
|
* }) |
46
|
|
|
*/ |
47
|
|
|
private $people; |
48
|
|
|
/** |
49
|
|
|
* @var string |
50
|
|
|
* |
51
|
|
|
* @ORM\Column(name="config_key", type="string", length=255, nullable=false) |
52
|
|
|
*/ |
53
|
|
|
private $config_key; |
54
|
|
|
/** |
55
|
|
|
* @var string |
56
|
|
|
* |
57
|
|
|
* @ORM\Column(name="visibility", type="string", length=255, nullable=false) |
58
|
|
|
*/ |
59
|
|
|
private $visibility; |
60
|
|
|
/** |
61
|
|
|
* @var string |
62
|
|
|
* |
63
|
|
|
* @ORM\Column(name="config_value", type="string", length=255, nullable=false) |
64
|
|
|
*/ |
65
|
|
|
private $config_value; |
66
|
|
|
/** |
67
|
|
|
* Get id |
68
|
|
|
* |
69
|
|
|
* @return integer |
70
|
|
|
*/ |
71
|
|
|
public function getId() |
72
|
|
|
{ |
73
|
|
|
return $this->id; |
74
|
|
|
} |
75
|
|
|
/** |
76
|
|
|
* Set people |
77
|
|
|
* |
78
|
|
|
* @param \ControleOnline\Entity\People $people |
79
|
|
|
* @return PeopleConfigKey |
|
|
|
|
80
|
|
|
*/ |
81
|
|
|
public function setPeople(\ControleOnline\Entity\People $people = null) |
82
|
|
|
{ |
83
|
|
|
$this->people = $people; |
84
|
|
|
return $this; |
|
|
|
|
85
|
|
|
} |
86
|
|
|
/** |
87
|
|
|
* Get people |
88
|
|
|
* |
89
|
|
|
* @return \ControleOnline\Entity\People |
90
|
|
|
*/ |
91
|
|
|
public function getPeople() |
92
|
|
|
{ |
93
|
|
|
return $this->people; |
94
|
|
|
} |
95
|
|
|
/** |
96
|
|
|
* Set config_key |
97
|
|
|
* |
98
|
|
|
* @param string config_key |
|
|
|
|
99
|
|
|
* @return PeopleConfigKey |
100
|
|
|
*/ |
101
|
|
|
public function setConfigKey($config_key) |
102
|
|
|
{ |
103
|
|
|
$this->config_key = $config_key; |
104
|
|
|
return $this; |
|
|
|
|
105
|
|
|
} |
106
|
|
|
/** |
107
|
|
|
* Get config_key |
108
|
|
|
* |
109
|
|
|
* @return string |
110
|
|
|
*/ |
111
|
|
|
public function getConfigKey() |
112
|
|
|
{ |
113
|
|
|
return $this->config_key; |
114
|
|
|
} |
115
|
|
|
/** |
116
|
|
|
* Set visibility |
117
|
|
|
* |
118
|
|
|
* @param string visibility |
|
|
|
|
119
|
|
|
* @return Config |
120
|
|
|
*/ |
121
|
|
|
public function setVisibility($visibility) |
122
|
|
|
{ |
123
|
|
|
$this->visibility = $visibility; |
124
|
|
|
return $this; |
125
|
|
|
} |
126
|
|
|
/** |
127
|
|
|
* Get visibility |
128
|
|
|
* |
129
|
|
|
* @return string |
130
|
|
|
*/ |
131
|
|
|
public function getVisibility() |
132
|
|
|
{ |
133
|
|
|
return $this->visibility; |
134
|
|
|
} |
135
|
|
|
/** |
136
|
|
|
* Set config_value |
137
|
|
|
* |
138
|
|
|
* @param string config_value |
|
|
|
|
139
|
|
|
* @return PeopleConfigKey |
140
|
|
|
*/ |
141
|
|
|
public function setConfigValue($config_value) |
142
|
|
|
{ |
143
|
|
|
$this->config_value = $config_value; |
144
|
|
|
return $this; |
|
|
|
|
145
|
|
|
} |
146
|
|
|
/** |
147
|
|
|
* Get config_value |
148
|
|
|
* |
149
|
|
|
* @return string |
150
|
|
|
*/ |
151
|
|
|
public function getConfigValue() |
152
|
|
|
{ |
153
|
|
|
return $this->config_value; |
154
|
|
|
} |
155
|
|
|
} |
156
|
|
|
|
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