Skip to content

Added support for setting priority of config files#26

Closed
richard-ejem wants to merge 1 commit into
nette:masterfrom
richard-ejem:master
Closed

Added support for setting priority of config files#26
richard-ejem wants to merge 1 commit into
nette:masterfrom
richard-ejem:master

Conversation

@richard-ejem

Copy link
Copy Markdown

Configuration in parameters section of config files had hardcoded higher priority than configuration passed from parameters array passed to Compiler::compile.
I found this unhandy, because sometimes I need to override some configuration from config files in my bootstrap. It seems more logical for me that dynamically built parameters in bootstrap.php have higher priority than static config files.
For backwards compatibility, I've made this behavior optional, configurable by ContainerFactory::$configPriority.
I issued another pull request for nette/bootstrap, which which should allow to set $configurator->configPriority in bootstrap without needing to manually call ContainerFactory.

@fprochazka

Copy link
Copy Markdown
Contributor

I don't like this.

@richard-ejem

Copy link
Copy Markdown
Author

@fprochazka can you tell what's wrong with that?

@dg

dg commented Oct 26, 2014

Copy link
Copy Markdown
Member

Better solution is to allow $configurator->addConfig(array(...config...)).

@richard-ejem

Copy link
Copy Markdown
Author

Ok I'll fix it :)

Dne neděle 26. října 2014 David Grudl notifications@github.com napsal(a):

Better solution is to allow $configurator->addConfig(array(...config...)).


Reply to this email directly or view it on GitHub
#26 (comment).

@richard-ejem richard-ejem force-pushed the master branch 2 times, most recently from 55cdb1d to 61faeff Compare October 31, 2014 10:24
@richard-ejem

Copy link
Copy Markdown
Author

Fixed. now it is much simpler :) not even needing its counterpart in nette/bootstrap, I can remove that other pull request now

@dg

dg commented Nov 8, 2014

Copy link
Copy Markdown
Member

This is not correct due to

$code .= "// source: $info[0] $info[1]\n";

@dg dg closed this in b7fd926 Nov 8, 2014
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

Successfully merging this pull request may close these issues.

3 participants