Skip to content

fix: warn formula users ng states will be promoted in v1.0.0 #185

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

Merged
merged 6 commits into from
Aug 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,31 @@ php-formula

Formula to set up and configure php

.. list-table::
:name: banner-breaking-changes-v1.0.0
:header-rows: 1
:widths: 1

* - WARNING: BREAKING CHANGES IN UPCOMING ``v1.0.0``
* - This formula currently provides two methods for managing PHP; the old method
under ``php`` and the new method under ``php.ng``.
In upcoming `v1.0.0 <https://github.com/saltstack-formulas/php-formula/releases/tag/v1.0.0>`_,
the old method will be removed and ``php.ng`` will be promoted to ``php`` in its place.

If you are not in a position to migrate, you will need to pin your repo to
the final release tag before
`v1.0.0 <https://github.com/saltstack-formulas/php-formula/releases/tag/v1.0.0>`_,
which is expected to be
`v0.37.1 <https://github.com/saltstack-formulas/php-formula/releases/tag/v0.37.1>`_.

If you are currently using ``php.ng``, there is nothing to do until
`v1.0.0 <https://github.com/saltstack-formulas/php-formula/releases/tag/v1.0.0>`_
is released.

To migrate from the old ``php``, the first step is to convert to ``php.ng``,
before `v1.0.0 <https://github.com/saltstack-formulas/php-formula/releases/tag/v1.0.0>`_
is released.

.. contents:: **Table of Contents**

General notes
Expand Down
1 change: 1 addition & 0 deletions php/adodb.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-adodb:
Expand Down
1 change: 1 addition & 0 deletions php/apc.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-apc:
Expand Down
1 change: 1 addition & 0 deletions php/apcu.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-apcu:
Expand Down
1 change: 1 addition & 0 deletions php/bcmath.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-bcmath:
Expand Down
1 change: 1 addition & 0 deletions php/cgi.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-cgi:
Expand Down
1 change: 1 addition & 0 deletions php/cli.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-cli:
Expand Down
1 change: 1 addition & 0 deletions php/composer.sls
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{%- set salt_user_home = salt['user.info'](salt_user).get('home', '/root') %}

include:
- php.deprecated
- php

get-composer:
Expand Down
1 change: 1 addition & 0 deletions php/curl.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-curl:
Expand Down
41 changes: 41 additions & 0 deletions php/deprecated.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
# vim: ft=sls

{#- Evaluating as `False` by default, using this method since `defaults.yaml` not available in this repo #}
{%- if not salt['config.get']('php').get('warning_messages', {}).get('v1.0.0', {}).get('mute_critical', False) %}
php-deprecated-in-v1.0.0-test-succeed:
test.succeed_without_changes:
- name: |


################################################################################
# #
# WARNING: BREAKING CHANGES IN UPCOMING VERSION `v1.0.0` #
# #
################################################################################
# #
# This formula currently provides two methods for managing PHP; the old method #
# under `php` and the new method under `php.ng`. In upcoming `v1.0.0`, the old #
# method will be removed and `php.ng` will be promoted to `php` in its place. #
# #
# If you are not in a position to migrate, you will need to pin your repo to #
# the final release tag before `v1.0.0`, which is expected to be `v0.37.1`. #
# #
# If you are currently using `php.ng`, there is nothing to do until `v1.0.0` #
# is released. #
# #
# To migrate from the old `php`, the first step is to convert to `php.ng`, #
# before `v1.0.0` is released. #
# #
# To prevent this message being displayed again, set the pillar/config value: #
# #
# ``` #
# php: #
# warning_messages: #
# v1.0.0: #
# mute_critical: True #
# ``` #
# #
################################################################################
# - failhard: True
{%- endif %}
1 change: 1 addition & 0 deletions php/dev.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-dev:
Expand Down
3 changes: 3 additions & 0 deletions php/fpm.sls
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated

php-fpm:
pkg.installed:
- name: {{ php.fpm_pkg }}
Expand Down
1 change: 1 addition & 0 deletions php/gd.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-gd:
Expand Down
1 change: 1 addition & 0 deletions php/imagick.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-imagick:
Expand Down
1 change: 1 addition & 0 deletions php/imap.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-imap:
Expand Down
3 changes: 3 additions & 0 deletions php/init.sls
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated

{%- if not 'ng' in salt['pillar.get']('php', {}) %}

{%- if grains['os'] == "Ubuntu" %}
Expand Down
1 change: 1 addition & 0 deletions php/intl.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-intl:
Expand Down
1 change: 1 addition & 0 deletions php/json.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-json:
Expand Down
1 change: 1 addition & 0 deletions php/ldap.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-ldap:
Expand Down
1 change: 1 addition & 0 deletions php/mail.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-mail:
Expand Down
1 change: 1 addition & 0 deletions php/mbstring.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-mbstring:
Expand Down
1 change: 1 addition & 0 deletions php/mcrypt.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-mcrypt:
Expand Down
1 change: 1 addition & 0 deletions php/memcache.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-memcache:
Expand Down
1 change: 1 addition & 0 deletions php/memcached.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-memcached:
Expand Down
1 change: 1 addition & 0 deletions php/mongo.sls
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{%- set version = salt['pillar.get']('php:mongo_version', none) %}

include:
- php.deprecated
- php
- php.xml
- php.dev
Expand Down
1 change: 1 addition & 0 deletions php/mysql.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-mysql:
Expand Down
1 change: 1 addition & 0 deletions php/mysqlnd.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-mysqlnd:
Expand Down
3 changes: 3 additions & 0 deletions php/ng/apache2/ini.sls
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
{% set settings = php.ini.defaults %}
{% do settings.update(php.apache2.ini.settings) %}

include:
- php.ng.deprecated

php_apache2_ini:
{{ php_ini(php.lookup.apache2.ini, php.apache2.ini.opts, settings) }}
1 change: 1 addition & 0 deletions php/ng/apache2/init.sls
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{% if grains['os_family'] in ["Debian", "FreeBSD"] %}
include:
- php.ng.deprecated
- php.ng.apache2.install
{% endif %} #END: os = Debian|FreeBSD
{% if grains['os_family'] == "Debian" %}
Expand Down
3 changes: 3 additions & 0 deletions php/ng/apache2/install.sls
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{% from "php/ng/map.jinja" import php with context %}

include:
- php.ng.deprecated

{% set state = 'apache2' %}
{% include "php/ng/installed.jinja" %}

Expand Down
3 changes: 3 additions & 0 deletions php/ng/cli/ini.sls
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
{% from "php/ng/map.jinja" import php with context %}
{% from "php/ng/ini.jinja" import php_ini %}

include:
- php.ng.deprecated

{% set settings = php.ini.defaults %}
{% for key, value in php.cli.ini.settings.items() %}
{% if settings[key] is defined %}
Expand Down
1 change: 1 addition & 0 deletions php/ng/cli/init.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Installs php-cli and manages the associated php.ini

include:
- php.ng.deprecated
- php.ng.cli.install
- php.ng.cli.ini

Expand Down
3 changes: 3 additions & 0 deletions php/ng/cli/install.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{% set state = 'cli' %}
{% include "php/ng/installed.jinja" %}

include:
- php.ng.deprecated

{%- if salt['grains.get']('os_family') == "Debian" %}
{% set current_php = salt['alternatives.show_current']('php') %}
{% set phpng_version = salt['pillar.get']('php:ng:version', '7.0')|string %}
Expand Down
1 change: 1 addition & 0 deletions php/ng/composer.sls
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
{% set salt_user_home = salt['user.info'](salt_user).get('home', '/root') %}

include:
- php.ng.deprecated
- php.ng
{% if grains['os_family'] == 'FreeBSD' %}
- php.ng.filter
Expand Down
40 changes: 40 additions & 0 deletions php/ng/deprecated.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
# vim: ft=sls

{#- Evaluating as `False` by default, using this method since `defaults.yaml` not available in this repo #}
{%- if not salt['config.get']('php').get('warning_messages', {}).get('v1.0.0', {}).get('mute_upcoming', False) %}
php-deprecated-in-v1.0.0-test-succeed:
test.succeed_without_changes:
- name: |


################################################################################
# #
# WARNING: BREAKING CHANGES IN UPCOMING VERSION `v1.0.0` #
# #
################################################################################
# #
# This formula currently provides two methods for managing PHP; the old method #
# under `php` and the new method under `php.ng`. In upcoming `v1.0.0`, the old #
# method will be removed and `php.ng` will be promoted to `php` in its place. #
# #
# If you are not in a position to migrate, you will need to pin your repo to #
# the final release tag before `v1.0.0`, which is expected to be `v0.37.1`. #
# #
# If you are currently using `php.ng`, there is nothing to do until `v1.0.0` #
# is released. #
# #
# To migrate from the old `php`, the first step is to convert to `php.ng`, #
# before `v1.0.0` is released. #
# #
# To prevent this message being displayed again, set the pillar/config value: #
# #
# ``` #
# php: #
# warning_messages: #
# v1.0.0: #
# mute_upcoming: True #
# ``` #
# #
################################################################################
{%- endif %}
3 changes: 3 additions & 0 deletions php/ng/fpm/config.sls
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
{% from 'php/ng/map.jinja' import php with context %}
{% from "php/ng/ini.jinja" import php_ini %}

include:
- php.ng.deprecated

{% set ini_settings = php.ini.defaults %}
{% for key, value in php.fpm.config.ini.settings.items() %}
{% if ini_settings[key] is defined %}
Expand Down
1 change: 1 addition & 0 deletions php/ng/fpm/init.sls
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Meta-state to fully install php.fpm

include:
- php.ng.deprecated
- php.ng.fpm.config
- php.ng.fpm.service
- php.ng.fpm.pools
Expand Down
Loading