Browse code

Merge branch '1.x' into 2.x

* 1.x:
Length filter non-mb_string on 7.x fix.
fixed code for older versions of PHP
bumped version to 1.34
Support PHPUnit 6 for testing extensions
added PHP 7.2 to the test matrix

Fabien Potencier authored on 12/05/2017 13:59:34
Showing 5 changed files
... ...
@@ -14,6 +14,7 @@ matrix:
14 14
           dist: trusty
15 15
         - php: 7.0
16 16
         - php: 7.1
17
+        - php: nightly
17 18
     allow_failures:
18 19
         - php: hhvm-stable
19 20
     fast_finish: true
... ...
@@ -24,3 +25,5 @@ before_install:
24 25
 
25 26
 install:
26 27
     - travis_retry composer install
28
+
29
+script: ./vendor/bin/simple-phpunit
... ...
@@ -51,9 +51,9 @@
51 51
  * improved the performance of the filesystem loader
52 52
  * removed features that were deprecated in 1.x
53 53
 
54
-* 1.33.3 (2017-XX-XX)
54
+* 1.34.0 (2017-XX-XX)
55 55
 
56
- * n/a
56
+ * dropped PHP 5.2 support
57 57
 
58 58
 * 1.33.2 (2017-04-20)
59 59
 
... ...
@@ -16,7 +16,7 @@
16 16
  */
17 17
 class Twig_Environment
18 18
 {
19
-    const VERSION = '2.3.3';
19
+    const VERSION = '2.3.3-DEV';
20 20
     const VERSION_ID = 20303;
21 21
     const MAJOR_VERSION = 2;
22 22
     const MINOR_VERSION = 3;
... ...
@@ -9,13 +9,15 @@
9 9
  * file that was distributed with this source code.
10 10
  */
11 11
 
12
+use PHPUnit\Framework\TestCase;
13
+
12 14
 /**
13 15
  * Integration test helper.
14 16
  *
15 17
  * @author Fabien Potencier <fabien@symfony.com>
16 18
  * @author Karma Dordrak <drak@zikula.org>
17 19
  */
18
-abstract class Twig_Test_IntegrationTestCase extends PHPUnit_Framework_TestCase
20
+abstract class Twig_Test_IntegrationTestCase extends TestCase
19 21
 {
20 22
     /**
21 23
      * @return string
... ...
@@ -193,7 +195,8 @@ abstract class Twig_Test_IntegrationTestCase extends PHPUnit_Framework_TestCase
193 195
 
194 196
             if (false !== $exception) {
195 197
                 list($class) = explode(':', $exception);
196
-                $this->assertThat(null, new PHPUnit_Framework_Constraint_Exception($class));
198
+                $constraintClass = class_exists('PHPUnit\Framework\Constraint\Exception') ? 'PHPUnit\Framework\Constraint\Exception' : 'PHPUnit_Framework_Constraint_Exception';
199
+                $this->assertThat(null, new $constraintClass($class));
197 200
             }
198 201
 
199 202
             $expected = trim($match[3], "\n ");
... ...
@@ -1,5 +1,7 @@
1 1
 <?php
2 2
 
3
+use PHPUnit\Framework\TestCase;
4
+
3 5
 /*
4 6
  * This file is part of Twig.
5 7
  *
... ...
@@ -8,7 +10,7 @@
8 10
  * For the full copyright and license information, please view the LICENSE
9 11
  * file that was distributed with this source code.
10 12
  */
11
-abstract class Twig_Test_NodeTestCase extends PHPUnit_Framework_TestCase
13
+abstract class Twig_Test_NodeTestCase extends TestCase
12 14
 {
13 15
     abstract public function getTests();
14 16