web-dev-qa-db-fra.com

Erreur fatale: Méthode Class @ Anonymous :: __ Tostring () Ne doit pas jeter une exception après composer Installation

bonjour j'ai une erreur lorsque je fais un composer installer et lequel cache: clair.

  • J'utilise Symfony 4.1
  • Je supprime déjà /var & /Vendeur
  • Je suis sur Docker (PHP)
composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Package doctrine/reflection is abandoned, you should avoid using it. Use roave/better-reflection instead.
Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
Package symfony/lts is abandoned, you should avoid using it. Use symfony/flex instead.
Package symfony/webpack-encore-pack is abandoned, you should avoid using it. Use symfony/webpack-encore-bundle instead.
Package zendframework/zend-code is abandoned, you should avoid using it. Use laminas/laminas-code instead.
Package zendframework/zend-eventmanager is abandoned, you should avoid using it. Use laminas/laminas-eventmanager instead.
Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
102 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Run composer recipes at any time to see the status of your Symfony recipes.

Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 255
!!  Xdebug: [Config] Invalid mode '1' set for 'xdebug.mode' configuration setting (See: https://xdebug.org/docs/errors#CFG-C-MODE)
!!  
!!  Fatal error: Method class@anonymous::__toString() must not throw an exception, caught Symfony\Component\DependencyInjection\Exception\AutowiringFailedException:  in /var/www/symfony/vendor/symfony/dependency-injection/Compiler/AutowirePass.php on line 236
!!  
!!  Call Stack:
!!      0.0004     403344   1. {main}() /var/www/symfony/bin/console:0
!!      0.1875    2144496   2. Symfony\Bundle\FrameworkBundle\Console\Application->run($input = class Symfony\Component\Console\Input\ArgvInput 
!!      5.8396   32162400  18. Symfony\Component\DependencyInjection\Compiler\AutowirePass->Symfony\Component\DependencyInjection\Compiler\{closure:/var/www/symfony/vendor/symfony/dependency-injection/Compiler/AutowirePass.php:229-241}() /var/www/symfony/vendor/symfony/dependency-injection/Compiler/AutowirePass.php:261
!!  
!!  
!!  In AutowirePass.php line 236:
!!                                                                                 
!!    Error: Method class@anonymous::__toString() must not throw an exception, ca  
!!    ught Symfony\Component\DependencyInjection\Exception\AutowiringFailedExcept  
!!    ion:                                                                         
!!                                                                                 
!!  
!!  
Script @auto-scripts was called via post-install-cmd

J'ai essayé de suivre cela problème mais rien ne fonctionne (ne travaille pas dans le développement pour moi)

Mon compositeur.json

{
    "type": "project",
    "license": "proprietary",
    "require": {
        "php": "^7.1.3",
        "ext-iconv": "*",
        "accord/mandrill-swiftmailer-bundle": "^1.3",
        "api-platform/api-pack": "^1.1",
        "composer/package-versions-deprecated": "1.11.99.1",
        "doctrine/doctrine-bundle": "^1.0",
        "doctrine/doctrine-migrations-bundle": "^2.2",
        "doctrine/orm": "^2.7",
        "friendsofsymfony/ckeditor-bundle": "^2.1",
        "friendsofsymfony/user-bundle": "~2.0",
        "knplabs/knp-paginator-bundle": "^4.0",
        "paragonie/random_compat": "^2.0",
        "ramsey/uuid-doctrine": "^1.4",
        "sensio/framework-extra-bundle": "^5.1",
        "sentry/sentry-symfony": "^3.1",
        "stof/doctrine-extensions-bundle": "^1.3",
        "symfony/asset": "^4.1",
        "symfony/console": "^4.1",
        "symfony/dotenv": "^4.1",
        "symfony/expression-language": "^4.1",
        "symfony/flex": "^1.0",
        "symfony/form": "^4.1",
        "symfony/framework-bundle": "^4.1",
        "symfony/lts": "^4@dev",
        "symfony/monolog-bundle": "^3.1",
        "symfony/process": "^4.1",
        "symfony/security-bundle": "^4.1",
        "symfony/serializer-pack": "*",
        "symfony/swiftmailer-bundle": "^3.1",
        "symfony/translation": "^4.1",
        "symfony/twig-bundle": "^4.1",
        "symfony/validator": "^4.1",
        "symfony/web-link": "^4.1",
        "symfony/webpack-encore-pack": "*",
        "symfony/yaml": "^4.1",
        "vich/uploader-bundle": "^1.9"
    },
    "require-dev": {
        "hautelook/alice-bundle": "^2.0",
        "doctrine/data-fixtures": "^1.3",
        "behat/behat": "^3.4",
        "symfony/debug-pack": "*",
        "symfony/maker-bundle": "^1.0",
        "symfony/phpunit-bridge": "^4.1",
        "symfony/profiler-pack": "*",
        "symfony/test-pack": "^1.0",
        "symfony/web-server-bundle": "^4.1"
    },
    "config": {
        "preferred-install": {
            "*": "dist"
        },
        "sort-packages": true
    },
    "autoload": {
        "psr-4": {
            "App\\": "src/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "App\\Tests\\": "tests/"
        }
    },
    "replace": {
        "symfony/polyfill-iconv": "*",
        "symfony/polyfill-php71": "*",
        "symfony/polyfill-php70": "*",
        "symfony/polyfill-php56": "*"
    },
    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },
    "conflict": {
        "symfony/symfony": "*"
    },
    "extra": {
        "symfony": {
            "allow-contrib": false
        }
    }
}

Si quelqu'un a même une idée stupide, je vais le prendre. J'ai été coincé dessus pendant une longue période ...

8
Arnaud Bagnis

En plus de la réponse de Romain (qui devrait être la réponse acceptée). Pour l'option 1, suivez cette étape avant d'installer la version ancienne https://howtoInstall.co/fr/ubuntu/xenial/php-xdebug?Action=ReMove

0
SpicyTacos23