summaryrefslogtreecommitdiffstats
path: root/varnish-php8.patch
diff options
context:
space:
mode:
Diffstat (limited to 'varnish-php8.patch')
-rw-r--r--varnish-php8.patch274
1 files changed, 0 insertions, 274 deletions
diff --git a/varnish-php8.patch b/varnish-php8.patch
deleted file mode 100644
index e5a8152..0000000
--- a/varnish-php8.patch
+++ /dev/null
@@ -1,274 +0,0 @@
-Index: php_varnish.h
-===================================================================
---- pecl/varnish/trunk/php_varnish.h 2018/07/01 11:30:53 345257
-+++ pecl/varnish/trunk/php_varnish.h 2020/08/24 14:11:30 350373
-@@ -131,6 +131,14 @@
- int authok;
- };
-
-+#if PHP_MAJOR_VERSION >= 8
-+#define TSRMLS_D void
-+#define TSRMLS_DC
-+#define TSRMLS_C
-+#define TSRMLS_CC
-+#define TSRMLS_FETCH()
-+#endif
-+
- #if PHP_MAJOR_VERSION >= 7
- struct ze_varnish_adm_obj {
- struct ze_varnish_conn zvc;
-Index: varnish.c
-===================================================================
---- pecl/varnish/trunk/varnish.c (révision 350372)
-+++ pecl/varnish/trunk/varnish.c (copie de travail)
-@@ -40,6 +40,24 @@
-
- #include "varnish_lib.h"
-
-+/* Compatibility with PHP < 8 */
-+#if PHP_VERSION_ID < 70200
-+#undef ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX
-+#endif
-+
-+#ifndef ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX
-+#define ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(name, return_reference, required_num_args, type, allow_null) \
-+ ZEND_BEGIN_ARG_INFO_EX(name, _unused, return_reference, required_num_args)
-+#endif
-+
-+#ifndef ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE
-+#define ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(pass_by_ref, name, type_hint, allow_null, default_value) \
-+ ZEND_ARG_TYPE_INFO(pass_by_ref, name, type_hint, allow_null)
-+#endif
-+
-+/* Arginfo generated with PHP 8 */
-+#include "varnish_arginfo.h"
-+
- /*ZEND_DECLARE_MODULE_GLOBALS(varnish)*/
-
- /* True global resources - no need for thread safety here
-@@ -70,27 +88,27 @@
- /* {{{ VarnishAdmin_methods[]
- */
- const zend_function_entry VarnishAdmin_methods[] = {
-- PHP_ME(VarnishAdmin, __construct, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, connect, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, auth, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, getParams, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, setParam, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, stop, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, start, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, banUrl, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, ban, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, isRunning, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, getPanic, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, clearPanic, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, setHost, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, setIdent, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, setTimeout, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, setPort, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, setSecret, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, setCompat, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, getVclList, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, vclUse, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishAdmin, disconnect, NULL, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, __construct, arginfo_class_VarnishAdmin___construct, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, connect, arginfo_class_VarnishAdmin_connect, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, auth, arginfo_class_VarnishAdmin_auth, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, getParams, arginfo_class_VarnishAdmin_getParams, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, setParam, arginfo_class_VarnishAdmin_setParam, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, stop, arginfo_class_VarnishAdmin_stop, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, start, arginfo_class_VarnishAdmin_start, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, banUrl, arginfo_class_VarnishAdmin_banUrl, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, ban, arginfo_class_VarnishAdmin_ban, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, isRunning, arginfo_class_VarnishAdmin_isRunning, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, getPanic, arginfo_class_VarnishAdmin_getPanic, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, clearPanic, arginfo_class_VarnishAdmin_clearPanic, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, setHost, arginfo_class_VarnishAdmin_setHost, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, setIdent, arginfo_class_VarnishAdmin_setIdent, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, setTimeout, arginfo_class_VarnishAdmin_setTimeout, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, setPort, arginfo_class_VarnishAdmin_setPort, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, setSecret, arginfo_class_VarnishAdmin_setSecret, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, setCompat, arginfo_class_VarnishAdmin_setCompat, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, getVclList, arginfo_class_VarnishAdmin_getVclList, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, vclUse, arginfo_class_VarnishAdmin_vclUse, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishAdmin, disconnect, arginfo_class_VarnishAdmin_disconnect, ZEND_ACC_PUBLIC)
- {NULL, NULL, NULL}
- };
- /* }}} */
-@@ -97,9 +115,9 @@
-
- /* {{{ VarnishStat_methods{} */
- const zend_function_entry VarnishStat_methods[] = {
-- PHP_ME(VarnishStat, __construct, NULL, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishStat, __construct, arginfo_class_VarnishStat___construct, ZEND_ACC_PUBLIC)
- #if defined(HAVE_VARNISHAPILIB) && HAVE_VARNISHAPILIB < 40
-- PHP_ME(VarnishStat, getSnapshot, NULL, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishStat, getSnapshot, arginfo_class_VarnishStat_getSnapshot, ZEND_ACC_PUBLIC)
- #endif
- {NULL, NULL, NULL}
- };
-@@ -107,10 +125,10 @@
-
- /* {{{ VarnishLog_methods{} */
- const zend_function_entry VarnishLog_methods[] = {
-- PHP_ME(VarnishLog, __construct, NULL, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishLog, __construct, arginfo_class_VarnishLog___construct, ZEND_ACC_PUBLIC)
- #if defined(HAVE_VARNISHAPILIB) && HAVE_VARNISHAPILIB < 40
-- PHP_ME(VarnishLog, getLine, NULL, ZEND_ACC_PUBLIC)
-- PHP_ME(VarnishLog, getTagName, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
-+ PHP_ME(VarnishLog, getLine, arginfo_class_VarnishLog_getLine, ZEND_ACC_PUBLIC)
-+ PHP_ME(VarnishLog, getTagName, arginfo_class_VarnishLog_getTagName, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
- #endif
- {NULL, NULL, NULL}
- };
-Index: varnish.stub.php
-===================================================================
---- /dev/null
-+++ pecl/varnish/trunk/varnish.stub.php (copie de travail)
-@@ -0,0 +1,59 @@
-+<?php
-+
-+class VarnishAdmin {
-+ public function __construct(array $opt = []);
-+
-+ public function connect(): bool;
-+
-+ public function auth(): bool;
-+
-+ public function getParams(): array;
-+
-+ public function setParam(string $name, string $value): int;
-+
-+ public function stop(): int;
-+
-+ public function start(): int;
-+
-+ public function banUrl(string $regex): int;
-+
-+ public function ban(string $regex): int;
-+
-+ public function isRunning(): bool;
-+
-+ public function getPanic(): string;
-+
-+ public function clearPanic(): int;
-+
-+ public function setHost(string $host): void;
-+
-+ public function setIdent(string $ident): void;
-+
-+ public function setSecret(string $secret): void;
-+
-+ public function setTimeout(int $timeout): void;
-+
-+ public function setPort(int $port): void;
-+
-+ public function setCompat(int $compat): void;
-+
-+ public function getVclList(): array;
-+
-+ public function vclUse(string $name): bool;
-+
-+ public function disconnect(): bool;
-+}
-+
-+class VarnishStat {
-+ public function __construct(array $opt = []);
-+
-+ public function getSnapshot(): array;
-+}
-+
-+class VarnishLog {
-+ public function __construct(array $opt = []);
-+
-+ public function getLine(): array;
-+
-+ public function getTagName(int $ind): string;
-+}
-
-Index: varnish_arginfo.h
-===================================================================
---- /dev/null
-+++ pecl/varnish/trunk/varnish_arginfo.h (copie de travail)
-@@ -0,0 +1,81 @@
-+/* This is a generated file, edit the .stub.php file instead.
-+ * Stub hash: 8f85af0f0ca3c73efcc24ed046662a4df80bf74f */
-+
-+ZEND_BEGIN_ARG_INFO_EX(arginfo_class_VarnishAdmin___construct, 0, 0, 0)
-+ ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, opt, IS_ARRAY, 0, "[]")
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_VarnishAdmin_connect, 0, 0, _IS_BOOL, 0)
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_VarnishAdmin_auth arginfo_class_VarnishAdmin_connect
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_VarnishAdmin_getParams, 0, 0, IS_ARRAY, 0)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_VarnishAdmin_setParam, 0, 2, IS_LONG, 0)
-+ ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, value, IS_STRING, 0)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_VarnishAdmin_stop, 0, 0, IS_LONG, 0)
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_VarnishAdmin_start arginfo_class_VarnishAdmin_stop
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_VarnishAdmin_banUrl, 0, 1, IS_LONG, 0)
-+ ZEND_ARG_TYPE_INFO(0, regex, IS_STRING, 0)
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_VarnishAdmin_ban arginfo_class_VarnishAdmin_banUrl
-+
-+#define arginfo_class_VarnishAdmin_isRunning arginfo_class_VarnishAdmin_connect
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_VarnishAdmin_getPanic, 0, 0, IS_STRING, 0)
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_VarnishAdmin_clearPanic arginfo_class_VarnishAdmin_stop
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_VarnishAdmin_setHost, 0, 1, IS_VOID, 0)
-+ ZEND_ARG_TYPE_INFO(0, host, IS_STRING, 0)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_VarnishAdmin_setIdent, 0, 1, IS_VOID, 0)
-+ ZEND_ARG_TYPE_INFO(0, ident, IS_STRING, 0)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_VarnishAdmin_setSecret, 0, 1, IS_VOID, 0)
-+ ZEND_ARG_TYPE_INFO(0, secret, IS_STRING, 0)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_VarnishAdmin_setTimeout, 0, 1, IS_VOID, 0)
-+ ZEND_ARG_TYPE_INFO(0, timeout, IS_LONG, 0)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_VarnishAdmin_setPort, 0, 1, IS_VOID, 0)
-+ ZEND_ARG_TYPE_INFO(0, port, IS_LONG, 0)
-+ZEND_END_ARG_INFO()
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_VarnishAdmin_setCompat, 0, 1, IS_VOID, 0)
-+ ZEND_ARG_TYPE_INFO(0, compat, IS_LONG, 0)
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_VarnishAdmin_getVclList arginfo_class_VarnishAdmin_getParams
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_VarnishAdmin_vclUse, 0, 1, _IS_BOOL, 0)
-+ ZEND_ARG_TYPE_INFO(0, name, IS_STRING, 0)
-+ZEND_END_ARG_INFO()
-+
-+#define arginfo_class_VarnishAdmin_disconnect arginfo_class_VarnishAdmin_connect
-+
-+#define arginfo_class_VarnishStat___construct arginfo_class_VarnishAdmin___construct
-+
-+#define arginfo_class_VarnishStat_getSnapshot arginfo_class_VarnishAdmin_getParams
-+
-+#define arginfo_class_VarnishLog___construct arginfo_class_VarnishAdmin___construct
-+
-+#define arginfo_class_VarnishLog_getLine arginfo_class_VarnishAdmin_getParams
-+
-+ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_class_VarnishLog_getTagName, 0, 1, IS_STRING, 0)
-+ ZEND_ARG_TYPE_INFO(0, ind, IS_LONG, 0)
-+ZEND_END_ARG_INFO()