|
31 | 31 | */
|
32 | 32 | class DumpDataCollector extends DataCollector implements DataDumperInterface
|
33 | 33 | {
|
34 |
| - private ?Stopwatch $stopwatch = null; |
35 | 34 | private string|FileLinkFormatter|false $fileLinkFormat;
|
36 | 35 | private int $dataCount = 0;
|
37 | 36 | private bool $isCollected = true;
|
38 | 37 | private int $clonesCount = 0;
|
39 | 38 | private int $clonesIndex = 0;
|
40 | 39 | private array $rootRefs;
|
41 | 40 | private string $charset;
|
42 |
| - private ?RequestStack $requestStack; |
43 |
| - private DataDumperInterface|Connection|null $dumper; |
44 | 41 | private mixed $sourceContextProvider;
|
45 | 42 | private bool $webMode;
|
46 | 43 |
|
47 |
| - public function __construct(?Stopwatch $stopwatch = null, string|FileLinkFormatter|null $fileLinkFormat = null, ?string $charset = null, ?RequestStack $requestStack = null, DataDumperInterface|Connection|null $dumper = null, ?bool $webMode = null) |
48 |
| - { |
| 44 | + public function __construct( |
| 45 | + private ?Stopwatch $stopwatch = null, |
| 46 | + string|FileLinkFormatter|null $fileLinkFormat = null, |
| 47 | + ?string $charset = null, |
| 48 | + private ?RequestStack $requestStack = null, |
| 49 | + private DataDumperInterface|Connection|null $dumper = null, |
| 50 | + ?bool $webMode = null, |
| 51 | + ) { |
49 | 52 | $fileLinkFormat = $fileLinkFormat ?: \ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
|
50 |
| - $this->stopwatch = $stopwatch; |
51 | 53 | $this->fileLinkFormat = $fileLinkFormat instanceof FileLinkFormatter && false === $fileLinkFormat->format('', 0) ? false : $fileLinkFormat;
|
52 | 54 | $this->charset = $charset ?: \ini_get('php.output_encoding') ?: \ini_get('default_charset') ?: 'UTF-8';
|
53 |
| - $this->requestStack = $requestStack; |
54 |
| - $this->dumper = $dumper; |
55 | 55 | $this->webMode = $webMode ?? !\in_array(\PHP_SAPI, ['cli', 'phpdbg', 'embed'], true);
|
56 | 56 |
|
57 | 57 | // All clones share these properties by reference:
|
@@ -180,7 +180,7 @@ public function __wakeup(): void
|
180 | 180 | }
|
181 | 181 | }
|
182 | 182 |
|
183 |
| - self::__construct($this->stopwatch, \is_string($fileLinkFormat) || $fileLinkFormat instanceof FileLinkFormatter ? $fileLinkFormat : null, \is_string($charset) ? $charset : null); |
| 183 | + self::__construct($this->stopwatch ?? null, \is_string($fileLinkFormat) || $fileLinkFormat instanceof FileLinkFormatter ? $fileLinkFormat : null, \is_string($charset) ? $charset : null); |
184 | 184 | }
|
185 | 185 |
|
186 | 186 | public function getDumpsCount(): int
|
|
0 commit comments