1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* MIT License |
5
|
|
|
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. |
6
|
|
|
*/ |
7
|
|
|
|
8
|
|
|
namespace SprykerEco\Zed\Econda\Business\Manager; |
9
|
|
|
|
10
|
|
|
use Generated\Shared\Transfer\LocaleTransfer; |
|
|
|
|
11
|
|
|
use Spryker\Shared\SqlCriteriaBuilder\CriteriaBuilder\CriteriaBuilderInterface; |
|
|
|
|
12
|
|
|
use SprykerEco\Zed\Econda\Business\Collector\DatabaseCollectorInterface; |
13
|
|
|
use SprykerEco\Zed\Econda\Business\Exporter\Writer\WriterInterface; |
14
|
|
|
use SprykerEco\Zed\Econda\Business\Helper\ProgressBarHelper; |
15
|
|
|
use SprykerEco\Zed\Econda\Business\Model\BatchResultInterface; |
16
|
|
|
use SprykerEco\Zed\Econda\Persistence\EcondaQueryContainerInterface; |
17
|
|
|
use Symfony\Component\Console\Output\OutputInterface; |
|
|
|
|
18
|
|
|
|
19
|
|
|
class CollectorManager implements CollectorManagerInterface |
20
|
|
|
{ |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* @var \Spryker\Shared\SqlCriteriaBuilder\CriteriaBuilder\CriteriaBuilderInterface |
24
|
|
|
*/ |
25
|
|
|
protected $criteriaBuilder; |
26
|
|
|
|
27
|
|
|
/** |
28
|
|
|
* @var \SprykerEco\Zed\Econda\Persistence\EcondaQueryContainerInterface |
29
|
|
|
*/ |
30
|
|
|
protected $queryContainer; |
31
|
|
|
|
32
|
|
|
/** @var \SprykerEco\Zed\Econda\Business\Helper\ProgressBarHelper */ |
33
|
|
|
protected $progressBarHelper; |
34
|
|
|
|
35
|
|
|
/** |
36
|
|
|
* CollectorManager constructor. |
37
|
|
|
* |
38
|
|
|
* @param \Spryker\Shared\SqlCriteriaBuilder\CriteriaBuilder\CriteriaBuilderInterface $criteriaBuilder |
39
|
|
|
* @param \SprykerEco\Zed\Econda\Persistence\EcondaQueryContainerInterface $queryContainer |
40
|
|
|
* @param \SprykerEco\Zed\Econda\Business\Helper\ProgressBarHelper $progressBarHelper |
41
|
|
|
*/ |
42
|
|
|
public function __construct( |
43
|
|
|
CriteriaBuilderInterface $criteriaBuilder, |
44
|
|
|
EcondaQueryContainerInterface $queryContainer, |
45
|
|
|
ProgressBarHelper $progressBarHelper |
46
|
|
|
) { |
47
|
|
|
$this->criteriaBuilder = $criteriaBuilder; |
48
|
|
|
$this->queryContainer = $queryContainer; |
49
|
|
|
$this->progressBarHelper = $progressBarHelper; |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @param \SprykerEco\Zed\Econda\Business\Collector\DatabaseCollectorInterface $collector |
54
|
|
|
* @param \Generated\Shared\Transfer\LocaleTransfer $locale |
55
|
|
|
* @param \SprykerEco\Zed\Econda\Business\Model\BatchResultInterface $result |
56
|
|
|
* @param \SprykerEco\Zed\Econda\Business\Exporter\Writer\WriterInterface $dataWriter |
57
|
|
|
* @param \Symfony\Component\Console\Output\OutputInterface $output |
58
|
|
|
* |
59
|
|
|
* @return void |
60
|
|
|
*/ |
61
|
|
|
public function runCollector( |
62
|
|
|
DatabaseCollectorInterface $collector, |
63
|
|
|
LocaleTransfer $locale, |
64
|
|
|
BatchResultInterface $result, |
65
|
|
|
WriterInterface $dataWriter, |
66
|
|
|
OutputInterface $output |
67
|
|
|
) { |
68
|
|
|
$batchCollection = $collector->createIteratorAndPrepareQuery($locale, $this->criteriaBuilder, $this->queryContainer); |
69
|
|
|
$progressBar = $this->progressBarHelper->startProgressBar($output, '', $batchCollection->count()); |
70
|
|
|
|
71
|
|
|
$collector->exportDataToStore($batchCollection, $result, $dataWriter, $locale, $output, $progressBar); |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
} |
75
|
|
|
|
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