-
| 
         I am (unsuccesfully) trying to get Sentry installed in a Symfony 3 project. I had a look at the other Symfony 3 thread and a related issue without finding an answer, so thought I could give this a go. The first error I got was      Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface:
        '@Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory'
    Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface:
        '@Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory'
    Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory: null
    Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory: nullFully admit (as mainly a Java/Javascript/.NET/Haskell dev) I am not sure what this is supposed to do, but AFAIK the PSR stuff in general is about the community landing on standardized approaches/interfaces to doing X, so this is probably about the Sentry plugin using some standardized approach that Symfony 3 does not know about and this is supposed to wire that support in (?). I am obviously not doing it right, as after adding the previous lines I get  Starting up Symfony ...
PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Too few arguments to function Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory::__construct(), 0 passed in /Users/my-user/dev/ACME-api/var/cache/dev/ContainerZgmg21d/appDevDebugProjectContainer.php on line 1476 and exactly 4 expected in /Users/my-user/dev/ACME-api/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php:38
Stack trace:
#0 /Users/my-user/dev/ACME-api/var/cache/dev/ContainerZgmg21d/appDevDebugProjectContainer.php(1476): Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory->__construct()
#1 /Users/my-user/dev/ACME-api/var/cache/dev/ContainerZgmg21d/appDevDebugProjectContainer.php(1619): ContainerZgmg21d\appDevDebugProjectContainer->getHubInterfaceService()
#2 /Users/my-user/dev/ACME-api/var/cache/dev/ContainerZgmg21d/getAnnotations_CacheService.php(8): ContainerZgmg21d\appDevDebugProjectContainer->getCache_Annotations_TraceableService()
#3 /Users/my-user/dev/ACME-api/var/cache/dev/Container in /Users/my-user/dev/ACME-api/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php on line 38
Fatal error: Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Type error: Too few arguments to function Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory::__construct(), 0 passed in /Users/my-user/dev/ACME-api/var/cache/dev/ContainerZgmg21d/appDevDebugProjectContainer.php on line 1476 and exactly 4 expected in /Users/my-user/dev/ACME-api/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php:38
Stack trace:
#0 /Users/my-user/dev/ACME-api/var/cache/dev/ContainerZgmg21d/appDevDebugProjectContainer.php(1476): Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory->__construct()
#1 /Users/my-user/dev/ACME-api/var/cache/dev/ContainerZgmg21d/appDevDebugProjectContainer.php(1619): ContainerZgmg21d\appDevDebugProjectContainer->getHubInterfaceService()
#2 /Users/my-user/dev/ACME-api/var/cache/dev/ContainerZgmg21d/getAnnotations_CacheService.php(8): ContainerZgmg21d\appDevDebugProjectContainer->getCache_Annotations_TraceableService()
#3 /Users/my-user/dev/ACME-api/var/cache/dev/Container in /Users/my-user/dev/ACME-api/vendor/symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php on line 38composer.json and PHPSymfony 3.4.49 {
  "name": "my-symfony-api",
  "license": "proprietary",
  "type": "project",
  "autoload": {
    "psr-4": {
      "": "src/"
    },
    "classmap": [
      "app/AppKernel.php",
      "app/AppCache.php"
    ]
  },
  "autoload-dev": {
    "psr-4": {
      "Tests\\": "tests/"
    }
  },
  "require": {
    "php": ">=7.4",
    "ext-curl": "*",
    "ext-intl": "*",
    "ext-json": "*",
    "ext-redis": "*",
    "aws/aws-sdk-php": "^3.0",
    "chrisboulton/php-resque": "dev-master",
    "chrisboulton/php-resque-scheduler": "dev-master",
    "doctrine/doctrine-bundle": "^1.6",
    "doctrine/doctrine-cache-bundle": "^1.2",
    "doctrine/doctrine-fixtures-bundle": "^2.3",
    "doctrine/doctrine-migrations-bundle": "^1.0",
    "doctrine/orm": "2.7.5",
    "eluceo/ical": "^0.11.0",
    "facebook/graph-sdk": "^5.0",
    "friendsofsymfony/jsrouting-bundle": "1.*",
    "incenteev/composer-parameter-handler": "^2.0",
    "jms/translation-bundle": "^1.3",
    "kachkaev/assets-version-bundle": "^2.0",
    "knplabs/knp-gaufrette-bundle": "~0.3",
    "knplabs/knp-snappy-bundle": "^1.5",
    "nelmio/api-doc-bundle": "2.*",
    "nelmio/cors-bundle": "1.5.6",
    "pagerfanta/pagerfanta": "1.*",
    "ramsey/uuid": "^3.5",
    "resquebundle/resque": "2.0.9",
    "rinvex/country": "^1.0",
    "rollbar/rollbar": "^0.18",
    "sensio/distribution-bundle": "^5.0",
    "sensio/framework-extra-bundle": "^3.0.2",
    "sentry/sentry-symfony": "^4.2",
    "simplethings/entity-audit-bundle": "1.*",
    "stripe/stripe-php": "^7.110.0",
    "symfony/assetic-bundle": "2.*",
    "symfony/monolog-bundle": "^3.0",
    "symfony/polyfill-apcu": "^1.0",
    "symfony/swiftmailer-bundle": "^2.3",
    "symfony/symfony": "3.4.49",
    "twig/twig": "<2.0",
    "vich/uploader-bundle": "1.*",
    "willdurand/geocoder-bundle": "^4.0"
  },
  "require-dev": {
    "phpunit/phpunit": "^9.5",
    "sensio/generator-bundle": "^3.0",
    "squizlabs/php_codesniffer": "3.*",
    "symfony/phpunit-bridge": "^3.0",
    "symfony/test-pack": "^1.0"
  },
  "scripts": {
    "post-install-cmd": [
      "echo 'DISABLED for Docker. Run manually: bash scripts/git-hooks/setup.sh'",
      "npm install",
      "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
    ],
    "post-update-cmd": [
      "echo 'DISABLED for Docker. Run manually: bash scripts/git-hooks/setup.sh'",
      "npm install",
      "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
      "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
    ],
    "test": "phpunit tests"
  },
  "config": {
    "platform": {
      "php": "7.4"
    },
    "sort-packages": true,
    "allow-plugins": {
      "ocramius/package-versions": true,
      "composer/package-versions-deprecated": true
    }
  },
  "extra": {
    "symfony-app-dir": "app",
    "symfony-bin-dir": "bin",
    "symfony-var-dir": "var",
    "symfony-web-dir": "web",
    "symfony-tests-dir": "tests",
    "symfony-assets-install": "relative",
    "incenteev-parameters": {
      "file": "app/config/parameters.yml",
      "env-map": {
        "database_port": "PETE_DB_PORT",
        "app_redis_port": "PETE_REDIS_PORT",
        "resque_redis_port": "PETE_REDIS_PORT",
        "s3_endpoint": "PETE_S3_ENDPOINT",
        "imageproxy_addr": "PETE_IMAGEPROXY"
      }
    }
  }
} | 
  
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
| 
         Keep in mind that Symfony 3 is EOL and no longer supported. Your error seems related to   | 
  
Beta Was this translation helpful? Give feedback.
Keep in mind that Symfony 3 is EOL and no longer supported. Your error seems related to
symfony/psr-http-message-bridge/Factory/PsrHttpFactory.php, so you should check which version of that package are you using, and which constructor argument is last, so to find which dependency is missing.