Closed
Description
Symfony version(s) affected: 3.4
How to reproduce
Bind a value beneath _defaults
or _instanceof
:
# config/services.yaml
services:
_defaults:
# ...
bind:
$variableName: 'someValue'
If this bind is not actually used, the error is attached to the last service that the rule was applied to. So, something like:
Unused binding "$variableName" in service ".abstract.instanceof.App\Twig\AppExtension".
A better error would be:
You have a "bind" configured for an argument named $variableName. But, this argument was not found in any of the services it was applied to. The bind may be unused and can be removed. Or, the bind may have a typo.