summaryrefslogtreecommitdiffstats
path: root/2.patch
blob: 275acf1420c92f5a26d0f5ca21e461cbd32e1d64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
From f7db92b01bae9fa4dad813c7c7ef62549245549c Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Thu, 23 Nov 2023 07:37:43 +0100
Subject: [PATCH 1/2] relax test for PHP 8.1 and 8.2

---
 tests/003.phpt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/003.phpt b/tests/003.phpt
index 2629a64..fff74b7 100644
--- a/tests/003.phpt
+++ b/tests/003.phpt
@@ -35,7 +35,7 @@ var_dump(pspell_config_ignore($cfg, PHP_INT_MAX));
 bool(false)
 
 Warning: pspell_new_config(): PSPELL couldn't open the dictionary. reason: The encoding "b0rked" is not known. This could also mean that the file "%sb0rked.%s" could not be opened for reading or does not exist. in %s003.php on line 9
-pspell_check(): Argument #1 ($dictionary) must be of type PSpell\Dictionary, false given
+pspell_check(): Argument #1 ($dictionary) must be of type PSpell\Dictionary, %s given
 ---
 bool(true)
 bool(true)

From c3502eda30a770006ed2a2750f3c3128eb17be73 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Thu, 23 Nov 2023 07:41:12 +0100
Subject: [PATCH 2/2] Fix ext version and report it in phpinfo

---
 php_pspell.h | 2 +-
 pspell.c     | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/php_pspell.h b/php_pspell.h
index 322569b..bc0b133 100644
--- a/php_pspell.h
+++ b/php_pspell.h
@@ -21,7 +21,7 @@ extern zend_module_entry pspell_module_entry;
 #define pspell_module_ptr &pspell_module_entry
 
 #include "php_version.h"
-#define PHP_PSPELL_VERSION PHP_VERSION
+#define PHP_PSPELL_VERSION "1.0.0"
 
 #else
 #define pspell_module_ptr NULL
diff --git a/pspell.c b/pspell.c
index 7c15472..7ec2eee 100644
--- a/pspell.c
+++ b/pspell.c
@@ -780,6 +780,7 @@ static PHP_MINFO_FUNCTION(pspell)
 {
 	php_info_print_table_start();
 	php_info_print_table_row(2, "PSpell Support", "enabled");
+	php_info_print_table_row(2, "PSpell extension version", PHP_PSPELL_VERSION);
 	php_info_print_table_end();
 }
 /* }}} */