1 | <?php |
||
2 | |||
3 | namespace App\Fixture; |
||
4 | |||
5 | use App\Entity\Organization as OrganizationEntity; |
||
6 | use Doctrine\Common\Persistence\ObjectManager; |
||
0 ignored issues
–
show
|
|||
7 | use Ds\Component\Database\Fixture\Yaml; |
||
0 ignored issues
–
show
The type
Ds\Component\Database\Fixture\Yaml 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 ![]() |
|||
8 | |||
9 | /** |
||
10 | * Trait Organization |
||
11 | */ |
||
12 | trait Organization |
||
13 | { |
||
14 | use Yaml; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | private $path; |
||
20 | |||
21 | /** |
||
22 | * {@inheritdoc} |
||
23 | */ |
||
24 | public function load(ObjectManager $manager) |
||
25 | { |
||
26 | $objects = $this->parse($this->path); |
||
27 | |||
28 | foreach ($objects as $object) { |
||
29 | $organization = new OrganizationEntity; |
||
30 | $organization |
||
31 | ->setUuid($object->uuid) |
||
32 | ->setOwner($object->owner) |
||
33 | ->setOwnerUuid($object->owner_uuid) |
||
34 | ->setTenant($object->tenant); |
||
35 | $manager->persist($organization); |
||
36 | $this->setReference($object->uuid, $organization); |
||
37 | } |
||
38 | |||
39 | $manager->flush(); |
||
40 | } |
||
41 | } |
||
42 |
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