Skip to content

Commit

Permalink
Fixed arginfo with 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
laruence committed Jun 26, 2024
1 parent 356d71e commit 992fd8d
Show file tree
Hide file tree
Showing 12 changed files with 71 additions and 46 deletions.
10 changes: 9 additions & 1 deletion configs/yaf_config_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ PHP_METHOD(yaf_config_simple, set) {
}
/* }}} */

/** {{{ proto public Yaf_Config_Simple::__set($name, $value)
*/
PHP_METHOD(yaf_config_simple, __set) {
PHP_MN(yaf_config_simple_set)(INTERNAL_FUNCTION_PARAM_PASSTHRU);
RETURN_NULL();
}
/* }}} */

/** {{{ proto public Yaf_Config_Simple::readonly(void)
*/
PHP_METHOD(yaf_config_simple, readonly) {
Expand Down Expand Up @@ -145,7 +153,7 @@ zend_function_entry yaf_config_simple_methods[] = {
PHP_ME(yaf_config_simple, set, arginfo_class_Yaf_Config_Simple_set, ZEND_ACC_PUBLIC)
PHP_ME(yaf_config_simple, readonly, arginfo_class_Yaf_Config_Simple_readonly, ZEND_ACC_PUBLIC)
PHP_ME(yaf_config_simple, offsetUnset, arginfo_class_Yaf_Config_Simple_offsetUnSet, ZEND_ACC_PUBLIC)
PHP_MALIAS(yaf_config_simple, __set, set, arginfo_class_Yaf_Config_Simple___set, ZEND_ACC_PUBLIC)
PHP_ME(yaf_config_simple, __set, arginfo_class_Yaf_Config_Simple___set, ZEND_ACC_PUBLIC)
PHP_MALIAS(yaf_config_simple, offsetSet, set, arginfo_class_Yaf_Config_Simple_offsetSet, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
Expand Down
15 changes: 14 additions & 1 deletion views/yaf_view_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,19 @@ PHP_METHOD(yaf_view_simple, assign) {
}
/* }}} */

/** {{{ proto public Yaf_View_Simple::__set(mixed $value, mixed $value)
*/
PHP_METHOD(yaf_view_simple, __set) {
yaf_view_object *view = Z_YAFVIEWOBJ_P(getThis());
zval *value;
zend_string *name;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Sz", &name, &value) == FAILURE) {
return;
}
yaf_view_simple_assign_single(view, name, value);
}
/* }}} */

/** {{{ proto public Yaf_View_Simple::assignRef(mixed $value, mixed &$value)
*/
PHP_METHOD(yaf_view_simple, assignRef) {
Expand Down Expand Up @@ -647,8 +660,8 @@ zend_function_entry yaf_view_simple_methods[] = {
PHP_ME(yaf_view_simple, setScriptPath, arginfo_class_Yaf_View_Simple_setScriptPath, ZEND_ACC_PUBLIC)
PHP_ME(yaf_view_simple, getScriptPath, arginfo_class_Yaf_View_Simple_getScriptPath, ZEND_ACC_PUBLIC)
PHP_ME(yaf_view_simple, __isset, arginfo_class_Yaf_View_Simple___isset, ZEND_ACC_PUBLIC)
PHP_ME(yaf_view_simple, __set, arginfo_class_Yaf_View_Simple___set, ZEND_ACC_PUBLIC)
PHP_MALIAS(yaf_view_simple, __get, get, arginfo_class_Yaf_View_Simple___get, ZEND_ACC_PUBLIC)
PHP_MALIAS(yaf_view_simple, __set, assign, arginfo_class_Yaf_View_Simple___set, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
};
/* }}} */
Expand Down
4 changes: 1 addition & 3 deletions yaf_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,8 @@ PHP_METHOD(yaf_config, next) {

if (conf->config) {
zend_hash_move_forward(conf->config);
RETURN_TRUE;
}

RETURN_FALSE;
return;
}
/* }}} */

Expand Down
20 changes: 10 additions & 10 deletions yaf_controller.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ abstract class Yaf_Controller_Abstract {
/* constants */

/* properties */
protected array $actions = NULL;
protected string $_module = NULL;
protected string $_name = NULL;
protected object $_request = NULL;
protected object $_response = NULL;
protected array $_invoke_args = NULL;
protected object $_view = NULL;
protected ?array $actions = NULL;
protected ?string $_module = NULL;
protected ?string $_name = NULL;
protected ?object $_request = NULL;
protected ?object $_response = NULL;
protected ?array $_invoke_args = NULL;
protected ?object $_view = NULL;

/* methods */

Expand All @@ -38,7 +38,7 @@ final public function getView():?object;
/**
* @return Yaf_View_Interface|NULL
*/
final public function initView(array $options = NULL):?object;
final public function initView(?array $options = NULL):?object;

final public function setViewpath(string $view_directory):?bool;

Expand All @@ -64,9 +64,9 @@ final public function getInvokeArg(string $name):?string;

final public function getName():?string;

final protected function render(string $tpl, array $parameters = NULL):string|null|bool;
final protected function render(string $tpl, ?array $parameters = NULL):string|null|bool;

final protected function display(string $tpl, array $parameters = NULL):?bool;
final protected function display(string $tpl, ?array $parameters = NULL):?bool;
}

abstract class Yaf_Action_Abstract extends Yaf_Controller_Abstract {
Expand Down
9 changes: 5 additions & 4 deletions yaf_controller_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: c265ad91ca592d72f56f0603c262bcb90f0a1737 */
* Stub hash: f6b3c770dde0187a7432deb7b9291bec34347c5b */

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Yaf_Controller_Abstract___construct, 0, 0, 0)
ZEND_END_ARG_INFO()
Expand All @@ -15,7 +15,7 @@ ZEND_END_ARG_INFO()
#define arginfo_class_Yaf_Controller_Abstract_getView arginfo_class_Yaf_Controller_Abstract_getRequest

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Yaf_Controller_Abstract_initView, 0, 0, IS_OBJECT, 1)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "NULL")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "NULL")
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Yaf_Controller_Abstract_setViewpath, 0, 1, _IS_BOOL, 1)
Expand Down Expand Up @@ -46,16 +46,17 @@ ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Yaf_Controller_Abstract_render, 0, 1, MAY_BE_STRING|MAY_BE_NULL|MAY_BE_BOOL)
ZEND_ARG_TYPE_INFO(0, tpl, IS_STRING, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, parameters, IS_ARRAY, 0, "NULL")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, parameters, IS_ARRAY, 1, "NULL")
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Yaf_Controller_Abstract_display, 0, 1, _IS_BOOL, 1)
ZEND_ARG_TYPE_INFO(0, tpl, IS_STRING, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, parameters, IS_ARRAY, 0, "NULL")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, parameters, IS_ARRAY, 1, "NULL")
ZEND_END_ARG_INFO()

#define arginfo_class_Yaf_Action_Abstract_execute arginfo_class_Yaf_Controller_Abstract___construct

#define arginfo_class_Yaf_Action_Abstract_getController arginfo_class_Yaf_Controller_Abstract_getRequest

#define arginfo_class_Yaf_Action_Abstract_getControllerName arginfo_class_Yaf_Controller_Abstract_getModuleName

3 changes: 2 additions & 1 deletion yaf_controller_legacy_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: c265ad91ca592d72f56f0603c262bcb90f0a1737 */
* Stub hash: f6b3c770dde0187a7432deb7b9291bec34347c5b */

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Yaf_Controller_Abstract___construct, 0, 0, 0)
ZEND_END_ARG_INFO()
Expand Down Expand Up @@ -53,3 +53,4 @@ ZEND_END_ARG_INFO()
#define arginfo_class_Yaf_Action_Abstract_getController arginfo_class_Yaf_Controller_Abstract___construct

#define arginfo_class_Yaf_Action_Abstract_getControllerName arginfo_class_Yaf_Controller_Abstract___construct

6 changes: 3 additions & 3 deletions yaf_session.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ final class Yaf_Session implements \Iterator, \Traversable, \ArrayAccess, \Count
/* constants */

/* properties */
static protected object $_instance = NULL;
protected array $_session = NULL;
static protected ?object $_instance = NULL;
protected ?array $_session = NULL;
protected bool $_started = false;

/* methods */
Expand All @@ -22,7 +22,7 @@ public static function getInstance():?object;
*/
public function start():object;

public function get(string $name = NULL):mixed;
public function get(?string $name = NULL):mixed;

public function has(string $name):?bool;

Expand Down
5 changes: 3 additions & 2 deletions yaf_session_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 61ccfe989e1c36218cc63866db9e781a671efd6e */
* Stub hash: f10baf628eb99eafbf7d0d0baef833070aa0d3ba */

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Yaf_Session___construct, 0, 0, 0)
ZEND_END_ARG_INFO()
Expand All @@ -11,7 +11,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Yaf_Session_start, 0, 0, I
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Yaf_Session_get, 0, 0, IS_MIXED, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 0, "NULL")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "NULL")
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Yaf_Session_has, 0, 1, _IS_BOOL, 1)
Expand Down Expand Up @@ -78,3 +78,4 @@ ZEND_END_ARG_INFO()
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Yaf_Session___unset, 0, 1, IS_VOID, 0)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_END_ARG_INFO()

3 changes: 2 additions & 1 deletion yaf_session_legacy_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 61ccfe989e1c36218cc63866db9e781a671efd6e */
* Stub hash: f10baf628eb99eafbf7d0d0baef833070aa0d3ba */

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Yaf_Session___construct, 0, 0, 0)
ZEND_END_ARG_INFO()
Expand Down Expand Up @@ -52,3 +52,4 @@ ZEND_END_ARG_INFO()
#define arginfo_class_Yaf_Session___set arginfo_class_Yaf_Session_set

#define arginfo_class_Yaf_Session___unset arginfo_class_Yaf_Session_has

14 changes: 7 additions & 7 deletions yaf_view.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ public function assign(string $name, mixed $value = NULL);
/**
* @return string|bool
*/
public function render(string $tpl, array $tpl_vars = NULL);
public function render(string $tpl, ?array $tpl_vars = NULL);

/**
* @return Yaf_View_Interface|bool
*/
public function display(string $tpl, array $tpl_vars = NULL);
public function display(string $tpl, ?array $tpl_vars = NULL);

/**
* @return bool
Expand All @@ -39,11 +39,11 @@ final class Yaf_View_Simple implements Yaf_View_Interface {
protected ?array $_options = NULL;

/* methods */
public function __construct(string $tempalte_dir, array $options = NULL) {}
public function __construct(string $tempalte_dir, ?array $options = NULL) {}

public function __isset(string $name):bool {}

public function get(string $name = NULL):mixed {}
public function get(string $name):mixed {}

/**
* @return Yaf_View_Simple|NULL|FALSE
Expand All @@ -59,12 +59,12 @@ public function display(string $tpl, ?array $tpl_vars = NULL):?bool {}
/**
* @return Yaf_View_Simple|NULL
*/
public function assignRef(string $name = NULL, mixed &$value):?object {}
public function assignRef(?string $name = NULL, mixed &$value):?object {}

/**
* @return Yaf_View_Simple|NULL
*/
public function clear(string $name = NULL):?object {}
public function clear(?string $name = NULL):?object {}

/**
* @return Yaf_View_Simple|NULL|FALSE
Expand All @@ -74,7 +74,7 @@ public function setScriptPath(string $template_dir):object|null|bool {}
public function getScriptPath():?string {}

/** @implementation-alias Yaf_View_Simple::get */
public function __get(string $name = NULL):mixed {}
public function __get(string $name):mixed {}

/** @implementation-alias Yaf_View_Simple::assign */
public function __set(string $name, mixed $value):void {}
Expand Down
15 changes: 8 additions & 7 deletions yaf_view_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 5d45d131328e5f80f5df131f65cd8018d12574b8 */
* Stub hash: 45071bca670049bd8ac3f1a2ea5611c022466ade */

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Yaf_View_Interface_assign, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
Expand All @@ -8,7 +8,7 @@ ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Yaf_View_Interface_render, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, tpl, IS_STRING, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, tpl_vars, IS_ARRAY, 0, "NULL")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, tpl_vars, IS_ARRAY, 1, "NULL")
ZEND_END_ARG_INFO()

#define arginfo_class_Yaf_View_Interface_display arginfo_class_Yaf_View_Interface_render
Expand All @@ -22,15 +22,15 @@ ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Yaf_View_Simple___construct, 0, 0, 1)
ZEND_ARG_TYPE_INFO(0, tempalte_dir, IS_STRING, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 0, "NULL")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, options, IS_ARRAY, 1, "NULL")
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Yaf_View_Simple___isset, 0, 1, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Yaf_View_Simple_get, 0, 0, IS_MIXED, 0)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 0, "NULL")
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Yaf_View_Simple_get, 0, 1, IS_MIXED, 0)
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Yaf_View_Simple_assign, 0, 0, MAY_BE_OBJECT|MAY_BE_NULL|MAY_BE_FALSE)
Expand All @@ -54,12 +54,12 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Yaf_View_Simple_display, 0
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Yaf_View_Simple_assignRef, 0, 2, IS_OBJECT, 1)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 0, "NULL")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "NULL")
ZEND_ARG_TYPE_INFO(1, value, IS_MIXED, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Yaf_View_Simple_clear, 0, 0, IS_OBJECT, 1)
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 0, "NULL")
ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, name, IS_STRING, 1, "NULL")
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_class_Yaf_View_Simple_setScriptPath, 0, 1, MAY_BE_OBJECT|MAY_BE_NULL|MAY_BE_BOOL)
Expand All @@ -75,3 +75,4 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Yaf_View_Simple___set, 0,
ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, value, IS_MIXED, 0)
ZEND_END_ARG_INFO()

13 changes: 7 additions & 6 deletions yaf_view_legacy_arginfo.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is a generated file, edit the .stub.php file instead.
* Stub hash: 5d45d131328e5f80f5df131f65cd8018d12574b8 */
* Stub hash: 45071bca670049bd8ac3f1a2ea5611c022466ade */

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Yaf_View_Interface_assign, 0, 0, 1)
ZEND_ARG_INFO(0, name)
Expand Down Expand Up @@ -29,9 +29,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Yaf_View_Simple___isset, 0, 0, 1)
ZEND_ARG_INFO(0, name)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Yaf_View_Simple_get, 0, 0, 0)
ZEND_ARG_INFO(0, name)
ZEND_END_ARG_INFO()
#define arginfo_class_Yaf_View_Simple_get arginfo_class_Yaf_View_Simple___isset

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Yaf_View_Simple_assign, 0, 0, 0)
ZEND_ARG_INFO(0, name)
Expand All @@ -52,15 +50,18 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Yaf_View_Simple_assignRef, 0, 0, 2)
ZEND_ARG_INFO(1, value)
ZEND_END_ARG_INFO()

#define arginfo_class_Yaf_View_Simple_clear arginfo_class_Yaf_View_Simple_get
ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Yaf_View_Simple_clear, 0, 0, 0)
ZEND_ARG_INFO(0, name)
ZEND_END_ARG_INFO()

#define arginfo_class_Yaf_View_Simple_setScriptPath arginfo_class_Yaf_View_Interface_setScriptPath

#define arginfo_class_Yaf_View_Simple_getScriptPath arginfo_class_Yaf_View_Interface_getScriptPath

#define arginfo_class_Yaf_View_Simple___get arginfo_class_Yaf_View_Simple_get
#define arginfo_class_Yaf_View_Simple___get arginfo_class_Yaf_View_Simple___isset

ZEND_BEGIN_ARG_INFO_EX(arginfo_class_Yaf_View_Simple___set, 0, 0, 2)
ZEND_ARG_INFO(0, name)
ZEND_ARG_INFO(0, value)
ZEND_END_ARG_INFO()

0 comments on commit 992fd8d

Please sign in to comment.