Skip to content

Commit 712cc13

Browse files
committed
prepare v2.2.0
1 parent 8568da4 commit 712cc13

File tree

5 files changed

+111
-32
lines changed

5 files changed

+111
-32
lines changed

.github/workflows/ci.yml

+74-18
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
old-matrix-0:
11-
name: old-matrix-0
11+
name: php-7.0-debug-zts
1212
env:
1313
PHP: "7.0"
1414
enable_debug: "yes"
@@ -36,7 +36,7 @@ jobs:
3636
make -f scripts/ci/Makefile test
3737
3838
old-matrix-1:
39-
name: old-matrix-1
39+
name: php-7.1-debug-zts
4040
env:
4141
PHP: "7.1"
4242
enable_debug: "yes"
@@ -64,7 +64,7 @@ jobs:
6464
make -f scripts/ci/Makefile test
6565
6666
old-matrix-2:
67-
name: old-matrix-2
67+
name: php-7.2-debug-zts
6868
env:
6969
PHP: "7.2"
7070
enable_debug: "yes"
@@ -92,7 +92,7 @@ jobs:
9292
make -f scripts/ci/Makefile test
9393
9494
old-matrix-3:
95-
name: old-matrix-3
95+
name: php-7.3-debug-zts
9696
env:
9797
PHP: "7.3"
9898
enable_debug: "yes"
@@ -120,7 +120,7 @@ jobs:
120120
make -f scripts/ci/Makefile test
121121
122122
old-matrix-4:
123-
name: old-matrix-4
123+
name: php-7.4-debug-zts
124124
env:
125125
PHP: "7.4"
126126
enable_debug: "yes"
@@ -148,7 +148,7 @@ jobs:
148148
make -f scripts/ci/Makefile test
149149
150150
master-0:
151-
name: master-0
151+
name: php-master-debug-nozts
152152
continue-on-error: true
153153
env:
154154
PHP: "master"
@@ -176,10 +176,66 @@ jobs:
176176
run: |
177177
make -f scripts/ci/Makefile test
178178
179-
cur-none-0:
180-
name: cur-none-0
179+
cur-matrix-0:
180+
name: php-8.0-debug-zts
181181
env:
182182
PHP: "8.0"
183+
enable_debug: "yes"
184+
enable_zts: "yes"
185+
enable_session: "yes"
186+
runs-on: ubuntu-20.04
187+
steps:
188+
- uses: actions/checkout@v2
189+
with:
190+
submodules: true
191+
- name: Install
192+
run: |
193+
sudo apt-get install -y \
194+
php-cli \
195+
php-pear \
196+
re2c
197+
- name: Prepare
198+
run: |
199+
make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
200+
- name: Build
201+
run: |
202+
make -f scripts/ci/Makefile ext PECL=msgpack
203+
- name: Test
204+
run: |
205+
make -f scripts/ci/Makefile test
206+
207+
cur-matrix-1:
208+
name: php-8.1-debug-zts
209+
env:
210+
PHP: "8.1"
211+
enable_debug: "yes"
212+
enable_zts: "yes"
213+
enable_session: "yes"
214+
runs-on: ubuntu-20.04
215+
steps:
216+
- uses: actions/checkout@v2
217+
with:
218+
submodules: true
219+
- name: Install
220+
run: |
221+
sudo apt-get install -y \
222+
php-cli \
223+
php-pear \
224+
re2c
225+
- name: Prepare
226+
run: |
227+
make -f scripts/ci/Makefile php || make -f scripts/ci/Makefile clean php
228+
- name: Build
229+
run: |
230+
make -f scripts/ci/Makefile ext PECL=msgpack
231+
- name: Test
232+
run: |
233+
make -f scripts/ci/Makefile test
234+
235+
cur-none-0:
236+
name: php-8.2-nodebug-nozts
237+
env:
238+
PHP: "8.2"
183239
enable_session: "no"
184240
runs-on: ubuntu-20.04
185241
steps:
@@ -203,9 +259,9 @@ jobs:
203259
make -f scripts/ci/Makefile test
204260
205261
cur-dbg-zts-0:
206-
name: cur-dbg-zts-0
262+
name: php-8.2-debug-zts
207263
env:
208-
PHP: "8.0"
264+
PHP: "8.2"
209265
enable_debug: "yes"
210266
enable_zts: "yes"
211267
enable_session: "yes"
@@ -231,9 +287,9 @@ jobs:
231287
make -f scripts/ci/Makefile test
232288
233289
cur-dbg-zts-1:
234-
name: cur-dbg-zts-1
290+
name: php-8.2-debug-zts
235291
env:
236-
PHP: "8.0"
292+
PHP: "8.2"
237293
enable_debug: "no"
238294
enable_zts: "yes"
239295
enable_session: "yes"
@@ -259,9 +315,9 @@ jobs:
259315
make -f scripts/ci/Makefile test
260316
261317
cur-dbg-zts-2:
262-
name: cur-dbg-zts-2
318+
name: php-8.2-debug-zts
263319
env:
264-
PHP: "8.0"
320+
PHP: "8.2"
265321
enable_debug: "yes"
266322
enable_zts: "no"
267323
enable_session: "yes"
@@ -287,9 +343,9 @@ jobs:
287343
make -f scripts/ci/Makefile test
288344
289345
cur-dbg-zts-3:
290-
name: cur-dbg-zts-3
346+
name: php-8.2-debug-zts
291347
env:
292-
PHP: "8.0"
348+
PHP: "8.2"
293349
enable_debug: "no"
294350
enable_zts: "no"
295351
enable_session: "yes"
@@ -315,11 +371,11 @@ jobs:
315371
make -f scripts/ci/Makefile test
316372
317373
cur-cov-0:
318-
name: cur-cov-0
374+
name: php-8.2-nodebug-nozts
319375
env:
320376
CFLAGS: "-O0 -g --coverage"
321377
CXXFLAGS: "-O0 -g --coverage"
322-
PHP: "8.0"
378+
PHP: "8.2"
323379
enable_session: "yes"
324380
runs-on: ubuntu-20.04
325381
steps:

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Msgpack for PHP
22
[![Build Status](https://github.com/msgpack/msgpack-php/workflows/ci/badge.svg?branch=master)](https://github.com/msgpack/msgpack-php/actions?query=workflow%3Aci+branch%3Amaster)
33

4-
This extension provides an API for communicating with MessagePack serialization.
4+
This extension provides an API for communicating with MessagePack serialization.
55

66
MessagePack is a binary-based efficient object serialization library.
77
It enables to exchange structured objects between many languages just like JSON.
@@ -13,7 +13,7 @@ But unlike JSON, it is very fast and small.
1313
## Install
1414

1515
### Install from PECL
16-
Msgpack is an PECL extension, thus you can simply install it by:
16+
Msgpack is a PECL extension, thus you can simply install it by:
1717

1818
```shell
1919
pecl install msgpack
@@ -72,9 +72,9 @@ $buffer .= $packed2;
7272
while(true) {
7373
if($unpacker->execute($buffer, $nread)) {
7474
$msg = $unpacker->data();
75-
75+
7676
var_dump($msg);
77-
77+
7878
$unpacker->reset();
7979
$buffer = substr($buffer, $nread);
8080
$nread = 0;

package.xml

+9-6
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,23 @@
2222
<email>[email protected]</email>
2323
<active>yes</active>
2424
</lead>
25-
<date>2022-10-07</date>
25+
<date>2023-06-02</date>
2626
<version>
27-
<release>2.2.0RC2</release>
27+
<release>2.2.0</release>
2828
<api>2.2.0</api>
2929
</version>
3030
<stability>
31-
<release>beta</release>
31+
<release>stable</release>
3232
<api>stable</api>
3333
</stability>
3434
<license filesource="LICENSE">3-Clause-BSD</license>
3535
<notes><![CDATA[
36-
* Fixed PHP-8.2 compatibility (see gh issue #165)
37-
* Fixed PHP-8.1 compatibility (see gh issues #161, #157, and #156)
38-
* Added support for ZEND_ACC_NOT_SERIALIZABLE and magic __{,un}serialize
36+
No changes from RC2.
37+
* RC2:
38+
* Fix PHP-8.2 compatibility (see gh issue #165)
39+
* RC1:
40+
* Fix PHP-8.1 compatibility (see gh issues #161, #157, and #156)
41+
* Add support for ZEND_ACC_NOT_SERIALIZABLE and magic __{,un}serialize
3942
]]></notes>
4043
<contents>
4144
<dir name="/">

php_msgpack.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include "Zend/zend_smart_str.h" /* for smart_string */
55

6-
#define PHP_MSGPACK_VERSION "2.2.0RC2"
6+
#define PHP_MSGPACK_VERSION "2.2.0"
77

88
extern zend_module_entry msgpack_module_entry;
99
#define phpext_msgpack_ptr &msgpack_module_entry

scripts/gen_github_workflow_ci.php

+23-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,22 @@
99

1010
jobs:
1111
<?php
12-
12+
function yesno(array $env, string $key) : string {
13+
if (version_compare($env["PHP"], "8.0", "<") && $key === "zts") {
14+
$check = "maintainer_zts";
15+
} else {
16+
$check = $key;
17+
}
18+
if ($env["enable_$check"] ?? null === "yes") {
19+
return $key;
20+
}
21+
return "no$key";
22+
}
23+
function jobname(string $id, array $env) : string {
24+
return sprintf("php-%s-%s-%s", $env["PHP"], yesno($env, "debug"), yesno($env, "zts"));
25+
}
1326
$gen = include __DIR__ . "/ci/gen-matrix.php";
14-
$cur = "8.0";
27+
$cur = "8.2";
1528
$job = $gen->github([
1629
"old-matrix" => [
1730
// most useful for all additional versions except current
@@ -27,6 +40,13 @@
2740
"enable_zts" => "yes",
2841
"enable_session" => "yes",
2942
],
43+
"cur-matrix" => [
44+
// most useful for all additional versions except current
45+
"PHP" => ["8.0", "8.1"],
46+
"enable_debug" => "yes",
47+
"enable_zts" => "yes",
48+
"enable_session" => "yes",
49+
],
3050
"cur-none" => [
3151
// everything disabled for current
3252
"PHP" => $cur,
@@ -48,7 +68,7 @@
4868
]]);
4969
foreach ($job as $id => $env) {
5070
printf(" %s:\n", $id);
51-
printf(" name: %s\n", $id);
71+
printf(" name: %s\n", jobname($id, $env));
5272
if ($env["PHP"] == "master") {
5373
printf(" continue-on-error: true\n");
5474
}

0 commit comments

Comments
 (0)