Skip to content

Commit 7a7bd6a

Browse files
higidikeoz-higidi
authored andcommitted
Revert "Merge pull request #13 from php-vcr/symfony5"
This reverts commit 341950b, reversing changes made to e6c3787.
1 parent 341950b commit 7a7bd6a

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

DataCollector/VCRDataCollector.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Symfony\Component\HttpFoundation\Request;
66
use Symfony\Component\HttpFoundation\Response;
77
use Symfony\Component\HttpKernel\DataCollector\DataCollector;
8+
89
use VCR\VCRBundle\VCR\Logger;
910

1011
class VCRDataCollector extends DataCollector
@@ -16,7 +17,7 @@ public function __construct(Logger $logger)
1617
$this->logger = $logger;
1718
}
1819

19-
public function collect(Request $request, Response $response, \Throwable $exception = null)
20+
public function collect(Request $request, Response $response, \Exception $exception = null)
2021
{
2122
$requests = $this->logger->getHttpRequests();
2223
$playbacks = $this->logger->getPlaybacks();

DependencyInjection/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ public function __construct(array $factories = array())
1717

1818
public function getConfigTreeBuilder()
1919
{
20-
$treeBuilder = new TreeBuilder('vcrvcr');
21-
$rootNode = $treeBuilder->getRootNode();
20+
$treeBuilder = new TreeBuilder();
21+
$rootNode = $treeBuilder->root('vcrvcr');
2222

2323
$this->addCassetteNode($rootNode);
2424

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,18 @@ Install the behavior adding `php-vcr/vcr-bundle` to your composer.json or
1414
from CLI:
1515

1616
```bash
17-
composer require php-vcr/vcr-bundle
17+
php composer.phar require php-vcr/vcr-bundle
1818
```
1919

20-
And declare the bundle in your `config/bundles.php` file:
20+
And declare the bundle in your `app/AppKernel.php` file:
2121

2222
```php
23-
return [
24-
// ...
25-
VCR\VCRBundle\VCRVCRBundle::class => ['test' => true],
26-
];
27-
23+
public function registerBundles()
24+
{
25+
if (in_array($this->getEnvironment(), array('dev', 'test'))) {
26+
$bundles[] = new VCR\VCRBundle\VCRVCRBundle();
27+
}
28+
}
2829
```
2930

3031
## Configuration reference

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
}
1111
],
1212
"require": {
13-
"symfony/framework-bundle": "~3.0||~4.0||~5.0",
14-
"php-vcr/php-vcr": "^1.5"
13+
"symfony/framework-bundle": "~2.6||~3.0||~4.0",
14+
"php-vcr/php-vcr": "~1.2"
1515
},
1616
"autoload": {
1717
"psr-4": {

0 commit comments

Comments
 (0)