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

JMSDiExtraBundle support for annotation service definitions #838

Open
jtreminio opened this issue Dec 15, 2016 · 1 comment
Open

JMSDiExtraBundle support for annotation service definitions #838

jtreminio opened this issue Dec 15, 2016 · 1 comment

Comments

@jtreminio
Copy link

I see you added support in this ticket: #245

I have two classes:

<?php

namespace FirstBundle\Entity;

use JMS\DiExtraBundle\Annotation AS DI;

/**
 * @DI\Service("mybundle.entity.answer_type")
 */
class AnswerType
{
}

and

<?php

namespace SecondBundle\Entity;

use JMS\DiExtraBundle\Annotation AS DI;

/**
 * @DI\Service("mybundle.entity.answer_type")
 */
class AnswerType
{
}

My config looks like:

jms_di_extra:
    locations:
        all_bundles: false
        bundles:
            - FirstBundle
            - SecondBundle
        directories:
            - "%kernel.root_dir%/../src"

Instantiating the object as: $foo = $this->get('mybundle.entity.answer_type'); works, loading SecondBundle's class first before falling back to FirstBundle's.

However, the service appears undefined via PHPStorm:

image

My settings window looks like:

image

Although that is from the annotations plugin.

Every interaction I have with your plugin has been so great, and I would love for this to work as well - is it possible?

@Grummfy
Copy link

Grummfy commented Dec 16, 2016

probably linked to https://youtrack.jetbrains.com/issue/WI-34281 and several already reported issue

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

No branches or pull requests

2 participants