1 | <?php |
||
2 | |||
3 | namespace Dtc\QueueBundle\ODM; |
||
4 | |||
5 | use Doctrine\MongoDB\Query\Builder; |
||
0 ignored issues
–
show
|
|||
6 | use Doctrine\ODM\MongoDB\DocumentManager; |
||
0 ignored issues
–
show
The type
Doctrine\ODM\MongoDB\DocumentManager 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 ![]() |
|||
7 | use Dtc\QueueBundle\Doctrine\DoctrineRunManager; |
||
8 | |||
9 | class RunManager extends DoctrineRunManager |
||
10 | { |
||
11 | 1 | use CommonTrait; |
|
12 | |||
13 | /** |
||
14 | * @return array |
||
15 | * |
||
16 | * @throws \Exception |
||
17 | */ |
||
18 | 1 | protected function getOldLiveRuns() |
|
19 | { |
||
20 | /** @var DocumentManager $objectManager */ |
||
21 | 1 | $objectManager = $this->getObjectManager(); |
|
22 | /** @var Builder $queryBuilder */ |
||
23 | 1 | $queryBuilder = $objectManager->createQueryBuilder($this->getRunClass()); |
|
24 | 1 | $queryBuilder->find(); |
|
25 | 1 | $time = time() - 86400; |
|
26 | 1 | $date = \DateTime::createFromFormat('U', strval($time)); |
|
27 | 1 | if (false === $date) { |
|
28 | throw new \Exception("Could not create DateTime object from $time"); |
||
29 | } |
||
30 | 1 | $date->setTimezone(new \DateTimeZone(date_default_timezone_get())); |
|
31 | 1 | $queryBuilder->field('lastHeartbeatAt')->lt($date); |
|
32 | |||
33 | 1 | return $queryBuilder->getQuery()->toArray(); |
|
34 | } |
||
35 | } |
||
36 |
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