Skip to content

Commit bc0719a

Browse files
authored
Merge pull request #185 from sticky-note/fix/non-ng-deprecation
fix: warn formula users ng states will be promoted in `v1.0.0`
2 parents 08cd563 + 3ac59e4 commit bc0719a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+220
-2
lines changed

docs/README.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,31 @@ php-formula
1616

1717
Formula to set up and configure php
1818

19+
.. list-table::
20+
:name: banner-breaking-changes-v1.0.0
21+
:header-rows: 1
22+
:widths: 1
23+
24+
* - WARNING: BREAKING CHANGES IN UPCOMING ``v1.0.0``
25+
* - This formula currently provides two methods for managing PHP; the old method
26+
under ``php`` and the new method under ``php.ng``.
27+
In upcoming `v1.0.0 <https://github.com/saltstack-formulas/php-formula/releases/tag/v1.0.0>`_,
28+
the old method will be removed and ``php.ng`` will be promoted to ``php`` in its place.
29+
30+
If you are not in a position to migrate, you will need to pin your repo to
31+
the final release tag before
32+
`v1.0.0 <https://github.com/saltstack-formulas/php-formula/releases/tag/v1.0.0>`_,
33+
which is expected to be
34+
`v0.37.1 <https://github.com/saltstack-formulas/php-formula/releases/tag/v0.37.1>`_.
35+
36+
If you are currently using ``php.ng``, there is nothing to do until
37+
`v1.0.0 <https://github.com/saltstack-formulas/php-formula/releases/tag/v1.0.0>`_
38+
is released.
39+
40+
To migrate from the old ``php``, the first step is to convert to ``php.ng``,
41+
before `v1.0.0 <https://github.com/saltstack-formulas/php-formula/releases/tag/v1.0.0>`_
42+
is released.
43+
1944
.. contents:: **Table of Contents**
2045

2146
General notes

php/adodb.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-adodb:

php/apc.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-apc:

php/apcu.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-apcu:

php/bcmath.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-bcmath:

php/cgi.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-cgi:

php/cli.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-cli:

php/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.deprecated
1415
- php
1516
1617
get-composer:

php/curl.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-curl:

php/deprecated.sls

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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_critical', 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_critical: True #
37+
# ``` #
38+
# #
39+
################################################################################
40+
# - failhard: True
41+
{%- endif %}

php/dev.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-dev:

php/fpm.sls

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

php/gd.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-gd:

php/imagick.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-imagick:

php/imap.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-imap:

php/init.sls

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{%- from "php/map.jinja" import php with context %}
22
3+
include:
4+
- php.deprecated
5+
36
{%- if not 'ng' in salt['pillar.get']('php', {}) %}
47
58
{%- if grains['os'] == "Ubuntu" %}

php/intl.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-intl:

php/json.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-json:

php/ldap.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-ldap:

php/mail.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-mail:

php/mbstring.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-mbstring:

php/mcrypt.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-mcrypt:

php/memcache.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-memcache:

php/memcached.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-memcached:

php/mongo.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
{%- set version = salt['pillar.get']('php:mongo_version', none) %}
44
55
include:
6+
- php.deprecated
67
- php
78
- php.xml
89
- php.dev

php/mysql.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-mysql:

php/mysqlnd.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{%- from "php/map.jinja" import php with context %}
22
33
include:
4+
- php.deprecated
45
- php
56
67
php-mysqlnd:

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)