Skip to content

Commit

Permalink
ApplicationExtension: presenters are excluded from autowiring via exc…
Browse files Browse the repository at this point in the history
…ludedClasses
  • Loading branch information
dg committed May 23, 2016
1 parent 819f30f commit 3adfa43
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Bridges/ApplicationDI/ApplicationExtension.php
Expand Up @@ -54,7 +54,7 @@ public function loadConfiguration()
{
$config = $this->validateConfig($this->defaults);
$builder = $this->getContainerBuilder();
$builder->addExcludedClasses([UI\Control::class]);
$builder->addExcludedClasses([UI\Presenter::class]);

$this->invalidLinkMode = $this->debugMode
? UI\Presenter::INVALID_LINK_TEXTUAL | ($config['silentLinks'] ? 0 : UI\Presenter::INVALID_LINK_WARNING)
Expand Down Expand Up @@ -109,7 +109,7 @@ public function beforeCompile()
}

foreach ($all as $def) {
$def->setInject(TRUE)->setAutowired(FALSE)->addTag('nette.presenter', $def->getClass());
$def->setInject(TRUE)->addTag('nette.presenter', $def->getClass());
if (is_subclass_of($def->getClass(), UI\Presenter::class)) {
$def->addSetup('$invalidLinkMode', [$this->invalidLinkMode]);
}
Expand Down

2 comments on commit 3adfa43

@JanTvrdik
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to close #87 as well, or not?

@dg
Copy link
Member Author

@dg dg commented on 3adfa43 May 26, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jj

Please sign in to comment.