diff --git a/php/ng/apache2/ini.sls b/php/ng/apache2/ini.sls index 8f01a8a6..6e9bc398 100644 --- a/php/ng/apache2/ini.sls +++ b/php/ng/apache2/ini.sls @@ -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) }} diff --git a/php/ng/apache2/init.sls b/php/ng/apache2/init.sls index ce587886..f7b94196 100644 --- a/php/ng/apache2/init.sls +++ b/php/ng/apache2/init.sls @@ -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" %} diff --git a/php/ng/apache2/install.sls b/php/ng/apache2/install.sls index 46c7da4f..51e1500a 100644 --- a/php/ng/apache2/install.sls +++ b/php/ng/apache2/install.sls @@ -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" %} diff --git a/php/ng/cli/ini.sls b/php/ng/cli/ini.sls index 68441922..1d5c92d4 100644 --- a/php/ng/cli/ini.sls +++ b/php/ng/cli/ini.sls @@ -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 %} diff --git a/php/ng/cli/init.sls b/php/ng/cli/init.sls index 06bc3e91..78cb5a3d 100644 --- a/php/ng/cli/init.sls +++ b/php/ng/cli/init.sls @@ -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 diff --git a/php/ng/cli/install.sls b/php/ng/cli/install.sls index ee4d463e..432e5452 100644 --- a/php/ng/cli/install.sls +++ b/php/ng/cli/install.sls @@ -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 %} diff --git a/php/ng/composer.sls b/php/ng/composer.sls index 8f6221da..b5776e66 100644 --- a/php/ng/composer.sls +++ b/php/ng/composer.sls @@ -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 diff --git a/php/ng/deprecated.sls b/php/ng/deprecated.sls new file mode 100644 index 00000000..83f9fa51 --- /dev/null +++ b/php/ng/deprecated.sls @@ -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 %} diff --git a/php/ng/fpm/config.sls b/php/ng/fpm/config.sls index a91ff892..0c4d6d64 100644 --- a/php/ng/fpm/config.sls +++ b/php/ng/fpm/config.sls @@ -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 %} diff --git a/php/ng/fpm/init.sls b/php/ng/fpm/init.sls index 0087bc37..80b446a8 100644 --- a/php/ng/fpm/init.sls +++ b/php/ng/fpm/init.sls @@ -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 diff --git a/php/ng/fpm/install.sls b/php/ng/fpm/install.sls index 6fda19ea..72fa5c84 100644 --- a/php/ng/fpm/install.sls +++ b/php/ng/fpm/install.sls @@ -1,2 +1,5 @@ +include: + - php.ng.deprecated + {% set state = 'fpm' %} {% include "php/ng/installed.jinja" %} diff --git a/php/ng/fpm/pools.sls b/php/ng/fpm/pools.sls index cfc796b4..b3d7454f 100644 --- a/php/ng/fpm/pools.sls +++ b/php/ng/fpm/pools.sls @@ -10,6 +10,7 @@ {% endmacro %} include: + - php.ng.deprecated - php.ng.fpm.service - php.ng.fpm.pools_config diff --git a/php/ng/fpm/pools_config.sls b/php/ng/fpm/pools_config.sls index 625f303d..e63ec2ab 100644 --- a/php/ng/fpm/pools_config.sls +++ b/php/ng/fpm/pools_config.sls @@ -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 }} diff --git a/php/ng/fpm/service.sls b/php/ng/fpm/service.sls index aa8cd2c5..084a5395 100644 --- a/php/ng/fpm/service.sls +++ b/php/ng/fpm/service.sls @@ -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: diff --git a/php/ng/hhvm/config.sls b/php/ng/hhvm/config.sls index f257a6fc..4f242e55 100644 --- a/php/ng/hhvm/config.sls +++ b/php/ng/hhvm/config.sls @@ -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) %} diff --git a/php/ng/hhvm/init.sls b/php/ng/hhvm/init.sls index 080edb62..ba6576e3 100644 --- a/php/ng/hhvm/init.sls +++ b/php/ng/hhvm/init.sls @@ -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 diff --git a/php/ng/hhvm/install.sls b/php/ng/hhvm/install.sls index 1c1b2778..65761eee 100644 --- a/php/ng/hhvm/install.sls +++ b/php/ng/hhvm/install.sls @@ -1,2 +1,5 @@ +include: + - php.ng.deprecated + {% set state = 'hhvm' %} {% include "php/ng/installed.jinja" %} diff --git a/php/ng/hhvm/repo.sls b/php/ng/hhvm/repo.sls index fa790a09..8fd38416 100644 --- a/php/ng/hhvm/repo.sls +++ b/php/ng/hhvm/repo.sls @@ -2,6 +2,7 @@ {% from "php/ng/map.jinja" import php with context %} include: + - php.ng.deprecated - php.ng.hhvm.install diff --git a/php/ng/hhvm/service.sls b/php/ng/hhvm/service.sls index d7bcce9b..458ad7c4 100644 --- a/php/ng/hhvm/service.sls +++ b/php/ng/hhvm/service.sls @@ -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 diff --git a/php/ng/installed.jinja b/php/ng/installed.jinja index 0033d31c..9db803df 100644 --- a/php/ng/installed.jinja +++ b/php/ng/installed.jinja @@ -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: diff --git a/php/ng/mdb2/init.sls b/php/ng/mdb2/init.sls index d39a7803..138ace04 100644 --- a/php/ng/mdb2/init.sls +++ b/php/ng/mdb2/init.sls @@ -1,2 +1,5 @@ +include: + - php.ng.deprecated + {% set state = 'mdb2' %} {% include "php/ng/installed.jinja" %} diff --git a/php/ng/mdb2/mysql.sls b/php/ng/mdb2/mysql.sls index 83939e25..831515d7 100644 --- a/php/ng/mdb2/mysql.sls +++ b/php/ng/mdb2/mysql.sls @@ -1,3 +1,6 @@ +include: + - php.ng.deprecated + {% set state = 'mdb2-driver-mysql' %} {% include "php/ng/installed.jinja" %} {% include "php/ng/mdb2/init.sls" %} diff --git a/php/ng/mdb2/pgsql.sls b/php/ng/mdb2/pgsql.sls index fed322ac..9b9aba4a 100644 --- a/php/ng/mdb2/pgsql.sls +++ b/php/ng/mdb2/pgsql.sls @@ -1,3 +1,6 @@ +include: + - php.ng.deprecated + {% set state = 'mdb2-driver-pgsql' %} {% include "php/ng/installed.jinja" %} {% include "php/ng/mdb2/init.sls" %} diff --git a/php/ng/suhosin.sls b/php/ng/suhosin.sls index 903a3359..b4b9c2a3 100644 --- a/php/ng/suhosin.sls +++ b/php/ng/suhosin.sls @@ -1,6 +1,7 @@ {% from "php/ng/map.jinja" import php with context %} include: + - php.ng.deprecated - php.ng - php.ng.dev diff --git a/php/ng/xcache/ini.sls b/php/ng/xcache/ini.sls index c4977888..46b65519 100644 --- a/php/ng/xcache/ini.sls +++ b/php/ng/xcache/ini.sls @@ -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 %} diff --git a/php/ng/xcache/init.sls b/php/ng/xcache/init.sls index fb6e07fb..2214246c 100644 --- a/php/ng/xcache/init.sls +++ b/php/ng/xcache/init.sls @@ -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 diff --git a/php/ng/xcache/install.sls b/php/ng/xcache/install.sls index 82a7eb42..78caa756 100644 --- a/php/ng/xcache/install.sls +++ b/php/ng/xcache/install.sls @@ -1,2 +1,5 @@ +include: + - php.ng.deprecated + {% set state = 'xcache' %} {% include "php/ng/installed.jinja" %} diff --git a/pillar.example b/pillar.example index 5aa54d9c..83859334 100644 --- a/pillar.example +++ b/pillar.example @@ -5,6 +5,7 @@ php: 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)