Skip to content

Inject extension is not called as last extension #88

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

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 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
dg added a commit that referenced this issue Jan 13, 2016
@dg dg closed this as completed in 629f157 Jan 13, 2016
@fprochazka
Copy link
Contributor

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

@dg
Copy link
Member

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants