Skip to content

Commit 8e7471e

Browse files
committed
fix: allow muting deprecation warning via. pillar/config entry
1 parent e97eeae commit 8e7471e

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

php/deprecated.sls

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# -*- coding: utf-8 -*-
22
# vim: ft=sls
33

4+
{#- Evaluating as `False` by default, using this method since `defaults.yaml` not available in this repo #}
5+
{%- if not salt['config.get']('php').get('warning_messages', {}).get('v1.0.0', {}).get('mute_critical', False) %}
46
php-deprecated-in-v1.0.0-test-succeed:
57
test.succeed_without_changes:
68
- name: |
@@ -25,5 +27,15 @@ php-deprecated-in-v1.0.0-test-succeed:
2527
# To migrate from the old `php`, the first step is to convert to `php.ng`, #
2628
# before `v1.0.0` is released. #
2729
# #
30+
# To prevent this message being displayed again, set the pillar/config value: #
31+
# #
32+
# ``` #
33+
# php: #
34+
# warning_messages: #
35+
# v1.0.0: #
36+
# mute_critical: True #
37+
# ``` #
38+
# #
2839
################################################################################
2940
# - failhard: True
41+
{%- endif %}

pillar.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
## php.ng pillar examples
22

33
php:
4+
# Use the following values to mute deprecation warnings
5+
warning_messages: #
6+
v1.0.0: #
7+
mute_critical: True #
48
# Use external repository instead the default (only Ubuntu family)
59
use_external_repo: True
610
# Set the external repository name (valid only if use_external_repo is not none)

0 commit comments

Comments
 (0)