Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Yaml] Expected instance of: <FQCN of last parameter> #710

Closed
MisatoTremor opened this issue Apr 7, 2016 · 2 comments
Closed

[Yaml] Expected instance of: <FQCN of last parameter> #710

MisatoTremor opened this issue Apr 7, 2016 · 2 comments
Labels

Comments

@MisatoTremor
Copy link

I think this started after updating to 0.12.115.
I get warnings for every service defined in YAML using multiple arguments. Using the following definition

services:
    foo_bar.baz_subscriber:
        class: 'Foo\BarBundle\EventSubscriber\BazSubscriber'
        arguments: ['@security.authorization_checker', '@security.token_storage', '@router']
        tags:
            - { name: 'kernel.event_subscriber' }
namespace Foo\BarBundle\EventSubscriber;

use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;

class BazSubscriber implements EventSubscriberInterface
{
    /**
     * @var AuthorizationCheckerInterface
     */
    private $authorizationChecker;
    /**
     * @var TokenStorageInterface
     */
    private $tokenStorage;
    /**
     * @var RouterInterface
     */
    private $router;

    /**
     * @param AuthorizationCheckerInterface $authorizationChecker
     * @param TokenStorageInterface         $tokenStorage
     * @param RouterInterface               $router
     */
    public function __construct(
        AuthorizationCheckerInterface $authorizationChecker,
        TokenStorageInterface $tokenStorage,
        RouterInterface $router
    ) {
        $this->authorizationChecker = $authorizationChecker;
        $this->tokenStorage = $tokenStorage;
        $this->router = $router;
    }

    // ...
}

Will show warnings for the first 2 arguments:
Expected instance of: Symfony\Component\Routing\RouterInterface

@Haehnchen
Copy link
Owner

related #626

@Haehnchen Haehnchen changed the title [YAML] Expected instance of: <FQCN of last parameter> [Yaml] Expected instance of: <FQCN of last parameter> Apr 7, 2016
@Haehnchen Haehnchen added the todo label Apr 7, 2016
Haehnchen added a commit that referenced this issue Apr 11, 2016
@Haehnchen Haehnchen added fixed and removed todo labels Apr 11, 2016
@Haehnchen
Copy link
Owner

fixed because of migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants