mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-10 01:16:52 +00:00
Twig 2 is compatible with PHP 7.0
This commit is contained in:
+16
-10
@@ -6,28 +6,34 @@ cache:
|
||||
- extra/*/vendor
|
||||
- $HOME/.composer/cache/files
|
||||
|
||||
env:
|
||||
global:
|
||||
- SYMFONY_PHPUNIT_REMOVE_RETURN_TYPEHINT=1
|
||||
- SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE=1
|
||||
|
||||
before_install:
|
||||
- phpenv config-rm xdebug.ini || return 0
|
||||
|
||||
install:
|
||||
- travis_retry composer install
|
||||
- (cd extra/cssinliner-extra && travis_retry composer install)
|
||||
- (cd extra/html-extra && travis_retry composer install)
|
||||
- (cd extra/inky-extra && travis_retry composer install)
|
||||
- (cd extra/intl-extra && travis_retry composer install)
|
||||
- (cd extra/markdown-extra && travis_retry composer install)
|
||||
- ([[ $TRAVIS_PHP_VERSION = 7.0 ]] || cd extra/cssinliner-extra && travis_retry composer install)
|
||||
- ([[ $TRAVIS_PHP_VERSION = 7.0 ]] || cd extra/html-extra && travis_retry composer install)
|
||||
- ([[ $TRAVIS_PHP_VERSION = 7.0 ]] || cd extra/inky-extra && travis_retry composer install)
|
||||
- ([[ $TRAVIS_PHP_VERSION = 7.0 ]] || cd extra/intl-extra && travis_retry composer install)
|
||||
- ([[ $TRAVIS_PHP_VERSION = 7.0 ]] || cd extra/markdown-extra && travis_retry composer install)
|
||||
|
||||
script:
|
||||
- ./vendor/bin/simple-phpunit
|
||||
- (cd extra/cssinliner-extra && ./vendor/bin/simple-phpunit)
|
||||
- (cd extra/html-extra && ./vendor/bin/simple-phpunit)
|
||||
- (cd extra/inky-extra && ./vendor/bin/simple-phpunit)
|
||||
- (cd extra/intl-extra && ./vendor/bin/simple-phpunit)
|
||||
- (cd extra/markdown-extra && ./vendor/bin/simple-phpunit)
|
||||
- ([[ $TRAVIS_PHP_VERSION = 7.0 ]] || cd extra/cssinliner-extra && ./vendor/bin/simple-phpunit)
|
||||
- ([[ $TRAVIS_PHP_VERSION = 7.0 ]] || cd extra/html-extra && ./vendor/bin/simple-phpunit)
|
||||
- ([[ $TRAVIS_PHP_VERSION = 7.0 ]] || cd extra/inky-extra && ./vendor/bin/simple-phpunit)
|
||||
- ([[ $TRAVIS_PHP_VERSION = 7.0 ]] || cd extra/intl-extra && ./vendor/bin/simple-phpunit)
|
||||
- ([[ $TRAVIS_PHP_VERSION = 7.0 ]] || cd extra/markdown-extra && ./vendor/bin/simple-phpunit)
|
||||
|
||||
jobs:
|
||||
fast_finish: true
|
||||
include:
|
||||
- php: 7.0
|
||||
- php: 7.1
|
||||
- php: 7.2
|
||||
- php: 7.3
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": "^7.1.3",
|
||||
"php": "^7.0",
|
||||
"symfony/polyfill-mbstring": "^1.3",
|
||||
"symfony/polyfill-ctype": "^1.8"
|
||||
},
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ Slim, Yii, Laravel, and Codeigniter — just to name a few.
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
Twig needs at least **PHP 7.1.3** to run.
|
||||
Twig needs at least **PHP 7.0.0** to run.
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
@@ -21,7 +21,7 @@ class FilesystemTest extends TestCase
|
||||
private $directory;
|
||||
private $cache;
|
||||
|
||||
protected function setUp(): void
|
||||
protected function setUp()
|
||||
{
|
||||
$nonce = hash('sha256', uniqid(mt_rand(), true));
|
||||
$this->classname = '__Twig_Tests_Cache_FilesystemTest_Template_'.$nonce;
|
||||
@@ -29,7 +29,7 @@ class FilesystemTest extends TestCase
|
||||
$this->cache = new FilesystemCache($this->directory);
|
||||
}
|
||||
|
||||
protected function tearDown(): void
|
||||
protected function tearDown()
|
||||
{
|
||||
if (file_exists($this->directory)) {
|
||||
FilesystemHelper::removeDir($this->directory);
|
||||
|
||||
@@ -28,7 +28,7 @@ class SandboxTest extends TestCase
|
||||
protected static $params;
|
||||
protected static $templates;
|
||||
|
||||
protected function setUp(): void
|
||||
protected function setUp()
|
||||
{
|
||||
self::$params = [
|
||||
'name' => 'Fabien',
|
||||
|
||||
@@ -20,7 +20,7 @@ class TokenStreamTest extends TestCase
|
||||
{
|
||||
protected static $tokens;
|
||||
|
||||
protected function setUp(): void
|
||||
protected function setUp()
|
||||
{
|
||||
self::$tokens = [
|
||||
new Token(Token::TEXT_TYPE, 1, 1),
|
||||
|
||||
Reference in New Issue
Block a user