forked from akeneo/pim-community-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php_cd
101 lines (93 loc) · 3.64 KB
/
.php_cd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
use Akeneo\CouplingDetector\Configuration\Configuration;
use Akeneo\CouplingDetector\Configuration\DefaultFinder;
use Akeneo\CouplingDetector\Domain\Rule;
use Akeneo\CouplingDetector\Domain\RuleInterface;
$finder = new DefaultFinder();
$finder->notPath('Oro');
$finder->notPath('Acme');
$finder->notPath('spec');
$cBusinessDeps = [
'Symfony\Component\Serializer',
'Symfony\Component\Validator',
'Symfony\Component\EventDispatcher',
'Symfony\Component\Security\Core', // for the moment, let's discuss about that later
];
$cUtilsDeps = [
'Symfony\Component\OptionsResolver',
'Symfony\Component\PropertyAccess',
'Symfony\Component\Filesystem',
'Symfony\Component\Yaml',
'Doctrine\Common\Collections',
'Doctrine\Common\Util\Inflector',
'Doctrine\Common\Util\ClassUtils',
'Doctrine\Common\Persistence\ObjectRepository',
'Akeneo\Component\StorageUtils',
];
$cDeps = array_merge($cBusinessDeps, $cUtilsDeps);
$cAkeneoRules = [
new Rule('Akeneo\Component\Analytics', $cDeps, RuleInterface::TYPE_ONLY),
new Rule('Akeneo\Component\Batch', $cDeps, RuleInterface::TYPE_ONLY),
new Rule('Akeneo\Component\Buffer', $cDeps, RuleInterface::TYPE_ONLY),
new Rule(
'Akeneo\Component\Classification',
array_merge($cDeps, [
'Gedmo\Tree\RepositoryInterface', // used as base tree library
]),
RuleInterface::TYPE_ONLY
),
new Rule('Akeneo\Component\Console', $cDeps, RuleInterface::TYPE_ONLY, 'have no real existence, should be merged into Batch'),
new Rule(
'Akeneo\Component\FileStorage',
array_merge($cDeps, [
'League\Flysystem', // used as base file storage system
]),
RuleInterface::TYPE_ONLY
),
new Rule('Akeneo\Component\Localization', $cDeps, RuleInterface::TYPE_ONLY),
new Rule('Akeneo\Component\StorageUtils', $cDeps, RuleInterface::TYPE_ONLY),
new Rule('Akeneo\Component\Versioning', $cDeps, RuleInterface::TYPE_ONLY),
];
$cPimRules = [
new Rule(
'Pim\Component\Catalog',
array_merge($cDeps, [
'Akeneo\Component\Localization', // to localize product's data
'Akeneo\Component\FileStorage', // for product categories
'Akeneo\Component\Classification', // to handle product's media
'Akeneo\Component\Versioning', // for the history of all models
]),
RuleInterface::TYPE_ONLY
),
new Rule(
'Pim\Component\Connector',
array_merge($cDeps, [
'Box\Spout', // to import/export CSV and XLSX files
'Akeneo\Component\Batch', // used as base import/export system
'Akeneo\Component\Buffer', // to handle large files
'Akeneo\Component\FileStorage', // to import/export product's media
'Pim\Component\Catalog', // because ;)
'Pim\Component\Localization', // to check the localized data during an import
]),
RuleInterface::TYPE_ONLY
),
new Rule(
'Pim\Component\Localization',
array_merge($cDeps, [
'Pim\Component\Catalog', // because ;)
'Symfony\Component\Translation', // to translate units of the metric attribute types
]),
RuleInterface::TYPE_ONLY
),
new Rule(
'Pim\Component\ReferenceData',
array_merge($cDeps, [
'Pim\Component\Catalog', // because ;)
]),
RuleInterface::TYPE_ONLY
),
new Rule('Pim\Component\User', $cDeps, RuleInterface::TYPE_ONLY),
];
$rules = array_merge($cAkeneoRules, $cPimRules);
$config = new Configuration($rules, $finder);
return $config;