1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-01-29 12:43:15 +01:00

[ticket/14948] Remove checks for unsupported PHP versions

PHPBB3-14948
This commit is contained in:
Marc Alexander 2019-01-02 20:34:45 +01:00
parent 56669ac280
commit 5a0e426b38
No known key found for this signature in database
GPG Key ID: 50E0D2423696F995
4 changed files with 6 additions and 23 deletions

View File

@ -42,7 +42,7 @@ require_once 'test_framework/phpbb_database_test_connection_manager.php';
require_once 'test_framework/phpbb_functional_test_case.php'; require_once 'test_framework/phpbb_functional_test_case.php';
require_once 'test_framework/phpbb_ui_test_case.php'; require_once 'test_framework/phpbb_ui_test_case.php';
if (version_compare(PHP_VERSION, '5.3.19', ">=") && file_exists(__DIR__ . '/vendor/autoload.php')) if (file_exists(__DIR__ . '/vendor/autoload.php'))
{ {
require_once __DIR__ . '/vendor/autoload.php'; require_once __DIR__ . '/vendor/autoload.php';
} }

View File

@ -45,11 +45,6 @@ class phpbb_lint_test extends phpbb_test_case
*/ */
public function test_lint($path) public function test_lint($path)
{ {
if (version_compare(PHP_VERSION, '5.3.0', '<'))
{
$this->markTestSkipped('phpBB uses PHP 5.3 syntax in some files, linting on PHP < 5.3 will fail');
}
$cmd = sprintf('(%s -l %s) 2>&1', self::$php_binary, escapeshellarg($path)); $cmd = sprintf('(%s -l %s) 2>&1', self::$php_binary, escapeshellarg($path));
$output = array(); $output = array();
$status = 1; $status = 1;

View File

@ -52,15 +52,10 @@ class phpbb_ui_test_case extends phpbb_test_case
{ {
parent::setUpBeforeClass(); parent::setUpBeforeClass();
if (version_compare(PHP_VERSION, '5.3.19', '<')) if (!class_exists('\Facebook\WebDriver\Remote\RemoteWebDriver'))
{
self::markTestSkipped('UI test case requires at least PHP 5.3.19.');
}
else if (!class_exists('\Facebook\WebDriver\Remote\RemoteWebDriver'))
{ {
self::markTestSkipped( self::markTestSkipped(
'Could not find RemoteWebDriver class. ' . 'Could not find RemoteWebDriver class.'
'Run "php ../composer.phar install" from the tests folder.'
); );
} }

View File

@ -42,16 +42,9 @@ function install_php_extension
php_ini_file=$(find_php_ini) php_ini_file=$(find_php_ini)
# apc # Disable opcache for testing
if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.5.0-dev', '<');"` == "1" ] echo 'Disabling Opcache'
then echo 'opcache.enable=0' >> "$php_ini_file"
echo 'Enabling APC PHP extension'
printf "\n" | pecl install apc
echo 'apc.enable_cli=1' >> "$php_ini_file"
else
echo 'Disabling Opcache'
echo 'opcache.enable=0' >> "$php_ini_file"
fi
# APCu # APCu
if [ `php -r "echo (int) (version_compare(PHP_VERSION, '7.0.0-dev', '>=') && version_compare(PHP_VERSION, '7.3.0-dev', '<'));"` == "1" ] if [ `php -r "echo (int) (version_compare(PHP_VERSION, '7.0.0-dev', '>=') && version_compare(PHP_VERSION, '7.3.0-dev', '<'));"` == "1" ]