This repository has been archived by the owner on Feb 16, 2021. It is now read-only.
forked from akeneo/pim-community-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cd_transitional.php
73 lines (65 loc) · 2.51 KB
/
.php_cd_transitional.php
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
<?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
),
];
$rules = array_merge($cAkeneoRules, $cPimRules);
$config = new Configuration($rules, $finder);
return $config;