question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"Missing method" in service calls

See original GitHub issue

origin: https://github.com/Haehnchen/idea-php-annotation-plugin/issues/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.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:9
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
stampycodecommented, Jan 5, 2017

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?

2reactions
Haehnchencommented, Apr 16, 2017

fixed

Read more comments on GitHub >

github_iconTop Results From Across the Web

Groovy: Missing Method Exception when calling Java API
It is trying to invoke SimpleDateFormat::parse(String, Closure) which doesn't exist. There seems to be a typo somewhere. It is working fine under groovy ......
Read more >
Missing ')' in method call. - TechNet - Microsoft
If I run the following from within a powershell command prompt, I get success. $objuser = [ADSI] ("WinNT://sccmtest/PDCSCCMSQL$");$objgroup ...
Read more >
No error for missing method call · Issue #35557 - GitHub
Expected behavior: Error on isDirectory . This is a method but it has not been called. Actual behavior: No error reported.
Read more >
Missing method to method (call stack information) - Agents
I'm used to seeing the Java methods, but all I see is the Spring MVC Controller, the calls out via Spring RestTemplate or...
Read more >
Attempt To Call Missing Method 'Play' Of Table Error
So I'm trying to make something that will play all the tweens in a table at once but it's throwing me errors, any...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found