Skip to content

Commit df8015f

Browse files
committed
Remove ext/spl dependency from ext/session
This is a follow-up of 6686068 (GH-21001). The SPL extension is no longer needed to be listed among dependencies. The https://bugs.php.net/53141 is tested in ext/session/tests/bug53141.phpt. Additionally: - Added missing inclusion guards to Zend/zend_autoload.h
1 parent 62c94b6 commit df8015f

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

Zend/zend_autoload.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
+----------------------------------------------------------------------+
1717
*/
1818

19+
#ifndef _ZEND_AUTOLOAD_H
20+
#define _ZEND_AUTOLOAD_H
21+
1922
#include "zend_string.h"
2023
#include "zend_hash.h"
2124
#include "zend_API.h"
@@ -28,3 +31,5 @@ ZEND_API void zend_autoload_fcc_map_to_callable_zval_map(zval *return_value);
2831
/* Only for deprecated strange behaviour of spl_autoload_unregister() */
2932
ZEND_API void zend_autoload_clean_class_loaders(void);
3033
void zend_autoload_shutdown(void);
34+
35+
#endif

ext/session/config.m4

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ if test "$PHP_SESSION" != "no"; then
2020
[-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1])
2121

2222
PHP_ADD_EXTENSION_DEP(session, date)
23-
dnl https://bugs.php.net/53141
24-
PHP_ADD_EXTENSION_DEP(session, spl, true)
2523

2624
PHP_SUBST([SESSION_SHARED_LIBADD])
2725
PHP_INSTALL_HEADERS([ext/session], [php_session.h mod_files.h mod_user.h])

ext/session/config.w32

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ ARG_ENABLE("session", "session support", "yes");
55
if (PHP_SESSION == "yes") {
66
EXTENSION("session", "mod_user_class.c session.c mod_files.c mod_user.c", false /* never shared */, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
77
ADD_EXTENSION_DEP('session', 'date');
8-
// https://bugs.php.net/53141
9-
ADD_EXTENSION_DEP('session', 'spl', true);
108
AC_DEFINE("HAVE_PHP_SESSION", 1, "Define to 1 if the PHP extension 'session' is available.");
119
PHP_INSTALL_HEADERS("ext/session", "php_session.h mod_files.h mod_user.h");
1210
}

ext/session/session.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,15 +1527,15 @@ static bool php_can_change_session_setting(const char *setting_name, bool check_
15271527

15281528
return false;
15291529
}
1530-
1530+
15311531
if (SG(headers_sent) && (!check_cookies || PS(use_cookies))) {
15321532
char error_msg[256];
15331533
snprintf(error_msg, sizeof(error_msg), "Session %s cannot be changed after headers have already been sent", setting_name);
15341534
php_session_headers_already_sent_error(E_WARNING, error_msg);
15351535

15361536
return false;
15371537
}
1538-
1538+
15391539
return true;
15401540
}
15411541

@@ -3055,11 +3055,6 @@ static PHP_MINFO_FUNCTION(session)
30553055
DISPLAY_INI_ENTRIES();
30563056
}
30573057

3058-
static const zend_module_dep session_deps[] = {
3059-
ZEND_MOD_OPTIONAL("spl")
3060-
ZEND_MOD_END
3061-
};
3062-
30633058
/* ************************
30643059
* Upload hook handling *
30653060
************************ */
@@ -3347,7 +3342,7 @@ static zend_result php_session_rfc1867_callback(unsigned int event, void *event_
33473342
zend_module_entry session_module_entry = {
33483343
STANDARD_MODULE_HEADER_EX,
33493344
NULL,
3350-
session_deps,
3345+
NULL,
33513346
"session",
33523347
ext_functions,
33533348
PHP_MINIT(session), PHP_MSHUTDOWN(session),

0 commit comments

Comments
 (0)