summaryrefslogtreecommitdiffstats
path: root/lesserphp--pullrequest-18.patch
blob: d3e42b957885ef798bdfaacb2f37002138b99e0f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
diff --git a/.travis.yml b/.travis.yml
index fbaf2e8..f2ead47 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,7 +2,6 @@ language: php
 
 php:
   - 5.6
-  - 7.1
   - 7.2
   - 7.3
   - 7.4
diff --git a/composer.json b/composer.json
index d32a5d4..f96d98d 100644
--- a/composer.json
+++ b/composer.json
@@ -30,7 +30,7 @@
         }
     },
     "require-dev": {
-        "phpunit/phpunit": "~4.3"
+        "phpunit/phpunit": ">=4.8.35 <8"
     },
     "scripts": {
         "test": "phpunit"
diff --git a/lessc.inc.php b/lessc.inc.php
index 4764b28..14299d1 100644
--- a/lessc.inc.php
+++ b/lessc.inc.php
@@ -1,7 +1,7 @@
 <?php
 
 /**
- * lessphp v0.5.2
+ * lessphp v0.5.4
  * http://leafo.net/lessphp
  *
  * LESS CSS compiler, adapted from http://lesscss.org
@@ -39,7 +39,7 @@
  * handling things like indentation.
  */
 class lessc {
-	static public $VERSION = "v0.5.2";
+	static public $VERSION = "v0.5.4";
 
 	static public $TRUE = array("keyword", "true");
 	static public $FALSE = array("keyword", "false");
@@ -758,7 +758,7 @@ protected function compileProp($prop, $block, $out) {
 					if ($suffix !== null &&
 						$subProp[0] == "assign" &&
 						is_string($subProp[1]) &&
-						$subProp[1]{0} != $this->vPrefix)
+						$subProp[1][0] != $this->vPrefix)
 					{
 						$subProp[2] = array(
 							'list', ' ',
@@ -2759,7 +2759,7 @@ protected function parseChunk() {
 				$hidden = true;
 				if (!isset($block->args)) {
 					foreach ($block->tags as $tag) {
-						if (!is_string($tag) || $tag{0} != $this->lessc->mPrefix) {
+						if (!is_string($tag) || $tag[0] != $this->lessc->mPrefix) {
 							$hidden = false;
 							break;
 						}
@@ -2813,7 +2813,7 @@ protected function isDirective($dirname, $directives) {
 	protected function fixTags($tags) {
 		// move @ tags out of variable namespace
 		foreach ($tags as &$tag) {
-			if ($tag{0} == $this->lessc->vPrefix)
+			if ($tag[0] == $this->lessc->vPrefix)
 				$tag[0] = $this->lessc->mPrefix;
 		}
 		return $tags;
diff --git a/tests/ApiTest.php b/tests/ApiTest.php
index fe1bbff..8e0a6f4 100644
--- a/tests/ApiTest.php
+++ b/tests/ApiTest.php
@@ -2,7 +2,9 @@
 
 require_once __DIR__ . "/../lessc.inc.php";
 
-class ApiTest extends PHPUnit_Framework_TestCase {
+use PHPUnit\Framework\TestCase;
+
+class ApiTest extends TestCase {
 	public function setUp() {
 		$this->less = new lessc();
 		$this->less->importDir = array(__DIR__ . "/inputs/test-imports");
diff --git a/tests/ErrorHandlingTest.php b/tests/ErrorHandlingTest.php
index f928974..5bb7b6f 100644
--- a/tests/ErrorHandlingTest.php
+++ b/tests/ErrorHandlingTest.php
@@ -1,7 +1,9 @@
 <?php
 require_once __DIR__ . "/../lessc.inc.php";
 
-class ErrorHandlingTest extends PHPUnit_Framework_TestCase {
+use PHPUnit\Framework\TestCase;
+
+class ErrorHandlingTest extends TestCase {
 	public function setUp() {
 		$this->less = new lessc();
 	}
diff --git a/tests/InputTest.php b/tests/InputTest.php
index 32db95b..8a0724c 100644
--- a/tests/InputTest.php
+++ b/tests/InputTest.php
@@ -2,6 +2,8 @@
 
 require_once __DIR__ . "/../lessc.inc.php";
 
+use PHPUnit\Framework\TestCase;
+
 // Runs all the tests in inputs/ and compares their output to ouputs/
 
 function _dump($value) {
@@ -12,7 +14,7 @@ function _quote($str) {
 	return preg_quote($str, "/");
 }
 
-class InputTest extends PHPUnit_Framework_TestCase {
+class InputTest extends TestCase {
 	protected static $importDirs = array("inputs/test-imports");
 
 	protected static $testDirs = array(
diff --git a/tests/ServerTest.php b/tests/ServerTest.php
index 5537f59..5e8a03f 100644
--- a/tests/ServerTest.php
+++ b/tests/ServerTest.php
@@ -1,6 +1,8 @@
 <?php
 
-class ServerTest extends \PHPUnit_Framework_TestCase
+use PHPUnit\Framework\TestCase;
+
+class ServerTest extends TestCase
 {
 
     public function testCheckedCachedCompile()