Skip to content

Commit 7dbafba

Browse files
authored
Merge pull request #1 from odolbeau/tiime-to-bab
From tiime to bab
2 parents 78e5bd6 + 19e4ad3 commit 7dbafba

21 files changed

Lines changed: 1288 additions & 510 deletions

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Tiime
3+
Copyright (c) 2025 Olivier Dolbeau
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Tiime TestedRoutesCheckerBundle
1+
# TestedRoutesCheckerBundle
22

33
A bundle to ensure all routes of a Symfony application have been tested.
44

55
## How it works?
66

7-
1. Launch your tests using PHPUnit or anything else. All called routes will be stored in `var/cache/tiime_tested_routes_checker_bundle_route_storage`.
8-
2. Run `php bin/console tiime:tested-routes-checker:check` to have a small report of what's tested and what's not!
7+
1. Launch your tests using PHPUnit or anything else. All called routes will be stored in `var/cache/bab_tested_routes_checker_bundle_route_storage`.
8+
2. Run `php bin/console bab:tested-routes-checker:check` to have a small report of what's tested and what's not!
99

1010
## Installation
1111

@@ -18,7 +18,7 @@ documentation.
1818
Open a command console, enter your project directory and execute:
1919

2020
```console
21-
composer require tiime/tested-routes-checker-bundle
21+
composer require bab/tested-routes-checker-bundle
2222
```
2323

2424
### Applications that don't use Symfony Flex
@@ -29,7 +29,7 @@ Open a command console, enter your project directory and execute the
2929
following command to download the latest stable version of this bundle:
3030

3131
```console
32-
composer require tiime/tested-routes-checker-bundle
32+
composer require bab/tested-routes-checker-bundle
3333
```
3434

3535
#### Step 2: Enable the Bundle
@@ -42,10 +42,10 @@ in the `config/bundles.php` file of your project:
4242

4343
return [
4444
// ...
45-
Tiime\TestedRoutesCheckerBundle\TiimeTestedRoutesCheckerBundle::class => ['dev' => true, 'test' => true],
45+
Bab\TestedRoutesCheckerBundle\BabTestedRoutesCheckerBundle::class => ['dev' => true, 'test' => true],
4646
];
4747
```
4848

4949
## Using baseline to ignore some routes
5050

51-
You can ignore some routes with a `.tiime-trc-baseline` file with 1 route per line.
51+
You can ignore some routes with a `.bab-trc-baseline` file with 1 route per line.

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
2-
"name": "tiime/tested-routes-checker-bundle",
2+
"name": "bab/tested-routes-checker-bundle",
33
"description": "A bundle to ensure all routes of a Symfony application have been tested",
44
"type": "symfony-bundle",
55
"license": "MIT",
66
"autoload": {
77
"psr-4": {
8-
"Tiime\\TestedRoutesCheckerBundle\\": "src/"
8+
"Bab\\TestedRoutesCheckerBundle\\": "src/"
99
}
1010
},
1111
"autoload-dev": {
1212
"psr-4": {
13-
"Tiime\\TestedRoutesCheckerBundle\\Tests\\": "tests/"
13+
"Bab\\TestedRoutesCheckerBundle\\Tests\\": "tests/"
1414
}
1515
},
1616
"require": {

config/services.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,28 @@
44

55
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
66

7-
use Tiime\TestedRoutesCheckerBundle\Analysis\Analyser;
8-
use Tiime\TestedRoutesCheckerBundle\Command\CheckCommand;
9-
use Tiime\TestedRoutesCheckerBundle\RouteStorage\FileRouteStorage;
7+
use Bab\TestedRoutesCheckerBundle\Analysis\Analyser;
8+
use Bab\TestedRoutesCheckerBundle\Command\CheckCommand;
9+
use Bab\TestedRoutesCheckerBundle\RouteStorage\FileRouteStorage;
1010

1111
return static function (ContainerConfigurator $container) {
1212
$container->services()
13-
->set('tiime_tested_routes_checker_bundle.analysis.analyser', Analyser::class)
13+
->set('bab_tested_routes_checker_bundle.analysis.analyser', Analyser::class)
1414
->args([
1515
service('router'),
16-
service('tiime_tested_routes_checker_bundle.route_storage.file'),
16+
service('bab_tested_routes_checker_bundle.route_storage.file'),
1717
])
1818

19-
->set('tiime_tested_routes_checker_bundle.route_storage.file', FileRouteStorage::class)
19+
->set('bab_tested_routes_checker_bundle.route_storage.file', FileRouteStorage::class)
2020
->args([
21-
param('tiime_tested_routes_checker_bundle.route_storage_file'),
21+
param('bab_tested_routes_checker_bundle.route_storage_file'),
2222
])
2323

24-
->set('tiime_tested_routes_checker_bundle.command.check', CheckCommand::class)
24+
->set('bab_tested_routes_checker_bundle.command.check', CheckCommand::class)
2525
->args([
26-
service('tiime_tested_routes_checker_bundle.analysis.analyser'),
27-
param('tiime_tested_routes_checker_bundle.maximum_number_of_routes_to_display'),
28-
param('tiime_tested_routes_checker_bundle.routes_to_ignore_file'),
26+
service('bab_tested_routes_checker_bundle.analysis.analyser'),
27+
param('bab_tested_routes_checker_bundle.maximum_number_of_routes_to_display'),
28+
param('bab_tested_routes_checker_bundle.routes_to_ignore_file'),
2929
])
3030
->tag('console.command')
3131
;

config/services_test.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
66

7+
use Bab\TestedRoutesCheckerBundle\EventListener\KernelRequestListener;
78
use Symfony\Component\HttpKernel\KernelEvents;
8-
use Tiime\TestedRoutesCheckerBundle\EventListener\KernelRequestListener;
99

1010
return static function (ContainerConfigurator $container) {
1111
$container->services()
12-
->set('tiime_tested_routes_checker_bundle.listener.kernel_request_listener', KernelRequestListener::class)
12+
->set('bab_tested_routes_checker_bundle.listener.kernel_request_listener', KernelRequestListener::class)
1313
->args([
14-
service('tiime_tested_routes_checker_bundle.route_storage.file'),
14+
service('bab_tested_routes_checker_bundle.route_storage.file'),
1515
])
1616
->tag('kernel.event_listener', ['event' => KernelEvents::RESPONSE])
1717
;

src/Analysis/Analyser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
declare(strict_types=1);
44

5-
namespace Tiime\TestedRoutesCheckerBundle\Analysis;
5+
namespace Bab\TestedRoutesCheckerBundle\Analysis;
66

7+
use Bab\TestedRoutesCheckerBundle\RouteStorage\RouteStorageInterface;
78
use Symfony\Component\Routing\RouterInterface;
8-
use Tiime\TestedRoutesCheckerBundle\RouteStorage\RouteStorageInterface;
99

1010
/**
1111
* @internal

src/Analysis/AnalysisResult.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Tiime\TestedRoutesCheckerBundle\Analysis;
5+
namespace Bab\TestedRoutesCheckerBundle\Analysis;
66

77
/**
88
* @internal
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22

33
declare(strict_types=1);
44

5-
namespace Tiime\TestedRoutesCheckerBundle;
5+
namespace Bab\TestedRoutesCheckerBundle;
66

77
use Symfony\Component\Config\Definition\Configurator\DefinitionConfigurator;
88
use Symfony\Component\DependencyInjection\ContainerBuilder;
99
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
1010
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
1111

12-
class TiimeTestedRoutesCheckerBundle extends AbstractBundle
12+
class BabTestedRoutesCheckerBundle extends AbstractBundle
1313
{
1414
public function configure(DefinitionConfigurator $definition): void
1515
{
1616
/* @phpstan-ignore-next-line */
1717
$definition->rootNode()
1818
->children()
1919
->integerNode('maximum_number_of_routes_to_display')->defaultValue(25)->end()
20-
->scalarNode('routes_to_ignore_file')->defaultValue('%kernel.project_dir%/.tiime-trc-baseline')->end()
21-
->scalarNode('route_storage_file')->defaultValue('%kernel.project_dir%/var/cache/tiime_tested_routes_checker_bundle_route_storage')->end()
20+
->scalarNode('routes_to_ignore_file')->defaultValue('%kernel.project_dir%/.bab-trc-baseline')->end()
21+
->scalarNode('route_storage_file')->defaultValue('%kernel.project_dir%/var/cache/bab_tested_routes_checker_bundle_route_storage')->end()
2222
->end()
2323
;
2424
}
@@ -32,8 +32,8 @@ public function loadExtension(array $config, ContainerConfigurator $container, C
3232
$container->import('../config/services_test.php');
3333
}
3434

35-
$container->parameters()->set('tiime_tested_routes_checker_bundle.maximum_number_of_routes_to_display', $config['maximum_number_of_routes_to_display']);
36-
$container->parameters()->set('tiime_tested_routes_checker_bundle.routes_to_ignore_file', $config['routes_to_ignore_file']);
37-
$container->parameters()->set('tiime_tested_routes_checker_bundle.route_storage_file', $config['route_storage_file']);
35+
$container->parameters()->set('bab_tested_routes_checker_bundle.maximum_number_of_routes_to_display', $config['maximum_number_of_routes_to_display']);
36+
$container->parameters()->set('bab_tested_routes_checker_bundle.routes_to_ignore_file', $config['routes_to_ignore_file']);
37+
$container->parameters()->set('bab_tested_routes_checker_bundle.route_storage_file', $config['route_storage_file']);
3838
}
3939
}

src/Command/CheckCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

33
declare(strict_types=1);
44

5-
namespace Tiime\TestedRoutesCheckerBundle\Command;
5+
namespace Bab\TestedRoutesCheckerBundle\Command;
66

7+
use Bab\TestedRoutesCheckerBundle\Analysis\Analyser;
8+
use Bab\TestedRoutesCheckerBundle\IgnoredRoutesStorage;
79
use Symfony\Component\Console\Attribute\AsCommand;
810
use Symfony\Component\Console\Command\Command;
911
use Symfony\Component\Console\Input\InputInterface;
1012
use Symfony\Component\Console\Input\InputOption;
1113
use Symfony\Component\Console\Output\OutputInterface;
1214
use Symfony\Component\Console\Style\SymfonyStyle;
13-
use Tiime\TestedRoutesCheckerBundle\Analysis\Analyser;
14-
use Tiime\TestedRoutesCheckerBundle\IgnoredRoutesStorage;
1515

1616
#[AsCommand(
17-
name: 'tiime:tested-routes-checker:check',
17+
name: 'bab:tested-routes-checker:check',
1818
description: 'Ensure all routes have been tested during previous PHPUnit run(s).',
1919
)]
2020
class CheckCommand extends Command

src/EventListener/KernelRequestListener.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
declare(strict_types=1);
44

5-
namespace Tiime\TestedRoutesCheckerBundle\EventListener;
5+
namespace Bab\TestedRoutesCheckerBundle\EventListener;
66

7+
use Bab\TestedRoutesCheckerBundle\RouteStorage\RouteStorageInterface;
78
use Symfony\Component\HttpKernel\Event\ResponseEvent;
8-
use Tiime\TestedRoutesCheckerBundle\RouteStorage\RouteStorageInterface;
99

1010
final class KernelRequestListener
1111
{

0 commit comments

Comments
 (0)