Skip to content

Commit

Permalink
[ticket/14948] Remove checks for unsupported PHP versions
Browse files Browse the repository at this point in the history
PHPBB3-14948
  • Loading branch information
marc1706 committed Jan 2, 2019
1 parent 56669ac commit 5a0e426
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 23 deletions.
2 changes: 1 addition & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
require_once 'test_framework/phpbb_functional_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';
}
5 changes: 0 additions & 5 deletions tests/lint_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ static public function setUpBeforeClass()
*/
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));
$output = array();
$status = 1;
Expand Down
9 changes: 2 additions & 7 deletions tests/test_framework/phpbb_ui_test_case.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,10 @@ static public function setUpBeforeClass()
{
parent::setUpBeforeClass();

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

Expand Down
13 changes: 3 additions & 10 deletions travis/setup-php-extensions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,9 @@ function install_php_extension

php_ini_file=$(find_php_ini)

# apc
if [ `php -r "echo (int) version_compare(PHP_VERSION, '5.5.0-dev', '<');"` == "1" ]
then
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
# Disable opcache for testing
echo 'Disabling Opcache'
echo 'opcache.enable=0' >> "$php_ini_file"

# APCu
if [ `php -r "echo (int) (version_compare(PHP_VERSION, '7.0.0-dev', '>=') && version_compare(PHP_VERSION, '7.3.0-dev', '<'));"` == "1" ]
Expand Down

0 comments on commit 5a0e426

Please sign in to comment.