silverstripe /
silverstripe-externallinks
| 1 | <?php |
||
| 2 | |||
| 3 | namespace SilverStripe\ExternalLinks\Jobs; |
||
| 4 | |||
| 5 | use Symbiote\QueuedJobs\Services\AbstractQueuedJob; |
||
|
0 ignored issues
–
show
|
|||
| 6 | use Symbiote\QueuedJobs\Services\QueuedJob; |
||
|
0 ignored issues
–
show
The type
Symbiote\QueuedJobs\Services\QueuedJob 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 Loading history...
|
|||
| 7 | use SilverStripe\ExternalLinks\Tasks\CheckExternalLinksTask; |
||
| 8 | |||
| 9 | if (!class_exists(AbstractQueuedJob::class)) { |
||
| 10 | return; |
||
| 11 | } |
||
| 12 | |||
| 13 | /** |
||
| 14 | * A Job for running a external link check for published pages |
||
| 15 | * |
||
| 16 | */ |
||
| 17 | class CheckExternalLinksJob extends AbstractQueuedJob implements QueuedJob |
||
| 18 | { |
||
| 19 | |||
| 20 | public function getTitle() |
||
| 21 | { |
||
| 22 | return _t(__CLASS__ . '.TITLE', 'Checking for external broken links'); |
||
| 23 | } |
||
| 24 | |||
| 25 | public function getJobType() |
||
| 26 | { |
||
| 27 | return QueuedJob::QUEUED; |
||
| 28 | } |
||
| 29 | |||
| 30 | public function getSignature() |
||
| 31 | { |
||
| 32 | return md5(get_class($this)); |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Check an individual page |
||
| 37 | */ |
||
| 38 | public function process() |
||
| 39 | { |
||
| 40 | $task = CheckExternalLinksTask::create(); |
||
| 41 | $track = $task->runLinksCheck(1); |
||
| 42 | $this->currentStep = $track->CompletedPages; |
||
|
0 ignored issues
–
show
|
|||
| 43 | $this->totalSteps = $track->TotalPages; |
||
|
0 ignored issues
–
show
|
|||
| 44 | $this->isComplete = $track->Status === 'Completed'; |
||
|
0 ignored issues
–
show
|
|||
| 45 | } |
||
| 46 | } |
||
| 47 |
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