Skip to content

Commit

Permalink
yaf 2.2.2 released
Browse files Browse the repository at this point in the history
  • Loading branch information
laruence committed Sep 14, 2012
1 parent b9d9928 commit 360ea71
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 22 deletions.
17 changes: 11 additions & 6 deletions configs/ini.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/

/* $Id: ini.c 327591 2012-09-10 10:56:13Z laruence $ */
/* $Id: ini.c 327626 2012-09-13 02:57:39Z laruence $ */

zend_class_entry *yaf_config_ini_ce;

Expand Down Expand Up @@ -751,11 +751,16 @@ PHP_METHOD(yaf_config_ini, key) {
char *string;
ulong index;

prop = zend_read_property(yaf_config_ini_ce, getThis(), ZEND_STRL(YAF_CONFIG_PROPERT_NAME), 1 TSRMLS_CC);
if (zend_hash_get_current_key(Z_ARRVAL_P(prop), &string, &index, 0) == HASH_KEY_IS_LONG) {
RETURN_LONG(index);
} else {
RETURN_STRING(string, 1);
prop = zend_read_property(yaf_config_ini_ce, getThis(), ZEND_STRL(YAF_CONFIG_PROPERT_NAME), 0 TSRMLS_CC);
switch (zend_hash_get_current_key(Z_ARRVAL_P(prop), &string, &index, 0)) {
case HASH_KEY_IS_LONG:
RETURN_LONG(index);
break;
case HASH_KEY_IS_STRING:
RETURN_STRING(string, 1);
break;
default:
RETURN_FALSE;
}
}
/* }}} */
Expand Down
15 changes: 10 additions & 5 deletions configs/simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/

/* $Id: simple.c 327425 2012-09-02 03:58:49Z laruence $ */
/* $Id: simple.c 327626 2012-09-13 02:57:39Z laruence $ */

zend_class_entry *yaf_config_simple_ce;

Expand Down Expand Up @@ -267,10 +267,15 @@ PHP_METHOD(yaf_config_simple, key) {

prop = zend_read_property(yaf_config_simple_ce, getThis(), ZEND_STRL(YAF_CONFIG_PROPERT_NAME), 1 TSRMLS_CC);
zend_hash_get_current_key(Z_ARRVAL_P(prop), &string, &index, 0);
if (zend_hash_get_current_key_type(Z_ARRVAL_P(prop)) == HASH_KEY_IS_LONG) {
RETURN_LONG(index);
} else {
RETURN_STRING(string, 1);
switch(zend_hash_get_current_key_type(Z_ARRVAL_P(prop))) {
case HASH_KEY_IS_LONG:
RETURN_LONG(index);
break;
case HASH_KEY_IS_STRING:
RETURN_STRING(string, 1);
break;
default:
RETURN_FALSE;
}
}
/* }}} */
Expand Down
31 changes: 26 additions & 5 deletions package2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<email>[email protected]</email>
<active>yes</active>
</lead>
<date>2012-09-07</date>
<time>16:01:47</time>
<date>2012-09-14</date>
<time>16:56:28</time>
<version>
<release>2.2.2</release>
<api>2.2.2</api>
Expand Down Expand Up @@ -144,6 +144,10 @@
<file name="048.phpt" role="test" />
<file name="049.phpt" role="test" />
<file name="050.phpt" role="test" />
<file name="051.phpt" role="test" />
<file name="052.phpt" role="test" />
<file name="053.phpt" role="test" />
<file name="054.phpt" role="test" />
<file name="build.inc" role="test" />
<file name="bug61493.phpt" role="test" />
<file name="simple.ini" role="test" />
Expand All @@ -164,11 +168,29 @@
<providesextension>yaf</providesextension>
<extsrcrelease />
<changelog>
<release>
<date>2012-09-14</date>
<version>
<release>2.2.2</release>
<api>2.2.2</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<license uri="http://www.php.net/license">PHP License</license>
<notes>
- Yaf_Controller's methods are not final anymore
- Yaf_View_Simple is not final anymore
- Memleaks fixed in various place
</notes>
</release>

<release>
<date>2012-09-07</date>
<version>
<release>2.2.0</release>
<api>2.2.0</api>
<release>2.2.1</release>
<api>2.2.1</api>
</version>
<stability>
<release>beta</release>
Expand All @@ -179,7 +201,6 @@
- Repackage, previous one missed one fix
</notes>
</release>

<release>
<date>2012-09-07</date>
<version>
Expand Down
4 changes: 2 additions & 2 deletions php_yaf.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/

/* $Id: php_yaf.h 327561 2012-09-09 06:30:22Z laruence $ */
/* $Id: php_yaf.h 327615 2012-09-12 08:57:59Z laruence $ */

#ifndef PHP_YAF_H
#define PHP_YAF_H
Expand All @@ -41,7 +41,7 @@ extern zend_module_entry yaf_module_entry;
#define YAF_G(v) (yaf_globals.v)
#endif

#define YAF_VERSION "2.2.2-dev"
#define YAF_VERSION "2.2.2"

#define YAF_STARTUP_FUNCTION(module) ZEND_MINIT_FUNCTION(yaf_##module)
#define YAF_RINIT_FUNCTION(module) ZEND_RINIT_FUNCTION(yaf_##module)
Expand Down
4 changes: 2 additions & 2 deletions routes/static.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/

/* $Id: static.c 327548 2012-09-09 02:33:16Z laruence $ */
/* $Id: static.c 327627 2012-09-13 06:12:38Z laruence $ */

zend_class_entry * yaf_route_static_ce;

Expand Down Expand Up @@ -198,7 +198,7 @@ YAF_STARTUP_FUNCTION(route_static) {

YAF_INIT_CLASS_ENTRY(ce, "Yaf_Route_Static", "Yaf\\Route_Static", yaf_route_static_methods);
yaf_route_static_ce = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC);
zend_class_implements(yaf_route_static_ce TSRMLS_CC, 1, yaf_router_ce);
zend_class_implements(yaf_route_static_ce TSRMLS_CC, 1, yaf_route_ce);

return SUCCESS;
}
Expand Down
3 changes: 3 additions & 0 deletions tests/054.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ try {
$request = new Yaf_Request_Simple(NULL);
var_dump($request->isOptions());


$config = new Yaf_Config_Simple(array());
$config->key();
echo "okey";
?>
--EXPECTF--
Expand Down
4 changes: 2 additions & 2 deletions views/simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
+----------------------------------------------------------------------+
*/

/* $Id: simple.c 327562 2012-09-09 06:54:44Z laruence $ */
/* $Id: simple.c 327628 2012-09-13 06:23:11Z laruence $ */

#include "main/php_output.h"

Expand Down Expand Up @@ -875,7 +875,7 @@ PHP_METHOD(yaf_view_simple, clear) {
/** {{{ yaf_view_simple_methods
*/
zend_function_entry yaf_view_simple_methods[] = {
PHP_ME(yaf_view_simple, __construct, yaf_view_simple_construct_arginfo, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC)
PHP_ME(yaf_view_simple, __construct, yaf_view_simple_construct_arginfo, ZEND_ACC_CTOR|ZEND_ACC_FINAL|ZEND_ACC_PUBLIC)
PHP_ME(yaf_view_simple, __isset, yaf_view_simple_isset_arginfo, ZEND_ACC_PUBLIC)
PHP_ME(yaf_view_simple, get, yaf_view_simple_get_arginfo, ZEND_ACC_PUBLIC)
PHP_ME(yaf_view_simple, assign, yaf_view_assign_arginfo, ZEND_ACC_PUBLIC)
Expand Down

0 comments on commit 360ea71

Please sign in to comment.