1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-14 12:52:08 +02:00

[ticket/14205] Bump PHP requirement to PHP 5.4

PHPBB3-14205
This commit is contained in:
Tristan Darricau 2015-09-28 17:40:24 +02:00
parent a342517dfb
commit f3dc2a801d
19 changed files with 60 additions and 50 deletions

View File

@ -2,10 +2,10 @@ language: php
matrix:
include:
- php: 5.3
env: DB=mysqli # MyISAM
- php: 5.4
env: DB=mysqli
env: DB=none;NOTESTS=1
- php: 5.4
env: DB=mysqli # MyISAM
- php: 5.4
env: DB=mysql
- php: 5.4
@ -33,19 +33,18 @@ services:
- redis-server
install:
- travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION
- travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
before_script:
- travis/setup-database.sh $DB $TRAVIS_PHP_VERSION
- travis/setup-database.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
- phantomjs --webdriver=8910 > /dev/null &
script:
- travis/phing-sniff.sh $DB $TRAVIS_PHP_VERSION
- travis/check-sami-parse-errors.sh $DB $TRAVIS_PHP_VERSION
- travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION
- travis/check-executable-files.sh $DB $TRAVIS_PHP_VERSION ./
- travis/phing-sniff.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
- travis/check-sami-parse-errors.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
- travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
- travis/check-executable-files.sh $DB $TRAVIS_PHP_VERSION $NOTESTS ./
- sh -c "if [ '$SLOWTESTS' != '1' -a '$DB' = 'mysqli' ]; then phpBB/vendor/bin/phpunit tests/lint_test.php; fi"
- sh -c "if [ '$SLOWTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml; fi"
- sh -c "if [ '$NOTESTS' != '1' -a '$SLOWTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml; fi"
- sh -c "if [ '$SLOWTESTS' = '1' ]; then phpBB/vendor/bin/phpunit --configuration travis/phpunit-$DB-travis.xml --group slow; fi"
- sh -c "if [ '$TRAVIS_PHP_VERSION' = '5.3' -a '$DB' = 'mysqli' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..FETCH_HEAD; fi"
- sh -c "set -x;if [ '$NOTESTS' = '1' -a '$TRAVIS_PULL_REQUEST' != 'false' ]; then git-tools/commit-msg-hook-range.sh origin/$TRAVIS_BRANCH..FETCH_HEAD; fi"

View File

@ -29,7 +29,7 @@
"lusitanian/oauth": "0.2.*",
"marc1706/fast-image-size": "1.1.*",
"patchwork/utf8": "1.1.*",
"php": ">=5.3.9",
"php": ">=5.4",
"s9e/text-formatter": "dev-release/php5.3",
"symfony/config": "2.8.*@dev",
"symfony/console": "2.8.*@dev",

28
phpBB/composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "983770c26a0dcd7399ebd488846ade9a",
"hash": "3a1fb55478d50b5b7b5888f3a07e0b43",
"packages": [
{
"name": "bantu/ini-get-wrapper",
@ -254,7 +254,7 @@
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/s9e/TextFormatter/zipball/fb39bdd38f6706b96422a7583b89c9283a58960f",
"url": "https://api.github.com/repos/s9e/TextFormatter/zipball/c065d0e81e7e4666cd13ba4414f4dc7fe8d33dd9",
"reference": "beee0e5693f7ca8ed16a94294acf53b6e6207e7c",
"shasum": ""
},
@ -313,7 +313,7 @@
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Config/zipball/a3aa17e2dcec2dc1c764bedd21e69fdf888b8b55",
"url": "https://api.github.com/repos/symfony/Config/zipball/546b5c41f8e0c3b18e55e4450ec51444adf3e61e",
"reference": "a3aa17e2dcec2dc1c764bedd21e69fdf888b8b55",
"shasum": ""
},
@ -363,7 +363,7 @@
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Console/zipball/d31246d93cd99dc57858adb5da63841d56969928",
"url": "https://api.github.com/repos/symfony/Console/zipball/a0d4aa01cfe2e3646e50c13c721c04d044534535",
"reference": "d31246d93cd99dc57858adb5da63841d56969928",
"shasum": ""
},
@ -420,7 +420,7 @@
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Debug/zipball/3c14966b099b4ba807f146df4c6a7acffba2f793",
"url": "https://api.github.com/repos/symfony/Debug/zipball/7eac742c453af47ae561d6c41743dc7faefc9464",
"reference": "3c14966b099b4ba807f146df4c6a7acffba2f793",
"shasum": ""
},
@ -475,7 +475,7 @@
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/99c05679526e9293783ce3a9059890b47da1d97e",
"url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/0558c49dc0abbf4702b432fb9813bcd849d46ff9",
"reference": "99c05679526e9293783ce3a9059890b47da1d97e",
"shasum": ""
},
@ -535,7 +535,7 @@
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/d7246885b7fe4cb5a2786bda34362d2f0e40b730",
"url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/e79162fa079bb559ddad17c58cf8b7ecbaffd9b6",
"reference": "d7246885b7fe4cb5a2786bda34362d2f0e40b730",
"shasum": ""
},
@ -593,7 +593,7 @@
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Filesystem/zipball/b9fa06f1822de287e660130955b546777994597b",
"url": "https://api.github.com/repos/symfony/Filesystem/zipball/287fc0b1dcb11ff729eeefc20441c08eaf628f29",
"reference": "b9fa06f1822de287e660130955b546777994597b",
"shasum": ""
},
@ -744,7 +744,7 @@
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/330079921340f2d273dd24df16fc129948614e77",
"url": "https://api.github.com/repos/symfony/HttpKernel/zipball/39aa7db7997031951ad4a4019153199287e1cc88",
"reference": "330079921340f2d273dd24df16fc129948614e77",
"shasum": ""
},
@ -824,7 +824,7 @@
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/Routing/zipball/e9554bafc78c93b15ef56ce72c5aa2f3a511e683",
"url": "https://api.github.com/repos/symfony/Routing/zipball/7ee642267d616c9855c28387d30050e093f26c6b",
"reference": "e9554bafc78c93b15ef56ce72c5aa2f3a511e683",
"shasum": ""
},
@ -971,7 +971,7 @@
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/TwigBridge/zipball/f85dc88ede5943c63c8681c02d8ef6b4252be54c",
"url": "https://api.github.com/repos/symfony/TwigBridge/zipball/2d1b0ac84ff35256d14c7dd5d949e50d138fa7f3",
"reference": "f85dc88ede5943c63c8681c02d8ef6b4252be54c",
"shasum": ""
},
@ -2443,7 +2443,7 @@
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/BrowserKit/zipball/4f297d7e00c375b6ab03732e076f65799a73937d",
"url": "https://api.github.com/repos/symfony/BrowserKit/zipball/4dbd336331f5e7ba7a6f9e4f9f608b89093f49b3",
"reference": "4f297d7e00c375b6ab03732e076f65799a73937d",
"shasum": ""
},
@ -2551,7 +2551,7 @@
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/DomCrawler/zipball/be577b3a5d4a06d8ce03db57222bd06b5a6509de",
"url": "https://api.github.com/repos/symfony/DomCrawler/zipball/1b459587235fb74b213269ec5ad8ac2f6e22f5f4",
"reference": "be577b3a5d4a06d8ce03db57222bd06b5a6509de",
"shasum": ""
},
@ -2670,7 +2670,7 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=5.3.9"
"php": ">=5.4"
},
"platform-dev": []
}

View File

@ -147,7 +147,7 @@
<li>Oracle</li>
</ul>
</li>
<li><strong>PHP 5.3.9+</strong> with support for the database you intend to use.</li>
<li><strong>PHP 5.4.0+</strong> with support for the database you intend to use.</li>
<li>The following PHP modules are required:
<ul>
<li>json</li>

View File

@ -265,7 +265,7 @@
<ul>
<li>Your server type/version, e.g. Apache 2.2.3, IIS 7, Sambar, etc.</li>
<li>PHP version and mode of operation, e.g. PHP 5.3.9 as a module, PHP 5.4.0 running as CGI, etc.</li>
<li>PHP version and mode of operation, e.g. PHP 5.4.0 as a module, PHP 5.4.0 running as CGI, etc.</li>
<li>DB type/version, e.g. MySQL 5.0.77, PostgreSQL 9.0.6, MSSQL Server 2000 SP1, etc.</li>
</ul>
@ -323,11 +323,11 @@
<div class="content">
<p>phpBB 3.1.x takes advantage of new features added in PHP 5.3. We recommend that you upgrade to the latest stable release of PHP5 to run phpBB. The minimum version required is PHP 5.3.9.</p>
<p>phpBB 3.2.x takes advantage of new features added in PHP 5.4. We recommend that you upgrade to the latest stable release of PHP5 to run phpBB. The minimum version required is PHP 5.4.0.</p>
<p>Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB. If you are running a development version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
<p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MariaDB 5.x, MSSQL Server 2000, PostgreSQL 8.x, Oracle 8, SQLite 2 and SQLite 3. Versions of PHP used range from 5.3.x to 5.4.x without problem.</p>
<p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MariaDB 5.x, MSSQL Server 2000, PostgreSQL 8.x, Oracle 8, SQLite 2 and SQLite 3. Versions of PHP used range from 5.4.x to 5.6.x without problem.</p>
<a name="phpsec"></a><h3>7.i. Notice on PHP security issues</h3>

View File

@ -426,7 +426,7 @@ class acp_main
// Version check
$user->add_lang('install');
if ($auth->acl_get('a_server') && version_compare(PHP_VERSION, '5.3.3', '<'))
if ($auth->acl_get('a_server') && version_compare(PHP_VERSION, '5.4', '<'))
{
$template->assign_vars(array(
'S_PHP_VERSION_OLD' => true,

View File

@ -22,9 +22,9 @@ define('PHPBB_ENVIRONMENT', 'production');
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
if (version_compare(PHP_VERSION, '5.3.9') < 0)
if (version_compare(PHP_VERSION, '5.4') < 0)
{
die('You are running an unsupported PHP version. Please upgrade to PHP 5.3.9 or higher before trying to install phpBB 3.1');
die('You are running an unsupported PHP version. Please upgrade to PHP 5.4 or higher before trying to install phpBB 3.2');
}
function phpbb_require_updated($path, $optional = false)

View File

@ -163,7 +163,7 @@ class install_install extends module
// Test the minimum PHP version
$php_version = PHP_VERSION;
if (version_compare($php_version, '5.3.9') < 0)
if (version_compare($php_version, '5.4') < 0)
{
$result = '<strong style="color:red">' . $lang['NO'] . '</strong>';
}

View File

@ -301,10 +301,10 @@ $lang = array_merge($lang, array(
'PHP_REGISTER_GLOBALS_EXPLAIN' => 'phpBB will still run if this setting is enabled, but if possible, it is recommended that register_globals is disabled on your PHP install for security reasons.',
'PHP_SAFE_MODE' => 'Safe mode',
'PHP_SETTINGS' => 'PHP version and settings',
'PHP_SETTINGS_EXPLAIN' => '<strong>Required</strong> - You must be running at least version 5.3.9 of PHP in order to install phpBB. If <var>safe mode</var> is displayed below your PHP installation is running in that mode. This will impose limitations on remote administration and similar features.',
'PHP_SETTINGS_EXPLAIN' => '<strong>Required</strong> - You must be running at least version 5.4.0 of PHP in order to install phpBB. If <var>safe mode</var> is displayed below your PHP installation is running in that mode. This will impose limitations on remote administration and similar features.',
'PHP_URL_FOPEN_SUPPORT' => 'PHP setting <var>allow_url_fopen</var> is enabled',
'PHP_URL_FOPEN_SUPPORT_EXPLAIN' => '<strong>Optional</strong> - This setting is optional, however certain phpBB functions like off-site avatars will not work properly without it.',
'PHP_VERSION_REQD' => 'PHP version >= 5.3.9',
'PHP_VERSION_REQD' => 'PHP version >= 5.4.0',
'POST_ID' => 'Post ID',
'PREFIX_FOUND' => 'A scan of your tables has shown a valid installation using <strong>%s</strong> as table prefix.',
'PREPROCESS_STEP' => 'Executing pre-processing functions/queries',

View File

@ -99,7 +99,7 @@ $lang = array_merge($lang, array(
// Server requirements
'PHP_VERSION_REQD' => 'PHP version',
'PHP_VERSION_REQD_EXPLAIN' => 'phpBB requires PHP version 5.3.9 or higher.',
'PHP_VERSION_REQD_EXPLAIN' => 'phpBB requires PHP version 5.4.0 or higher.',
'PHP_GETIMAGESIZE_SUPPORT' => 'PHP getimagesize() function is required',
'PHP_GETIMAGESIZE_SUPPORT_EXPLAIN' => 'In order for phpBB to function correctly, the getimagesize function needs to be available.',
'PCRE_UTF_SUPPORT' => 'PCRE UTF-8 support',

View File

@ -22,6 +22,6 @@
"classmap": [""]
},
"require": {
"php": ">=5.3.9"
"php": ">=5.4"
}
}

View File

@ -95,7 +95,7 @@ class check_server_environment extends \phpbb\install\task_base
{
$php_version = PHP_VERSION;
if (version_compare($php_version, '5.3.9') < 0)
if (version_compare($php_version, '5.4') < 0)
{
$this->response_helper->add_error_message('PHP_VERSION_REQD', 'PHP_VERSION_REQD_EXPLAIN');

View File

@ -12,10 +12,11 @@ set -e
DB=$1
TRAVIS_PHP_VERSION=$2
root="$3"
NOTESTS=$3
root="$4"
path="${root}phpBB/"
if [ "$TRAVIS_PHP_VERSION" == "5.3" -a "$DB" == "mysqli" ]
if [ "$NOTESTS" == '1' ]
then
# Check the permissions of the files

View File

@ -12,8 +12,9 @@ set -e
DB=$1
TRAVIS_PHP_VERSION=$2
NOTESTS=$3
if [ "$TRAVIS_PHP_VERSION" == "5.3" -a "$DB" == "mysqli" ]
if [ "$NOTESTS" == '1' ]
then
find . -type f -a -iregex '.*\.\(gif\|jpg\|jpeg\|png\)$' -a -not -wholename '*vendor/*' | \
parallel --gnu --keep-order 'phpBB/develop/strip_icc_profiles.sh {}'

View File

@ -12,8 +12,9 @@ set -e
DB=$1
TRAVIS_PHP_VERSION=$2
NOTESTS=$3
if [ "$TRAVIS_PHP_VERSION" == "5.3" -a "$DB" == "mysqli" ]
if [ "$NOTESTS" == '1' ]
then
# Workarounds for
# https://github.com/fabpot/Sami/issues/116

View File

@ -10,7 +10,7 @@
#
set -e
set -x
DB=$1
TRAVIS_PHP_VERSION=$2
EXTNAME=$3

View File

@ -13,8 +13,9 @@ set -x
DB=$1
TRAVIS_PHP_VERSION=$2
NOTESTS=$3
if [ "$TRAVIS_PHP_VERSION" == "5.5" -a "$DB" == "mysqli" ]
if [ "$NOTESTS" == '1' ]
then
cd build
../phpBB/vendor/bin/phing sniff

View File

@ -13,6 +13,12 @@ set -x
DB=$1
TRAVIS_PHP_VERSION=$2
NOTESTS=$3
if [ "$NOTESTS" == '1' ]
then
exit 0
fi
if [ "$DB" == "postgres" ]
then
@ -20,7 +26,7 @@ then
psql -c 'create database phpbb_tests;' -U postgres
fi
if [ "$TRAVIS_PHP_VERSION" == "5.3" -a "$DB" == "mysqli" ]
if [ "$TRAVIS_PHP_VERSION" == "5.4" -a "$DB" == "mysqli" ]
then
mysql -e 'SET GLOBAL storage_engine=MyISAM;'
fi

View File

@ -13,8 +13,9 @@ set -x
DB=$1
TRAVIS_PHP_VERSION=$2
NOTESTS=$3
if [ "$TRAVIS_PHP_VERSION" == "5.3" -a "$DB" == "mysqli" ]
if [ "$NOTESTS" == '1' ]
then
travis/setup-exiftool.sh
travis/setup-unbuffer.sh
@ -25,12 +26,12 @@ then
travis/setup-mariadb.sh
fi
if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]
if [ "$NOTESTS" != '1' -a "$TRAVIS_PHP_VERSION" != "hhvm" ]
then
travis/setup-php-extensions.sh
fi
if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.3.19', '>=');"` == "1" ]
if [ "$NOTESTS" != '1' ]
then
travis/setup-webserver.sh
travis/install-phpbb-test-dependencies.sh