johndwells / Minimee

Minimize & combine your CSS and JS files. Minify your HTML. Because size (still) DOES matter.
http://johndwells.github.com/Minimee
56 stars 16 forks source link

Question: Overriding disable config option #10

Closed paynecodes closed 10 years ago

paynecodes commented 11 years ago

I am having an issue disabling and enabling Minimee between environment using EE Master Config from Focus Lab LLC.

In my config.master.php, I am using:

$env_config['minimee'] = array(
    // Stripped down other config options for simplicity
    'disable'           => 'yes'
);

In my config.prod.php, I am using:

$env_config['minimee'] = array(
    // Not stripped
    // this is the only config option I would like to change
    // for the production environment
    'disable'           => 'yes'
);

I used a similar approach with Minimee v1, with the old config options and format, of course. When I set, the disable config option to 'no' in config.master.php, everything works as expected! So, I am guessing there is a better way to override a single config option for the production environment only. Any ideas? For now, I am just enabling Minimee in all environments, so no rush. This is probably due to my lack of PHP knowledge :) Thanks!

johndwells commented 10 years ago

Hi,

Sorry that I never saw this issue! I hope you managed to resolve it, but if not, here is how you should override a single config option:

$env_config['minimee']['disable'] = 'yes';

The trick is to assume that the rest of the 'minimee' key/val array has been set; then with this syntax, you're only overriding one part of that array.

Cheers, John

paynecodes commented 10 years ago

:) Thanks! PHP chops just weren't there back in the day.