-
Notifications
You must be signed in to change notification settings - Fork 230
feat(ng): promote NG formula #183
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" %} |
6 changes: 3 additions & 3 deletions
6
php/ng/apache2/files/mod_php.conf.jinja → php/apache2/files/mod_php.conf.jinja
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{% set state = 'auth-sasl' %} | ||
{% include "php/installed.jinja" %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{% set state = 'bz2' %} | ||
{% include "php/installed.jinja" %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{% set state = 'cache-lite' %} | ||
{% include "php/installed.jinja" %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" %} |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{% set state = 'console-table' %} | ||
{% include "php/installed.jinja" %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{% set state = 'ctype' %} | ||
{% include "php/installed.jinja" %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{% set state = 'dba' %} | ||
{% include "php/installed.jinja" %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{% set state = 'dom' %} | ||
{% include "php/installed.jinja" %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{% set state = 'fileinfo' %} | ||
{% include "php/installed.jinja" %} |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{% set state = 'filter' %} | ||
{% include "php/installed.jinja" %} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.