From 61025e01d308a221a2288f82c527d8b706b73f48 Mon Sep 17 00:00:00 2001 From: NickSdot Date: Sat, 15 Aug 2026 23:28:45 +0700 Subject: [PATCH 1/2] fix: removed `getFragment()` alias to use intended function --- ext/uri/php_uri.stub.php | 1 - ext/uri/php_uri_arginfo.h | 5 +++-- ext/uri/php_uri_decl.h | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ext/uri/php_uri.stub.php b/ext/uri/php_uri.stub.php index 81a766c0e16d..345307cc6662 100644 --- a/ext/uri/php_uri.stub.php +++ b/ext/uri/php_uri.stub.php @@ -263,7 +263,6 @@ public function getQuery(): ?string {} /** @implementation-alias Uri\Rfc3986\Uri::withQuery */ public function withQuery(?string $query): static {} - /** @implementation-alias Uri\Rfc3986\Uri::getFragment */ public function getFragment(): ?string {} /** @implementation-alias Uri\Rfc3986\Uri::withFragment */ diff --git a/ext/uri/php_uri_arginfo.h b/ext/uri/php_uri_arginfo.h index 1231408fbeb6..c134e9928401 100644 --- a/ext/uri/php_uri_arginfo.h +++ b/ext/uri/php_uri_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit php_uri.stub.php instead. - * Stub hash: bfd9247fa79baf877d600134c9ef615ec5ca9cea + * Stub hash: b15c2938e8b7eb1f9cfedfb788cf35254280f253 * Has decl header: yes */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Uri_Rfc3986_UriBuilder_reset, 0, 0, IS_STATIC, 0) @@ -275,6 +275,7 @@ ZEND_METHOD(Uri_WhatWg_Url, withPassword); ZEND_METHOD(Uri_WhatWg_Url, getAsciiHost); ZEND_METHOD(Uri_WhatWg_Url, getUnicodeHost); ZEND_METHOD(Uri_WhatWg_Url, getHostType); +ZEND_METHOD(Uri_WhatWg_Url, getFragment); ZEND_METHOD(Uri_WhatWg_Url, equals); ZEND_METHOD(Uri_WhatWg_Url, toAsciiString); ZEND_METHOD(Uri_WhatWg_Url, toUnicodeString); @@ -365,7 +366,7 @@ static const zend_function_entry class_Uri_WhatWg_Url_methods[] = { ZEND_RAW_FENTRY("withPath", zim_Uri_Rfc3986_Uri_withPath, arginfo_class_Uri_WhatWg_Url_withPath, ZEND_ACC_PUBLIC, NULL, NULL) ZEND_RAW_FENTRY("getQuery", zim_Uri_Rfc3986_Uri_getQuery, arginfo_class_Uri_WhatWg_Url_getQuery, ZEND_ACC_PUBLIC, NULL, NULL) ZEND_RAW_FENTRY("withQuery", zim_Uri_Rfc3986_Uri_withQuery, arginfo_class_Uri_WhatWg_Url_withQuery, ZEND_ACC_PUBLIC, NULL, NULL) - ZEND_RAW_FENTRY("getFragment", zim_Uri_Rfc3986_Uri_getFragment, arginfo_class_Uri_WhatWg_Url_getFragment, ZEND_ACC_PUBLIC, NULL, NULL) + ZEND_ME(Uri_WhatWg_Url, getFragment, arginfo_class_Uri_WhatWg_Url_getFragment, ZEND_ACC_PUBLIC) ZEND_RAW_FENTRY("withFragment", zim_Uri_Rfc3986_Uri_withFragment, arginfo_class_Uri_WhatWg_Url_withFragment, ZEND_ACC_PUBLIC, NULL, NULL) ZEND_ME(Uri_WhatWg_Url, equals, arginfo_class_Uri_WhatWg_Url_equals, ZEND_ACC_PUBLIC) ZEND_ME(Uri_WhatWg_Url, toAsciiString, arginfo_class_Uri_WhatWg_Url_toAsciiString, ZEND_ACC_PUBLIC) diff --git a/ext/uri/php_uri_decl.h b/ext/uri/php_uri_decl.h index 9c817659cf76..6cb6e1680afb 100644 --- a/ext/uri/php_uri_decl.h +++ b/ext/uri/php_uri_decl.h @@ -1,8 +1,8 @@ /* This is a generated file, edit php_uri.stub.php instead. - * Stub hash: bfd9247fa79baf877d600134c9ef615ec5ca9cea */ + * Stub hash: b15c2938e8b7eb1f9cfedfb788cf35254280f253 */ -#ifndef ZEND_PHP_URI_DECL_bfd9247fa79baf877d600134c9ef615ec5ca9cea_H -#define ZEND_PHP_URI_DECL_bfd9247fa79baf877d600134c9ef615ec5ca9cea_H +#ifndef ZEND_PHP_URI_DECL_b15c2938e8b7eb1f9cfedfb788cf35254280f253_H +#define ZEND_PHP_URI_DECL_b15c2938e8b7eb1f9cfedfb788cf35254280f253_H typedef enum zend_enum_Uri_UriComparisonMode { ZEND_ENUM_Uri_UriComparisonMode_IncludeFragment = 1, @@ -63,4 +63,4 @@ typedef enum zend_enum_Uri_WhatWg_UrlHostType { ZEND_ENUM_Uri_WhatWg_UrlHostType_Empty = 5, } zend_enum_Uri_WhatWg_UrlHostType; -#endif /* ZEND_PHP_URI_DECL_bfd9247fa79baf877d600134c9ef615ec5ca9cea_H */ +#endif /* ZEND_PHP_URI_DECL_b15c2938e8b7eb1f9cfedfb788cf35254280f253_H */ From 6608d3ec7c7a82cf35086cdefb19ca6329be59eb Mon Sep 17 00:00:00 2001 From: NickSdot Date: Sun, 16 Aug 2026 09:01:00 +0700 Subject: [PATCH 2/2] fix: removed dead `getFragment()` --- ext/uri/php_uri.c | 5 ----- ext/uri/php_uri.stub.php | 1 + ext/uri/php_uri_arginfo.h | 5 ++--- ext/uri/php_uri_decl.h | 8 ++++---- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/ext/uri/php_uri.c b/ext/uri/php_uri.c index 6ede828b69fe..c774130f5237 100644 --- a/ext/uri/php_uri.c +++ b/ext/uri/php_uri.c @@ -968,11 +968,6 @@ PHP_METHOD(Uri_WhatWg_Url, getHostType) php_uri_parser_whatwg_host_type_read(uri_object->uri, return_value); } -PHP_METHOD(Uri_WhatWg_Url, getFragment) -{ - php_uri_property_read_helper(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_URI_PROPERTY_NAME_FRAGMENT, PHP_URI_COMPONENT_READ_MODE_NORMALIZED_UNICODE); -} - PHP_METHOD(Uri_WhatWg_Url, equals) { zend_object *that_object; diff --git a/ext/uri/php_uri.stub.php b/ext/uri/php_uri.stub.php index 345307cc6662..81a766c0e16d 100644 --- a/ext/uri/php_uri.stub.php +++ b/ext/uri/php_uri.stub.php @@ -263,6 +263,7 @@ public function getQuery(): ?string {} /** @implementation-alias Uri\Rfc3986\Uri::withQuery */ public function withQuery(?string $query): static {} + /** @implementation-alias Uri\Rfc3986\Uri::getFragment */ public function getFragment(): ?string {} /** @implementation-alias Uri\Rfc3986\Uri::withFragment */ diff --git a/ext/uri/php_uri_arginfo.h b/ext/uri/php_uri_arginfo.h index c134e9928401..1231408fbeb6 100644 --- a/ext/uri/php_uri_arginfo.h +++ b/ext/uri/php_uri_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit php_uri.stub.php instead. - * Stub hash: b15c2938e8b7eb1f9cfedfb788cf35254280f253 + * Stub hash: bfd9247fa79baf877d600134c9ef615ec5ca9cea * Has decl header: yes */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_Uri_Rfc3986_UriBuilder_reset, 0, 0, IS_STATIC, 0) @@ -275,7 +275,6 @@ ZEND_METHOD(Uri_WhatWg_Url, withPassword); ZEND_METHOD(Uri_WhatWg_Url, getAsciiHost); ZEND_METHOD(Uri_WhatWg_Url, getUnicodeHost); ZEND_METHOD(Uri_WhatWg_Url, getHostType); -ZEND_METHOD(Uri_WhatWg_Url, getFragment); ZEND_METHOD(Uri_WhatWg_Url, equals); ZEND_METHOD(Uri_WhatWg_Url, toAsciiString); ZEND_METHOD(Uri_WhatWg_Url, toUnicodeString); @@ -366,7 +365,7 @@ static const zend_function_entry class_Uri_WhatWg_Url_methods[] = { ZEND_RAW_FENTRY("withPath", zim_Uri_Rfc3986_Uri_withPath, arginfo_class_Uri_WhatWg_Url_withPath, ZEND_ACC_PUBLIC, NULL, NULL) ZEND_RAW_FENTRY("getQuery", zim_Uri_Rfc3986_Uri_getQuery, arginfo_class_Uri_WhatWg_Url_getQuery, ZEND_ACC_PUBLIC, NULL, NULL) ZEND_RAW_FENTRY("withQuery", zim_Uri_Rfc3986_Uri_withQuery, arginfo_class_Uri_WhatWg_Url_withQuery, ZEND_ACC_PUBLIC, NULL, NULL) - ZEND_ME(Uri_WhatWg_Url, getFragment, arginfo_class_Uri_WhatWg_Url_getFragment, ZEND_ACC_PUBLIC) + ZEND_RAW_FENTRY("getFragment", zim_Uri_Rfc3986_Uri_getFragment, arginfo_class_Uri_WhatWg_Url_getFragment, ZEND_ACC_PUBLIC, NULL, NULL) ZEND_RAW_FENTRY("withFragment", zim_Uri_Rfc3986_Uri_withFragment, arginfo_class_Uri_WhatWg_Url_withFragment, ZEND_ACC_PUBLIC, NULL, NULL) ZEND_ME(Uri_WhatWg_Url, equals, arginfo_class_Uri_WhatWg_Url_equals, ZEND_ACC_PUBLIC) ZEND_ME(Uri_WhatWg_Url, toAsciiString, arginfo_class_Uri_WhatWg_Url_toAsciiString, ZEND_ACC_PUBLIC) diff --git a/ext/uri/php_uri_decl.h b/ext/uri/php_uri_decl.h index 6cb6e1680afb..9c817659cf76 100644 --- a/ext/uri/php_uri_decl.h +++ b/ext/uri/php_uri_decl.h @@ -1,8 +1,8 @@ /* This is a generated file, edit php_uri.stub.php instead. - * Stub hash: b15c2938e8b7eb1f9cfedfb788cf35254280f253 */ + * Stub hash: bfd9247fa79baf877d600134c9ef615ec5ca9cea */ -#ifndef ZEND_PHP_URI_DECL_b15c2938e8b7eb1f9cfedfb788cf35254280f253_H -#define ZEND_PHP_URI_DECL_b15c2938e8b7eb1f9cfedfb788cf35254280f253_H +#ifndef ZEND_PHP_URI_DECL_bfd9247fa79baf877d600134c9ef615ec5ca9cea_H +#define ZEND_PHP_URI_DECL_bfd9247fa79baf877d600134c9ef615ec5ca9cea_H typedef enum zend_enum_Uri_UriComparisonMode { ZEND_ENUM_Uri_UriComparisonMode_IncludeFragment = 1, @@ -63,4 +63,4 @@ typedef enum zend_enum_Uri_WhatWg_UrlHostType { ZEND_ENUM_Uri_WhatWg_UrlHostType_Empty = 5, } zend_enum_Uri_WhatWg_UrlHostType; -#endif /* ZEND_PHP_URI_DECL_b15c2938e8b7eb1f9cfedfb788cf35254280f253_H */ +#endif /* ZEND_PHP_URI_DECL_bfd9247fa79baf877d600134c9ef615ec5ca9cea_H */