Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.

Commit f779b85

Browse files
committed
Merge pull request #58 from sambauers/master
Update CHANGELOG, bump secure PHP versions, add secure warning toggle, upgrade instructions.
2 parents 9f38acc + a071083 commit f779b85

File tree

6 files changed

+102
-18
lines changed

6 files changed

+102
-18
lines changed

CHANGELOG.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,70 @@
1+
## 2.0.0 ##
2+
3+
* Use Hiera for configs
4+
* Allow configure params on PHP builds
5+
* Add PThreads extension
6+
* Update cardboard to 2.1.0 and update tests
7+
* Add support for PHP 5.6+
8+
* Add insecure PHP version warnings
9+
* Make Composer version configurable
10+
* Remove version specific PHP classes allowing arbitrary PHP versions
11+
12+
## 1.2.6 ##
13+
14+
* Fix autoconf 2.13 sandboxing
15+
16+
## 1.2.5 ##
17+
18+
* Sandbox autoconf213 to fix some installation conflicts
19+
* Set the PECL provider to default on darwin for PHP extensions (this can be overridden)
20+
* Increase `pm.max_children` to 10 for PHP-FPM pools (@gblair)
21+
22+
## 1.2.4 ##
23+
24+
* Fixes compilation of PHP versions > 5.4.17 due to a break in Bison compatibility (@webflo!)
25+
26+
## 1.2.3 ##
27+
28+
* Add xhprof extension (@webflo)
29+
* Add latest versions of PHP 5.4 and 5.5 (@webflo)
30+
31+
## 1.2.2 ##
32+
33+
* Change default .ini settings to increase timeouts, memory limits etc.
34+
35+
## 1.2.1 ##
36+
37+
* Bump Composer to latest 1.0.0-alpha8 (@webbj74)
38+
39+
## 1.2.0 ##
40+
41+
* Adds PHP 5.5 support! This requires a later version of Bison to compile, which is installed as a sandboxed package.
42+
* Adds additional minor versions of PHP for 5.3 and 5.4
43+
* Use ensure_packages from the stdlib to improve module compatibility (thanks @jameydeorio)
44+
* Fixes specs, and added Github API token to travis so builds actually work again
45+
46+
## 1.1.5 ##
47+
48+
* Add OAuth extension (@dbtlr)
49+
* Fix HTTP extension bug including zookeeper (@dbtlr)
50+
* Add Mongo extension (@eebs)
51+
* Fix compilation bug caused by Freetype and GD incompatibilities (@eebs!)
52+
53+
## 1.1.4 ##
54+
55+
* Add memcache PHP extension (@poppen)
56+
* Add pdo_pgsql PHP extension (@poppen)
57+
58+
## 1.1.3 ##
59+
60+
* Added support for Composer see the readme for usage.
61+
* Module now has test specs (hooray!), please run script/cibuild before making a pull request.
62+
* Fixes to bugs the specs caught
63+
64+
## 1.1.2 ##
65+
66+
* Increase xdebug `max_nesting_level`
67+
168
## 1.1.1 ##
269

370
* Remove `libpng` package, add dependency on `libpng` module

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ A sample PHP project manifest is provided in `manifests/project.pp` which will r
7979

8080
A simple project manifest example:
8181

82-
````puppet
82+
```puppet
8383
# your-boxen/modules/projects/manifests/trollin.pp
8484
8585
class projects::trollin {
@@ -93,10 +93,20 @@ class projects::trollin {
9393
php => '5.3.23',
9494
}
9595
}
96-
````
96+
```
9797

9898
With the above, as long as our app is configured to listen to requests at `www/index.php` we can visit [http://trollin.dev/](http://trollin.dev/) to access the app.
9999

100100
In the background this is installing PHP 5.3.23, creating a PHP-FPM service for 5.3.23, and a FPM pool for this project which runs within the FPM service. This then listens on an nginx socket at "#{ENV['BOXEN_SOCKET_DIR']}"/trollin.
101101

102102
The example nginx host template at `templates/nginx/nginx.conf.erb` is also a sample configuration which can be copied to your main boxen module and the nginx template path above altered to match this. This is set up with a basic PHP structure, and Fastcgi params to pass the expected variables from Nginx to PHP-FPM.
103+
104+
## Upgrading to version 2.X.X from version 1.X.X
105+
106+
The old PHP version classes are removed completely in version 2.
107+
108+
You will need to change any code in your manifests like `include PHP::5_X_X` to the version 2 equivalent `php::version { 5.X.X: }`
109+
110+
All other classes remain unchanged in syntax, and should "just work".
111+
112+
This module will now warn you if you are running an insecure version of PHP when you run Boxen.

data/common.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ php::config::composer:
1313
php::config::phpenv:
1414
revision: '6499bb6c7b645af3f4e67f7e17708d5ee208453f'
1515
php::config::secure_versions:
16-
'5.6': '5.6.5'
17-
'5.5': '5.5.20'
18-
'5.4': '5.4.36'
16+
'5.6': '5.6.8'
17+
'5.5': '5.5.24'
18+
'5.4': '5.4.40'
19+
php::config::secure_warning: true

manifests/config.pp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
$composer = undef,
1717
$phpenv = undef,
1818
$secure_versions = undef,
19+
$secure_warning = undef,
1920
) {
2021
include boxen::config
2122

@@ -35,4 +36,8 @@
3536
$phpenv,
3637
$secure_versions,
3738
)
39+
40+
validate_bool(
41+
$secure_warning,
42+
)
3843
}

manifests/version.pp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@
3030
}
3131

3232
# Version is greater than or equal to 5.6.0 and less than the 5.6 secure version
33-
if versioncmp($patch_version, '5.6') >= 0 and versioncmp($patch_version, $secure_5_6) < 0 {
33+
if $php::config::secure_warning and versioncmp($patch_version, '5.6') >= 0 and versioncmp($patch_version, $secure_5_6) < 0 {
3434
warning("You are installing PHP ${patch_version} which is known to be insecure. The current secure 5.6.X version is ${secure_5_6}")
3535
}
3636

3737
# Version is greater than or equal to 5.5.0 and less than the 5.5 secure version
38-
if versioncmp($patch_version, '5.5') >= 0 and versioncmp($patch_version, $secure_5_5) < 0 {
38+
if $php::config::secure_warning and versioncmp($patch_version, '5.5') >= 0 and versioncmp($patch_version, $secure_5_5) < 0 {
3939
warning("You are installing PHP ${patch_version} which is known to be insecure. The current secure 5.5.X version is ${secure_5_5}")
4040
}
4141

4242
# Version is less than the minimum secure version
43-
if versioncmp($patch_version, $secure_5_4) < 0 {
43+
if $php::config::secure_warning and versioncmp($patch_version, $secure_5_4) < 0 {
4444
warning("You are installing PHP ${patch_version} which is known to be insecure. The current secure 5.4.X version is ${secure_5_4}")
4545
}
4646

spec/fixtures/hiera/test.yaml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
---
2-
php::config::root: "/test/boxen/phpenv"
3-
php::config::logdir: "/test/boxen/log/php"
4-
php::config::configdir: "/test/boxen/config/php"
5-
php::config::datadir: "/test/boxen/data/php"
6-
php::config::pluginsdir: "/test/boxen/phpenv/plugins"
7-
php::config::cachedir: "/test/boxen/data/php/cache"
2+
php::config::root: "/test/boxen/phpenv"
3+
php::config::logdir: "/test/boxen/log/php"
4+
php::config::configdir: "/test/boxen/config/php"
5+
php::config::datadir: "/test/boxen/data/php"
6+
php::config::pluginsdir: "/test/boxen/phpenv/plugins"
7+
php::config::cachedir: "/test/boxen/data/php/cache"
88
php::config::extensioncachedir: "/test/boxen/data/php/cache/extensions"
9-
php::config::configure_params: {}
9+
php::config::configure_params: {}
1010
php::config::composer:
1111
version: '1.0.0-alpha9'
1212
checksum: '05df355b5277c8c9012470e699fa5494'
1313
php::config::phpenv:
1414
revision: '6499bb6c7b645af3f4e67f7e17708d5ee208453f'
1515
php::config::secure_versions:
16-
'5.6': '5.6.4'
17-
'5.5': '5.5.20'
18-
'5.4': '5.4.36'
16+
'5.6': '5.6.7'
17+
'5.5': '5.5.23'
18+
'5.4': '5.4.39'
19+
php::config::secure_warning: true

0 commit comments

Comments
 (0)