|
1
|
|
|
<?php declare(strict_types=1); |
|
2
|
|
|
|
|
3
|
|
|
namespace Shopware\Core\System\User\Aggregate\UserConfig; |
|
4
|
|
|
|
|
5
|
|
|
use Shopware\Core\Framework\DataAbstractionLayer\EntityDefinition; |
|
6
|
|
|
use Shopware\Core\Framework\DataAbstractionLayer\Field\FkField; |
|
7
|
|
|
use Shopware\Core\Framework\DataAbstractionLayer\Field\Flag\PrimaryKey; |
|
8
|
|
|
use Shopware\Core\Framework\DataAbstractionLayer\Field\Flag\Required; |
|
9
|
|
|
use Shopware\Core\Framework\DataAbstractionLayer\Field\IdField; |
|
10
|
|
|
use Shopware\Core\Framework\DataAbstractionLayer\Field\JsonField; |
|
11
|
|
|
use Shopware\Core\Framework\DataAbstractionLayer\Field\ManyToOneAssociationField; |
|
12
|
|
|
use Shopware\Core\Framework\DataAbstractionLayer\Field\StringField; |
|
13
|
|
|
use Shopware\Core\Framework\DataAbstractionLayer\FieldCollection; |
|
14
|
|
|
use Shopware\Core\Framework\Log\Package; |
|
15
|
|
|
use Shopware\Core\System\User\UserDefinition; |
|
16
|
|
|
|
|
17
|
|
|
#[Package('system-settings')] |
|
18
|
|
|
class UserConfigDefinition extends EntityDefinition |
|
19
|
|
|
{ |
|
20
|
|
|
final public const ENTITY_NAME = 'user_config'; |
|
21
|
|
|
|
|
22
|
|
|
public function getEntityName(): string |
|
23
|
|
|
{ |
|
24
|
|
|
return self::ENTITY_NAME; |
|
25
|
|
|
} |
|
26
|
|
|
|
|
27
|
|
|
public function getEntityClass(): string |
|
28
|
|
|
{ |
|
29
|
|
|
return UserConfigEntity::class; |
|
|
|
|
|
|
30
|
|
|
} |
|
31
|
|
|
|
|
32
|
|
|
public function getCollectionClass(): string |
|
33
|
|
|
{ |
|
34
|
|
|
return UserConfigCollection::class; |
|
35
|
|
|
} |
|
36
|
|
|
|
|
37
|
|
|
public function since(): ?string |
|
38
|
|
|
{ |
|
39
|
|
|
return '6.3.5.0'; |
|
40
|
|
|
} |
|
41
|
|
|
|
|
42
|
|
|
protected function getParentDefinitionClass(): ?string |
|
43
|
|
|
{ |
|
44
|
|
|
return UserDefinition::class; |
|
45
|
|
|
} |
|
46
|
|
|
|
|
47
|
|
|
protected function defineFields(): FieldCollection |
|
48
|
|
|
{ |
|
49
|
|
|
return new FieldCollection([ |
|
50
|
|
|
(new IdField('id', 'id'))->addFlags(new PrimaryKey(), new Required()), |
|
51
|
|
|
(new FkField('user_id', 'userId', UserDefinition::class))->addFlags(new Required()), |
|
52
|
|
|
(new StringField('key', 'key'))->addFlags(new Required()), |
|
53
|
|
|
(new JsonField('value', 'value')), |
|
54
|
|
|
|
|
55
|
|
|
(new ManyToOneAssociationField('user', 'user_id', UserDefinition::class, 'id', false)), |
|
56
|
|
|
]); |
|
57
|
|
|
} |
|
58
|
|
|
} |
|
59
|
|
|
|
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