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

Update 3.3-bootstrap.php #17

Closed
wants to merge 2 commits into from
Closed

Update 3.3-bootstrap.php #17

wants to merge 2 commits into from

Conversation

WinterSilence
Copy link

No description provided.

if (isset($_SERVER['KOHANA_ENV']))
{
Kohana::$environment = constant('Kohana::'.strtoupper($_SERVER['KOHANA_ENV']));
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this removed?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kohana::$environment = KOHANA::PRODUCTION;

Copy link
Member

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?

Copy link
Contributor

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.

@WinterSilence
Copy link
Author

this bootstrap to display kohanaframework.org or I'm missing something? when site application use another environment?

@kemo
Copy link
Member

kemo commented Apr 15, 2014

On staging, for example. Although I'm not sure what's up with that subdomain at the moment?

@WinterSilence
Copy link
Author

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
));
Copy link
Member

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 ?

@WinterSilence
Copy link
Author

fixed

'cache_life' => 300, // 5 minutes
'errors' => Kohana::$environment != Kohana::PRODUCTION,
'profile' => Kohana::$environment != Kohana::PRODUCTION,
'caching' => Kohana::$environment == Kohana::PRODUCTION
));
Copy link
Member

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 :)

Copy link
Author

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.

Copy link
Contributor

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.

Copy link
Author

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.

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.

None yet

5 participants