1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace ControleOnline\Entity; |
4
|
|
|
|
5
|
|
|
use Symfony\Component\Serializer\Attribute\Groups; |
|
|
|
|
6
|
|
|
use ControleOnline\Repository\PackageRepository; |
7
|
|
|
use ControleOnline\Listener\LogListener; |
|
|
|
|
8
|
|
|
|
9
|
|
|
use ApiPlatform\Metadata\GetCollection; |
|
|
|
|
10
|
|
|
use ApiPlatform\Metadata\Get; |
|
|
|
|
11
|
|
|
use ApiPlatform\Metadata\ApiResource; |
|
|
|
|
12
|
|
|
use ApiPlatform\Metadata\ApiProperty; |
|
|
|
|
13
|
|
|
use ApiPlatform\Metadata\ApiFilter; |
|
|
|
|
14
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
|
|
|
15
|
|
|
use Doctrine\Common\Collections\ArrayCollection; |
|
|
|
|
16
|
|
|
use Doctrine\Common\Collections\Collection; |
|
|
|
|
17
|
|
|
#[ApiResource(operations: [new Get(security: 'is_granted(\'ROLE_CLIENT\')'), new GetCollection(security: 'is_granted(\'ROLE_CLIENT\')')], formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']], normalizationContext: ['groups' => ['package:read']], denormalizationContext: ['groups' => ['package:write']])] |
18
|
|
|
#[ORM\Table(name: 'package')] |
19
|
|
|
#[ORM\EntityListeners([LogListener::class])] |
20
|
|
|
#[ORM\Entity(repositoryClass: PackageRepository::class)] |
21
|
|
|
class Package |
22
|
|
|
{ |
23
|
|
|
/** |
24
|
|
|
* @var int |
25
|
|
|
*/ |
26
|
|
|
#[ORM\Column(name: 'id', type: 'integer', nullable: false)] |
27
|
|
|
#[ORM\Id] |
28
|
|
|
#[ORM\GeneratedValue(strategy: 'IDENTITY')] |
29
|
|
|
private $id; |
30
|
|
|
/** |
31
|
|
|
* @var string |
32
|
|
|
*/ |
33
|
|
|
#[ORM\Column(name: 'name', type: 'string', length: 50, nullable: false)] |
34
|
|
|
private $name; |
35
|
|
|
/** |
36
|
|
|
* @var bool |
37
|
|
|
*/ |
38
|
|
|
#[ORM\Column(name: 'active', type: 'boolean', nullable: false, options: ['default' => '1'])] |
39
|
|
|
private $active = true; |
40
|
|
|
/** |
41
|
|
|
* Get the value of id |
42
|
|
|
*/ |
43
|
|
|
public function getId() |
44
|
|
|
{ |
45
|
|
|
return $this->id; |
46
|
|
|
} |
47
|
|
|
/** |
48
|
|
|
* Get the value of name |
49
|
|
|
*/ |
50
|
|
|
public function getName() : string |
51
|
|
|
{ |
52
|
|
|
return $this->name; |
53
|
|
|
} |
54
|
|
|
/** |
55
|
|
|
* Set the value of name |
56
|
|
|
*/ |
57
|
|
|
public function setName(string $name) : self |
58
|
|
|
{ |
59
|
|
|
$this->name = $name; |
60
|
|
|
return $this; |
61
|
|
|
} |
62
|
|
|
/** |
63
|
|
|
* Get the value of active |
64
|
|
|
*/ |
65
|
|
|
public function isActive() : bool |
66
|
|
|
{ |
67
|
|
|
return $this->active; |
68
|
|
|
} |
69
|
|
|
/** |
70
|
|
|
* Set the value of active |
71
|
|
|
*/ |
72
|
|
|
public function setActive(bool $active) : self |
73
|
|
|
{ |
74
|
|
|
$this->active = $active; |
75
|
|
|
return $this; |
76
|
|
|
} |
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