Skip to content

Commit 9ef9fad

Browse files
author
nb
committed
fix: prevent running of states deprecated in v1.0.0
1 parent 08cd563 commit 9ef9fad

38 files changed

+68
-937
lines changed

php/adodb.sls

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
{%- from "php/map.jinja" import php with context %}
2-
31
include:
4-
- php
5-
6-
php-adodb:
7-
pkg.installed:
8-
- name: {{ php.adodb_pkg }}
2+
- php.deprecated

php/apc.sls

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
{%- from "php/map.jinja" import php with context %}
2-
31
include:
4-
- php
5-
6-
php-apc:
7-
pkg.installed:
8-
- name: {{ php.apc_pkg }}
2+
- php.deprecated

php/apcu.sls

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
{%- from "php/map.jinja" import php with context %}
2-
31
include:
4-
- php
5-
6-
php-apcu:
7-
pkg.installed:
8-
- name: {{ php.apcu_pkg }}
2+
- php.deprecated

php/bcmath.sls

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
{%- from "php/map.jinja" import php with context %}
2-
31
include:
4-
- php
5-
6-
php-bcmath:
7-
pkg.installed:
8-
- name: {{ php.bcmath_pkg }}
2+
- php.deprecated

php/cgi.sls

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
{%- from "php/map.jinja" import php with context %}
2-
31
include:
4-
- php
5-
6-
php-cgi:
7-
pkg.installed:
8-
- name: {{ php.cgi_pkg }}
2+
- php.deprecated

php/cli.sls

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
{%- from "php/map.jinja" import php with context %}
2-
31
include:
4-
- php
5-
6-
php-cli:
7-
pkg.installed:
8-
- name: {{ php.cli_pkg }}
2+
- php.deprecated

php/composer.sls

+1-52
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,2 @@
1-
{%- from "php/map.jinja" import php with context %}
2-
3-
{%- set install_file = php.local_bin + '/' + php.composer_bin %}
4-
5-
{%- if not salt['config.get']('sudo_user') %}
6-
{%- set salt_user = salt['config.get']('user', 'root') %}
7-
{%- else %}
8-
{%- set salt_user = salt['config.get']('sudo_user', 'root') %}
9-
{%- endif %}
10-
11-
{%- set salt_user_home = salt['user.info'](salt_user).get('home', '/root') %}
12-
131
include:
14-
- php
15-
16-
get-composer:
17-
file.managed:
18-
- name: {{ php.temp_dir }}/installer
19-
- mode: 0755
20-
- unless: test -f {{ install_file }}
21-
- source: https://getcomposer.org/installer
22-
- source_hash: https://composer.github.io/installer.sig
23-
- require:
24-
- pkg: php
25-
26-
install-composer:
27-
cmd.run:
28-
- name: php {{ php.temp_dir }}/installer --filename={{ php.composer_bin }} --install-dir={{ php.local_bin }}
29-
- unless: test -f {{ install_file }}
30-
- env:
31-
- HOME: {{ salt_user_home }}
32-
- require:
33-
- file: get-composer
34-
35-
# Get composer version date and check if older than 60day (defaultvalue of COMPOSER_DEV_WARNING_TIME)
36-
# then it's time to run `composer selfupdate`
37-
#
38-
# It would be nice if composer had a command line switch to get this, but it doesn't,
39-
# and so we just grep for it.
40-
#
41-
update-composer:
42-
cmd.run:
43-
- name: "{{ install_file }} selfupdate"
44-
{% if grains['os_family'] == 'FreeBSD' %}
45-
- 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")
46-
{% else %}
47-
- unless: test $(date -d "60 days $({{ install_file }} --version | cut -d ' ' -f 4,5)" "+%s") -gt $(date "+%s")
48-
{% endif %}
49-
- cwd: {{ php.local_bin }}
50-
- env:
51-
- HOME: {{ salt_user_home }}
52-
- require:
53-
- cmd: install-composer
2+
- php.deprecated

php/curl.sls

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
{%- from "php/map.jinja" import php with context %}
2-
31
include:
4-
- php
5-
6-
php-curl:
7-
pkg.installed:
8-
- name: {{ php.curl_pkg }}
2+
- php.deprecated

php/deprecated.sls

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# -*- coding: utf-8 -*-
2+
# vim: ft=sls
3+
4+
php-deprecated-in-v1.0.0-test-fail:
5+
test.fail_without_changes:
6+
- name: |
7+
################################################################################
8+
# #
9+
# WARNING: BREAKING CHANGES SINCE `v1.0.0` #
10+
# #
11+
################################################################################
12+
# #
13+
# Prior to `v1.0.0`, this formula provided two methods for managing php; the #
14+
# old method under `php` and the new method under `php.ng`. The old method #
15+
# has now been removed and `php.ng` has been promoted to be `PHP` in its #
16+
# place. #
17+
# #
18+
# If you are not in a position to migrate, please pin your repo to the final #
19+
# release tag before `v1.0.0`, i.e. `v0.37.1`. #
20+
# #
21+
# To migrate from `php.ng`, simply modify your pillar to promote the entire #
22+
# section under `php:ng` so that it is under `php` instead. So with the #
23+
# editor of your choice, highlight the entire section and then unindent one #
24+
# level. Finish by removing the `ng:` line. #
25+
# #
26+
# To migrate from the old `php`, first convert to `php.ng` under `v0.37.0` #
27+
# and then follow the steps laid out in the paragraph directly above. #
28+
# #
29+
################################################################################
30+
- failhard: True

php/dev.sls

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
{%- from "php/map.jinja" import php with context %}
2-
31
include:
4-
- php
5-
6-
php-dev:
7-
pkg.installed:
8-
- name: {{ php.dev_pkg }}
2+
- php.deprecated

php/fpm.sls

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
{%- from "php/map.jinja" import php with context %}
2-
3-
php-fpm:
4-
pkg.installed:
5-
- name: {{ php.fpm_pkg }}
6-
service.running:
7-
- name: {{ php.fpm_service }}
8-
- enable: True
1+
include:
2+
- php.deprecated

php/gd.sls

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
{%- from "php/map.jinja" import php with context %}
2-
31
include:
4-
- php
5-
6-
php-gd:
7-
pkg.installed:
8-
- name: {{ php.gd_pkg }}
2+
- php.deprecated

php/imagick.sls

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
{%- from "php/map.jinja" import php with context %}
2-
31
include:
4-
- php
5-
6-
php-imagick:
7-
pkg.installed:
8-
- name: {{ php.imagick_pkg }}
2+
- php.deprecated

php/imap.sls

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
{%- from "php/map.jinja" import php with context %}
2-
31
include:
4-
- php
5-
6-
php-imap:
7-
pkg.installed:
8-
- name: {{ php.imap_pkg }}
2+
- php.deprecated

php/init.sls

+2-30
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,2 @@
1-
{%- from "php/map.jinja" import php with context %}
2-
3-
{%- if not 'ng' in salt['pillar.get']('php', {}) %}
4-
5-
{%- if grains['os'] == "Ubuntu" %}
6-
{%- set use_external_repo = salt['pillar.get']('php:use_external_repo', False) %}
7-
8-
{%- if use_external_repo %}
9-
{%- set external_repo_name = salt['pillar.get']('php:external_repo_name', 'ondrej/php') %}
10-
11-
php_from_ppa:
12-
pkgrepo.managed:
13-
- ppa: {{ external_repo_name }}
14-
- env:
15-
- LC_ALL: "C.UTF-8"
16-
- require_in:
17-
- pkg: php_from_ppa
18-
pkg.latest:
19-
- name: {{ php.php_pkg }}
20-
- refresh: True
21-
22-
{%- endif %}
23-
24-
{%- endif %}
25-
26-
php:
27-
pkg.installed:
28-
- name: {{ php.php_pkg }}
29-
30-
{%- endif %}
1+
include:
2+
- php.deprecated

php/intl.sls

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
{%- from "php/map.jinja" import php with context %}
2-
31
include:
4-
- php
5-
6-
php-intl:
7-
pkg.installed:
8-
- name: {{ php.intl_pkg }}
2+
- php.deprecated

php/json.sls

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
{%- from "php/map.jinja" import php with context %}
2-
31
include:
4-
- php
5-
6-
php-json:
7-
pkg.installed:
8-
- name: {{ php.json_pkg }}
2+
- php.deprecated

php/ldap.sls

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
{%- from "php/map.jinja" import php with context %}
2-
31
include:
4-
- php
5-
6-
php-ldap:
7-
pkg.installed:
8-
- name: {{ php.ldap_pkg }}
2+
- php.deprecated

php/mail.sls

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
{%- from "php/map.jinja" import php with context %}
2-
31
include:
4-
- php
5-
6-
php-mail:
7-
pkg.installed:
8-
- name : {{ php.mail_pkg }}
2+
- php.deprecated

0 commit comments

Comments
 (0)