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

Lines changed: 1 addition & 7 deletions
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

Lines changed: 1 addition & 7 deletions
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

Lines changed: 1 addition & 7 deletions
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

Lines changed: 1 addition & 7 deletions
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

Lines changed: 1 addition & 7 deletions
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

Lines changed: 1 addition & 7 deletions
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

Lines changed: 1 addition & 52 deletions
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

Lines changed: 1 addition & 7 deletions
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

Lines changed: 30 additions & 0 deletions
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

Lines changed: 1 addition & 7 deletions
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

0 commit comments

Comments
 (0)