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

Imported services without compiled container #203

Closed
mabar opened this issue Jun 20, 2019 · 0 comments
Closed

Imported services without compiled container #203

mabar opened this issue Jun 20, 2019 · 0 comments

Comments

@mabar
Copy link
Contributor

@mabar mabar commented Jun 20, 2019

Version: 3.0.0

In some very simple tests we create container directly instead of a compiled container

		$logger = new Logger('foo');
		$container = new Container();
		$container->addService('foo', $logger);

this causes error Nette\DI\Container::addService() service 'foo' should be defined as 'imported', but it is not possible without compilation of container.

Imho error should be triggered only if container is compiled (self::class !== static::class?)

@dg dg closed this in a8cbbca Jul 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.