mirror of
https://github.com/smarty-php/smarty.git
synced 2025-07-31 08:27:14 +02:00
run travis in xenial where possible for latest php versions. Fix unit tests from freakingo over inconsistent error messages in php8-beta.
This commit is contained in:
10
.travis.yml
10
.travis.yml
@ -1,8 +1,6 @@
|
||||
language: php
|
||||
|
||||
sudo: false
|
||||
|
||||
dist: trusty
|
||||
os: linux
|
||||
dist: xenial
|
||||
|
||||
install:
|
||||
- travis_retry composer require phpunit/phpunit:^7.5
|
||||
@ -13,8 +11,10 @@ jobs:
|
||||
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
|
||||
@ -28,7 +28,7 @@ jobs:
|
||||
install: travis_retry composer config platform.php 7.4.0 && composer require phpunit/phpunit:^7.5
|
||||
fast_finish: true
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
- php: nightly # PHP 8 is still in beta
|
||||
|
||||
services:
|
||||
- memcached
|
||||
|
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- Changed error handlers and handling of undefined constants for php8-compatibility (set $errcontext argument optional) https://github.com/smarty-php/smarty/issues/605
|
||||
- Changed expected error levels in unit tests for php8-compatibility
|
||||
- Travis unit tests now run for all php versions >= 5.3, including php8
|
||||
- Travis runs on Xenial where possible
|
||||
|
||||
### Fixed
|
||||
- PHP5.3 compatibility fixes
|
||||
|
@ -76,13 +76,7 @@ class UndefinedTemplateVarTest extends PHPUnit_Smarty
|
||||
} catch (Exception $e) {
|
||||
|
||||
$exceptionThrown = true;
|
||||
|
||||
if (PHP_VERSION_ID >= 80000) {
|
||||
$this->assertStringStartsWith('Undefined array key', $e->getMessage());
|
||||
} else {
|
||||
$this->assertStringStartsWith('Undefined index', $e->getMessage());
|
||||
}
|
||||
|
||||
$this->assertStringStartsWith('Undefined ', $e->getMessage());
|
||||
$this->assertTrue(in_array(
|
||||
get_class($e),
|
||||
array(
|
||||
|
Reference in New Issue
Block a user