Przeglądaj źródła

Merge pull request #183 from sticky-note/feat/ng

feat(ng): promote NG formula
tags/v0.41.0
Imran Iqbal 5 lat temu
rodzic
commit
de91f7f50a
Brak konta powiązanego z adresem e-mail autora
100 zmienionych plików z 3931 dodań i 1363 usunięć
  1. +121
    -323
      docs/README.rst
  2. +2
    -9
      php/adodb.sls
  3. +3
    -3
      php/apache2/files/mod_php.conf.jinja
  4. +9
    -0
      php/apache2/ini.sls
  5. +13
    -0
      php/apache2/init.sls
  6. +18
    -0
      php/apache2/install.sls
  7. +2
    -9
      php/apc.sls
  8. +2
    -9
      php/apcu.sls
  9. +2
    -0
      php/auth-sasl.sls
  10. +2
    -9
      php/bcmath.sls
  11. +2
    -0
      php/bz2.sls
  12. +2
    -0
      php/cache-lite.sls
  13. +2
    -9
      php/cgi.sls
  14. +0
    -9
      php/cli.sls
  15. +26
    -0
      php/cli/ini.sls
  16. +22
    -0
      php/cli/init.sls
  17. +28
    -0
      php/cli/install.sls
  18. +19
    -12
      php/composer.sls
  19. +2
    -0
      php/console-table.sls
  20. +2
    -0
      php/ctype.sls
  21. +2
    -9
      php/curl.sls
  22. +2
    -0
      php/dba.sls
  23. +16
    -25
      php/deprecated.sls
  24. +2
    -9
      php/dev.sls
  25. +2
    -0
      php/dom.sls
  26. +2
    -0
      php/fileinfo.sls
  27. +0
    -0
      php/files/php.ini
  28. +2
    -0
      php/filter.sls
  29. +0
    -11
      php/fpm.sls
  30. +63
    -0
      php/fpm/config.sls
  31. +44
    -0
      php/fpm/init.sls
  32. +2
    -0
      php/fpm/install.sls
  33. +24
    -0
      php/fpm/pools.sls
  34. +45
    -0
      php/fpm/pools_config.sls
  35. +18
    -0
      php/fpm/service.sls
  36. +2
    -9
      php/gd.sls
  37. +2
    -0
      php/gearman.sls
  38. +2
    -0
      php/geoip.sls
  39. +2
    -0
      php/geshi.sls
  40. +2
    -0
      php/gettext.sls
  41. +2
    -0
      php/gmp.sls
  42. +2
    -0
      php/hash.sls
  43. +16
    -0
      php/hhvm/config.sls
  44. +23
    -0
      php/hhvm/init.sls
  45. +2
    -0
      php/hhvm/install.sls
  46. +19
    -0
      php/hhvm/repo.sls
  47. +19
    -0
      php/hhvm/service.sls
  48. +2
    -0
      php/http.sls
  49. +2
    -0
      php/iconv.sls
  50. +2
    -0
      php/igbinary.sls
  51. +2
    -9
      php/imagick.sls
  52. +2
    -9
      php/imap.sls
  53. +2
    -2
      php/ini.jinja
  54. +2
    -33
      php/init.sls
  55. +3
    -3
      php/installed.jinja
  56. +2
    -9
      php/intl.sls
  57. +2
    -9
      php/json.sls
  58. +2
    -9
      php/ldap.sls
  59. +0
    -0
      php/macro.jinja
  60. +2
    -9
      php/mail.sls
  61. +3211
    -464
      php/map.jinja
  62. +2
    -9
      php/mbstring.sls
  63. +2
    -9
      php/mcrypt.sls
  64. +2
    -0
      php/mdb2/init.sls
  65. +3
    -0
      php/mdb2/mysql.sls
  66. +3
    -0
      php/mdb2/pgsql.sls
  67. +2
    -9
      php/memcache.sls
  68. +2
    -9
      php/memcached.sls
  69. +23
    -0
      php/modules.sls
  70. +2
    -43
      php/mongo.sls
  71. +2
    -0
      php/mongodb.sls
  72. +2
    -0
      php/msgpack.sls
  73. +2
    -9
      php/mysql.sls
  74. +2
    -9
      php/mysqlnd.sls
  75. +2
    -0
      php/net-smtp.sls
  76. +2
    -0
      php/net4.sls
  77. +9
    -0
      php/net6.sls
  78. +2
    -2
      php/ng/adodb.sls
  79. +1
    -11
      php/ng/apache2/ini.sls
  80. +1
    -13
      php/ng/apache2/init.sls
  81. +1
    -20
      php/ng/apache2/install.sls
  82. +2
    -2
      php/ng/apc.sls
  83. +2
    -2
      php/ng/apcu.sls
  84. +2
    -2
      php/ng/auth-sasl.sls
  85. +2
    -2
      php/ng/bcmath.sls
  86. +2
    -2
      php/ng/bz2.sls
  87. +2
    -2
      php/ng/cache-lite.sls
  88. +2
    -2
      php/ng/cgi.sls
  89. +1
    -28
      php/ng/cli/ini.sls
  90. +1
    -22
      php/ng/cli/init.sls
  91. +1
    -30
      php/ng/cli/install.sls
  92. +1
    -61
      php/ng/composer.sls
  93. +2
    -2
      php/ng/console-table.sls
  94. +2
    -2
      php/ng/ctype.sls
  95. +2
    -2
      php/ng/curl.sls
  96. +2
    -2
      php/ng/dba.sls
  97. +0
    -40
      php/ng/deprecated.sls
  98. +2
    -2
      php/ng/dev.sls
  99. +2
    -2
      php/ng/dom.sls
  100. +2
    -2
      php/ng/fileinfo.sls

+ 121
- 323
docs/README.rst Wyświetl plik

@@ -21,25 +21,28 @@ Formula to set up and configure php
: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
* - WARNING: BREAKING CHANGES SINCE ``v1.0.0``
* - Prior to
`v1.0.0 <https://github.com/saltstack-formulas/php-formula/releases/tag/v1.0.0>`_,
which is expected to be
this formula provided two methods for managing PHP;
the old method under ``php`` and the new method under ``php.ng``.
The old method has now been removed and ``php.ng`` has been promoted to
be ``php`` in its place.

If you are not in a position to migrate, please pin your repo to the final
release tag before
`v1.0.0 <https://github.com/saltstack-formulas/php-formula/releases/tag/v1.0.0>`_,
i.e.
`v0.40.1 <https://github.com/saltstack-formulas/php-formula/releases/tag/v0.40.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 ``php.ng``, simply modify your pillar to promote the
entire section under ``php:ng`` so that it is under ``php`` instead.
So with the editor of your choice, highlight the entire section and then
unindent one level. Finish by removing the ``ng:`` line.

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.
To migrate from the old ``php``, first convert to ``php.ng`` under
`v0.40.1 <https://github.com/saltstack-formulas/php-formula/releases/tag/v0.40.1>`_.
and then follow the steps laid out in the paragraph directly above.

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

@@ -70,694 +73,489 @@ Available states
.. contents::
:local:

``php``
^^^^^^^

Installs the php package.

``php.adodb``
^^^^^^^^^^^^^

Installs the php-adodb package.

``php.apc``
^^^^^^^^^^^

Installs the php-apc package.
Disabled by default on opensuse need server:php repo

``php.apcu``
^^^^^^^^^^^^

Installs the php-apcu package.
Disabled by default on opensuse need server:php repo

``php.bcmath``
^^^^^^^^^^^^^^

Installs the php-bcmath package.

``php.cgi``
^^^^^^^^^^^

Installs the php-cgi package.
Disabled on opensuse not available, only fastcgi

``php.cli``
^^^^^^^^^^^

Installs the php-cli package.

``php.composer``
^^^^^^^^^^^^^^^^

Installs [composer](https://getcomposer.org) and keeps it updated.

``php.curl``
^^^^^^^^^^^^

Installs the php5-curl package on Debian, and ensures that curl itself is
installed for RedHat systems, this is due to the curl libs being provided by
php-common, which will get installed with the main php package.

``php.dev``
^^^^^^^^^^^

Installs the php-dev package.

``php.fileinfo``
^^^^^^^^^^^^^^^^

Installs the php-fileinfo package and enables it.

``php.fpm``
^^^^^^^^^^^

Installs the php-fpm package, starts the service, and enables it.

``php.gd``
^^^^^^^^^^

Installs the php-gd package.

``php.imagick``
^^^^^^^^^^^^^^^

Installs the php-imagick package.
Disabled on opensuse not available.

``php.imap``
^^^^^^^^^^^^

Installs the php-imap package.

``php.intl``
^^^^^^^^^^^^

Installs the php-intl package.

``php.json``
^^^^^^^^^^^^

Installs the php-json package.

``php.ldap``
^^^^^^^^^^^^

Installs the php-ldap package.

``php.mail``
^^^^^^^^^^^^

Installs the php-mail package.

``php.mbstring``
^^^^^^^^^^^^^^^^

Installs the php-mbstring package.

``php.mcrypt``
^^^^^^^^^^^^^^

Installs the php-mcrypt package.

``php.memcache``
^^^^^^^^^^^^^^^^

Installs the php-memcache package.
Disabled on opensuse need server:php:extensions repo

``php.memcached``
^^^^^^^^^^^^^^^^^

Installs the php-memcached package.
Disabled on opensuse need server:php:extensions repo

``php.mongo``
^^^^^^^^^^^^^

Installs the php-mongo package.
Disabled on opensuse need server:php:extensions repo

``php.mysql``
^^^^^^^^^^^^^

Installs the php-mysql package.

``php.mysqlnd``
^^^^^^^^^^^^^^^

Installs the php-mysqlnd package.
Disabled on opensuse no package.

``php.oauth``
^^^^^^^^^^^^^

Installs the php-oauth package.

``php.pear``
^^^^^^^^^^^^

Installs the php-pear package.

``php.pgsql``
^^^^^^^^^^^^^

Installs the php-pgsql package.

``php.readline``
^^^^^^^^^^^^^^^^

Installs the php-readline package.

``php.redis``
^^^^^^^^^^^^^

Installs the php-redis package.
Disabled on opensuse need server:php:extensions repo

``php.soap``
^^^^^^^^^^^^

Installs the php-soap package.

``php.sqlite``
^^^^^^^^^^^^^^

Installs the php-sqlite package,

``php.suhosin``
^^^^^^^^^^^^^^^

Installs the php-suhosin package.

``php.sybase``
^^^^^^^^^^^^^^

Installs the php-sybase package for Sybase/MS-SQL. Debian / Ubuntu as RedHat has no similar package.

``php.tokenizer``
^^^^^^^^^^^^^^^^^

Installs the php-tokenizer package and enables it.

``php.xml``
^^^^^^^^^^^

Installs the php-xml package.

``php.zip``
^^^^^^^^^^^

Installs the php-zip package.

Next-generation, alternate approach
-----------------------------------

The following states provide an alternate approach to managing PHP and FPM
pools, as well as code organization. Please provide feedback by filing issues,
Please provide feedback by filing issues,
discussing in ``#salt`` in Freenode and the mailing list as normal.

**Note:** php.ng states require the merge parameter of salt.modules.pillar.get(),
**Note:** php states require the merge parameter of salt.modules.pillar.get(),
first available in the Helium release.

.. contents::
:local:

``php.ng``
``php``
^^^^^^^^^^

Installs the php package.

``php.ng.adodb``
``php.adodb``
^^^^^^^^^^^^^^^^

Installs the php-adodb package.

``php.ng.apache2``
``php.apache2``
^^^^^^^^^^^^^^^^^^

Meta-state that combines `php.ng.apache2.install`_ and `php.ng.apache2.ini`_.
Meta-state that combines `php.apache2.install`_ and `php.apache2.ini`_.

``php.ng.apache2.ini``
``php.apache2.ini``
^^^^^^^^^^^^^^^^^^^^^^

Manages the apache2 php.ini file

``php.ng.apache2.install``
``php.apache2.install``
^^^^^^^^^^^^^^^^^^^^^^^^^^

Installs the apache2 and libapache2-mod-php5 package. Debian Only.

``php.ng.apc``
``php.apc``
^^^^^^^^^^^^^^

Installs the php-apc package.
Disabled on opensuse need server:php repo

``php.ng.apcu``
``php.apcu``
^^^^^^^^^^^^^^^

Installs the php-apcu package.
Disabled on opensuse need server:php repo

``php.ng.auth-sasl``
``php.auth-sasl``
^^^^^^^^^^^^^^^^^^^^

Installs the php-auth-sasl package.

``php.ng.bcmath``
``php.bcmath``
^^^^^^^^^^^^^^^^^

Installs the php-bcmath package.

``php.ng.bz2``
``php.bz2``
^^^^^^^^^^^^^^

Installs the php-bz2 package.

``php.ng.cache-lite``
``php.cache-lite``
^^^^^^^^^^^^^^^^^^^^^

Installs the php-cache-lite package.

``php.ng.cgi``
``php.cgi``
^^^^^^^^^^^^^^

Installs the php-cgi package.
Disabled on opensuse only php5-fastcgi available.

``php.ng.cli``
``php.cli``
^^^^^^^^^^^^^^

Meta-state that combines `php.ng.cli.install`_ and `php.ng.cli.ini`_.
Meta-state that combines `php.cli.install`_ and `php.cli.ini`_.

``php.ng.cli.ini``
``php.cli.ini``
^^^^^^^^^^^^^^^^^^

Manages the php-cli ini file.

``php.ng.cli.install``
``php.cli.install``
^^^^^^^^^^^^^^^^^^^^^^

Installs the php-cli package.

``php.ng.composer``
``php.composer``
^^^^^^^^^^^^^^^^^^^

Installs [composer](https://getcomposer.org) and keeps it updated.

``php.ng.console-table``
``php.console-table``
^^^^^^^^^^^^^^^^^^^^^^^^

Installs the php-console-table package.

``php.ng.ctype``
``php.ctype``
^^^^^^^^^^^^^^^^

Installs the php-ctype package.

``php.ng.curl``
``php.curl``
^^^^^^^^^^^^^^^

Installs the php5-curl package on Debian, and ensures that curl itself is
installed for RedHat systems, this is due to the curl libs being provided by
php-common, which will get installed with the main php package.

``php.ng.dba``
``php.dba``
^^^^^^^^^^^^^^

Installs the php-dba package.

``php.ng.dev``
``php.dev``
^^^^^^^^^^^^^^

Installs the php5-dev and build-essential package.

``php.ng.filter``
``php.filter``
^^^^^^^^^^^^^^^^^

Installs the php-filter package.

``php.ng.fpm``
``php.fpm``
^^^^^^^^^^^^^^

Meta-state that combines all php.ng.fpm states.
Meta-state that combines all php.fpm states.

``php.ng.fpm.config``
``php.fpm.config``
^^^^^^^^^^^^^^^^^^^^^

Manages the (non-pool) php-fpm config files.

``php.ng.fpm.install``
``php.fpm.install``
^^^^^^^^^^^^^^^^^^^^^^

Installs the php-fpm package.

``php.ng.fpm.pools``
``php.fpm.pools``
^^^^^^^^^^^^^^^^^^^^

Meta-state that combines `php.ng.fpm.service`_ and `php.ng.fpm.pools_config`_
Meta-state that combines `php.fpm.service`_ and `php.fpm.pools_config`_

``php.ng.fpm.pools_config``
``php.fpm.pools_config``
^^^^^^^^^^^^^^^^^^^^^^^^^^^

Manages php-fpm pool config files.

``php.ng.fpm.service``
``php.fpm.service``
^^^^^^^^^^^^^^^^^^^^^^

Manages the php-fpm service.

``php.ng.gd``
``php.gd``
^^^^^^^^^^^^^

Installs the php-gd package.

``php.ng.gearman``
``php.gearman``
^^^^^^^^^^^^^^^^^^

Installs the php-gearman package.

``php.ng.geoip``
``php.geoip``
^^^^^^^^^^^^^^^^

Installs the php-geoip package.

``php.ng.geshi``
``php.geshi``
^^^^^^^^^^^^^^^^

Installs the php-geshi package.

``php.ng.gettext``
``php.gettext``
^^^^^^^^^^^^^^^^^^

Installs the php-gettext package.

``php.ng.gmp``
``php.gmp``
^^^^^^^^^^^^^^

Installs the php-gmp package. Debian Only.

``php.ng.hash``
``php.hash``
^^^^^^^^^^^^^^^

Installs the php-hash package.

``php.ng.http``
``php.http``
^^^^^^^^^^^^^^^

Installs the php-http package.

``php.ng.hhvm``
``php.hhvm``
^^^^^^^^^^^^^^^

Meta-state that combines php.ng.hhvm states
Meta-state that combines php.hhvm states

``php.ng.hhvm.config``
``php.hhvm.config``
^^^^^^^^^^^^^^^^^^^^^^

Manages the php-hhvm config files

``php.ng.hhvm.install``
``php.hhvm.install``
^^^^^^^^^^^^^^^^^^^^^^^

Installs the php-hhvm package

``php.ng.hhvm.repo``
``php.hhvm.repo``
^^^^^^^^^.REPO^^^^^^

Configures the hhvm repo for debian/ubuntu

``php.ng.hhvm.service``
``php.hhvm.service``
^^^^^^^^^^^^^^^^^^^^^^^

Manages the php-hhvm service.

``php.ng.igbinary``
``php.igbinary``
^^^^^^^^^^^^^^^^^^^

Installs the php-igbinary package.

``php.ng.imagick``
``php.imagick``
^^^^^^^^^^^^^^^^^^

Installs the php-imagick package.
Disabled on opensuse no package.

``php.ng.imap``
``php.imap``
^^^^^^^^^^^^^^^

Installs the php-imap package.

``php.ng.intl``
``php.intl``
^^^^^^^^^^^^^^^

Installs the php-intl package.

``php.ng.json``
``php.json``
^^^^^^^^^^^^^^^

Installs the php-json package.

``php.ng.ldap``
``php.ldap``
^^^^^^^^^^^^^^^

Installs the php-ldap package.

``php.ng.mail``
``php.mail``
^^^^^^^^^^^^^^^

Installs the php-mail package.

``php.ng.mbstring``
``php.mbstring``
^^^^^^^^^^^^^^^^^^^

Installs the php-mbstring package.

``php.ng.mcrypt``
``php.mcrypt``
^^^^^^^^^^^^^^^^^

Installs the php-mcrypt package.

``php.ng.mdb2``
``php.mdb2``
^^^^^^^^^^^^^^^

Installs the php-mdb2 package.

``php.ng.mdb2-driver-mysql``
``php.mdb2-driver-mysql``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Installs the php-mdb2-driver-mysql package.

``php.ng.mdb2-driver-pgsql``
``php.mdb2-driver-pgsql``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Installs the php-mdb2-driver-pgsql package.

``php.ng.memcache``
``php.memcache``
^^^^^^^^^^^^^^^^^^^

Installs the php-memcache package.
Disabled on opensuse need server:php:extensions repo

``php.ng.memcached``
``php.memcached``
^^^^^^^^^^^^^^^^^^^^

Installs the php-memcached package.
Disabled on opensuse need server:php:extensions repo

``php.ng.modules``
``php.modules``
^^^^^^^^^^^^^^^^^^

Calls ``php.ng.<name>`` for each entry in ``php:ng:modules`` if available, or
Calls ``php.<name>`` for each entry in ``php:modules`` if available, or
try to install the matching packages that can be set via from
``php:ng:lookup:pkgs``
``php:lookup:pkgs``

``php.ng.mongo``
``php.mongo``
^^^^^^^^^^^^^^^^

Installs the php-mongo package.

``php.ng.mongodb``
``php.mongodb``
^^^^^^^^^^^^^^^^^^

Installs the php-mongodb package.

``php.ng.msgpack``
``php.msgpack``
^^^^^^^^^^^^^^^^^^

Installs the php-msgpack package.

``php.ng.mysql``
``php.mysql``
^^^^^^^^^^^^^^^^

Installs the php-mysql package.

``php.ng.mysqlnd``
``php.mysqlnd``
^^^^^^^^^^^^^^^^^^

Installs the php-mysqlnd package.
Disabled on opensuse no package.

``php.ng.net-smtp``
``php.net-smtp``
^^^^^^^^^^^^^^^^^^^

Installs the php-net-smtp package.

``php.ng.net4``
``php.net4``
^^^^^^^^^^^^^^^

Installs the php-net4 package.

``php.ng.net6``
``php.net6``
^^^^^^^^^^^NET6

Installs the php-net6 package.

``php.ng.oauth``
``php.oauth``
^^^^^^^^^^^^^^^^

Installs the php-oauth package.

``php.ng.opcache``
``php.opcache``
^^^^^^^^^^^^^^^^^^

Installs the php-opcache package.

``php.ng.openssl``
``php.openssl``
^^^^^^^^^^^^^^^^^^

Installs the php-openssl package.

``php.ng.pear``
``php.pear``
^^^^^^^^^^^^^^^

Installs the php-pear package.

``php.ng.pgsql``
``php.pgsql``
^^^^^^^^^^^^^^^^

Installs the php-pgsql package.

``php.ng.phar``
``php.phar``
^^^^^^^^^^^^^^^

Installs the php-phar package.

``php.ng.posix``
``php.posix``
^^^^^^^^^^^^^^^^

Installs the php-posix package.

``php.ng.pspell``
``php.pspell``
^^^^^^^^^^^^^^^^^

Installs the php-pspell package.

``php.ng.readline``
``php.readline``
^^^^^^^^^^^^^^^^^^^

Installs the php-readline package.

``php.ng.redis``
``php.redis``
^^^^^^^^^^^^^^^^

Installs the php-redis package.
Disabled on opensuse need server:php:extensions repo

``php.ng.seclib``
``php.seclib``
^^^^^^^^^^^^^^^^^

Installs the php-seclib package.

``php.ng.session``
``php.session``
^^^^^^^^^^^^^^^^^^

Installs the php-session package.

``php.ng.snmp``
``php.snmp``
^^^^^^^^^^^^^^^

Installs the php-snmp package.

``php.ng.soap``
``php.soap``
^^^^^^^^^^^^^^^

Installs the php-soap package.

``php.ng.sqlite``
``php.sqlite``
^^^^^^^^^^^^^^^^^

Installs the php-sqlite package,

``php.ng.ssh2``
``php.ssh2``
^^^^^^^^^^^^^^^

Installs the php-ssh2 package,

``php.ng.suhosin``
``php.suhosin``
^^^^^^^^^^^^^^^^^^

Installs the php-suhosin package.

``php.ng.svn``
``php.svn``
^^^^^^^^^^^^^^

Installs the php-svn package.

``php.ng.sybase``
``php.sybase``
^^^^^^^^^^^^^^^^^

Installs the php-sybase package.

``php.ng.tcpdf``
``php.tcpdf``
^^^^^^^^^^^^^^^^

Installs the php-tcpdf package.

``php.ng.tidy``
``php.tidy``
^^^^^^^^^^^^^^^

Installs the php-tidy package.

``php.ng.uuid``
``php.uuid``
^^^^^^^^^^^^^^^

Installs the php-uuid package.

``php.ng.xcache``
``php.xcache``
^^^^^^^^^^^^^^^^^

Meta-state that combines `php.ng.xcache.install`_ and `php.ng.xcache.ini`_.
Meta-state that combines `php.xcache.install`_ and `php.xcache.ini`_.

``php.ng.xcache.ini``
``php.xcache.ini``
^^^^^^^^^^^^^^^^^^^^^

Manages the php-xcache ini file

``php.ng.xcache.install``
``php.xcache.install``
^^^^^^^^^^^^^^^^^^^^^^^^^

Installs the php-xcache package.
Disabled on opensuse need server:php:extensions repo

``php.ng.xdebug``
``php.xdebug``
^^^^^^^^^^^^^^^^^

Installs the php-xdebug package.

``php.ng.xml``
``php.xml``
^^^^^^^^^^^^^^

Installs the php-xml package.

``php.ng.xsl``
``php.xsl``
^^^^^^^^^^^^^^

Installs the php-xsl package.

``php.ng.zip``
``php.zip``
^^^^^^^^^^^^^^

Installs the php-zip package.

+ 2
- 9
php/adodb.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-adodb:
pkg.installed:
- name: {{ php.adodb_pkg }}
{% set state = 'adodb' %}
{% include "php/installed.jinja" %}

php/ng/apache2/files/mod_php.conf.jinja → php/apache2/files/mod_php.conf.jinja Wyświetl plik

@@ -1,6 +1,6 @@
{% from "php/ng/map.jinja" import php with context %}
{% from "php/ng/map.jinja" import phpng_version with context %}
{% set major = phpng_version.split('.')|first %}
{% from "php/map.jinja" import php with context %}
{% from "php/map.jinja" import php_version with context %}
{% set major = php_version.split('.')|first %}

LoadModule php{{ major }}_module /usr/local/libexec/{{ php.lookup.apache2.name }}/libphp{{ major }}.so


+ 9
- 0
php/apache2/ini.sls Wyświetl plik

@@ -0,0 +1,9 @@
# Manages the main Apache2 ini file
{% from "php/map.jinja" import php with context %}
{% from "php/ini.jinja" import php_ini %}

{% set settings = php.ini.defaults %}
{% do settings.update(php.apache2.ini.settings) %}

php_apache2_ini:
{{ php_ini(php.lookup.apache2.ini, php.apache2.ini.opts, settings) }}

+ 13
- 0
php/apache2/init.sls Wyświetl plik

@@ -0,0 +1,13 @@
{% if grains['os_family'] in ["Debian", "FreeBSD"] %}
include:
- php.apache2.install
{% endif %} #END: os = Debian|FreeBSD
{% if grains['os_family'] == "Debian" %}
- php.apache2.ini

extend:
php_apache2_ini:
file:
- require:
- sls: php.apache2.install
{% endif %} #END: os = debian

+ 18
- 0
php/apache2/install.sls Wyświetl plik

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

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

{% if grains['os_family'] == "FreeBSD" %}
{{ php.lookup.apache2.module_config }}:
file.managed:
- source: salt://php/apache2/files/mod_php.conf.jinja
- template: jinja
{% if salt['pillar.get']('php:use_apache_formula', True) %}
- makedirs: true
- require_in:
- sls: apache
- watch_in:
- module: apache-restart
{% endif %} #END: use apache formula
{% endif %} #END: os = debian

+ 2
- 9
php/apc.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-apc:
pkg.installed:
- name: {{ php.apc_pkg }}
{% set state = 'apc' %}
{% include "php/installed.jinja" %}

+ 2
- 9
php/apcu.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-apcu:
pkg.installed:
- name: {{ php.apcu_pkg }}
{% set state = 'apcu' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/auth-sasl.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'auth-sasl' %}
{% include "php/installed.jinja" %}

+ 2
- 9
php/bcmath.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-bcmath:
pkg.installed:
- name: {{ php.bcmath_pkg }}
{% set state = 'bcmath' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/bz2.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'bz2' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/cache-lite.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'cache-lite' %}
{% include "php/installed.jinja" %}

+ 2
- 9
php/cgi.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-cgi:
pkg.installed:
- name: {{ php.cgi_pkg }}
{% set state = 'cgi' %}
{% include "php/installed.jinja" %}

+ 0
- 9
php/cli.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-cli:
pkg.installed:
- name: {{ php.cli_pkg }}

+ 26
- 0
php/cli/ini.sls Wyświetl plik

@@ -0,0 +1,26 @@
# Manages the php cli main ini file
{% from "php/map.jinja" import php with context %}
{% from "php/ini.jinja" import php_ini %}

{% set settings = php.ini.defaults %}
{% for key, value in php.cli.ini.settings.items() %}
{% if settings[key] is defined %}
{% do settings[key].update(value) %}
{% else %}
{% do settings.update({key: value}) %}
{% endif %}
{% endfor %}

{% set pillar_php_ng_version = salt['pillar.get']('php:ng:version', '7.0') %}
{% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %}
{% for version in pillar_php_ng_version %}
{% set first_version = pillar_php_ng_version[0]|string %}
{% set ini = php.lookup.cli.ini|replace(first_version, version) %}
php_cli_ini_{{ version }}:
{{ php_ini(ini, php.cli.ini.opts, settings) }}
{% endfor %}
{% else %}

php_cli_ini:
{{ php_ini(php.lookup.cli.ini, php.cli.ini.opts, settings) }}
{% endif %}

+ 22
- 0
php/cli/init.sls Wyświetl plik

@@ -0,0 +1,22 @@
# Installs php-cli and manages the associated php.ini

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

{% set pillar_php_version = salt['pillar.get']('php:version', '7.0') %}
{% if pillar_php_version is iterable and pillar_php_version is not string %}
extend:
{% for version in pillar_php_version %}
php_cli_ini_{{ version }}:
file:
- require:
- sls: php.cli.install
{% endfor %}
{% else %}
extend:
php_cli_ini:
file:
- require:
- sls: php.cli.install
{% endif %}

+ 28
- 0
php/cli/install.sls Wyświetl plik

@@ -0,0 +1,28 @@
{% set state = 'cli' %}
{% include "php/installed.jinja" %}

{%- if salt['grains.get']('os_family') == "Debian" %}
{% set current_php = salt['alternatives.show_current']('php') %}
{% set pillar_php_version = salt['pillar.get']('php:version', '7.0') %}
{% if pillar_php_version is iterable and pillar_php_version is not string %}
{% if 'alternatives_version' in salt['pillar.get']('php') %}
{% set php_version = salt['pillar.get']('php:alternatives_version') %}
{% else %}
{% set php_version = false %}
{% endif %}
{% else %}
{% set php_version = salt['pillar.get']('php:version', '7.0')|string %}
{% endif %}

{% if php_version %}
php_{{ php_version }}_link:
alternatives.set:
- name: php
- path: /usr/bin/php{{ php_version }}
- require_in:
- pkg: php_install_{{ state }}
- onlyif:
- which php
- test {{ current_php }} != $(which php{{ php_version }})
{% endif %}
{% endif %}

+ 19
- 12
php/composer.sls Wyświetl plik

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

{%- set install_file = php.local_bin + '/' + php.composer_bin %}
{% set install_file = php.lookup.pkgs.local_bin + '/' + php.lookup.pkgs.composer_bin %}

{%- if not salt['config.get']('sudo_user') %}
{%- set salt_user = salt['config.get']('user', 'root') %}
{%- else %}
{%- set salt_user = salt['config.get']('sudo_user', 'root') %}
{%- endif %}
{% if not salt['config.get']('sudo_user') %}
{% set salt_user = salt['config.get']('user', 'root') %}
{% else %}
{% set salt_user = salt['config.get']('sudo_user', 'root') %}
{% endif %}

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

include:
- php.deprecated
- php
{% if grains['os_family'] == 'FreeBSD' %}
- php.filter
- php.hash
- php.json
- php.mbstring
- php.openssl
- php.phar
{% endif %}

get-composer:
file.managed:
- name: {{ php.temp_dir }}/installer
- name: {{ php.lookup.pkgs.temp_dir }}/installer
- mode: 0755
- unless: test -f {{ install_file }}
- source: https://getcomposer.org/installer
@@ -26,7 +33,7 @@ get-composer:

install-composer:
cmd.run:
- name: php {{ php.temp_dir }}/installer --filename={{ php.composer_bin }} --install-dir={{ php.local_bin }}
- name: php {{ php.lookup.pkgs.temp_dir }}/installer --filename={{ php.lookup.pkgs.composer_bin }} --install-dir={{ php.lookup.pkgs.local_bin }}
- unless: test -f {{ install_file }}
- env:
- HOME: {{ salt_user_home }}
@@ -47,7 +54,7 @@ update-composer:
{% else %}
- unless: test $(date -d "60 days $({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") -gt $(date "+%s")
{% endif %}
- cwd: {{ php.local_bin }}
- cwd: {{ php.lookup.pkgs.local_bin }}
- env:
- HOME: {{ salt_user_home }}
- require:

+ 2
- 0
php/console-table.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'console-table' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/ctype.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'ctype' %}
{% include "php/installed.jinja" %}

+ 2
- 9
php/curl.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-curl:
pkg.installed:
- name: {{ php.curl_pkg }}
{% set state = 'curl' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/dba.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'dba' %}
{% include "php/installed.jinja" %}

+ 16
- 25
php/deprecated.sls Wyświetl plik

@@ -1,41 +1,32 @@
# -*- 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:
php-deprecated-in-v1.0.0-test-fail:
test.fail_without_changes:
- name: |


################################################################################
# #
# WARNING: BREAKING CHANGES IN UPCOMING VERSION `v1.0.0` #
# WARNING: BREAKING CHANGES SINCE `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. #
# Prior to `v1.0.0`, this formula provided two methods for managing PHP; the #
# old method under `php` and the new method under `php.ng`. The old method #
# has now been removed and `php.ng` has been promoted to be `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.40.1`. #
# If you are not in a position to migrate, please pin your repo to the final #
# release tag before `v1.0.0`, i.e. `v0.40.1`. #
# #
# If you are currently using `php.ng`, there is nothing to do until `v1.0.0` #
# is released. #
# To migrate from `php.ng`, simply modify your pillar to promote the entire #
# section under `php:ng` so that it is under `php` instead. So with the #
# editor of your choice, highlight the entire section and then unindent one #
# level. Finish by removing the `ng:` line. #
# #
# 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 #
# ``` #
# To migrate from the old `php`, first convert to `php.ng` under `v0.40.1` #
# and then follow the steps laid out in the paragraph directly above. #
# #
################################################################################
# - failhard: True
{%- endif %}
- failhard: True

+ 2
- 9
php/dev.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-dev:
pkg.installed:
- name: {{ php.dev_pkg }}
{% set state = 'dev' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/dom.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'dom' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/fileinfo.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'fileinfo' %}
{% include "php/installed.jinja" %}

php/ng/files/php.ini → php/files/php.ini Wyświetl plik


+ 2
- 0
php/filter.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'filter' %}
{% include "php/installed.jinja" %}

+ 0
- 11
php/fpm.sls Wyświetl plik

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

include:
- php.deprecated

php-fpm:
pkg.installed:
- name: {{ php.fpm_pkg }}
service.running:
- name: {{ php.fpm_service }}
- enable: True

+ 63
- 0
php/fpm/config.sls Wyświetl plik

@@ -0,0 +1,63 @@
# Manages the php-fpm main ini file
{% from 'php/map.jinja' import php with context %}
{% from "php/ini.jinja" import php_ini %}

{% set ini_settings = php.ini.defaults %}
{% for key, value in php.fpm.config.ini.settings.items() %}
{% if ini_settings[key] is defined %}
{% do ini_settings[key].update(value) %}
{% else %}
{% do ini_settings.update({key: value}) %}
{% endif %}
{% endfor %}

{% set pillar_php_ng_version = salt['pillar.get']('php:ng:version', '7.0') %}
{% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %}
{% for version in pillar_php_ng_version %}
{% set conf_settings = odict(php.lookup.fpm.defaults) %}
{% set first_version = pillar_php_ng_version[0]|string %}
{% set ini = php.lookup.fpm.ini|replace(first_version, version) %}
{% set conf = php.lookup.fpm.conf|replace(first_version, version) %}
{% set pools = php.lookup.fpm.pools|replace(first_version, version) %}

{% for key, value in conf_settings.items() %}
{% if value is string %}
{% do conf_settings.update({key: value.replace(first_version, version)}) %}
{% endif %}
{% endfor %}
{% do conf_settings.global.update({'pid': '/var/run/php' + version + '-fpm.pid' }) %}
{% do conf_settings.global.update({'error_log': '/var/log/php' + version + '-fpm.log' }) %}

php_fpm_ini_config_{{ version }}:
{{ php_ini(ini, php.fpm.config.ini.opts, ini_settings) }}

php_fpm_conf_config_{{ version }}:
{{ php_ini(conf, php.fpm.config.conf.opts, odict(conf_settings)) }}

{{ pools }}:
file.directory:
- name: {{ pools }}
- user: {{ php.lookup.fpm.user }}
- group: {{ php.lookup.fpm.group }}
- file_mode: 755
- make_dirs: True
{% endfor %}
{% else %}

{% set conf_settings = php.lookup.fpm.defaults %}
{% do conf_settings.update(php.fpm.config.conf.settings) %}

php_fpm_ini_config:
{{ php_ini(php.lookup.fpm.ini, php.fpm.config.ini.opts, ini_settings) }}

php_fpm_conf_config:
{{ php_ini(php.lookup.fpm.conf, php.fpm.config.conf.opts, conf_settings) }}

{{ php.lookup.fpm.pools }}:
file.directory:
- name: {{ php.lookup.fpm.pools }}
- user: {{ php.lookup.fpm.user }}
- group: {{ php.lookup.fpm.group }}
- file_mode: 755
- make_dirs: True
{% endif %}

+ 44
- 0
php/fpm/init.sls Wyświetl plik

@@ -0,0 +1,44 @@
# Meta-state to fully install php.fpm

include:
- php.fpm.config
- php.fpm.service
- php.fpm.pools

{% set pillar_php_ng_version = salt['pillar.get']('php:ng:version', '7.0') %}
extend:
php_fpm_service:
service:
- watch:
{% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %}
{% for version in pillar_php_ng_version %}
- file: php_fpm_ini_config_{{ version }}
- file: php_fpm_conf_config_{{ version }}
{% endfor %}
{% else %}
- file: php_fpm_ini_config
- file: php_fpm_conf_config
{% endif %}
- require:
- sls: php.fpm.config
{% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %}
{% for version in pillar_php_ng_version %}
php_fpm_ini_config_{{ version }}:
file:
- require:
- pkg: php_install_fpm
php_fpm_conf_config_{{ version }}:
file:
- require:
- pkg: php_install_fpm
{% endfor %}
{% else %}
php_fpm_ini_config:
file:
- require:
- pkg: php_install_fpm
php_fpm_conf_config:
file:
- require:
- pkg: php_install_fpm
{% endif %}

+ 2
- 0
php/fpm/install.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'fpm' %}
{% include "php/installed.jinja" %}

+ 24
- 0
php/fpm/pools.sls Wyświetl plik

@@ -0,0 +1,24 @@
# Manages the php-fpm pools config files
{% from "php/map.jinja" import php with context %}
{% from "php/macro.jinja" import sls_block %}
{% from "php/fpm/pools_config.sls" import pool_states with context %}

{% macro file_requisites(states) %}
{%- for state in states %}
- file: {{ state }}
{%- endfor -%}
{% endmacro %}

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

{% if pool_states %}
extend:
php_fpm_service:
service:
- watch:
{{ file_requisites(pool_states) }}
- require:
{{ file_requisites(pool_states) }}
{% endif %}

+ 45
- 0
php/fpm/pools_config.sls Wyświetl plik

@@ -0,0 +1,45 @@
# Manages the php-fpm pools config files
{% from 'php/map.jinja' import php with context %}
{% from "php/macro.jinja" import sls_block, serialize %}

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

{% set pool_states = [] %}

{% for pool, config in php.fpm.pools.items() %}
{% if pool == 'defaults' %}{% continue %}{% endif %}
{% for pkey, pvalues in config.get('settings', {}).items() %}
{% set pool_defaults = php.fpm.pools.get('defaults', {}).copy() %}
{% do pool_defaults.update(pvalues) %}
{% do pvalues.update(pool_defaults) %}
{% endfor %}
{% set state = 'php_fpm_pool_conf_' ~ loop.index0 %}

{% set pillar_php_ng_version = salt['pillar.get']('php:ng:version', '7.0') %}
{% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %}
{% set first_fpath = path_join(config.get('filename', pool), php.lookup.fpm.pools) %}
{% set first_version = pillar_php_ng_version[0]|string %}
{% set fpath = first_fpath.replace(first_version, config.get('phpversion', '7.0')) %}
{% else %}
{% set fpath = path_join(config.get('filename', pool), php.lookup.fpm.pools) %}
{% endif %}

{{ state }}:
{% if config.enabled %}
file.managed:
{{ sls_block(config.get('opts', {})) }}
- name: {{ fpath }}
- source: salt://php/files/php.ini
- template: jinja
- context:
config: {{ serialize(config.get('settings', {})) }}
{% else %}
file.absent:
- name: {{ fpath }}
{% endif %}

{% do pool_states.append(state) %}
{% endfor %}

+ 18
- 0
php/fpm/service.sls Wyświetl plik

@@ -0,0 +1,18 @@
# Manages the php-fpm service.
{% from "php/map.jinja" import php with context %}
{% from "php/macro.jinja" import sls_block %}

{% set service_function = {True:'running', False:'dead'}.get(php.fpm.service.enabled) %}

include:
- php.fpm.install

php_fpm_service:
service.{{ service_function }}:
{{ sls_block(php.fpm.service.opts) }}
- name: {{ php.lookup.fpm.service }}
- enable: {{ php.fpm.service.enabled }}
- require:
- sls: php.fpm.install
- watch:
- pkg: php_install_fpm

+ 2
- 9
php/gd.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-gd:
pkg.installed:
- name: {{ php.gd_pkg }}
{% set state = 'gd' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/gearman.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'gearman' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/geoip.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'geoip' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/geshi.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'geshi' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/gettext.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'gettext' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/gmp.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'gmp' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/hash.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'hash' %}
{% include "php/installed.jinja" %}

+ 16
- 0
php/hhvm/config.sls Wyświetl plik

@@ -0,0 +1,16 @@
# Manages the php-hhvm main ini file
{% from "php/map.jinja" import php with context %}
{% from "php/ini.jinja" import php_ini %}

{% set server_settings = php.lookup.hhvm.server %}
{% do server_settings.update(php.hhvm.config.server.settings) %}

{% set php_settings = php.lookup.hhvm.php %}
{% do php_settings.update(php.hhvm.config.php.settings) %}

php_hhvm_ini_config:
{{ php_ini(php.lookup.hhvm.conf, php.hhvm.config.server.opts, server_settings) }}

php_hhvm_conf_config:
{{ php_ini(php.lookup.hhvm.ini, php.hhvm.config.php.opts, php_settings) }}


+ 23
- 0
php/hhvm/init.sls Wyświetl plik

@@ -0,0 +1,23 @@
# Meta-state to fully install php.hhvm

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

extend:
php_hhvm_service:
service:
- watch:
- file: php_hhvm_ini_config
- file: php_hhvm_conf_config
- require:
- sls: php.hhvm.config
php_hhvm_ini_config:
file:
- require:
- pkg: php_install_hhvm
php_hhvm_conf_config:
file:
- require:
- pkg: php_install_hhvm

+ 2
- 0
php/hhvm/install.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'hhvm' %}
{% include "php/installed.jinja" %}

+ 19
- 0
php/hhvm/repo.sls Wyświetl plik

@@ -0,0 +1,19 @@
# Manages the php-hhvm service.
{% from "php/map.jinja" import php with context %}

include:
- php.hhvm.install


{% if salt['grains.get']('os_family') == 'Debian' -%}

hhvm_repo:
pkgrepo.managed:
- name: deb http://dl.hhvm.com/{{ salt['grains.get']('os')|lower }} {{ salt['grains.get']('oscodename')}} main
- file: /etc/apt/sources.list.d/hhvm.list
- keyid: 0x5a16e7281be7a449
- keyserver: keyserver.ubuntu.com
- refresh_db: True
- require_in:
- pkg: php_install_hhvm
{%- endif %}

+ 19
- 0
php/hhvm/service.sls Wyświetl plik

@@ -0,0 +1,19 @@
# Manages the php-hhvm service.
{% from "php/map.jinja" import php with context %}
{% from "php/macro.jinja" import sls_block %}

{% set service_function = {True:'running', False:'dead'}.get(php.hhvm.service.enabled) %}

include:
- php.hhvm.install

php_hhvm_service:
service.{{ service_function }}:
{{ sls_block(php.hhvm.service.opts) }}
- name: {{ php.lookup.hhvm.service }}
- enable: {{ php.hhvm.service.enabled }}
- require:
- sls: php.hhvm.install
- watch:
- pkg: php_install_hhvm


+ 2
- 0
php/http.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'http' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/iconv.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'iconv' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/igbinary.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'igbinary' %}
{% include "php/installed.jinja" %}

+ 2
- 9
php/imagick.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-imagick:
pkg.installed:
- name: {{ php.imagick_pkg }}
{% set state = 'imagick' %}
{% include "php/installed.jinja" %}

+ 2
- 9
php/imap.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-imap:
pkg.installed:
- name: {{ php.imap_pkg }}
{% set state = 'imap' %}
{% include "php/installed.jinja" %}

php/ng/ini.jinja → php/ini.jinja Wyświetl plik

@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
# vim: ft=jinja
{# php.ini management macro. #}
{% from "php/ng/macro.jinja" import sls_block, serialize %}
{% from "php/macro.jinja" import sls_block, serialize %}

{% macro php_ini(filename, opts={}, settings={}) %}
file.managed:
{{ sls_block(opts) }}
- name: {{ filename }}
- source: salt://php/ng/files/php.ini
- source: salt://php/files/php.ini
- template: jinja
- context:
config: {{ serialize(odict(settings)) }}

+ 2
- 33
php/init.sls Wyświetl plik

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

include:
- php.deprecated

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

{%- if grains['os'] == "Ubuntu" %}
{%- set use_external_repo = salt['pillar.get']('php:use_external_repo', False) %}

{%- if use_external_repo %}
{%- set external_repo_name = salt['pillar.get']('php:external_repo_name', 'ondrej/php') %}

php_from_ppa:
pkgrepo.managed:
- ppa: {{ external_repo_name }}
- env:
- LC_ALL: "C.UTF-8"
- require_in:
- pkg: php_from_ppa
pkg.latest:
- name: {{ php.php_pkg }}
- refresh: True

{%- endif %}

{%- endif %}

php:
pkg.installed:
- name: {{ php.php_pkg }}

{%- endif %}
{% set state = 'php' %}
{% include "php/installed.jinja" %}

php/ng/installed.jinja → php/installed.jinja Wyświetl plik

@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
# vim: ft=jinja
{# Template for installing packages #}
{% from "php/ng/map.jinja" import php with context %}
{% from "php/ng/macro.jinja" import sls_block %}
{% from "php/map.jinja" import php with context %}
{% from "php/macro.jinja" import sls_block %}

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

@@ -89,7 +89,7 @@ php_ppa_{{ state }}:
{% elif grains['os_family'] == "RedHat" and (state == 'cli' or state == 'fpm' or state == 'php') %}
{% set use_scl_repo = salt['pillar.get']('php:use_scl_repo', False) %}
{% set scl_php_version = salt['pillar.get']('php:scl_php_version', 71) %}
{% set enable_php_repo = salt['pillar.get']('php:ng:lookup:enable_php_repo', False) %}
{% set enable_php_repo = salt['pillar.get']('php:lookup:enable_php_repo', False) %}
{% if use_scl_repo and grains['os'] == 'CentOS' %}
php_centos_scl_enable_{{ state }}:
pkg.installed:

+ 2
- 9
php/intl.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-intl:
pkg.installed:
- name: {{ php.intl_pkg }}
{% set state = 'intl' %}
{% include "php/installed.jinja" %}

+ 2
- 9
php/json.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-json:
pkg.installed:
- name: {{ php.json_pkg }}
{% set state = 'json' %}
{% include "php/installed.jinja" %}

+ 2
- 9
php/ldap.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-ldap:
pkg.installed:
- name: {{ php.ldap_pkg }}
{% set state = 'ldap' %}
{% include "php/installed.jinja" %}

php/ng/macro.jinja → php/macro.jinja Wyświetl plik


+ 2
- 9
php/mail.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-mail:
pkg.installed:
- name : {{ php.mail_pkg }}
{% set state = 'mail' %}
{% include "php/installed.jinja" %}

+ 3211
- 464
php/map.jinja
Plik diff jest za duży
Wyświetl plik


+ 2
- 9
php/mbstring.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-mbstring:
pkg.installed:
- name: {{ php.mbstring_pkg }}
{% set state = 'mbstring' %}
{% include "php/installed.jinja" %}

+ 2
- 9
php/mcrypt.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-mcrypt:
pkg.installed:
- name: {{ php.mcrypt_pkg }}
{% set state = 'mcrypt' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/mdb2/init.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'mdb2' %}
{% include "php/installed.jinja" %}

+ 3
- 0
php/mdb2/mysql.sls Wyświetl plik

@@ -0,0 +1,3 @@
{% set state = 'mdb2-driver-mysql' %}
{% include "php/installed.jinja" %}
{% include "php/mdb2/init.sls" %}

+ 3
- 0
php/mdb2/pgsql.sls Wyświetl plik

@@ -0,0 +1,3 @@
{% set state = 'mdb2-driver-pgsql' %}
{% include "php/installed.jinja" %}
{% include "php/mdb2/init.sls" %}

+ 2
- 9
php/memcache.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-memcache:
pkg.installed:
- name: {{ php.memcache_pkg }}
{% set state = 'memcache' %}
{% include "php/installed.jinja" %}

+ 2
- 9
php/memcached.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-memcached:
pkg.installed:
- name: {{ php.memcached_pkg }}
{% set state = 'memcached' %}
{% include "php/installed.jinja" %}

+ 23
- 0
php/modules.sls Wyświetl plik

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

{% set modules = salt['pillar.get']('php:modules') or [] %}
{% set base_name = 'php.' %}
{% set existing_states = salt['cp.list_states']() %}

{% set includes = [] %}
{% set install = [] %}

{% for module in modules %}
{% set state = base_name ~ module %}
{% if state in existing_states %}
{% do includes.append(state) %}
{% else %}
{% do install.append(module) %}
{% endif %}
{% endfor %}

include: {{ includes|json }}

{% for state in install %}
{% include "php/installed.jinja" %}
{% endfor %}

+ 2
- 43
php/mongo.sls Wyświetl plik

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

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

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

php-mongo:
pecl.installed:
- name: {{ php.mongo_pecl }}
- defaults: True
{%- if version is not none %}
- version: {{ version }}
{%- endif %}
- require:
- pkg: {{ php.pear_pkg }}
- pkg: build_pkgs

build_pkgs:
pkg.installed:
- pkgs: {{ php.build_pkgs }}

php-mongo-conf:
file.managed:
- name: {{ php.ext_conf_path }}/mongo.ini
- contents: |
extension={{ php.mongo_ext }}
- require:
- pkg: {{ php.php_pkg }}

{%- if salt['grains.get']('os_family') == "Debian" %}

php-mongo-enable:
cmd.run:
- name: {{ php.phpenmod_command }} mongo
- require:
- file: php-mongo-conf

{%- endif %}
{% set state = 'mongo' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/mongodb.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'mongodb' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/msgpack.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'msgpack' %}
{% include "php/installed.jinja" %}

+ 2
- 9
php/mysql.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-mysql:
pkg.installed:
- name: {{ php.mysql_pkg }}
{% set state = 'mysql' %}
{% include "php/installed.jinja" %}

+ 2
- 9
php/mysqlnd.sls Wyświetl plik

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

include:
- php.deprecated
- php

php-mysqlnd:
pkg.installed:
- name: {{ php.mysqlnd_pkg }}
{% set state = 'mysqlnd' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/net-smtp.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'net-smtp' %}
{% include "php/installed.jinja" %}

+ 2
- 0
php/net4.sls Wyświetl plik

@@ -0,0 +1,2 @@
{% set state = 'net4' %}
{% include "php/installed.jinja" %}

+ 9
- 0
php/net6.sls Wyświetl plik

@@ -0,0 +1,9 @@
{% if salt['grains.get']('os_family') == "RedHat" %}
{#
Installation of this PEAR module can be done by running
`pear install Net_IPv6` on RedHat based distros
#}
{% else %}
{% set state = 'net6' %}
{% include "php/installed.jinja" %}
{% endif %}

+ 2
- 2
php/ng/adodb.sls Wyświetl plik

@@ -1,2 +1,2 @@
{% set state = 'adodb' %}
{% include "php/ng/installed.jinja" %}
include:
- php.deprecated

+ 1
- 11
php/ng/apache2/ini.sls Wyświetl plik

@@ -1,12 +1,2 @@
# Manages the main Apache2 ini file
{% from "php/ng/map.jinja" import php with context %}
{% from "php/ng/ini.jinja" import php_ini %}

{% 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) }}
- php.deprecated

+ 1
- 13
php/ng/apache2/init.sls Wyświetl plik

@@ -1,14 +1,2 @@
{% 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" %}
- php.ng.apache2.ini

extend:
php_apache2_ini:
file:
- require:
- sls: php.ng.apache2.install
{% endif %} #END: os = debian
- php.deprecated

+ 1
- 20
php/ng/apache2/install.sls Wyświetl plik

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

include:
- php.ng.deprecated

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

{% if grains['os_family'] == "FreeBSD" %}
{{ php.lookup.apache2.module_config }}:
file.managed:
- source: salt://php/ng/apache2/files/mod_php.conf.jinja
- template: jinja
{% if salt['pillar.get']('php:ng:use_apache_formula', True) %}
- makedirs: true
- require_in:
- sls: apache
- watch_in:
- module: apache-restart
{% endif %} #END: use apache formula
{% endif %} #END: os = debian
- php.deprecated

+ 2
- 2
php/ng/apc.sls Wyświetl plik

@@ -1,2 +1,2 @@
{% set state = 'apc' %}
{% include "php/ng/installed.jinja" %}
include:
- php.deprecated

+ 2
- 2
php/ng/apcu.sls Wyświetl plik

@@ -1,2 +1,2 @@
{% set state = 'apcu' %}
{% include "php/ng/installed.jinja" %}
include:
- php.deprecated

+ 2
- 2
php/ng/auth-sasl.sls Wyświetl plik

@@ -1,2 +1,2 @@
{% set state = 'auth-sasl' %}
{% include "php/ng/installed.jinja" %}
include:
- php.deprecated

+ 2
- 2
php/ng/bcmath.sls Wyświetl plik

@@ -1,2 +1,2 @@
{% set state = 'bcmath' %}
{% include "php/ng/installed.jinja" %}
include:
- php.deprecated

+ 2
- 2
php/ng/bz2.sls Wyświetl plik

@@ -1,2 +1,2 @@
{% set state = 'bz2' %}
{% include "php/ng/installed.jinja" %}
include:
- php.deprecated

+ 2
- 2
php/ng/cache-lite.sls Wyświetl plik

@@ -1,2 +1,2 @@
{% set state = 'cache-lite' %}
{% include "php/ng/installed.jinja" %}
include:
- php.deprecated

+ 2
- 2
php/ng/cgi.sls Wyświetl plik

@@ -1,2 +1,2 @@
{% set state = 'cgi' %}
{% include "php/ng/installed.jinja" %}
include:
- php.deprecated

+ 1
- 28
php/ng/cli/ini.sls Wyświetl plik

@@ -1,29 +1,2 @@
# Manages the php cli main ini file
{% 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 %}
{% do settings[key].update(value) %}
{% else %}
{% do settings.update({key: value}) %}
{% endif %}
{% endfor %}

{% set pillar_php_ng_version = salt['pillar.get']('php:ng:version', '7.0') %}
{% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %}
{% for version in pillar_php_ng_version %}
{% set first_version = pillar_php_ng_version[0]|string %}
{% set ini = php.lookup.cli.ini|replace(first_version, version) %}
php_cli_ini_{{ version }}:
{{ php_ini(ini, php.cli.ini.opts, settings) }}
{% endfor %}
{% else %}

php_cli_ini:
{{ php_ini(php.lookup.cli.ini, php.cli.ini.opts, settings) }}
{% endif %}
- php.deprecated

+ 1
- 22
php/ng/cli/init.sls Wyświetl plik

@@ -1,23 +1,2 @@
# Installs php-cli and manages the associated php.ini

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

{% set pillar_php_ng_version = salt['pillar.get']('php:ng:version', '7.0') %}
{% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %}
extend:
{% for version in pillar_php_ng_version %}
php_cli_ini_{{ version }}:
file:
- require:
- sls: php.ng.cli.install
{% endfor %}
{% else %}
extend:
php_cli_ini:
file:
- require:
- sls: php.ng.cli.install
{% endif %}
- php.deprecated

+ 1
- 30
php/ng/cli/install.sls Wyświetl plik

@@ -1,31 +1,2 @@
{% 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 pillar_php_ng_version = salt['pillar.get']('php:ng:version', '7.0') %}
{% if pillar_php_ng_version is iterable and pillar_php_ng_version is not string %}
{% if 'alternatives_version' in salt['pillar.get']('php:ng') %}
{% set phpng_version = salt['pillar.get']('php:ng:alternatives_version') %}
{% else %}
{% set phpng_version = false %}
{% endif %}
{% else %}
{% set phpng_version = salt['pillar.get']('php:ng:version', '7.0')|string %}
{% endif %}

{% if phpng_version %}
php_{{ phpng_version }}_link:
alternatives.set:
- name: php
- path: /usr/bin/php{{ phpng_version }}
- require_in:
- pkg: php_install_{{ state }}
- onlyif:
- which php
- test {{ current_php }} != $(which php{{ phpng_version }})
{% endif %}
{% endif %}
- php.deprecated

+ 1
- 61
php/ng/composer.sls Wyświetl plik

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

{% set install_file = php.lookup.pkgs.local_bin + '/' + php.lookup.pkgs.composer_bin %}

{% if not salt['config.get']('sudo_user') %}
{% set salt_user = salt['config.get']('user', 'root') %}
{% else %}
{% set salt_user = salt['config.get']('sudo_user', 'root') %}
{% endif %}

{% 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
- php.ng.hash
- php.ng.json
- php.ng.mbstring
- php.ng.openssl
- php.ng.phar
{% endif %}

get-composer:
file.managed:
- name: {{ php.lookup.pkgs.temp_dir }}/installer
- mode: 0755
- unless: test -f {{ install_file }}
- source: https://getcomposer.org/installer
- source_hash: https://composer.github.io/installer.sig
- require:
- pkg: php

install-composer:
cmd.run:
- name: php {{ php.lookup.pkgs.temp_dir }}/installer --filename={{ php.lookup.pkgs.composer_bin }} --install-dir={{ php.lookup.pkgs.local_bin }}
- unless: test -f {{ install_file }}
- env:
- HOME: {{ salt_user_home }}
- require:
- file: get-composer

# Get composer version date and check if older than 60day (defaultvalue of COMPOSER_DEV_WARNING_TIME)
# then it's time to run `composer selfupdate`
#
# It would be nice if composer had a command line switch to get this, but it doesn't,
# and so we just grep for it.
#
update-composer:
cmd.run:
- name: "{{ install_file }} selfupdate"
{% if grains['os_family'] == 'FreeBSD' %}
- unless: test $(date -v+60d -j -f "%Y-%m-%d %H:%M:%S" "$({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") -gt $(date "+%s")
{% else %}
- unless: test $(date -d "60 days $({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") -gt $(date "+%s")
{% endif %}
- cwd: {{ php.lookup.pkgs.local_bin }}
- env:
- HOME: {{ salt_user_home }}
- require:
- cmd: install-composer
- php.deprecated

+ 2
- 2
php/ng/console-table.sls Wyświetl plik

@@ -1,2 +1,2 @@
{% set state = 'console-table' %}
{% include "php/ng/installed.jinja" %}
include:
- php.deprecated

+ 2
- 2
php/ng/ctype.sls Wyświetl plik

@@ -1,2 +1,2 @@
{% set state = 'ctype' %}
{% include "php/ng/installed.jinja" %}
include:
- php.deprecated

+ 2
- 2
php/ng/curl.sls Wyświetl plik

@@ -1,2 +1,2 @@
{% set state = 'curl' %}
{% include "php/ng/installed.jinja" %}
include:
- php.deprecated

+ 2
- 2
php/ng/dba.sls Wyświetl plik

@@ -1,2 +1,2 @@
{% set state = 'dba' %}
{% include "php/ng/installed.jinja" %}
include:
- php.deprecated

+ 0
- 40
php/ng/deprecated.sls Wyświetl plik

@@ -1,40 +0,0 @@
# -*- 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.40.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 %}

+ 2
- 2
php/ng/dev.sls Wyświetl plik

@@ -1,2 +1,2 @@
{% set state = 'dev' %}
{% include "php/ng/installed.jinja" %}
include:
- php.deprecated

+ 2
- 2
php/ng/dom.sls Wyświetl plik

@@ -1,2 +1,2 @@
{% set state = 'dom' %}
{% include "php/ng/installed.jinja" %}
include:
- php.deprecated

+ 2
- 2
php/ng/fileinfo.sls Wyświetl plik

@@ -1,2 +1,2 @@
{% set state = 'fileinfo' %}
{% include "php/ng/installed.jinja" %}
include:
- php.deprecated

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików

Ładowanie…
Anuluj
Zapisz