Browse code

added the Symfony PHPUnit bridge to better manage deprecation notices

Fabien Potencier authored on 16/08/2015 17:04:11
Showing 3 changed files
... ...
@@ -1,28 +1,33 @@
1 1
 language: php
2 2
 
3 3
 php:
4
-  - 5.2
5
-  - 5.3
6
-  - 5.4
7
-  - 5.5
8
-  - 5.6
9
-  - hhvm
10
-  - nightly
4
+    - 5.2
5
+    - 5.3
6
+    - 5.4
7
+    - 5.5
8
+    - 5.6
9
+    - hhvm
10
+    - nightly
11 11
 
12 12
 allow_failures:
13 13
     - php: nightly
14 14
 
15 15
 env:
16
-  - TWIG_EXT=no
17
-  - TWIG_EXT=yes
16
+    - TWIG_EXT=no
17
+    - TWIG_EXT=yes
18 18
 
19 19
 before_script:
20
-  - if [ "$TWIG_EXT" == "yes" ]; then sh -c "cd ext/twig && phpize && ./configure --enable-twig && make && sudo make install"; fi
21
-  - if [ "$TWIG_EXT" == "yes" ]; then echo "extension=twig.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`; fi
20
+    - if [ "$TWIG_EXT" == "yes" ]; then sh -c "cd ext/twig && phpize && ./configure --enable-twig && make && sudo make install"; fi
21
+    - if [ "$TWIG_EXT" == "yes" ]; then echo "extension=twig.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"`; fi
22
+    - if [ ${TRAVIS_PHP_VERSION:0:3} == "5.2" ]; then sed -i.bak "s|vendor/autoload.php|test/bootstrap.php|" phpunit.xml.dist; fi
23
+
24
+install:
25
+    # Composer is not available on PHP 5.2
26
+    - if [ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]; then travis_retry composer install; fi
22 27
 
23 28
 matrix:
24
-  exclude:
25
-    - php: hhvm
26
-      env: TWIG_EXT=yes
27
-    - php: nightly
28
-      env: TWIG_EXT=yes
29
+    exclude:
30
+        - php: hhvm
31
+          env: TWIG_EXT=yes
32
+        - php: nightly
33
+          env: TWIG_EXT=yes
... ...
@@ -29,6 +29,10 @@
29 29
     "require": {
30 30
         "php": ">=5.2.7"
31 31
     },
32
+    "require-dev": {
33
+        "symfony/phpunit-bridge": "~2.7",
34
+        "symfony/debug": "~2.7"
35
+    },
32 36
     "autoload": {
33 37
         "psr-0" : {
34 38
             "Twig_" : "lib/"
... ...
@@ -9,7 +9,7 @@
9 9
          processIsolation="false"
10 10
          stopOnFailure="false"
11 11
          syntaxCheck="false"
12
-         bootstrap="test/bootstrap.php"
12
+         bootstrap="vendor/autoload.php"
13 13
 >
14 14
   <testsuites>
15 15
     <testsuite name="Twig Test Suite">