Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[DI] Autowiring failures failing fatally with __toString exception #30571

Copy link
Copy link
Closed
@weaverryan

Description

@weaverryan
Issue body actions

Symfony version(s) affected: I believe master branch only

Description
Autowiring failures give this exception:

Error: Method class@anonymous::__toString() must not throw an exception, caught Symfony\Component\DependencyInjection\Exception\AutowiringFailedException:

How to reproduce

In a standard project, try to autowiring using an interface that doesn't exist - e.g.

<?php

namespace App\MessageHandler;

use Symfony\Component\HttpKernel\ControllerMetadata\ArgumentMetadataFactoryInterface;

class FooHandler
{
    public function __construct(ArgumentMetadataFactoryInterface $foo)
    {
    }
}

Possible Solution
I believe this is just an edge-case/bug from #29108

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.