Skip to content

Commit d45bae8

Browse files
author
nb
committed
fix: add warning message for ng states
1 parent 8e7471e commit d45bae8

28 files changed

+98
-2
lines changed

php/ng/apache2/ini.sls

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,8 @@
55
{% set settings = php.ini.defaults %}
66
{% do settings.update(php.apache2.ini.settings) %}
77
8+
include:
9+
- php.ng.deprecated
10+
811
php_apache2_ini:
912
{{ php_ini(php.lookup.apache2.ini, php.apache2.ini.opts, settings) }}

php/ng/apache2/init.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{% if grains['os_family'] in ["Debian", "FreeBSD"] %}
22
include:
3+
- php.ng.deprecated
34
- php.ng.apache2.install
45
{% endif %} #END: os = Debian|FreeBSD
56
{% if grains['os_family'] == "Debian" %}

php/ng/apache2/install.sls

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{% from "php/ng/map.jinja" import php with context %}
22
3+
include:
4+
- php.ng.deprecated
5+
36
{% set state = 'apache2' %}
47
{% include "php/ng/installed.jinja" %}
58

php/ng/cli/ini.sls

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
{% from "php/ng/map.jinja" import php with context %}
33
{% from "php/ng/ini.jinja" import php_ini %}
44
5+
include:
6+
- php.ng.deprecated
7+
58
{% set settings = php.ini.defaults %}
69
{% for key, value in php.cli.ini.settings.items() %}
710
{% if settings[key] is defined %}

php/ng/cli/init.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Installs php-cli and manages the associated php.ini
22

33
include:
4+
- php.ng.deprecated
45
- php.ng.cli.install
56
- php.ng.cli.ini
67

php/ng/cli/install.sls

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{% set state = 'cli' %}
22
{% include "php/ng/installed.jinja" %}
33

4+
include:
5+
- php.ng.deprecated
6+
47
{%- if salt['grains.get']('os_family') == "Debian" %}
58
{% set current_php = salt['alternatives.show_current']('php') %}
69
{% set phpng_version = salt['pillar.get']('php:ng:version', '7.0')|string %}

php/ng/composer.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
{% set salt_user_home = salt['user.info'](salt_user).get('home', '/root') %}
1212
1313
include:
14+
- php.ng.deprecated
1415
- php.ng
1516
{% if grains['os_family'] == 'FreeBSD' %}
1617
- php.ng.filter

php/ng/deprecated.sls

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=sls
3+
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_upcoming', False) %}
6+
php-deprecated-in-v1.0.0-test-succeed:
7+
test.succeed_without_changes:
8+
- name: |
9+
10+
11+
################################################################################
12+
# #
13+
# WARNING: BREAKING CHANGES IN UPCOMING VERSION `v1.0.0` #
14+
# #
15+
################################################################################
16+
# #
17+
# This formula currently provides two methods for managing PHP; the old method #
18+
# under `php` and the new method under `php.ng`. In upcoming `v1.0.0`, the old #
19+
# method will be removed and `php.ng` will be promoted to `php` in its place. #
20+
# #
21+
# If you are not in a position to migrate, you will need to pin your repo to #
22+
# the final release tag before `v1.0.0`, which is expected to be `v0.37.1`. #
23+
# #
24+
# If you are currently using `php.ng`, there is nothing to do until `v1.0.0` #
25+
# is released. #
26+
# #
27+
# To migrate from the old `php`, the first step is to convert to `php.ng`, #
28+
# before `v1.0.0` is released. #
29+
# #
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_upcoming: True #
37+
# ``` #
38+
# #
39+
################################################################################
40+
{%- endif %}

php/ng/fpm/config.sls

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
{% from 'php/ng/map.jinja' import php with context %}
33
{% from "php/ng/ini.jinja" import php_ini %}
44
5+
include:
6+
- php.ng.deprecated
7+
58
{% set ini_settings = php.ini.defaults %}
69
{% for key, value in php.fpm.config.ini.settings.items() %}
710
{% if ini_settings[key] is defined %}

php/ng/fpm/init.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Meta-state to fully install php.fpm
22

33
include:
4+
- php.ng.deprecated
45
- php.ng.fpm.config
56
- php.ng.fpm.service
67
- php.ng.fpm.pools

0 commit comments

Comments
 (0)