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

Inject extension is not called as last extension #88

Closed
KacerCZ opened this issue Nov 9, 2015 · 2 comments
Closed

Inject extension is not called as last extension #88

KacerCZ opened this issue Nov 9, 2015 · 2 comments

Comments

@KacerCZ
Copy link

@KacerCZ KacerCZ commented Nov 9, 2015

In Nette\DI\Compiler::processExtensions() (https://github.com/nette/di/blob/master/src/DI/Compiler.php#L159) is InjectExtension moved to end of list of extension.

If any extension is later added by ExtensionsExtension, then new extension is added after InjectExtension. This means, that any services added in extension in beforeCompile() can't take advantage of InjectExtension.

I believe, that line 159 (moving InjectExtension to end of extensions) should be after calling ExtensionsExtension::loadConfiguration() to line 168.

dg added a commit that referenced this issue Jan 13, 2016
…nsExtension [Closes #88]
dg added a commit that referenced this issue Jan 13, 2016
…nsExtension [Closes #88]
@dg dg closed this in 629f157 Jan 13, 2016
@fprochazka

This comment has been minimized.

Copy link
Contributor

@fprochazka fprochazka commented Jan 14, 2016

@dg nice, IMHO this should be done also for DecoratorExtension, which should be added before InjectExtension. What do you think?

@dg

This comment has been minimized.

Copy link
Member

@dg dg commented Jan 20, 2016

I am not sure, tags added via DecoratorExtension should be added soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.