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

"Missing method" in service calls #755

Closed
Haehnchen opened this issue Jun 20, 2016 · 7 comments
Closed

"Missing method" in service calls #755

Haehnchen opened this issue Jun 20, 2016 · 7 comments
Labels

Comments

@Haehnchen
Copy link
Owner

origin: Haehnchen/idea-php-annotation-plugin#57

PhpStorm annotates Missing method in all my service calls that call a method that is in a trait.
Example :

my_service:
    class: My\Service
    calls:
        - [setContainer, ["@service_container"]] #"Missing method"
namespace My;

use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;

class Service implements ContainerAwareInterface {
    use ContainerAwareTrait;
}

The ContainerAwareTrait contains the setContainer method.

Using PhpStorm 2016.1.2 with plugin 0.12.120.

@Haehnchen
Copy link
Owner Author

Haehnchen commented Jul 5, 2016

@skobkin
Copy link

skobkin commented Dec 19, 2016

Seems like same behavior happens when extending from abstract class.

@stampycode
Copy link

This even happens on simple classes, no extensions, no traits, no interfaces.

@Haehnchen can you please rename the title to remove the "when using traits" part?

@Growiel
Copy link

Growiel commented Apr 12, 2017

I can confirm that.

calls:
      - [setLocale, [ %locale%] ]

Says that %locale% is "Method not found"... but it's not a method, it's a parameter.

@stampycode
Copy link

Also you should now be putting %locale% in quotes, as per latest Yaml spec, and for Symfony3 compat.

@Growiel
Copy link

Growiel commented Apr 12, 2017

You are correct, but that doesn't change the issue.

@Haehnchen Haehnchen changed the title "Missing method" in service calls when using traits "Missing method" in service calls Apr 16, 2017
@Haehnchen Haehnchen added fixed and removed todo labels Apr 16, 2017
@Haehnchen
Copy link
Owner Author

fixed

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

4 participants