mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-02 09:24:28 +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
|
language: php
|
||||||
|
os: linux
|
||||||
sudo: false
|
dist: xenial
|
||||||
|
|
||||||
dist: trusty
|
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- travis_retry composer require phpunit/phpunit:^7.5
|
- travis_retry composer require phpunit/phpunit:^7.5
|
||||||
@@ -13,8 +11,10 @@ jobs:
|
|||||||
dist: precise # PHP 5.3 is supported only on Precise.
|
dist: precise # PHP 5.3 is supported only on Precise.
|
||||||
install: travis_retry composer require phpunit/phpunit:^4.8
|
install: travis_retry composer require phpunit/phpunit:^4.8
|
||||||
- php: 5.4
|
- php: 5.4
|
||||||
|
dist: trusty # PHP 5.4 is supported only on Trusty.
|
||||||
install: travis_retry composer require phpunit/phpunit:^4.8
|
install: travis_retry composer require phpunit/phpunit:^4.8
|
||||||
- php: 5.5
|
- php: 5.5
|
||||||
|
dist: trusty # PHP 5.5 is supported only on Trusty.
|
||||||
install: travis_retry composer require phpunit/phpunit:^4.8
|
install: travis_retry composer require phpunit/phpunit:^4.8
|
||||||
- php: 5.6
|
- php: 5.6
|
||||||
install: travis_retry composer require phpunit/phpunit:^5.7
|
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
|
install: travis_retry composer config platform.php 7.4.0 && composer require phpunit/phpunit:^7.5
|
||||||
fast_finish: true
|
fast_finish: true
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- php: nightly
|
- php: nightly # PHP 8 is still in beta
|
||||||
|
|
||||||
services:
|
services:
|
||||||
- memcached
|
- 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 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
|
- Changed expected error levels in unit tests for php8-compatibility
|
||||||
- Travis unit tests now run for all php versions >= 5.3, including php8
|
- Travis unit tests now run for all php versions >= 5.3, including php8
|
||||||
|
- Travis runs on Xenial where possible
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- PHP5.3 compatibility fixes
|
- PHP5.3 compatibility fixes
|
||||||
|
@@ -76,13 +76,7 @@ class UndefinedTemplateVarTest extends PHPUnit_Smarty
|
|||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|
||||||
$exceptionThrown = true;
|
$exceptionThrown = true;
|
||||||
|
$this->assertStringStartsWith('Undefined ', $e->getMessage());
|
||||||
if (PHP_VERSION_ID >= 80000) {
|
|
||||||
$this->assertStringStartsWith('Undefined array key', $e->getMessage());
|
|
||||||
} else {
|
|
||||||
$this->assertStringStartsWith('Undefined index', $e->getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
$this->assertTrue(in_array(
|
$this->assertTrue(in_array(
|
||||||
get_class($e),
|
get_class($e),
|
||||||
array(
|
array(
|
||||||
|
Reference in New Issue
Block a user