File tree Expand file tree Collapse file tree 4 files changed +14
-12
lines changed Expand file tree Collapse file tree 4 files changed +14
-12
lines changed Original file line number Diff line number Diff line change 55use Symfony \Component \HttpFoundation \Request ;
66use Symfony \Component \HttpFoundation \Response ;
77use Symfony \Component \HttpKernel \DataCollector \DataCollector ;
8+
89use VCR \VCRBundle \VCR \Logger ;
910
1011class 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 ();
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -14,17 +14,18 @@ Install the behavior adding `php-vcr/vcr-bundle` to your composer.json or
1414from 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
Original file line number Diff line number Diff line change 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" : {
You can’t perform that action at this time.
0 commit comments