Skip to content

Commit cc19020

Browse files
higidikeoz-higidi
authored andcommitted
Remove double VCRVCR[Bundle|Extension] and config key (changed to vcr)
1 parent dd315be commit cc19020

File tree

11 files changed

+19
-19
lines changed

11 files changed

+19
-19
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ And declare the bundle in your `config/bundles.php` file:
2222
```php
2323
return [
2424
// ...
25-
VCR\VCRBundle\VCRVCRBundle::class => ['test' => true],
25+
VCR\VCRBundle\VCRBundle::class => ['test' => true],
2626
];
2727

2828
```
2929

3030
## Configuration reference
3131

3232
```yaml
33-
vcrvcr:
33+
vcr:
3434
enabled: true
3535
library_hooks:
3636
stream_wrapper: false

src/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class Configuration implements ConfigurationInterface
1111
{
1212
public function getConfigTreeBuilder(): TreeBuilder
1313
{
14-
$treeBuilder = new TreeBuilder(VCRVCRExtension::ALIAS);
14+
$treeBuilder = new TreeBuilder(VCRExtension::ALIAS);
1515
$rootNode = $treeBuilder->getRootNode();
1616

1717
$this->addCassetteNode($rootNode);

src/DependencyInjection/VCRVCRExtension.php renamed to src/DependencyInjection/VCRExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
99
use Symfony\Component\Config\FileLocator;
1010

11-
class VCRVCRExtension extends Extension
11+
class VCRExtension extends Extension
1212
{
13-
const ALIAS = 'vcrvcr';
13+
const ALIAS = 'vcr';
1414

1515
public function load(array $configs, ContainerBuilder $container): void
1616
{

src/Resources/config/services.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ services:
33
class: VCR\VCRBundle\DataCollector\VCRDataCollector
44
arguments: [ '@vcr.logger' ]
55
tags:
6-
- { name: data_collector, template: "VCRVCRBundle:Profiler:collector", id: "vcr_collector" }
6+
- { name: data_collector, template: "VCRBundle:Profiler:collector", id: "vcr_collector" }
77

88
vcr.logger:
99
class: VCR\VCRBundle\VCR\Logger

src/Resources/views/Profiler/call.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
</ul>
2323

2424
<div class="tab-content">
25-
{% include 'VCRVCRBundle:Profiler:request.html.twig' with { 'index':index, 'request': log.request } %}
26-
{% include 'VCRVCRBundle:Profiler:response.html.twig' with { 'index':index, 'response':log.response } %}
25+
{% include 'VCRBundle:Profiler:request.html.twig' with { 'index':index, 'request': log.request } %}
26+
{% include 'VCRBundle:Profiler:response.html.twig' with { 'index':index, 'response':log.response } %}
2727
</div>
2828

2929
<div class="progress-striped" style="text-align:center;background-color:#ddd;margin:5px 0 30px 0;padding: 0;font-variant:small-caps;">
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="vcr_logs">
22
{% for index, log in logs %}
3-
{% include 'VCRVCRBundle:Profiler:call.html.twig' %}
3+
{% include 'VCRBundle:Profiler:call.html.twig' %}
44
{% endfor %}
55
</div>
66

7-
{% include 'VCRVCRBundle:Profiler:javascript.html.twig' %}
7+
{% include 'VCRBundle:Profiler:javascript.html.twig' %}

src/Resources/views/Profiler/collector.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@
3636
<h2>Intercepted Requests</h2>
3737

3838
{% if collector.requestsLogs %}
39-
{% include 'VCRVCRBundle:Profiler:calls.html.twig' with {'logs': collector.requestsLogs } %}
39+
{% include 'VCRBundle:Profiler:calls.html.twig' with {'logs': collector.requestsLogs } %}
4040
{% else %}
4141
<p>No request intercepted.</p>
4242
{% endif %}
4343

4444
<h2>Replays</h2>
4545

4646
{% if collector.playbacks %}
47-
{% include 'VCRVCRBundle:Profiler:calls.html.twig' with {'logs': collector.playbacks } %}
47+
{% include 'VCRBundle:Profiler:calls.html.twig' with {'logs': collector.playbacks } %}
4848
{% else %}
4949
<p>No request replayed.</p>
5050
{% endif %}

src/VCRVCRBundle.php renamed to src/VCRBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Symfony\Component\Filesystem\Filesystem;
77
use Symfony\Component\HttpKernel\Bundle\Bundle;
88

9-
class VCRVCRBundle extends Bundle
9+
class VCRBundle extends Bundle
1010
{
1111
public function boot(): void
1212
{

tests/Functional/ConfigurationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Symfony\Component\Config\Definition\Processor;
66
use Symfony\Component\DependencyInjection\ContainerBuilder;
77
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
8-
use VCR\VCRBundle\DependencyInjection\VCRVCRExtension;
8+
use VCR\VCRBundle\DependencyInjection\VCRExtension;
99

1010
class ConfigurationTest extends WebTestCase
1111
{
@@ -115,7 +115,7 @@ public function testConfiguration(array $expectedConfig, array $additionalConfig
115115
$this->getAdditionalConfigurationLoaderCallable($additionalConfig),
116116
],
117117
];
118-
$config = $this->getContainerConfiguration(VCRVCRExtension::ALIAS, $kernelOptions);
118+
$config = $this->getContainerConfiguration(VCRExtension::ALIAS, $kernelOptions);
119119

120120
static::assertArraySubset($expectedConfig, $config);
121121
}

tests/Functional/WebTestCase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTest;
77
use Symfony\Component\DependencyInjection\ContainerBuilder;
88
use Symfony\Component\HttpKernel\KernelInterface;
9-
use VCR\VCRBundle\DependencyInjection\VCRVCRExtension;
9+
use VCR\VCRBundle\DependencyInjection\VCRExtension;
1010
use VCR\VCRBundle\Tests\Functional\App\Kernel;
1111

1212
class WebTestCase extends BaseWebTest
@@ -43,7 +43,7 @@ protected static function createKernel(array $options = []): KernelInterface
4343

4444
protected function getAdditionalConfigurationLoaderCallable(
4545
array $config,
46-
string $extensionName = VCRVCRExtension::ALIAS
46+
string $extensionName = VCRExtension::ALIAS
4747
): callable {
4848
return function (ContainerBuilder $container) use ($config, $extensionName) {
4949
$container->loadFromExtension($extensionName, $config);

0 commit comments

Comments
 (0)