Browse Source

Merge pull request #185 from sticky-note/fix/non-ng-deprecation

fix: warn formula users ng states will be promoted in `v1.0.0`
tags/v0.37.1
Imran Iqbal 5 years ago
parent
commit
bc0719a5aa
No account linked to committer's email address
69 changed files with 220 additions and 2 deletions
  1. +25
    -0
      docs/README.rst
  2. +1
    -0
      php/adodb.sls
  3. +1
    -0
      php/apc.sls
  4. +1
    -0
      php/apcu.sls
  5. +1
    -0
      php/bcmath.sls
  6. +1
    -0
      php/cgi.sls
  7. +1
    -0
      php/cli.sls
  8. +1
    -0
      php/composer.sls
  9. +1
    -0
      php/curl.sls
  10. +41
    -0
      php/deprecated.sls
  11. +1
    -0
      php/dev.sls
  12. +3
    -0
      php/fpm.sls
  13. +1
    -0
      php/gd.sls
  14. +1
    -0
      php/imagick.sls
  15. +1
    -0
      php/imap.sls
  16. +3
    -0
      php/init.sls
  17. +1
    -0
      php/intl.sls
  18. +1
    -0
      php/json.sls
  19. +1
    -0
      php/ldap.sls
  20. +1
    -0
      php/mail.sls
  21. +1
    -0
      php/mbstring.sls
  22. +1
    -0
      php/mcrypt.sls
  23. +1
    -0
      php/memcache.sls
  24. +1
    -0
      php/memcached.sls
  25. +1
    -0
      php/mongo.sls
  26. +1
    -0
      php/mysql.sls
  27. +1
    -0
      php/mysqlnd.sls
  28. +3
    -0
      php/ng/apache2/ini.sls
  29. +1
    -0
      php/ng/apache2/init.sls
  30. +3
    -0
      php/ng/apache2/install.sls
  31. +3
    -0
      php/ng/cli/ini.sls
  32. +1
    -0
      php/ng/cli/init.sls
  33. +3
    -0
      php/ng/cli/install.sls
  34. +1
    -0
      php/ng/composer.sls
  35. +40
    -0
      php/ng/deprecated.sls
  36. +3
    -0
      php/ng/fpm/config.sls
  37. +1
    -0
      php/ng/fpm/init.sls
  38. +3
    -0
      php/ng/fpm/install.sls
  39. +1
    -0
      php/ng/fpm/pools.sls
  40. +3
    -0
      php/ng/fpm/pools_config.sls
  41. +1
    -0
      php/ng/fpm/service.sls
  42. +3
    -0
      php/ng/hhvm/config.sls
  43. +1
    -0
      php/ng/hhvm/init.sls
  44. +3
    -0
      php/ng/hhvm/install.sls
  45. +1
    -0
      php/ng/hhvm/repo.sls
  46. +2
    -1
      php/ng/hhvm/service.sls
  47. +3
    -1
      php/ng/installed.jinja
  48. +3
    -0
      php/ng/mdb2/init.sls
  49. +3
    -0
      php/ng/mdb2/mysql.sls
  50. +3
    -0
      php/ng/mdb2/pgsql.sls
  51. +1
    -0
      php/ng/suhosin.sls
  52. +3
    -0
      php/ng/xcache/ini.sls
  53. +1
    -0
      php/ng/xcache/init.sls
  54. +3
    -0
      php/ng/xcache/install.sls
  55. +1
    -0
      php/oauth.sls
  56. +1
    -0
      php/pear.sls
  57. +1
    -0
      php/pgsql.sls
  58. +1
    -0
      php/readline.sls
  59. +1
    -0
      php/redis.sls
  60. +1
    -0
      php/soap.sls
  61. +1
    -0
      php/sqlite.sls
  62. +1
    -0
      php/suhosin.sls
  63. +1
    -0
      php/sybase.sls
  64. +1
    -0
      php/xml.sls
  65. +1
    -0
      php/zip.sls
  66. +5
    -0
      pillar.example
  67. +4
    -0
      test/salt/pillar/debian.sls
  68. +4
    -0
      test/salt/pillar/redhat.sls
  69. +4
    -0
      test/salt/pillar/suse.sls

+ 25
- 0
docs/README.rst View File

@@ -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

+ 1
- 0
php/adodb.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-adodb:

+ 1
- 0
php/apc.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-apc:

+ 1
- 0
php/apcu.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-apcu:

+ 1
- 0
php/bcmath.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-bcmath:

+ 1
- 0
php/cgi.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-cgi:

+ 1
- 0
php/cli.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-cli:

+ 1
- 0
php/composer.sls View File

@@ -11,6 +11,7 @@
{%- set salt_user_home = salt['user.info'](salt_user).get('home', '/root') %}

include:
- php.deprecated
- php

get-composer:

+ 1
- 0
php/curl.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-curl:

+ 41
- 0
php/deprecated.sls View File

@@ -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
- 0
php/dev.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-dev:

+ 3
- 0
php/fpm.sls View File

@@ -1,5 +1,8 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated

php-fpm:
pkg.installed:
- name: {{ php.fpm_pkg }}

+ 1
- 0
php/gd.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-gd:

+ 1
- 0
php/imagick.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-imagick:

+ 1
- 0
php/imap.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-imap:

+ 3
- 0
php/init.sls View File

@@ -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" %}

+ 1
- 0
php/intl.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-intl:

+ 1
- 0
php/json.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-json:

+ 1
- 0
php/ldap.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-ldap:

+ 1
- 0
php/mail.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-mail:

+ 1
- 0
php/mbstring.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-mbstring:

+ 1
- 0
php/mcrypt.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-mcrypt:

+ 1
- 0
php/memcache.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-memcache:

+ 1
- 0
php/memcached.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-memcached:

+ 1
- 0
php/mongo.sls View File

@@ -3,6 +3,7 @@
{%- set version = salt['pillar.get']('php:mongo_version', none) %}

include:
- php.deprecated
- php
- php.xml
- php.dev

+ 1
- 0
php/mysql.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-mysql:

+ 1
- 0
php/mysqlnd.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-mysqlnd:

+ 3
- 0
php/ng/apache2/ini.sls View File

@@ -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
- 0
php/ng/apache2/init.sls View File

@@ -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" %}

+ 3
- 0
php/ng/apache2/install.sls View File

@@ -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" %}


+ 3
- 0
php/ng/cli/ini.sls View File

@@ -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 %}

+ 1
- 0
php/ng/cli/init.sls View File

@@ -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


+ 3
- 0
php/ng/cli/install.sls View File

@@ -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 %}

+ 1
- 0
php/ng/composer.sls View File

@@ -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

+ 40
- 0
php/ng/deprecated.sls View File

@@ -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
- 0
php/ng/fpm/config.sls View File

@@ -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 %}

+ 1
- 0
php/ng/fpm/init.sls View File

@@ -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

+ 3
- 0
php/ng/fpm/install.sls View File

@@ -1,2 +1,5 @@
include:
- php.ng.deprecated

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

+ 1
- 0
php/ng/fpm/pools.sls View File

@@ -10,6 +10,7 @@
{% endmacro %}

include:
- php.ng.deprecated
- php.ng.fpm.service
- php.ng.fpm.pools_config


+ 3
- 0
php/ng/fpm/pools_config.sls View File

@@ -2,6 +2,9 @@
{% from 'php/ng/map.jinja' import php with context %}
{% from "php/ng/macro.jinja" import sls_block, serialize %}

include:
- php.ng.deprecated

# Simple path concatenation.
{% macro path_join(file, root) -%}
{{ root ~ '/' ~ file }}

+ 1
- 0
php/ng/fpm/service.sls View File

@@ -5,6 +5,7 @@
{% set service_function = {True:'running', False:'dead'}.get(php.fpm.service.enabled) %}

include:
- php.ng.deprecated
- php.ng.fpm.install

php_fpm_service:

+ 3
- 0
php/ng/hhvm/config.sls View File

@@ -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 server_settings = php.lookup.hhvm.server %}
{% do server_settings.update(php.hhvm.config.server.settings) %}


+ 1
- 0
php/ng/hhvm/init.sls View File

@@ -1,6 +1,7 @@
# Meta-state to fully install php.hhvm

include:
- php.ng.deprecated
- php.ng.hhvm.repo
- php.ng.hhvm.config
- php.ng.hhvm.service

+ 3
- 0
php/ng/hhvm/install.sls View File

@@ -1,2 +1,5 @@
include:
- php.ng.deprecated

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

+ 1
- 0
php/ng/hhvm/repo.sls View File

@@ -2,6 +2,7 @@
{% from "php/ng/map.jinja" import php with context %}

include:
- php.ng.deprecated
- php.ng.hhvm.install



+ 2
- 1
php/ng/hhvm/service.sls View File

@@ -5,6 +5,7 @@
{% set service_function = {True:'running', False:'dead'}.get(php.hhvm.service.enabled) %}

include:
- php.ng.deprecated
- php.ng.hhvm.install

php_hhvm_service:
@@ -15,5 +16,5 @@ php_hhvm_service:
- require:
- sls: php.ng.hhvm.install
- watch:
- pkg: php_install_hhvm
- pkg: php_install_hhvm


+ 3
- 1
php/ng/installed.jinja View File

@@ -4,6 +4,8 @@
{% from "php/ng/map.jinja" import php with context %}
{% from "php/ng/macro.jinja" import sls_block %}

include:
- php.ng.deprecated

{% set pkginfo = php.lookup.pkgs.get(state) %}

@@ -60,7 +62,7 @@ php_ppa_{{ state }}:
- __env__:
- LC_ALL: C.UTF-8
- onlyif:
- test ! -e /etc/apt/sources.list.d/ondrej-php.list
- test ! -e /etc/apt/sources.list.d/ondrej-php.list
- require_in:
- pkg: php_install_{{ state }}
pkg.latest:

+ 3
- 0
php/ng/mdb2/init.sls View File

@@ -1,2 +1,5 @@
include:
- php.ng.deprecated

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

+ 3
- 0
php/ng/mdb2/mysql.sls View File

@@ -1,3 +1,6 @@
include:
- php.ng.deprecated

{% set state = 'mdb2-driver-mysql' %}
{% include "php/ng/installed.jinja" %}
{% include "php/ng/mdb2/init.sls" %}

+ 3
- 0
php/ng/mdb2/pgsql.sls View File

@@ -1,3 +1,6 @@
include:
- php.ng.deprecated

{% set state = 'mdb2-driver-pgsql' %}
{% include "php/ng/installed.jinja" %}
{% include "php/ng/mdb2/init.sls" %}

+ 1
- 0
php/ng/suhosin.sls View File

@@ -1,6 +1,7 @@
{% from "php/ng/map.jinja" import php with context %}

include:
- php.ng.deprecated
- php.ng
- php.ng.dev


+ 3
- 0
php/ng/xcache/ini.sls View File

@@ -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.xcache.ini.defaults %}
{% for key, value in php.xcache.ini.settings.items() %}
{% if settings[key] is defined %}

+ 1
- 0
php/ng/xcache/init.sls View File

@@ -1,6 +1,7 @@
# Installs php-xcache and manages the associated xcache.ini

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


+ 3
- 0
php/ng/xcache/install.sls View File

@@ -1,2 +1,5 @@
include:
- php.ng.deprecated

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

+ 1
- 0
php/oauth.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-oauth:

+ 1
- 0
php/pear.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-pear:

+ 1
- 0
php/pgsql.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-pgsql:

+ 1
- 0
php/readline.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-readline:

+ 1
- 0
php/redis.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-redis:

+ 1
- 0
php/soap.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-soap:

+ 1
- 0
php/sqlite.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-sqlite:

+ 1
- 0
php/suhosin.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php
- php.dev


+ 1
- 0
php/sybase.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-sybase:

+ 1
- 0
php/xml.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-xml:

+ 1
- 0
php/zip.sls View File

@@ -1,6 +1,7 @@
{%- from "php/map.jinja" import php with context %}

include:
- php.deprecated
- php

php-zip:

+ 5
- 0
pillar.example View File

@@ -1,6 +1,11 @@
## php.ng pillar examples

php:
# Use the following values to mute deprecation warnings
warning_messages: #
v1.0.0: #
mute_critical: True #
mute_upcoming: True #
# Use external repository instead the default (only Ubuntu family)
use_external_repo: True
# Set the external repository name (valid only if use_external_repo is not none)

+ 4
- 0
test/salt/pillar/debian.sls View File

@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
php: {}

+ 4
- 0
test/salt/pillar/redhat.sls View File

@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
php: {}

+ 4
- 0
test/salt/pillar/suse.sls View File

@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
# vim: ft=yaml
---
php: {}

Loading…
Cancel
Save