diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3a9875b --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/vendor/ +composer.lock diff --git a/DataCollector/VCRDataCollector.php b/DataCollector/VCRDataCollector.php index 40439de..34074c6 100644 --- a/DataCollector/VCRDataCollector.php +++ b/DataCollector/VCRDataCollector.php @@ -5,6 +5,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\DataCollector\DataCollector; + use VCR\VCRBundle\VCR\Logger; class VCRDataCollector extends DataCollector @@ -16,7 +17,7 @@ public function __construct(Logger $logger) $this->logger = $logger; } - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, \Exception $exception = null) { $requests = $this->logger->getHttpRequests(); $playbacks = $this->logger->getPlaybacks(); diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index ca2df35..01e8a88 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -17,8 +17,8 @@ public function __construct(array $factories = array()) public function getConfigTreeBuilder() { - $treeBuilder = new TreeBuilder('vcrvcr'); - $rootNode = $treeBuilder->getRootNode(); + $treeBuilder = new TreeBuilder(); + $rootNode = $treeBuilder->root('vcrvcr'); $this->addCassetteNode($rootNode); diff --git a/VCRVCRBundle.php b/VCRVCRBundle.php index 2cd6fdc..7a57408 100644 --- a/VCRVCRBundle.php +++ b/VCRVCRBundle.php @@ -5,8 +5,6 @@ use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\HttpKernel\Bundle\Bundle; -use VCR\VCRBundle\VCR\VCRFactory; - class VCRVCRBundle extends Bundle { public function boot() diff --git a/composer.json b/composer.json index d163ad8..fb6f8a3 100644 --- a/composer.json +++ b/composer.json @@ -10,8 +10,13 @@ } ], "require": { - "symfony/framework-bundle": "~3.0||~4.0||~5.0", - "php-vcr/php-vcr": "^1.5" + "php-vcr/php-vcr": "^1.2", + "symfony/config": "^2.6|^3|^4", + "symfony/dependency-injection": "^2.6|^3|^4", + "symfony/event-dispatcher": "^2.6|^3|^4", + "symfony/http-foundation": "^2.6|^3|^4", + "symfony/http-kernel": "^2.6|^3|^4", + "symfony/yaml": "^2.6|^3|^4" }, "autoload": { "psr-4": {