[php-src] master: [`%pS` migration] Use `%pS` in Zend/zend_attributes.c

From: Date: Fri, 30 Oct 2026 01:10:34 +0000
Subject: [php-src] master: [`%pS` migration] Use `%pS` in Zend/zend_attributes.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-142976@lists.php.net to get a copy of this message
Author: Daniel Scherzer (DanielEScherzer) Date: 2026-10-29T17:58:18-07:00 Commit: https://github.com/php/php-src/commit/93260994f1ddc6b0cd9f5219fb4a5cdaaed18d96 Raw diff: https://github.com/php/php-src/commit/93260994f1ddc6b0cd9f5219fb4a5cdaaed18d96.diff [%pS migration] Use %pS in Zend/zend_attributes.c Changed paths: M Zend/zend_attributes.c Diff: diff --git a/Zend/zend_attributes.c b/Zend/zend_attributes.c index c49b060ecd6f..d57b4c914466 100644 --- a/Zend/zend_attributes.c +++ b/Zend/zend_attributes.c @@ -75,16 +75,16 @@ static zend_string *validate_allow_dynamic_properties( ZEND_ASSERT(scope != NULL); const char *msg = NULL; if (scope->ce_flags & ZEND_ACC_TRAIT) { - msg = "Cannot apply #[\\AllowDynamicProperties] to trait %s"; + msg = "Cannot apply #[\\AllowDynamicProperties] to trait %pS"; } else if (scope->ce_flags & ZEND_ACC_INTERFACE) { - msg = "Cannot apply #[\\AllowDynamicProperties] to interface %s"; + msg = "Cannot apply #[\\AllowDynamicProperties] to interface %pS"; } else if (scope->ce_flags & ZEND_ACC_READONLY_CLASS) { - msg = "Cannot apply #[\\AllowDynamicProperties] to readonly class %s"; + msg = "Cannot apply #[\\AllowDynamicProperties] to readonly class %pS"; } else if (scope->ce_flags & ZEND_ACC_ENUM) { - msg = "Cannot apply #[\\AllowDynamicProperties] to enum %s"; + msg = "Cannot apply #[\\AllowDynamicProperties] to enum %pS"; } if (msg != NULL) { - return zend_strpprintf(0, msg, ZSTR_VAL(scope->name)); + return zend_strpprintf(0, msg, scope->name); } scope->ce_flags |= ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES; return NULL; @@ -95,16 +95,16 @@ static zend_string *validate_attribute( { const char *msg = NULL; if (scope->ce_flags & ZEND_ACC_TRAIT) { - msg = "Cannot apply #[\\Attribute] to trait %s"; + msg = "Cannot apply #[\\Attribute] to trait %pS"; } else if (scope->ce_flags & ZEND_ACC_INTERFACE) { - msg = "Cannot apply #[\\Attribute] to interface %s"; + msg = "Cannot apply #[\\Attribute] to interface %pS"; } else if (scope->ce_flags & ZEND_ACC_ENUM) { - msg = "Cannot apply #[\\Attribute] to enum %s"; + msg = "Cannot apply #[\\Attribute] to enum %pS"; } else if (scope->ce_flags & ZEND_ACC_EXPLICIT_ABSTRACT_CLASS) { - msg = "Cannot apply #[\\Attribute] to abstract class %s"; + msg = "Cannot apply #[\\Attribute] to abstract class %pS"; } if (msg != NULL) { - return zend_strpprintf(0, msg, ZSTR_VAL(scope->name)); + return zend_strpprintf(0, msg, scope->name); } return NULL; } @@ -120,7 +120,7 @@ static zend_string *validate_deprecated( } if (!(scope->ce_flags & ZEND_ACC_TRAIT)) { const char *type = zend_get_object_type_case(scope, false); - return zend_strpprintf(0, "Cannot apply #[\\Deprecated] to %s %s", type, ZSTR_VAL(scope->name)); + return zend_strpprintf(0, "Cannot apply #[\\Deprecated] to %s %pS", type, scope->name); } scope->ce_flags |= ZEND_ACC_DEPRECATED;

« previous php.cvs (#142976) next »