Skip to content

Commit eb32f3f

Browse files
committed
Switch to php 7.1
1 parent 5c570b8 commit eb32f3f

File tree

9 files changed

+339
-320
lines changed

9 files changed

+339
-320
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@
1919
/doc/*/*.html
2020
/.idea/
2121
/*.apache
22+
/*.nginx
2223
/web/css/*
2324
/web/js/*

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
language: php
22

33
php:
4-
- 7.0
54
- 7.1
65
- 7.2
76

app/Resources/configs/apache/phpofby_dev.apache

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
server {
2+
server_name domain.tld www.domain.tld;
3+
root /home/<username>/www/<sitename>/web;
4+
5+
location / {
6+
# try to serve file directly, fallback to app.php
7+
try_files $uri /app.php$is_args$args;
8+
}
9+
# DEV
10+
# This rule should only be placed on your development environment
11+
# In production, don't include this and don't deploy app_dev.php or config.php
12+
location ~ ^/(app_dev|config)\.php(/|$) {
13+
fastcgi_pass localhost:9000;
14+
fastcgi_split_path_info ^(.+\.php)(/.*)$;
15+
include fastcgi_params;
16+
# When you are using symlinks to link the document root to the
17+
# current version of your application, you should pass the real
18+
# application path instead of the path to the symlink to PHP
19+
# FPM.
20+
# Otherwise, PHP's OPcache may not properly detect changes to
21+
# your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
22+
# for more information).
23+
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
24+
fastcgi_param DOCUMENT_ROOT $realpath_root;
25+
}
26+
# PROD
27+
location ~ ^/app\.php(/|$) {
28+
fastcgi_pass localhost:9000;
29+
fastcgi_split_path_info ^(.+\.php)(/.*)$;
30+
include fastcgi_params;
31+
# When you are using symlinks to link the document root to the
32+
# current version of your application, you should pass the real
33+
# application path instead of the path to the symlink to PHP
34+
# FPM.
35+
# Otherwise, PHP's OPcache may not properly detect changes to
36+
# your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
37+
# for more information).
38+
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
39+
fastcgi_param DOCUMENT_ROOT $realpath_root;
40+
# Prevents URIs that include the front controller. This will 404:
41+
# http://domain.tld/app.php/some-path
42+
# Remove the internal directive to allow URIs like this
43+
internal;
44+
}
45+
46+
# return 404 for all other php files not matching the front controller
47+
# this prevents access to other php files you don't want to be accessible.
48+
location ~ \.php$ {
49+
return 404;
50+
}
51+
52+
error_log /var/log/nginx/<sitename>_error.log;
53+
access_log /var/log/nginx/<sitename>_access.log;
54+
}

bin/deploy-to-prod.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env sh
2-
# We should deploy only build for php 7
3-
if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ $(phpenv version-name) = "7.0" ]; then
2+
# We should deploy only build for php 7.1
3+
if [ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ $(phpenv version-name) = "7.1" ]; then
44
eval "$(ssh-agent -s)"
55
chmod 600 .travis/deploy.key
66
ssh-add .travis/deploy.key

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
}
3434
],
3535
"require": {
36-
"php": ">=7.0.0",
36+
"php": ">=7.1.18",
3737
"ext-pdo": "*",
3838
"ext-pdo_mysql": "*",
3939
"ext-zip": "*",
@@ -63,8 +63,8 @@
6363
"friendsofphp/php-cs-fixer": "2.*",
6464
"pdepend/pdepend": "2.*",
6565
"phpmd/phpmd": "2.*",
66-
"phpunit/phpunit": "6.*",
67-
"sebastian/phpcpd": "3.*",
66+
"phpunit/phpunit": "7.*",
67+
"sebastian/phpcpd": "4.*",
6868
"sensio/generator-bundle": "^3.0",
6969
"squizlabs/php_codesniffer": "2.*",
7070
"symfony/phpunit-bridge": "^3.0"
@@ -87,7 +87,7 @@
8787
},
8888
"config": {
8989
"platform": {
90-
"php": "7.0.30"
90+
"php": "7.1.18"
9191
},
9292
"sort-packages": true
9393
},

0 commit comments

Comments
 (0)