• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tempestphp / tempest-framework / 14024978163

23 Mar 2025 05:55PM UTC coverage: 79.391% (-0.05%) from 79.441%
14024978163

push

github

web-flow
feat(view): cache Blade and Twig templates in internal storage (#1061)

2 of 2 new or added lines in 2 files covered. (100.0%)

912 existing lines in 110 files now uncovered.

10478 of 13198 relevant lines covered (79.39%)

91.09 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Tempest/Console/src/Commands/TailDebugLogCommand.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Tempest\Console\Commands;
6

7
use Tempest\Console\Console;
8
use Tempest\Console\ConsoleCommand;
9
use Tempest\Console\Highlight\VarExportLanguage\VarExportLanguage;
10
use Tempest\Console\Output\TailReader;
11
use Tempest\Container\Tag;
12
use Tempest\Highlight\Highlighter;
13
use Tempest\Log\LogConfig;
14

15
final readonly class TailDebugLogCommand
16
{
17
    public function __construct(
×
18
        private Console $console,
19
        private LogConfig $logConfig,
20
        #[Tag('console')]
21
        private Highlighter $highlighter,
22
    ) {
23
    }
×
24

25
    #[ConsoleCommand('tail:debug', description: 'Tails the debug log')]
×
26
    public function __invoke(): void
27
    {
28
        $debugLogPath = $this->logConfig->debugLogPath;
×
29

30
        if (! $debugLogPath) {
×
UNCOV
31
            $this->console->error('No debug log configured in <code>LogConfig</code>.');
×
32

33
            return;
×
34
        }
35

UNCOV
36
        $dir = pathinfo($debugLogPath, PATHINFO_DIRNAME);
×
37

38
        if (! is_dir($dir)) {
×
UNCOV
39
            mkdir($dir);
×
40
        }
41

UNCOV
42
        if (! file_exists($debugLogPath)) {
×
UNCOV
43
            touch($debugLogPath);
×
44
        }
45

UNCOV
46
        $this->console->header('Tailing debug logs', "Reading <file='{$debugLogPath}'/>…");
×
47

48
        new TailReader()->tail(
×
UNCOV
49
            path: $debugLogPath,
×
50
            format: fn (string $text) => $this->highlighter->parse(
×
51
                $text,
×
52
                new VarExportLanguage(),
×
53
            ),
×
54
        );
×
55
    }
56
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc