Enable Discovery debug logging for production troubleshooting

- Add DISCOVERY_LOG_LEVEL=debug
- Add DISCOVERY_SHOW_PROGRESS=true
- Temporary changes for debugging InitializerProcessor fixes on production
This commit is contained in:
2025-08-11 20:13:26 +02:00
parent 59fd3dd3b1
commit 55a330b223
3683 changed files with 2956207 additions and 16948 deletions

View File

@@ -0,0 +1,70 @@
<?php
declare(strict_types=1);
namespace App\Framework\Discovery\ValueObjects;
/**
* Configuration options for discovery process
*/
final readonly class DiscoveryOptions
{
public function __construct(
public ScanType $scanType = ScanType::FULL,
public array $paths = ['/src'],
public bool $useCache = true,
public bool $parallel = false,
public int $batchSize = 50,
public bool $showProgress = false,
public array $excludePatterns = [],
public array $includePatterns = ['*.php']
) {
}
public static function defaults(): self
{
return new self();
}
public function withScanType(ScanType $scanType): self
{
return new self(
scanType: $scanType,
paths: $this->paths,
useCache: $this->useCache,
parallel: $this->parallel,
batchSize: $this->batchSize,
showProgress: $this->showProgress,
excludePatterns: $this->excludePatterns,
includePatterns: $this->includePatterns
);
}
public function withPaths(array $paths): self
{
return new self(
scanType: $this->scanType,
paths: $paths,
useCache: $this->useCache,
parallel: $this->parallel,
batchSize: $this->batchSize,
showProgress: $this->showProgress,
excludePatterns: $this->excludePatterns,
includePatterns: $this->includePatterns
);
}
public function withoutCache(): self
{
return new self(
scanType: $this->scanType,
paths: $this->paths,
useCache: false,
parallel: $this->parallel,
batchSize: $this->batchSize,
showProgress: $this->showProgress,
excludePatterns: $this->excludePatterns,
includePatterns: $this->includePatterns
);
}
}