diff --git a/integrations/symfony-bundle.rst b/integrations/symfony-bundle.rst index a2b452e..2fda6a1 100644 --- a/integrations/symfony-bundle.rst +++ b/integrations/symfony-bundle.rst @@ -357,6 +357,30 @@ You can configure a client with authentication. Valid authentication types are Using query parameters for authentication is :ref:`not safe `. The auth params will appear on the URL and we recommend to NOT log your request, especially on production side. +VCR Plugin +`````````` + +Allow you to enable the :doc:`VCR Plugin ` and configure the behavior to use ( Replay, Record , Replay OR Record). + +.. code-block:: yaml + + // config.yml + httplug: + clients: + acme: + plugins: + - vcr: + mode: replay # record | replay | replay_or_record + fixtures_directory: '%kernel.project_dir%/fixtures/http' # mandatory for "filesystem" recorder + # recorder: filesystem + +You also specify parameters to configure your naming strategy, see :doc:`Full configuration ` for more details. + +.. warning:: + + You have to explicitly require this plugin with composer (``composer require --dev php-http/vcr-plugin``) before + using it, as it isn't shipped by default. + Special HTTP Clients ```````````````````` diff --git a/integrations/symfony-full-configuration.rst b/integrations/symfony-full-configuration.rst index c3275f0..8a5e40e 100644 --- a/integrations/symfony-full-configuration.rst +++ b/integrations/symfony-full-configuration.rst @@ -138,3 +138,12 @@ This page shows an example of all configuration values provided by the bundle. - query_defaults: parameters: locale: en + # Enable VCR plugin integration (Must be installed first). + - vcr: + mode: replay # record | replay | replay_or_record + fixtures_directory: '%kernel.project_dir%/fixtures/http' # mandatory for "filesystem" recorder + # recorder: filesystem ## Can be filesystem, in_memory or the id of your custom recorder + # naming_strategy: service_id.of.naming_strategy + # naming_strategy_options: + # hash_headers: [] + # hash_body_methods: []