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

The full class name is required for injection #1

Closed
mnapoli opened this issue Sep 4, 2012 · 0 comments
Closed

The full class name is required for injection #1

mnapoli opened this issue Sep 4, 2012 · 0 comments
Assignees
Labels
Milestone

Comments

@mnapoli
Copy link
Member

mnapoli commented Sep 4, 2012

Works:

namespace TestFixtures\DependencyManagerTest;

use DI\Annotations\Inject;

class Class1 {

    /**
     * @Inject
     * @var TestFixtures\DependencyManagerTest\Class2
     */
    private $class2;

}

Doesn't work (Class2 is in the same namespace):

namespace TestFixtures\DependencyManagerTest;

use DI\Annotations\Inject;

class Class1 {

    /**
     * @Inject
     * @var Class2
     */
    private $class2;

}

Doesn't work (Class2 is in another namespace):

namespace TestFixtures\DependencyManagerTest;

use DI\Annotations\Inject;
use AnotherNamespace\Class2;

class Class1 {

    /**
     * @Inject
     * @var Class2
     */
    private $class2;

}
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

1 participant