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

Add management of an env var to disable debug toolbar in travis tests #15895

Merged
merged 1 commit into from Oct 10, 2019

Conversation

@jolelievre
Copy link
Contributor

jolelievre commented Oct 10, 2019

Questions Answers
Branch? 1.7.6.x
Description? Add management of an env var DISABLE_DEBUG_TOOLBAR to disable debug toolbar in travis tests
Type? bug fix
Category? TE
BC breaks? no
Deprecations? no
Fixed ticket? ~
How to test? Wait for build to go green

This change is Reviewable

@jolelievre jolelievre added this to the 1.7.6.2 milestone Oct 10, 2019
@jolelievre jolelievre requested a review from PrestaShop/prestashop-core-developers as a code owner Oct 10, 2019
Copy link
Contributor

matthieu-rolland left a comment

thank you @jolelievre 👍

Copy link
Contributor

PierreRambaud left a comment

You must update parameters.yml.dist and parameters.yml.travis

Copy link
Member

eternoendless left a comment

LGTM

@matks

This comment has been minimized.

Copy link
Contributor

matks commented Oct 10, 2019

I love the solution 😉 very smart

@jolelievre jolelievre dismissed stale reviews from eternoendless, matks, and matthieu-rolland via da32409 Oct 10, 2019
@jolelievre jolelievre force-pushed the jolelievre:disable-debug-toolbar branch from bc92950 to da32409 Oct 10, 2019
@jolelievre

This comment has been minimized.

Copy link
Contributor Author

jolelievre commented Oct 10, 2019

@PierreRambaud I'm not sure if these default parameters are very useful since they are overridden by set_parameters.php anyway but I added them for the future!

@@ -59,5 +59,8 @@
}
$container->setParameter('cache.driver', extension_loaded('apc') ? 'apc': 'array');
// Parameter used only in dev and test env
$container->setParameter('use_debug_toolbar', !getenv('DISABLE_DEBUG_TOOLBAR'));

This comment has been minimized.

Copy link
@PierreRambaud

PierreRambaud Oct 10, 2019

Contributor

This line erases what you defined in parameters.yml

Suggested change
$container->setParameter('use_debug_toolbar', !getenv('DISABLE_DEBUG_TOOLBAR'));
if (getenv('DISABLE_DEBUG_TOOLBAR') !== false) {
$container->setParameter('use_debug_toolbar', !getenv('DISABLE_DEBUG_TOOLBAR'));
}

This comment has been minimized.

Copy link
@jolelievre

jolelievre Oct 10, 2019

Author Contributor

@PierreRambaud done! Let's wait for the build to see if it works correctly

Copy link
Contributor

PierreRambaud left a comment

Oups forget something

@jolelievre jolelievre force-pushed the jolelievre:disable-debug-toolbar branch from da32409 to 5834de7 Oct 10, 2019
@PierreRambaud PierreRambaud merged commit cfbf6e0 into PrestaShop:1.7.6.x Oct 10, 2019
2 checks passed
2 checks passed
PrettyCI Code formatting
Details
Travis CI - Pull Request Build Passed
Details
@PierreRambaud

This comment has been minimized.

Copy link
Contributor

PierreRambaud commented Oct 10, 2019

Thanks @jolelievre

@jolelievre jolelievre deleted the jolelievre:disable-debug-toolbar branch Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.