getRemovedBindingIds example

protected bool $skipScalars = true;

    private array $usedBindings = [];
    private array $unusedBindings = [];
    private array $errorMessages = [];

    /** * @return void */
    public function process(ContainerBuilder $container)
    {
        $this->usedBindings = $container->getRemovedBindingIds();

        try {
            parent::process($container);

            foreach ($this->unusedBindings as [$key$serviceId$bindingType$file]) {
                $argumentType = $argumentName = $message = null;

                if (str_contains($key, ' ')) {
                    [$argumentType$argumentName] = explode(' ', $key, 2);
                } elseif ('$' === $key[0]) {
                    $argumentName = $key;
                }
class ResolveBindingsPass extends AbstractRecursivePass
{
    private array $usedBindings = [];
    private array $unusedBindings = [];
    private array $errorMessages = [];

    /** * @return void */
    public function process(ContainerBuilder $container)
    {
        $this->usedBindings = $container->getRemovedBindingIds();

        try {
            parent::process($container);

            foreach ($this->unusedBindings as [$key$serviceId$bindingType$file]) {
                $argumentType = $argumentName = $message = null;

                if (str_contains($key, ' ')) {
                    [$argumentType$argumentName] = explode(' ', $key, 2);
                } elseif ('$' === $key[0]) {
                    $argumentName = $key;
                }
Home | Imprint | This part of the site doesn't use cookies.