diff options
author | Remi Collet <fedora@famillecollet.com> | 2014-09-29 09:30:18 +0200 |
---|---|---|
committer | Remi Collet <fedora@famillecollet.com> | 2014-09-29 09:30:18 +0200 |
commit | 58f7c9f3ebb541b2e71474786509fe3b6f45a082 (patch) | |
tree | 99495875cf277862d42f922260d4832525322d5f | |
parent | 3fee76295cf71d6b7f18ea97b6ab79d882c4316b (diff) |
php-phalcon: 1.3.3
-rw-r--r-- | 2772.patch | 322 | ||||
-rw-r--r-- | 2774.patch | 228 | ||||
-rw-r--r-- | 2775.patch | 43 | ||||
-rw-r--r-- | 2793.patch | 36 | ||||
-rw-r--r-- | REFLECTION | 174 | ||||
-rw-r--r-- | d9ded2ae91afbf9a4b1f515c18c4a99760b2df5c.patch | 86 | ||||
-rw-r--r-- | php-phalcon.spec | 70 |
7 files changed, 205 insertions, 754 deletions
diff --git a/2772.patch b/2772.patch deleted file mode 100644 index fc9a3e5..0000000 --- a/2772.patch +++ /dev/null @@ -1,322 +0,0 @@ -From f3e58e7ff4746a0607aae182c46578ac349aa73f Mon Sep 17 00:00:00 2001 -From: Remi Collet <fedora@famillecollet.com> -Date: Thu, 4 Sep 2014 13:44:31 +0200 -Subject: [PATCH] Fix segfault with PHP 5.6 and interned strings - -Signed-off-by: Remi Collet <fedora@famillecollet.com> ---- - ext/kernel/concat.c | 52 +++++++++++++++++++++++------------------------ - ext/kernel/main.h | 4 ++++ - ext/kernel/operators.c | 4 ++-- - ext/tests/issue-1277.phpt | 6 +++--- - ext/tests/issue-1455.phpt | 2 +- - 5 files changed, 36 insertions(+), 32 deletions(-) - -diff --git a/ext/kernel/concat.c b/ext/kernel/concat.c -index 5ea4c20..6fa82ab 100644 ---- a/ext/kernel/concat.c -+++ b/ext/kernel/concat.c -@@ -47,7 +47,7 @@ void phalcon_concat_sv(zval **result, const char *op1, zend_uint op1_len, zval * - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -94,7 +94,7 @@ void phalcon_concat_svs(zval **result, const char *op1, zend_uint op1_len, zval - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -149,7 +149,7 @@ void phalcon_concat_svsv(zval **result, const char *op1, zend_uint op1_len, zval - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -209,7 +209,7 @@ void phalcon_concat_svsvs(zval **result, const char *op1, zend_uint op1_len, zva - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -277,7 +277,7 @@ void phalcon_concat_svsvsv(zval **result, const char *op1, zend_uint op1_len, zv - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -350,7 +350,7 @@ void phalcon_concat_svsvsvs(zval **result, const char *op1, zend_uint op1_len, z - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -431,7 +431,7 @@ void phalcon_concat_svsvsvsvs(zval **result, const char *op1, zend_uint op1_len, - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -512,7 +512,7 @@ void phalcon_concat_svsvv(zval **result, const char *op1, zend_uint op1_len, zva - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -577,7 +577,7 @@ void phalcon_concat_svv(zval **result, const char *op1, zend_uint op1_len, zval - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -636,7 +636,7 @@ void phalcon_concat_svvs(zval **result, const char *op1, zend_uint op1_len, zval - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -689,7 +689,7 @@ void phalcon_concat_vs(zval **result, zval *op1, const char *op2, zend_uint op2_ - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -743,7 +743,7 @@ void phalcon_concat_vsv(zval **result, zval *op1, const char *op2, zend_uint op2 - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -802,7 +802,7 @@ void phalcon_concat_vsvs(zval **result, zval *op1, const char *op2, zend_uint op - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -869,7 +869,7 @@ void phalcon_concat_vsvsv(zval **result, zval *op1, const char *op2, zend_uint o - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -941,7 +941,7 @@ void phalcon_concat_vsvsvs(zval **result, zval *op1, const char *op2, zend_uint - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -1021,7 +1021,7 @@ void phalcon_concat_vsvsvsv(zval **result, zval *op1, const char *op2, zend_uint - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -1099,7 +1099,7 @@ void phalcon_concat_vsvv(zval **result, zval *op1, const char *op2, zend_uint op - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -1177,7 +1177,7 @@ void phalcon_concat_vsvvv(zval **result, zval *op1, const char *op2, zend_uint o - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -1246,7 +1246,7 @@ void phalcon_concat_vv(zval **result, zval *op1, zval *op2, int self_var TSRMLS_ - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -1304,7 +1304,7 @@ void phalcon_concat_vvs(zval **result, zval *op1, zval *op2, const char *op3, ze - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -1370,7 +1370,7 @@ void phalcon_concat_vvsv(zval **result, zval *op1, zval *op2, const char *op3, z - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -1441,7 +1441,7 @@ void phalcon_concat_vvv(zval **result, zval *op1, zval *op2, zval *op3, int self - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -1518,7 +1518,7 @@ void phalcon_concat_vvvsv(zval **result, zval *op1, zval *op2, zval *op3, const - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -1601,7 +1601,7 @@ void phalcon_concat_vvvv(zval **result, zval *op1, zval *op2, zval *op3, zval *o - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -1697,7 +1697,7 @@ void phalcon_concat_vvvvsvv(zval **result, zval *op1, zval *op2, zval *op3, zval - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -@@ -1797,7 +1797,7 @@ void phalcon_concat_vvvvv(zval **result, zval *op1, zval *op2, zval *op3, zval * - - offset = Z_STRLEN_PP(result); - length += offset; -- Z_STRVAL_PP(result) = (char *) erealloc(Z_STRVAL_PP(result), length + 1); -+ Z_STRVAL_PP(result) = (char *) str_erealloc(Z_STRVAL_PP(result), length + 1); - - } else { - Z_STRVAL_PP(result) = (char *) emalloc(length + 1); -diff --git a/ext/kernel/main.h b/ext/kernel/main.h -index 963987c..9fbf2a3 100644 ---- a/ext/kernel/main.h -+++ b/ext/kernel/main.h -@@ -45,6 +45,10 @@ - #define ISL(str) (phalcon_interned_##str), (sizeof(#str)-1) - #define ISS(str) (phalcon_interned_##str), (sizeof(#str)) - -+/* str_erealloc is PHP 5.6 only */ -+#ifndef str_erealloc -+#define str_erealloc erealloc -+#endif - - /* Startup functions */ - void php_phalcon_init_globals(zend_phalcon_globals *phalcon_globals TSRMLS_DC); -diff --git a/ext/kernel/operators.c b/ext/kernel/operators.c -index 7d37d76..0b46284 100644 ---- a/ext/kernel/operators.c -+++ b/ext/kernel/operators.c -@@ -82,7 +82,7 @@ void phalcon_concat_self(zval **left, zval *right TSRMLS_DC){ - } - - length = Z_STRLEN_PP(left) + Z_STRLEN_P(right); -- Z_STRVAL_PP(left) = erealloc(Z_STRVAL_PP(left), length + 1); -+ Z_STRVAL_PP(left) = str_erealloc(Z_STRVAL_PP(left), length + 1); - - memcpy(Z_STRVAL_PP(left) + Z_STRLEN_PP(left), Z_STRVAL_P(right), Z_STRLEN_P(right)); - Z_STRVAL_PP(left)[length] = 0; -@@ -126,7 +126,7 @@ void phalcon_concat_self_str(zval **left, const char *right, int right_length TS - } - - length = Z_STRLEN_PP(left) + right_length; -- Z_STRVAL_PP(left) = erealloc(Z_STRVAL_PP(left), length + 1); -+ Z_STRVAL_PP(left) = str_erealloc(Z_STRVAL_PP(left), length + 1); - - memcpy(Z_STRVAL_PP(left) + Z_STRLEN_PP(left), right, right_length); - Z_STRVAL_PP(left)[length] = 0; -diff --git a/ext/tests/issue-1277.phpt b/ext/tests/issue-1277.phpt -index d2a530b..506c9a3 100644 ---- a/ext/tests/issue-1277.phpt -+++ b/ext/tests/issue-1277.phpt -@@ -10,12 +10,12 @@ $c2 = clone $c1; - var_dump($c1); - var_dump($c2); - ?> ----EXPECT-- --object(Phalcon\Config)#1 (1) { -+--EXPECTF-- -+object(Phalcon\Config)#%d (1) { - ["test"]=> - int(1) - } --object(Phalcon\Config)#2 (1) { -+object(Phalcon\Config)#%d (1) { - ["test"]=> - int(1) - } -diff --git a/ext/tests/issue-1455.phpt b/ext/tests/issue-1455.phpt -index f29f047..d82bc85 100644 ---- a/ext/tests/issue-1455.phpt -+++ b/ext/tests/issue-1455.phpt -@@ -5,7 +5,7 @@ report_memleaks=1 - --SKIPIF-- - <?php - include('skipif.inc'); --if (!function_exists('apc_store')) { -+if (!class_exists('APCIterator', false)) { - die('skip APC or APCu is required'); - } - ?> diff --git a/2774.patch b/2774.patch deleted file mode 100644 index c3c7a08..0000000 --- a/2774.patch +++ /dev/null @@ -1,228 +0,0 @@ -From 379c258e03959a8a1482d8cb498b67b8de7f0bc0 Mon Sep 17 00:00:00 2001 -From: Remi Collet <fedora@famillecollet.com> -Date: Thu, 4 Sep 2014 15:02:31 +0200 -Subject: [PATCH] add --without-non-free build option to disable non-free - minifiers - ---- - ext/assets/filters/cssmin.c | 4 ++++ - ext/assets/filters/jsmin.c | 4 ++++ - ext/assets/filters/nocssminifier.c | 31 +++++++++++++++++++++++++++++++ - ext/assets/filters/nocssminifier.h | 27 +++++++++++++++++++++++++++ - ext/assets/filters/nojsminifier.c | 31 +++++++++++++++++++++++++++++++ - ext/assets/filters/nojsminifier.h | 27 +++++++++++++++++++++++++++ - ext/config.m4 | 13 +++++++++++-- - 7 files changed, 135 insertions(+), 2 deletions(-) - create mode 100644 ext/assets/filters/nocssminifier.c - create mode 100644 ext/assets/filters/nocssminifier.h - create mode 100644 ext/assets/filters/nojsminifier.c - create mode 100644 ext/assets/filters/nojsminifier.h - -diff --git a/ext/assets/filters/cssmin.c b/ext/assets/filters/cssmin.c -index 3cfc89e..b490ae4 100644 ---- a/ext/assets/filters/cssmin.c -+++ b/ext/assets/filters/cssmin.c -@@ -18,7 +18,11 @@ - */ - - #include "assets/filters/cssmin.h" -+#ifdef PHALCON_NON_FREE - #include "assets/filters/cssminifier.h" -+#else -+#include "assets/filters/nocssminifier.h" -+#endif - #include "assets/filterinterface.h" - - #include "kernel/main.h" -diff --git a/ext/assets/filters/jsmin.c b/ext/assets/filters/jsmin.c -index 26197de..2b2791c 100644 ---- a/ext/assets/filters/jsmin.c -+++ b/ext/assets/filters/jsmin.c -@@ -18,7 +18,11 @@ - */ - - #include "assets/filters/jsmin.h" -+#ifdef PHALCON_NON_FREE - #include "assets/filters/jsminifier.h" -+#else -+#include "assets/filters/nojsminifier.h" -+#endif - #include "assets/filterinterface.h" - - #include "kernel/main.h" -diff --git a/ext/assets/filters/nocssminifier.c b/ext/assets/filters/nocssminifier.c -new file mode 100644 -index 0000000..efebc82 ---- /dev/null -+++ b/ext/assets/filters/nocssminifier.c -@@ -0,0 +1,31 @@ -+/* -+ +------------------------------------------------------------------------+ -+ | Phalcon Framework | -+ +------------------------------------------------------------------------+ -+ | Copyright (c) 2011-2014 Phalcon Team (http://www.phalconphp.com) | -+ +------------------------------------------------------------------------+ -+ | This source file is subject to the New BSD License that is bundled | -+ | with this package in the file docs/LICENSE.txt. | -+ | | -+ | If you did not receive a copy of the license and are unable to | -+ | obtain it through the world-wide-web, please send an email | -+ | to license@phalconphp.com so we can send you a copy immediately. | -+ +------------------------------------------------------------------------+ -+ | Authors: Remi Collet <remi@famillecollet.com> | -+ +------------------------------------------------------------------------+ -+*/ -+ -+/* placeholder for non-free csssminifier.c */ -+ -+ -+#include "php_phalcon.h" -+ -+#include "assets/filters/nocssminifier.h" -+#include "assets/exception.h" -+#include "kernel/exception.h" -+ -+int phalcon_cssmin(zval *return_value, zval *style TSRMLS_DC) { -+ -+ PHALCON_THROW_EXCEPTION_STRW(phalcon_assets_exception_ce, "Non-free csssminifier not available"); -+ return FAILURE; -+} -diff --git a/ext/assets/filters/nocssminifier.h b/ext/assets/filters/nocssminifier.h -new file mode 100644 -index 0000000..6ac8b07 ---- /dev/null -+++ b/ext/assets/filters/nocssminifier.h -@@ -0,0 +1,27 @@ -+/* -+ +------------------------------------------------------------------------+ -+ | Phalcon Framework | -+ +------------------------------------------------------------------------+ -+ | Copyright (c) 2011-2014 Phalcon Team (http://www.phalconphp.com) | -+ +------------------------------------------------------------------------+ -+ | This source file is subject to the New BSD License that is bundled | -+ | with this package in the file docs/LICENSE.txt. | -+ | | -+ | If you did not receive a copy of the license and are unable to | -+ | obtain it through the world-wide-web, please send an email | -+ | to license@phalconphp.com so we can send you a copy immediately. | -+ +------------------------------------------------------------------------+ -+ | Authors: Remi Collet <remi@famillecollet.com> | -+ +------------------------------------------------------------------------+ -+*/ -+ -+/* placeholder for non-free csssminifier.h */ -+ -+#ifndef PHALCON_ASSETS_FILTERS_CSSMINIFIER_H -+#define PHALCON_ASSETS_FILTERS_CSSMINIFIER_H -+ -+#include <Zend/zend.h> -+ -+int phalcon_cssmin(zval *return_value, zval *style TSRMLS_DC); -+ -+#endif /* PHALCON_ASSETS_FILTERS_CSSMINIFIER_H */ -diff --git a/ext/assets/filters/nojsminifier.c b/ext/assets/filters/nojsminifier.c -new file mode 100644 -index 0000000..885035b ---- /dev/null -+++ b/ext/assets/filters/nojsminifier.c -@@ -0,0 +1,31 @@ -+/* -+ +------------------------------------------------------------------------+ -+ | Phalcon Framework | -+ +------------------------------------------------------------------------+ -+ | Copyright (c) 2011-2014 Phalcon Team (http://www.phalconphp.com) | -+ +------------------------------------------------------------------------+ -+ | This source file is subject to the New BSD License that is bundled | -+ | with this package in the file docs/LICENSE.txt. | -+ | | -+ | If you did not receive a copy of the license and are unable to | -+ | obtain it through the world-wide-web, please send an email | -+ | to license@phalconphp.com so we can send you a copy immediately. | -+ +------------------------------------------------------------------------+ -+ | Authors: Remi Collet <remi@famillecollet.com> | -+ +------------------------------------------------------------------------+ -+*/ -+ -+/* placeholder for non-free jsminifier.c */ -+ -+ -+#include "php_phalcon.h" -+ -+#include "assets/filters/nojsminifier.h" -+#include "assets/exception.h" -+#include "kernel/exception.h" -+ -+int phalcon_jsmin(zval *return_value, zval *script TSRMLS_DC) { -+ -+ PHALCON_THROW_EXCEPTION_STRW(phalcon_assets_exception_ce, "Non-free jsminifier not available"); -+ return FAILURE; -+} -diff --git a/ext/assets/filters/nojsminifier.h b/ext/assets/filters/nojsminifier.h -new file mode 100644 -index 0000000..95829cc ---- /dev/null -+++ b/ext/assets/filters/nojsminifier.h -@@ -0,0 +1,27 @@ -+/* -+ +------------------------------------------------------------------------+ -+ | Phalcon Framework | -+ +------------------------------------------------------------------------+ -+ | Copyright (c) 2011-2014 Phalcon Team (http://www.phalconphp.com) | -+ +------------------------------------------------------------------------+ -+ | This source file is subject to the New BSD License that is bundled | -+ | with this package in the file docs/LICENSE.txt. | -+ | | -+ | If you did not receive a copy of the license and are unable to | -+ | obtain it through the world-wide-web, please send an email | -+ | to license@phalconphp.com so we can send you a copy immediately. | -+ +------------------------------------------------------------------------+ -+ | Authors: Remi Collet <remi@famillecollet.com> | -+ +------------------------------------------------------------------------+ -+*/ -+ -+/* placeholder for non-free jsminifier.h */ -+ -+#ifndef PHALCON_ASSETS_FILTERS_JSMINIFIER_H -+#define PHALCON_ASSETS_FILTERS_JSMINIFIER_H -+ -+#include <Zend/zend.h> -+ -+int phalcon_jsmin(zval *return_value, zval *script TSRMLS_DC); -+ -+#endif /* PHALCON_ASSETS_FILTERS_JSMINIFIER_H */ -diff --git a/ext/config.m4 b/ext/config.m4 -index 88f8e4c..2df6dcd 100644 ---- a/ext/config.m4 -+++ b/ext/config.m4 -@@ -1,4 +1,5 @@ - PHP_ARG_ENABLE(phalcon, whether to enable phalcon framework, [ --enable-phalcon Enable phalcon framework]) -+PHP_ARG_WITH(non-free, wheter to enable non-free css and js minifier, [ --without-non-free Disable non-free minifiers], yes, no) - - if test "$PHP_PHALCON" = "yes"; then - AC_DEFINE(HAVE_PHALCON, 1, [Whether you have Phalcon Framework]) -@@ -340,8 +341,6 @@ validation/validator/inclusionin.c \ - validation/validator/stringlength.c \ - validation/validator/url.c \ - validation/validator.c \ --assets/filters/jsminifier.c \ --assets/filters/cssminifier.c \ - mvc/model/query/parser.c \ - mvc/model/query/scanner.c \ - mvc/view/engine/volt/parser.c \ -@@ -364,6 +363,16 @@ psr/log/loglevel.c \ - psr/log/nulllogger.c \ - registry.c" - -+ AC_MSG_CHECKING([Include non-free minifiers]) -+ if test "$PHP_NON_FREE" = "yes"; then -+ phalcon_sources="$phalcon_sources assets/filters/jsminifier.c assets/filters/cssminifier.c " -+ AC_DEFINE([PHALCON_NON_FREE], [1], [Whether non-free minifiers are available]) -+ AC_MSG_RESULT([yes, css and js]) -+ else -+ phalcon_sources="$phalcon_sources assets/filters/nojsminifier.c assets/filters/nocssminifier.c " -+ AC_MSG_RESULT([no]) -+ fi -+ - PHP_NEW_EXTENSION(phalcon, $phalcon_sources, $ext_shared) - PHP_ADD_EXTENSION_DEP([phalcon], [spl]) - diff --git a/2775.patch b/2775.patch deleted file mode 100644 index 9ced075..0000000 --- a/2775.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 9950f69baf175606d8fb72ce0b9bb10b892934f1 Mon Sep 17 00:00:00 2001 -From: Remi Collet <fedora@famillecollet.com> -Date: Thu, 4 Sep 2014 15:30:38 +0200 -Subject: [PATCH] Fix JSON detection - ---- - ext/config.m4 | 18 ++++++------------ - 1 file changed, 6 insertions(+), 12 deletions(-) - -diff --git a/ext/config.m4 b/ext/config.m4 -index 88f8e4c..2340e9b 100644 ---- a/ext/config.m4 -+++ b/ext/config.m4 -@@ -399,23 +399,17 @@ registry.c" - [[#include "php_config.h"]] - ) - -- AC_CHECK_DECL( -- [HAVE_JSON], -+ AC_CHECK_HEADERS( -+ [ext/json/php_json.h], - [ -- AC_CHECK_HEADERS( -- [ext/json/php_json.h], -- [ -- PHP_ADD_EXTENSION_DEP([phalcon], [json]) -- AC_DEFINE([PHALCON_USE_PHP_JSON], [1], [Whether PHP json extension is present at compile time]) -- ], -- , -- [[#include "main/php.h"]] -- ) -+ PHP_ADD_EXTENSION_DEP([phalcon], [json]) -+ AC_DEFINE([PHALCON_USE_PHP_JSON], [1], [Whether PHP json extension is present at compile time]) - ], - , -- [[#include "php_config.h"]] -+ [[#include "main/php.h"]] - ) - -+ - AC_CHECK_DECL( - [HAVE_PHP_SESSION], - [ diff --git a/2793.patch b/2793.patch deleted file mode 100644 index 3188d73..0000000 --- a/2793.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 1d6f796b16a62c4334ea134310a80833cd2fee7e Mon Sep 17 00:00:00 2001 -From: Remi Collet <fedora@famillecollet.com> -Date: Sun, 7 Sep 2014 17:43:26 +0200 -Subject: [PATCH] switch headers + avoid duplicate definition - ---- - build/_resource/config/phalcon_c_priority_files.php | 4 ++-- - build/_resource/config/phalcon_c_skip_files.php | 2 ++ - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/build/_resource/config/phalcon_c_priority_files.php b/build/_resource/config/phalcon_c_priority_files.php -index f01c403..5414dee 100644 ---- a/build/_resource/config/phalcon_c_priority_files.php -+++ b/build/_resource/config/phalcon_c_priority_files.php -@@ -3,8 +3,8 @@ - - return array( - // Header files -- 'assets/filters/jsminifier.h', -- 'assets/filters/cssminifier.h', -+ 'assets/filters/nojsminifier.h', -+ 'assets/filters/nocssminifier.h', - 'mvc/model/query/parser.h', - 'mvc/model/query/scanner.h', - 'mvc/model/query/phql.h', -diff --git a/build/_resource/config/phalcon_c_skip_files.php b/build/_resource/config/phalcon_c_skip_files.php -index 613dd1b..a7ef989 100644 ---- a/build/_resource/config/phalcon_c_skip_files.php -+++ b/build/_resource/config/phalcon_c_skip_files.php -@@ -11,4 +11,6 @@ - 'annotations/base.c', - 'mvc/model/query/base.c', - 'mvc/view/engine/volt/base.c', -+ 'assets/filters/jsminifier.h', -+ 'assets/filters/cssminifier.h', - ); @@ -1,4 +1,4 @@ -Extension [ <persistent> extension #171 phalcon version 1.3.2 ] { +Extension [ <persistent> extension #172 phalcon version 1.3.3 ] { - Dependencies { Dependency [ spl (Required) ] @@ -51,7 +51,7 @@ Extension [ <persistent> extension #171 phalcon version 1.3.2 ] { } } - - Classes [320] { + - Classes [322] { Class [ <internal:phalcon> class Phalcon\Exception extends Exception ] { - Constants [0] { @@ -5058,7 +5058,7 @@ Extension [ <persistent> extension #171 phalcon version 1.3.2 ] { - Properties [0] { } - - Methods [15] { + - Methods [17] { Method [ <internal:phalcon> abstract public method setId ] { - Parameters [1] { @@ -5130,6 +5130,12 @@ Extension [ <persistent> extension #171 phalcon version 1.3.2 ] { Method [ <internal:phalcon> abstract public method save ] { } + Method [ <internal:phalcon> abstract public method create ] { + } + + Method [ <internal:phalcon> abstract public method update ] { + } + Method [ <internal:phalcon> abstract public method delete ] { } } @@ -5222,6 +5228,53 @@ Extension [ <persistent> extension #171 phalcon version 1.3.2 ] { } } + Interface [ <internal:phalcon> interface Phalcon\Mvc\Collection\MessageInterface ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [6] { + Method [ <internal:phalcon> abstract public method setType ] { + + - Parameters [1] { + Parameter #0 [ <required> $type ] + } + } + + Method [ <internal:phalcon> abstract public method getType ] { + } + + Method [ <internal:phalcon> abstract public method setMessage ] { + + - Parameters [1] { + Parameter #0 [ <required> $message ] + } + } + + Method [ <internal:phalcon> abstract public method getMessage ] { + } + + Method [ <internal:phalcon> abstract public method setField ] { + + - Parameters [1] { + Parameter #0 [ <required> $field ] + } + } + + Method [ <internal:phalcon> abstract public method getField ] { + } + } + } + Interface [ <internal:phalcon> interface Phalcon\Mvc\ControllerInterface ] { - Constants [0] { @@ -5598,7 +5651,7 @@ Extension [ <persistent> extension #171 phalcon version 1.3.2 ] { - Properties [0] { } - - Methods [25] { + - Methods [26] { Method [ <internal:phalcon> abstract public method setTransaction ] { - Parameters [1] { @@ -5739,6 +5792,9 @@ Extension [ <persistent> extension #171 phalcon version 1.3.2 ] { Parameter #1 [ <optional> $arguments ] } } + + Method [ <internal:phalcon> abstract public method reset ] { + } } } @@ -28560,7 +28616,7 @@ Extension [ <persistent> extension #171 phalcon version 1.3.2 ] { Property [ <default> protected $_snapshot ] } - - Methods [73] { + - Methods [74] { Method [ <internal:phalcon, ctor> final public method __construct ] { - Parameters [2] { @@ -28970,6 +29026,9 @@ Extension [ <persistent> extension #171 phalcon version 1.3.2 ] { Parameter #0 [ <optional> $columns ] } } + + Method [ <internal:phalcon, prototype Phalcon\Mvc\ModelInterface> public method reset ] { + } } } @@ -29412,14 +29471,14 @@ Extension [ <persistent> extension #171 phalcon version 1.3.2 ] { - Properties [7] { Property [ <default> public $_id ] Property [ <default> protected $_dependencyInjector ] - Property [ <default> protected $_modelsManager ] + Property [ <default> protected $_collectionManager ] Property [ <default> protected $_source ] Property [ <default> protected $_operationMade ] Property [ <default> protected $_connection ] Property [ <default> protected $_errorMessages ] } - - Methods [32] { + - Methods [34] { Method [ <internal:phalcon, ctor> final public method __construct ] { - Parameters [1] { @@ -29463,7 +29522,7 @@ Extension [ <persistent> extension #171 phalcon version 1.3.2 ] { } } - Method [ <internal:phalcon> public method getModelsManager ] { + Method [ <internal:phalcon> public method getCollectionManager ] { } Method [ <internal:phalcon, prototype Phalcon\Mvc\CollectionInterface> public method getReservedAttributes ] { @@ -29551,6 +29610,12 @@ Extension [ <persistent> extension #171 phalcon version 1.3.2 ] { Method [ <internal:phalcon, prototype Phalcon\Mvc\CollectionInterface> public method save ] { } + Method [ <internal:phalcon, prototype Phalcon\Mvc\CollectionInterface> public method create ] { + } + + Method [ <internal:phalcon, prototype Phalcon\Mvc\CollectionInterface> public method update ] { + } + Method [ <internal:phalcon, prototype Phalcon\Mvc\CollectionInterface> public method delete ] { } @@ -29808,6 +29873,99 @@ Extension [ <persistent> extension #171 phalcon version 1.3.2 ] { } } + Class [ <internal:phalcon> class Phalcon\Mvc\Collection\Message implements Phalcon\Mvc\Collection\MessageInterface ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [1] { + Method [ <internal:phalcon> static public method __set_state ] { + + - Parameters [1] { + Parameter #0 [ <optional> array $properties ] + } + } + } + + - Properties [5] { + Property [ <default> protected $_type ] + Property [ <default> protected $_message ] + Property [ <default> protected $_field ] + Property [ <default> protected $_collection ] + Property [ <default> protected $_code ] + } + + - Methods [12] { + Method [ <internal:phalcon, ctor> public method __construct ] { + + - Parameters [3] { + Parameter #0 [ <required> $message ] + Parameter #1 [ <optional> $field ] + Parameter #2 [ <optional> $type ] + } + } + + Method [ <internal:phalcon, prototype Phalcon\Mvc\Collection\MessageInterface> public method setType ] { + + - Parameters [1] { + Parameter #0 [ <required> $type ] + } + } + + Method [ <internal:phalcon, prototype Phalcon\Mvc\Collection\MessageInterface> public method getType ] { + } + + Method [ <internal:phalcon> public method setCode ] { + + - Parameters [1] { + Parameter #0 [ <required> $code ] + } + } + + Method [ <internal:phalcon> public method getCode ] { + } + + Method [ <internal:phalcon, prototype Phalcon\Mvc\Collection\MessageInterface> public method setMessage ] { + + - Parameters [1] { + Parameter #0 [ <required> $message ] + } + } + + Method [ <internal:phalcon, prototype Phalcon\Mvc\Collection\MessageInterface> public method getMessage ] { + } + + Method [ <internal:phalcon, prototype Phalcon\Mvc\Collection\MessageInterface> public method setField ] { + + - Parameters [1] { + Parameter #0 [ <required> $field ] + } + } + + Method [ <internal:phalcon, prototype Phalcon\Mvc\Collection\MessageInterface> public method getField ] { + } + + Method [ <internal:phalcon> public method setCollection ] { + + - Parameters [1] { + Parameter #0 [ <required> $collection ] + } + } + + Method [ <internal:phalcon> public method getCollection ] { + } + + Method [ <internal:phalcon> public method __toString ] { + + - Parameters [0] { + } + } + } + } + Class [ <internal:phalcon> class Phalcon\Mvc\Dispatcher extends Phalcon\Dispatcher implements Phalcon\Events\EventsAwareInterface, Phalcon\DI\InjectionAwareInterface, Phalcon\DispatcherInterface, Phalcon\Mvc\DispatcherInterface ] { - Constants [6] { diff --git a/d9ded2ae91afbf9a4b1f515c18c4a99760b2df5c.patch b/d9ded2ae91afbf9a4b1f515c18c4a99760b2df5c.patch deleted file mode 100644 index cc0e020..0000000 --- a/d9ded2ae91afbf9a4b1f515c18c4a99760b2df5c.patch +++ /dev/null @@ -1,86 +0,0 @@ -From d9ded2ae91afbf9a4b1f515c18c4a99760b2df5c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Olivier=20Garb=C3=A9?= <ogarbe@voyageprive.com> -Date: Sat, 6 Sep 2014 23:54:53 +0200 -Subject: [PATCH] Fix #2774 - Non free minifiers build dont work - ---- - ext/assets/filters/cssminifier.c | 3 +++ - ext/assets/filters/jsminifier.c | 3 +++ - ext/assets/filters/nocssminifier.c | 2 ++ - ext/assets/filters/nojsminifier.c | 3 +++ - ext/config.m4 | 13 +++++++++---- - 5 files changed, 20 insertions(+), 4 deletions(-) - -diff --git a/ext/assets/filters/nocssminifier.c b/ext/assets/filters/nocssminifier.c -index efebc82..2b42456 100644 ---- a/ext/assets/filters/nocssminifier.c -+++ b/ext/assets/filters/nocssminifier.c -@@ -17,6 +17,7 @@ - - /* placeholder for non-free csssminifier.c */ - -+#ifndef PHALCON_NON_FREE - - #include "php_phalcon.h" - -@@ -29,3 +30,4 @@ int phalcon_cssmin(zval *return_value, zval *style TSRMLS_DC) { - PHALCON_THROW_EXCEPTION_STRW(phalcon_assets_exception_ce, "Non-free csssminifier not available"); - return FAILURE; - } -+#endif -diff --git a/ext/assets/filters/nojsminifier.c b/ext/assets/filters/nojsminifier.c -index 885035b..a858fbb 100644 ---- a/ext/assets/filters/nojsminifier.c -+++ b/ext/assets/filters/nojsminifier.c -@@ -17,6 +17,7 @@ - - /* placeholder for non-free jsminifier.c */ - -+#ifndef PHALCON_NON_FREE - - #include "php_phalcon.h" - -@@ -29,3 +30,5 @@ int phalcon_jsmin(zval *return_value, zval *script TSRMLS_DC) { - PHALCON_THROW_EXCEPTION_STRW(phalcon_assets_exception_ce, "Non-free jsminifier not available"); - return FAILURE; - } -+ -+#endif -diff --git a/ext/config.m4 b/ext/config.m4 -index 2df6dcd..5ca9747 100644 ---- a/ext/config.m4 -+++ b/ext/config.m4 -@@ -1,6 +1,14 @@ - PHP_ARG_ENABLE(phalcon, whether to enable phalcon framework, [ --enable-phalcon Enable phalcon framework]) - PHP_ARG_WITH(non-free, wheter to enable non-free css and js minifier, [ --without-non-free Disable non-free minifiers], yes, no) - -+AC_MSG_CHECKING([Include non-free minifiers]) -+if test "$PHP_NON_FREE" = "yes"; then -+ AC_DEFINE([PHALCON_NON_FREE], [1], [Whether non-free minifiers are available]) -+ AC_MSG_RESULT([yes, css and js]) -+else -+ AC_MSG_RESULT([no]) -+fi -+ - if test "$PHP_PHALCON" = "yes"; then - AC_DEFINE(HAVE_PHALCON, 1, [Whether you have Phalcon Framework]) - phalcon_sources="phalcon.c \ -@@ -366,11 +374,8 @@ registry.c" - AC_MSG_CHECKING([Include non-free minifiers]) - if test "$PHP_NON_FREE" = "yes"; then - phalcon_sources="$phalcon_sources assets/filters/jsminifier.c assets/filters/cssminifier.c " -- AC_DEFINE([PHALCON_NON_FREE], [1], [Whether non-free minifiers are available]) -- AC_MSG_RESULT([yes, css and js]) - else - phalcon_sources="$phalcon_sources assets/filters/nojsminifier.c assets/filters/nocssminifier.c " -- AC_MSG_RESULT([no]) - fi - - PHP_NEW_EXTENSION(phalcon, $phalcon_sources, $ext_shared) -@@ -529,4 +534,4 @@ fi - - if test "$GCC" = "yes"; then - PHP_ADD_MAKEFILE_FRAGMENT([Makefile.frag.deps]) --fi -\ No newline at end of file -+fi diff --git a/php-phalcon.spec b/php-phalcon.spec index 93a38d7..3176247 100644 --- a/php-phalcon.spec +++ b/php-phalcon.spec @@ -8,7 +8,8 @@ # %{?scl: %scl_package php-phalcon} %{!?scl: %global pkg_name %{name}} -%global gh_commit 777fc83e7ed9932c006c54ce76a2975dc97aeac0 +%{!?__php: %global __php %{_bindir}/php} +%global gh_commit 9ce2bb076d6134794b3224e214a578d3a7ee0bf4 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phalcon %global gh_project cphalcon @@ -24,8 +25,8 @@ %endif Name: %{?scl_prefix}php-phalcon -Version: 1.3.2 -Release: 2%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} +Version: 1.3.3 +Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')} Summary: Phalcon Framework Group: Development/Libraries @@ -35,12 +36,6 @@ Source0: %{gh_project}-%{version}-strip.tar.bz2 # Script to generate the stripped archive Source1: strip.sh -Patch1: https://github.com/phalcon/cphalcon/pull/2772.patch -Patch2: https://github.com/phalcon/cphalcon/pull/2774.patch -Patch3: https://github.com/phalcon/cphalcon/pull/2775.patch -Patch4: https://github.com/vpg/cphalcon/commit/d9ded2ae91afbf9a4b1f515c18c4a99760b2df5c.patch -Patch5: https://github.com/phalcon/cphalcon/pull/2793.patch - BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: %{?scl_prefix}php-devel > 5.3 BuildRequires: %{?scl_prefix}php-date @@ -66,6 +61,7 @@ Requires: %{?scl_prefix}php-spl%{?_isa} %endif Requires: %{?scl_prefix}php-pdo%{?_isa} Requires: %{?scl_prefix}php-pecl(igbinary)%{?_isa} +%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} # Don't provides php-composer(phalcon/cphalcon), not registered on packagist @@ -90,13 +86,6 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO %prep %setup -q -n %{gh_project}-%{gh_commit} -%patch1 -p1 -b .2772 -%patch2 -p1 -b .2774 -chmod 644 ext/assets/filters/*.2774 -%patch3 -p1 -b .2775 -%patch4 -p1 -b .build -%patch5 -p1 -b .2793 - # Sanity check, really often broken extver=$(sed -n '/#define PHP_PHALCON_VERSION/{s/.* "//;s/".*$//;p}' ext/php_phalcon.h) if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then @@ -104,11 +93,6 @@ if test "x${extver}" != "x%{version}%{?prever:-%{prever}}"; then exit 1 fi -# Generate the optimized sources -cd build -php gen-build.php -cd .. - # Create configuration file cat << 'EOF' | tee %{ini_name} ; Enable '%{summary}' extension module @@ -125,6 +109,33 @@ extension=%{ext_name}.so ;phalcon.register_psr3_classes=0 EOF + +%build +peclconf() { +%configure \ + --without-non-free \ + --enable-phalcon \ + --with-libdir=%{_lib} \ + --with-php-config=$1 +} + +: Generate the SAFE sources +pushd build +%{__php} gen-build.php +popd + +: Build SAFE extension, needed to regenerate sources +pushd build/safe +%{_bindir}/phpize +peclconf %{_bindir}/php-config +make %{?_smp_mflags} +popd + +: Generate optimized sources +pushd build +%{__php} -d extension=safe/modules/phalcon.so gen-build.php +popd + # Use the optimized sources, is available if [ -d build/%{?__isa_bits}bits ]; then mv build/%{__isa_bits}bits build/NTS @@ -133,25 +144,18 @@ else fi %if %{with_zts} -# Duplicate source tree for NTS / ZTS build +: Duplicate source tree for NTS / ZTS build cp -r build/NTS build/ZTS %endif - -%build -peclconf() { -%configure \ - --without-non-free \ - --enable-phalcon \ - --with-libdir=%{_lib} \ - --with-php-config=$1 -} +: Build NTS extension cd build/NTS %{_bindir}/phpize peclconf %{_bindir}/php-config make %{?_smp_mflags} %if %{with_zts} +: Build ZTS extension cd ../ZTS %{_bindir}/zts-phpize peclconf %{_bindir}/zts-php-config @@ -230,6 +234,10 @@ rm -rf %{buildroot} %changelog +* Mon Sep 29 2014 Remi Collet <remi@fedoraproject.org> - 1.3.3-1 +- update to 1.3.3 +- drop all patches merged upstream + * Sun Sep 7 2014 Remi Collet <remi@fedoraproject.org> - 1.3.2-2 - use striped archive, without non-free sources - generate and use optimized sources |