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

ICanBoogie / bind-symfony-dependency-injection / 38836100724

16 Oct 2026 01:37AM UTC coverage: 38.462% (-18.7%) from 57.143%
38836100724

push

github

olvlvl
Additional safety when dumping

0 of 19 new or added lines in 2 files covered. (0.0%)

20 of 52 relevant lines covered (38.46%)

0.46 hits per line

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

0.0
/src/EventListener.php
1
<?php
2

3
namespace ICanBoogie\Binding\SymfonyDependencyInjection;
4

5
use ICanBoogie\Application\ClearCacheEvent;
6

7
use function unlink;
8

9
final class EventListener
10
{
11
    /**
12
     * Unlinks the container link on {@link ClearCacheEvent}. The hashed files are not removed right away,
13
     * because running processes might be about to load them, they are pruned once old enough.
14
     */
15
    public static function on_clear_cache(ClearCacheEvent $event): void
16
    {
NEW
17
        $container = ContainerPathname::from($event->app);
×
NEW
18
        $pathname = (string) $container;
×
19

NEW
20
        if (!$container->exists()) {
×
NEW
21
            $container->prune();
×
22

23
            return;
×
24
        }
25

26
        unlink($pathname);
×
NEW
27
        $container->prune();
×
28

29
        $event->cleared("container ($pathname)");
×
30
    }
31
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc