skip to Main Content

By upgrading Symfony from 4.4 to 5.4 I’ve taken an error

Argument 2 passed to SymfonyComponentAssetVersionStrategyJsonManifestVersionStrategy::__construct() must be an instance of SymfonyContractsHttpClientHttpClientInterface or null, instance of GuzzleHttpClient given, called in /var/www/var/cache/dev/ContainerHhXYcwE/App_KernelDevDebugContainer.php

enter image description here

JsonManifestVersionStrategy is not used in the project directly. Would appreciate any help where to start from?

2

Answers


  1. Chosen as BEST ANSWER

    The answer was found in Why doesn't the asset function work in Symfony 5? posted by Anderson:

    framework:
    assets:
        json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
    

    replace it by

    framework:
    assets:
        version: 'v2'
    

  2. You need to upgrade your Guzzle to a version that implements PSR-18.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search