diff options
author | Remi Collet <remi@remirepo.net> | 2019-10-04 14:54:00 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2019-10-04 14:54:00 +0200 |
commit | 1157ce017f8bdcfdd6214202ddeafed29918d3e5 (patch) | |
tree | 6f395e1139b1ef5bab4d31c9f2b1cd4eb4578365 | |
parent | 306e4a7e04f5678fd0e3da5a98c1f2b7a2ad943b (diff) |
add upstream patches for 1946 and 1949
-rw-r--r-- | 650708de9df9039f04eda0fc150bd94e5a5b9753.patch | 35 | ||||
-rw-r--r-- | 8380460c38d4e6d8f00c5596f8ebcd3a6be4f25a.patch | 42 | ||||
-rw-r--r-- | zephir.spec | 10 |
3 files changed, 85 insertions, 2 deletions
diff --git a/650708de9df9039f04eda0fc150bd94e5a5b9753.patch b/650708de9df9039f04eda0fc150bd94e5a5b9753.patch new file mode 100644 index 0000000..fd81576 --- /dev/null +++ b/650708de9df9039f04eda0fc150bd94e5a5b9753.patch @@ -0,0 +1,35 @@ +From 650708de9df9039f04eda0fc150bd94e5a5b9753 Mon Sep 17 00:00:00 2001 +From: Serghei Iakovlev <sadhooklay@gmail.com> +Date: Fri, 4 Oct 2019 15:39:16 +0300 +Subject: [PATCH] Fixed tests to be able run full test suite without Phalcon + +--- + CHANGELOG.md | 2 ++ + unit-tests/Extension/InternalClassesTest.php | 8 ++++++++ + 2 files changed, 10 insertions(+) + +diff --git a/unit-tests/Extension/InternalClassesTest.php b/unit-tests/Extension/InternalClassesTest.php +index 6333a8666..d5caee8e5 100644 +--- a/unit-tests/Extension/InternalClassesTest.php ++++ b/unit-tests/Extension/InternalClassesTest.php +@@ -20,12 +20,20 @@ class InternalClassesTest extends TestCase + { + public function testStaticMethodCall() + { ++ if (false === class_exists(Di::class)) { ++ $this->markTestSkipped('Class Phalcon\Di not found'); ++ } ++ + $class = new InternalClasses(); + $this->assertSame(Di::getDefault(), $class->testStaticCall()); + } + + public function testStaticPropertyFetch() + { ++ if (false === class_exists(Query::class)) { ++ $this->markTestSkipped('Class Phalcon\Mvc\Model\Query not found'); ++ } ++ + $class = new InternalClasses(); + $this->assertSame(Query::TYPE_DELETE, $class->testStaticPropertyFetch()); + } diff --git a/8380460c38d4e6d8f00c5596f8ebcd3a6be4f25a.patch b/8380460c38d4e6d8f00c5596f8ebcd3a6be4f25a.patch new file mode 100644 index 0000000..2b3f038 --- /dev/null +++ b/8380460c38d4e6d8f00c5596f8ebcd3a6be4f25a.patch @@ -0,0 +1,42 @@ +From 8380460c38d4e6d8f00c5596f8ebcd3a6be4f25a Mon Sep 17 00:00:00 2001 +From: Remi Collet <remi@remirepo.net> +Date: Fri, 4 Oct 2019 14:04:03 +0200 +Subject: [PATCH] Fix #1946 use ZVAL_NULL + +--- + kernels/ZendEngine3/string.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/kernels/ZendEngine3/string.c b/kernels/ZendEngine3/string.c +index 69c596364..8c9d4fd70 100644 +--- a/kernels/ZendEngine3/string.c ++++ b/kernels/ZendEngine3/string.c +@@ -1106,8 +1106,8 @@ void zephir_preg_match(zval *return_value, zval *regex, zval *subject, zval *mat + zval rv, tmp_matches; + zval *rvp = return_value ? return_value : &rv; + +- ZEPHIR_NULL(&tmp_flags); +- ZEPHIR_NULL(&tmp_offset); ++ ZVAL_NULL(&tmp_flags); ++ ZVAL_NULL(&tmp_offset); + + ZVAL_LONG(&tmp_flags, flags); + ZVAL_LONG(&tmp_offset, offset); +@@ -1183,7 +1183,7 @@ int zephir_json_encode(zval *return_value, zval *v, int opts) + zval zopts; + zval *params[2]; + +- ZEPHIR_NULL(&zopts); ++ ZVAL_NULL(&zopts); + ZVAL_LONG(&zopts, opts); + + params[0] = v; +@@ -1197,7 +1197,7 @@ int zephir_json_decode(zval *return_value, zval *v, zend_bool assoc) + zval zassoc; + zval *params[2]; + +- ZEPHIR_NULL(&zassoc); ++ ZVAL_NULL(&zassoc); + ZVAL_BOOL(&zassoc, assoc); + + params[0] = v; diff --git a/zephir.spec b/zephir.spec index 36b8494..de3b430 100644 --- a/zephir.spec +++ b/zephir.spec @@ -26,7 +26,7 @@ Name: %{?scl_prefix}%{gh_project} Version: 0.12.7 -Release: 1%{?gh_date:.%{gh_date}.%{gh_short}}%{?dist} +Release: 2%{?gh_date:.%{gh_date}.%{gh_short}}%{?dist} Summary: Zephir language for creation of extensions for PHP. License: MIT @@ -35,6 +35,8 @@ Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit # Adapt path used in RPM Patch0: %{gh_project}-rpm.patch +Patch1: https://github.com/phalcon/zephir/commit/8380460c38d4e6d8f00c5596f8ebcd3a6be4f25a.patch +Patch2: https://github.com/phalcon/zephir/commit/650708de9df9039f04eda0fc150bd94e5a5b9753.patch BuildArch: noarch BuildRequires: %{?scl_prefix}php-devel > 7.0 @@ -200,8 +202,9 @@ Compiler design goals: %prep %setup -q -n %{gh_project}-%{gh_commit} -sed -e s'/ZEPHIR_NULL/ZVAL_NULL/' -i kernels/ZendEngine3/string.c %patch0 -p0 -b .rpm +%patch1 -p1 -b .up +%patch2 -p1 -b .up sed -e 's/\$Id\$/%{gh_short}/' \ -i Library/Zephir.php @@ -329,6 +332,9 @@ esac %changelog +* Fri Oct 4 2019 Remi Collet <remi@remirepo.net> - 0.12.7-2 +- add upstream patches for 1946 and 1949 + * Fri Oct 4 2019 Remi Collet <remi@remirepo.net> - 0.12.7-1 - update to 0.12.7 - switch to phpunit7 |