[php-src] master: session: Put ZEND_ATTRIBUTE_DEPRECATED first on php_session_valid_key() (#25539)

From: Date: Tue, 17 Nov 2026 22:26:16 +0000
Subject: [php-src] master: session: Put ZEND_ATTRIBUTE_DEPRECATED first on php_session_valid_key() (#25539)
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-143807@lists.php.net to get a copy of this message
Author: Artem Ukrainskiy (ArtUkrainskiy) Committer: GitHub (web-flow) Pusher: Girgias Date: 2026-11-17T22:26:12Z Commit: https://github.com/php/php-src/commit/f488c95a739aed1565daffba33ef8138c98593b5 Raw diff: https://github.com/php/php-src/commit/f488c95a739aed1565daffba33ef8138c98593b5.diff session: Put ZEND_ATTRIBUTE_DEPRECATED first on php_session_valid_key() (#25539) Since ZEND_ATTRIBUTE_DEPRECATED is [[deprecated]] in C23, it must come before the other declaration specifiers. After PHPAPI it doesn't compile with GCC 15, which defaults to C23. Changed paths: M ext/session/php_session.h M ext/session/session.c Diff: diff --git a/ext/session/php_session.h b/ext/session/php_session.h index c43a2a3de15e..2268395906da 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -249,7 +249,7 @@ PHPAPI php_session_status php_get_session_status(void); PHPAPI const ps_module *_php_find_ps_module(const char *name); PHPAPI const ps_serializer *_php_find_ps_serializer(const char *name); -PHPAPI ZEND_ATTRIBUTE_DEPRECATED zend_result php_session_valid_key(const char *key); +ZEND_ATTRIBUTE_DEPRECATED PHPAPI zend_result php_session_valid_key(const char *key); PHPAPI zend_result php_session_valid_key_ex(const zend_string *key); PHPAPI zend_result php_session_reset_id(void); diff --git a/ext/session/session.c b/ext/session/session.c index 4bb46eacfa2e..9c1ac6905131 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -395,7 +395,7 @@ PHPAPI zend_result php_session_valid_key_ex(const zend_string *key) /* C-string compatibility wrapper. Callers that have a zend_string should use * php_session_valid_key_ex() instead. */ -PHPAPI ZEND_ATTRIBUTE_DEPRECATED zend_result php_session_valid_key(const char *key) +ZEND_ATTRIBUTE_DEPRECATED PHPAPI zend_result php_session_valid_key(const char *key) { return php_session_valid_key_len(key, strlen(key)); }

« previous php.cvs (#143807) next »