diff options
author | Remi Collet <remi@remirepo.net> | 2019-09-13 15:47:47 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2019-09-13 15:47:47 +0200 |
commit | ad9c356019c290cedd0112fd2aec576249d9375e (patch) | |
tree | 9b1018bf83e9584650bd74d544cf80fc0d452492 | |
parent | 1d20fc1f6533bc195083ba4b34cdb33223575f14 (diff) |
- add patch for PHP 7.4 from
https://github.com/leafo/scssphp/pull/710
-rw-r--r-- | 710.patch | 42 | ||||
-rw-r--r-- | composer.json | 5 | ||||
-rw-r--r-- | php-scssphp.spec | 16 |
3 files changed, 57 insertions, 6 deletions
diff --git a/710.patch b/710.patch new file mode 100644 index 0000000..2d3592d --- /dev/null +++ b/710.patch @@ -0,0 +1,42 @@ +From 97d14c110e91adc8387b7cb584b99c58ad23715d Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Fri, 13 Sep 2019 15:41:13 +0200 +Subject: [PATCH] fix Trying to access array offset on value of type null + +--- + src/Compiler.php | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/Compiler.php b/src/Compiler.php +index d22d0a35..95131df9 100644 +--- a/src/Compiler.php ++++ b/src/Compiler.php +@@ -2552,7 +2552,9 @@ protected function shouldEval($value) + */ + protected function reduce($value, $inExp = false) + { +- ++ if (is_null($value)) { ++ return null; ++ } + switch ($value[0]) { + case Type::T_EXPRESSION: + list(, $op, $left, $right, $inParens) = $value; +@@ -4373,7 +4375,7 @@ protected function sortArgs($prototype, $args) + foreach ($args as $arg) { + list($key, $value) = $arg; + +- $key = $key[1]; ++ $key = (isset($key[1]) ? $key[1] : ''); + + if (empty($key)) { + $posArgs[] = empty($arg[2]) ? $value : $arg; +@@ -5889,7 +5891,7 @@ protected function libStrSlice($args) + $start--; + } + +- $end = (int) $args[2][1]; ++ $end = (isset($args[2][1]) ? (int) $args[2][1] : 0); + $length = $end < 0 ? $end + 1 : ($end > 0 ? $end - $start : $end); + + $string[2] = $length diff --git a/composer.json b/composer.json index 62153e7..eaa8e87 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "psr-4": { "Leafo\\ScssPhp\\Test\\": "tests/" } }, "require": { - "php": "^5.6.0 || ^7" + "php": "^5.4.0 || ^7" }, "require-dev": { "squizlabs/php_codesniffer": "~2.5", @@ -39,5 +39,6 @@ "/phpunit.xml.dist", "/tests" ] - } + }, + "abandoned": "scssphp/scssphp" } diff --git a/php-scssphp.spec b/php-scssphp.spec index a92b03d..f09d120 100644 --- a/php-scssphp.spec +++ b/php-scssphp.spec @@ -14,14 +14,14 @@ %global github_owner leafo %global github_name scssphp -%global github_version 0.8.3 -%global github_commit 2f88bb86b67883b2cb4598a9793679326dc1d3f2 +%global github_version 0.8.4 +%global github_commit b9cdea3e42c3bcb1a9faafd04ccce4e8ec860ad9 %global composer_vendor leafo %global composer_project scssphp -# "php": "^5.6.0 || ^7" -%global php_min_ver 5.6.0 +# "php": "^5.4.0 || ^7" +%global php_min_ver 5.4.0 # Build using "--without tests" to disable tests %global with_tests 0%{!?_without_tests:1} @@ -40,6 +40,8 @@ URL: http://leafo.github.io/scssphp Source0: %{name}-%{github_version}-%{github_commit}.tar.gz Source1: %{name}-get-source.sh +Patch0: https://patch-diff.githubusercontent.com/raw/leafo/scssphp/pull/710.patch + BuildArch: noarch # Library version check BuildRequires: php-cli @@ -95,6 +97,7 @@ Autoloader: %{phpdir}/Leafo/ScssPhp/autoload.php %prep %setup -qn %{github_name}-%{github_commit} +%patch0 -p1 : Adjust bin autoload require sed "/scss.inc.php/s#.*#require_once '%{phpdir}/Leafo/ScssPhp/autoload.php';#" \ @@ -168,6 +171,11 @@ exit $RETURN_CODE %changelog +* Fri Sep 13 2019 Remi Collet <remi@remirepo.net> - 0.8.4-1 +- update to 0.8.4 +- add patch for PHP 7.4 from + https://github.com/leafo/scssphp/pull/710 + * Mon Jun 03 2019 Shawn Iwinski <shawn.iwinski@gmail.com> - 0.8.3-1 - Update to 0.8.3 (RHBZ #1716011) |