Incorporated AnrDaemons suggestions, making composer figure out the required phpunit version instead of specifying it explicitly and removing a unneeded error supression (@).

This commit is contained in:
Simon Wisselink
2020-09-12 21:15:49 +02:00
parent d1dcee0d9e
commit f25dd94f9f
2 changed files with 3 additions and 8 deletions

View File

@ -3,29 +3,24 @@ os: linux
dist: xenial
install:
- travis_retry composer require phpunit/phpunit:^7.5
- travis_retry composer install
jobs:
include:
- php: 5.3 # Composer and PHPUnit require PHP 5.3.2+ to run, so we cannot test below 5.3
dist: precise # PHP 5.3 is supported only on Precise.
install: travis_retry composer require phpunit/phpunit:^4.8
- php: 5.4
dist: trusty # PHP 5.4 is supported only on Trusty.
install: travis_retry composer require phpunit/phpunit:^4.8
- php: 5.5
dist: trusty # PHP 5.5 is supported only on Trusty.
install: travis_retry composer require phpunit/phpunit:^4.8
- php: 5.6
install: travis_retry composer require phpunit/phpunit:^5.7
- php: 7.0
install: travis_retry composer require phpunit/phpunit:^6.5
- php: 7.1
- php: 7.2
- php: 7.3
- php: 7.4
- php: nightly
install: travis_retry composer config platform.php 7.4.0 && composer require phpunit/phpunit:^7.5
install: travis_retry composer config platform.php 7.4.0 && composer install
fast_finish: true
allow_failures:
- php: nightly # PHP 8 is still in beta

View File

@ -96,7 +96,7 @@ class Smarty_Internal_Compile_Private_Special_Variable extends Smarty_Internal_C
if (strpos($_index[ 1 ], '$') === false && strpos($_index[ 1 ], '\'') === false) {
return "defined('{$_index[1]}') ? constant('{$_index[1]}') : null";
} else {
return "defined({$_index[1]}) ? @constant({$_index[1]}) : null";
return "defined({$_index[1]}) ? constant({$_index[1]}) : null";
}
// no break
case 'config':