Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ext/ddtrace.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class SpanData {
/**
* @var string The unique identifier of the span
*/
public readonly string $id = "";
public readonly string $id;

/**
* @var SpanLink[] $spanLinks An array of span links
Expand All @@ -115,7 +115,7 @@ class SpanData {
/**
* @var SpanData|null The parent span, or 'null' if there is none
*/
public readonly SpanData|null $parent = null;
public readonly SpanData|null $parent;

/**
* @var SpanStack The span's stack trace
Expand Down Expand Up @@ -150,14 +150,14 @@ public function getLink(): SpanLink {}
* 'switch_stack' functions. 'create_stack' creates a new SpanStack whose parent is the currently active stack,
* while 'switch_stack' switches the active span.
*/
readonly class SpanStack {
class SpanStack {
/**
* @var SpanStack|null The parent stack, or 'null' if there is none
*/
public readonly SpanStack|null $parent = null;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason you removed that readonly here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. You may notice that like 153 defines whole class as a readonly, so it's invalid to duplicate it to property too.

public readonly SpanStack|null $parent;

/**
* @var SpanData The active span
* @var SpanData|null The active span
*/
public SpanData|null $active = null;
}
Expand Down
19 changes: 9 additions & 10 deletions ext/ddtrace_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: d76f5179a4cac6921e820a94e4dd9b198fd303e7 */
* Stub hash: 414789fb27e3a704af44a6c25ae021ce97c85b43 */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_DDTrace_trace_method, 0, 3, _IS_BOOL, 0)
ZEND_ARG_TYPE_INFO(0, className, IS_STRING, 0)
Expand Down Expand Up @@ -513,15 +513,15 @@ static zend_class_entry *register_class_DDTrace_SpanData(void)
zend_declare_typed_property(class_entry, property_metrics_name, &property_metrics_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ARRAY));
zend_string_release(property_metrics_name);

zend_string *property_exception_class_Throwable = zend_string_init("Throwable", sizeof("Throwable")-1, 1);
zval property_exception_default_value;
ZVAL_NULL(&property_exception_default_value);
zend_string *property_exception_name = zend_string_init("exception", sizeof("exception") - 1, 1);
zend_string *property_exception_class_Throwable = zend_string_init("Throwable", sizeof("Throwable")-1, 1);
zend_declare_typed_property(class_entry, property_exception_name, &property_exception_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_exception_class_Throwable, 0, MAY_BE_NULL));
zend_string_release(property_exception_name);

zval property_id_default_value;
ZVAL_EMPTY_STRING(&property_id_default_value);
ZVAL_UNDEF(&property_id_default_value);
zend_string *property_id_name = zend_string_init("id", sizeof("id") - 1, 1);
zend_declare_typed_property(class_entry, property_id_name, &property_id_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_READONLY, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_STRING));
zend_string_release(property_id_name);
Expand All @@ -538,17 +538,17 @@ static zend_class_entry *register_class_DDTrace_SpanData(void)
zend_declare_typed_property(class_entry, property_peerServiceSources_name, &property_peerServiceSources_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ARRAY));
zend_string_release(property_peerServiceSources_name);

zend_string *property_parent_class_DDTrace_SpanData = zend_string_init("DDTrace\\SpanData", sizeof("DDTrace\\SpanData")-1, 1);
zval property_parent_default_value;
ZVAL_NULL(&property_parent_default_value);
ZVAL_UNDEF(&property_parent_default_value);
zend_string *property_parent_name = zend_string_init("parent", sizeof("parent") - 1, 1);
zend_string *property_parent_class_DDTrace_SpanData = zend_string_init("DDTrace\\SpanData", sizeof("DDTrace\\SpanData")-1, 1);
zend_declare_typed_property(class_entry, property_parent_name, &property_parent_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_READONLY, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_parent_class_DDTrace_SpanData, 0, MAY_BE_NULL));
zend_string_release(property_parent_name);

zend_string *property_stack_class_DDTrace_SpanStack = zend_string_init("DDTrace\\SpanStack", sizeof("DDTrace\\SpanStack")-1, 1);
zval property_stack_default_value;
ZVAL_UNDEF(&property_stack_default_value);
zend_string *property_stack_name = zend_string_init("stack", sizeof("stack") - 1, 1);
zend_string *property_stack_class_DDTrace_SpanStack = zend_string_init("DDTrace\\SpanStack", sizeof("DDTrace\\SpanStack")-1, 1);
zend_declare_typed_property(class_entry, property_stack_name, &property_stack_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_READONLY, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_stack_class_DDTrace_SpanStack, 0, 0));
zend_string_release(property_stack_name);

Expand All @@ -561,19 +561,18 @@ static zend_class_entry *register_class_DDTrace_SpanStack(void)

INIT_NS_CLASS_ENTRY(ce, "DDTrace", "SpanStack", class_DDTrace_SpanStack_methods);
class_entry = zend_register_internal_class_ex(&ce, NULL);
class_entry->ce_flags |= ZEND_ACC_READONLY_CLASS;

zend_string *property_parent_class_DDTrace_SpanStack = zend_string_init("DDTrace\\SpanStack", sizeof("DDTrace\\SpanStack")-1, 1);
zval property_parent_default_value;
ZVAL_NULL(&property_parent_default_value);
ZVAL_UNDEF(&property_parent_default_value);
zend_string *property_parent_name = zend_string_init("parent", sizeof("parent") - 1, 1);
zend_string *property_parent_class_DDTrace_SpanStack = zend_string_init("DDTrace\\SpanStack", sizeof("DDTrace\\SpanStack")-1, 1);
zend_declare_typed_property(class_entry, property_parent_name, &property_parent_default_value, ZEND_ACC_PUBLIC|ZEND_ACC_READONLY, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_parent_class_DDTrace_SpanStack, 0, MAY_BE_NULL));
zend_string_release(property_parent_name);

zend_string *property_active_class_DDTrace_SpanData = zend_string_init("DDTrace\\SpanData", sizeof("DDTrace\\SpanData")-1, 1);
zval property_active_default_value;
ZVAL_NULL(&property_active_default_value);
zend_string *property_active_name = zend_string_init("active", sizeof("active") - 1, 1);
zend_string *property_active_class_DDTrace_SpanData = zend_string_init("DDTrace\\SpanData", sizeof("DDTrace\\SpanData")-1, 1);
zend_declare_typed_property(class_entry, property_active_name, &property_active_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_active_class_DDTrace_SpanData, 0, MAY_BE_NULL));
zend_string_release(property_active_name);

Expand Down
2 changes: 1 addition & 1 deletion ext/hook/uhook.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class HookData {
public mixed $returned;

/**
* The a possible thrown exception within that function.
* The possible thrown exception within that function.
* Uninitialized in a begin hook.
*/
public ?\Throwable $exception;
Expand Down
4 changes: 2 additions & 2 deletions ext/hook/uhook_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: 998812aa3cd8f153aa141d6be99e957a38d3a60b */
* Stub hash: a5fb3dcc16aa9ce2eb23410e7e40f2d835adf66f */

ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_DDTrace_install_hook, 0, 1, IS_LONG, 0)
ZEND_ARG_OBJ_TYPE_MASK(0, target, Closure|Generator, MAY_BE_STRING|MAY_BE_CALLABLE, NULL)
Expand Down Expand Up @@ -87,10 +87,10 @@ static zend_class_entry *register_class_DDTrace_HookData(void)
zend_declare_typed_property(class_entry, property_returned_name, &property_returned_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_MASK(MAY_BE_ANY));
zend_string_release(property_returned_name);

zend_string *property_exception_class_Throwable = zend_string_init("Throwable", sizeof("Throwable")-1, 1);
zval property_exception_default_value;
ZVAL_UNDEF(&property_exception_default_value);
zend_string *property_exception_name = zend_string_init("exception", sizeof("exception") - 1, 1);
zend_string *property_exception_class_Throwable = zend_string_init("Throwable", sizeof("Throwable")-1, 1);
zend_declare_typed_property(class_entry, property_exception_name, &property_exception_default_value, ZEND_ACC_PUBLIC, NULL, (zend_type) ZEND_TYPE_INIT_CLASS(property_exception_class_Throwable, 0, MAY_BE_NULL));
zend_string_release(property_exception_name);

Expand Down