ControleOnline /
api-platform-people
| 1 | <?php |
||
| 2 | |||
| 3 | namespace ControleOnline\Entity; |
||
| 4 | |||
| 5 | use Symfony\Component\Serializer\Attribute\Groups; |
||
|
0 ignored issues
–
show
|
|||
| 6 | use ApiPlatform\Doctrine\Orm\Filter\SearchFilter; |
||
|
0 ignored issues
–
show
The type
ApiPlatform\Doctrine\Orm\Filter\SearchFilter was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 7 | use ApiPlatform\Metadata\ApiFilter; |
||
|
0 ignored issues
–
show
The type
ApiPlatform\Metadata\ApiFilter was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 8 | use ApiPlatform\Metadata\ApiResource; |
||
|
0 ignored issues
–
show
The type
ApiPlatform\Metadata\ApiResource was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 9 | use ApiPlatform\Metadata\Get; |
||
|
0 ignored issues
–
show
The type
ApiPlatform\Metadata\Get was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 10 | use ApiPlatform\Metadata\GetCollection; |
||
|
0 ignored issues
–
show
The type
ApiPlatform\Metadata\GetCollection was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 11 | use ControleOnline\Repository\CompanyDocumentRepository; |
||
| 12 | use Doctrine\ORM\Mapping as ORM; |
||
|
0 ignored issues
–
show
The type
Doctrine\ORM\Mapping was not found. Maybe you did not declare it correctly or list all dependencies?
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. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 13 | |||
| 14 | #[ApiResource( |
||
| 15 | operations: [ |
||
| 16 | new Get(security: 'is_granted(\'ROLE_CLIENT\')'), |
||
| 17 | new GetCollection(security: 'is_granted(\'ROLE_CLIENT\')') |
||
| 18 | ], |
||
| 19 | formats: ['jsonld', 'json', 'html', 'jsonhal', 'csv' => ['text/csv']], |
||
| 20 | normalizationContext: ['groups' => ['company_document:read']], |
||
| 21 | denormalizationContext: ['groups' => ['company_document:write']] |
||
| 22 | )] |
||
| 23 | #[ApiFilter(SearchFilter::class, properties: ['peopleType' => 'exact'])] |
||
| 24 | #[ORM\Table(name: 'company_document')] |
||
| 25 | #[ORM\Entity(repositoryClass: CompanyDocumentRepository::class)] |
||
| 26 | class CompanyDocument |
||
| 27 | { |
||
| 28 | #[ORM\Id] |
||
| 29 | #[ORM\GeneratedValue(strategy: 'IDENTITY')] |
||
| 30 | #[ORM\Column(type: 'integer')] |
||
| 31 | private int $id = 0; |
||
| 32 | |||
| 33 | #[ORM\ManyToOne(targetEntity: People::class, inversedBy: 'company_document')] |
||
| 34 | #[ORM\JoinColumn(name: 'people_id', referencedColumnName: 'id', nullable: false)] |
||
| 35 | #[Groups(['company_document:read', 'company_document:write'])] |
||
| 36 | private People $people; |
||
| 37 | |||
| 38 | #[ORM\ManyToOne(targetEntity: DocumentType::class, inversedBy: 'company_document')] |
||
| 39 | #[ORM\JoinColumn(name: 'document_type_id', referencedColumnName: 'id', nullable: false)] |
||
| 40 | #[Groups(['company_document:read', 'company_document:write'])] |
||
| 41 | private DocumentType $document_type; |
||
| 42 | |||
| 43 | public function getId(): int |
||
| 44 | { |
||
| 45 | return $this->id; |
||
| 46 | } |
||
| 47 | |||
| 48 | public function getPeople(): People |
||
| 49 | { |
||
| 50 | return $this->people; |
||
| 51 | } |
||
| 52 | |||
| 53 | public function setPeople(People $people): self |
||
| 54 | { |
||
| 55 | $this->people = $people; |
||
| 56 | return $this; |
||
| 57 | } |
||
| 58 | |||
| 59 | public function getDocumentType(): DocumentType |
||
| 60 | { |
||
| 61 | return $this->document_type; |
||
| 62 | } |
||
| 63 | |||
| 64 | public function setDocumentType(DocumentType $document_type): self |
||
| 65 | { |
||
| 66 | $this->document_type = $document_type; |
||
| 67 | return $this; |
||
| 68 | } |
||
| 69 | } |
||
| 70 |
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