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
Update 3.3-bootstrap.php #17
Conversation
if (isset($_SERVER['KOHANA_ENV'])) | ||
{ | ||
Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV'])); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kohana::$environment = KOHANA::PRODUCTION;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're forcing ENV to be production regardless of the actual environment variables. Kohana::DEVELOPMENT
is the default environment if none provided, I don't see why that would change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bad change.
this bootstrap to display |
On staging, for example. Although I'm not sure what's up with that subdomain at the moment? |
hm.. I think the public version is always in production. ok, сorrect now. Generally, the main goal was to enable caching in the public version of the site to work faster. Would be nice to activate it for other versions. Would be nice to add caching for userguide. |
'cache_life' => 300, // 5 minutes | ||
'errors' => FALSE, | ||
'profile' => FALSE, | ||
'caching' => TRUE | ||
)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it wouldn't be bad to use Kohana::$environment
comparison for setting these 3 booleans though ?
fixed |
'cache_life' => 300, // 5 minutes | ||
'errors' => Kohana::$environment != Kohana::PRODUCTION, | ||
'profile' => Kohana::$environment != Kohana::PRODUCTION, | ||
'caching' => Kohana::$environment == Kohana::PRODUCTION | ||
)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe
'profile' => Kohana::$environment === Kohana::DEVELOPMENT,
'caching' => Kohana::$environment < Kohana::DEVELOPMENT,
Just a suggestion :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for me it's not so important. the main thing that's worked quickly and without outages due to overload. For this need use cache in PRODUCTION, other changes are minor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't matter if it is important to you. This is a framework for many people. Do it properly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shadowhand Do not find fault with my words, I badly know English and you know it. Suggest your version, choose the best of the proposed. Finally, matters is the result, not who suggested it.
No description provided.