Skip to content

Commit ba3e1d4

Browse files
authored
chore: update readme and remove dep once_cell (#196)
1 parent 1f88d5c commit ba3e1d4

File tree

6 files changed

+19
-30
lines changed

6 files changed

+19
-30
lines changed

Cargo.lock

-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+15-21
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,19 @@ The framework that allows us to write PHP extensions using pure and safe Rust wh
2424

2525
### Tested Support
2626

27-
| **Category** | **Item** | **Status** |
28-
| --------------- | -------- | ---------- |
29-
| **OS** | Linux ||
30-
| | macOS ||
31-
| | Windows ||
32-
| **PHP Version** | 7.0 ||
33-
| | 7.1 ||
34-
| | 7.2 ||
35-
| | 7.3 ||
36-
| | 7.4 ||
37-
| | 8.0 ||
38-
| | 8.1 ||
39-
| | 8.2 ||
40-
| | 8.3 ||
41-
| | 8.4 ||
42-
| **PHP Mode** | NTS ||
43-
| | ZTS ||
44-
| **SAPI** | CLI ||
45-
| | FPM ||
46-
| **Debug** | Disable ||
47-
| | Enable ||
27+
| **Category** | **Item** | **Status** |
28+
| --------------- | --------- | ---------- |
29+
| **OS** | Linux ||
30+
| | macOS ||
31+
| | Windows ||
32+
| **PHP Version** | 7.0 ~ 7.4 ||
33+
| | 8.0 ~ 8.4 ||
34+
| **PHP Mode** | NTS ||
35+
| | ZTS ||
36+
| **SAPI** | CLI ||
37+
| | FPM ||
38+
| **Debug** | Disable ||
39+
| | Enable ||
4840

4941
## Examples
5042

@@ -54,6 +46,8 @@ See [examples](https://github.com/phper-framework/phper/tree/master/examples).
5446

5547
- [apache/skywalking-php](https://github.com/apache/skywalking-php) - The PHP Agent for Apache SkyWalking, which provides the native tracing abilities for PHP project.
5648

49+
- [phper-framework/jieba-php](https://github.com/phper-framework/jieba-php) - The Jieba Chinese Word Segmentation Implemented in Rust Bound for PHP.
50+
5751
## License
5852

5953
[MulanPSL-2.0](https://github.com/phper-framework/phper/blob/master/LICENSE).

phper-test/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ license = { workspace = true }
2222
[dependencies]
2323
fastcgi-client = "0.9.0"
2424
libc = "0.2.169"
25-
once_cell = "1.20.3"
2625
phper-macros = { workspace = true }
2726
tempfile = "3.17.1"
2827
tokio = { version = "1.43.0", features = ["full"] }

phper-test/src/context.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
// See the Mulan PSL v2 for more details.
1010

1111
use crate::utils;
12-
use once_cell::sync::OnceCell;
1312
use std::{
1413
env,
1514
fs::read_to_string,
1615
io::Write,
1716
ops::{Deref, DerefMut},
1817
path::Path,
1918
process::Command,
19+
sync::OnceLock,
2020
};
2121
use tempfile::NamedTempFile;
2222

@@ -28,7 +28,7 @@ pub struct Context {
2828

2929
impl Context {
3030
pub fn get_global() -> &'static Context {
31-
static CONTEXT: OnceCell<Context> = OnceCell::new();
31+
static CONTEXT: OnceLock<Context> = OnceLock::new();
3232
CONTEXT.get_or_init(|| {
3333
let mut ini_content = String::new();
3434

phper-test/src/fpm.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,18 @@
1212
use crate::{context::Context, utils::spawn_command};
1313
use fastcgi_client::{Client, Params, Request};
1414
use libc::{SIGTERM, atexit, kill, pid_t};
15-
use once_cell::sync::OnceCell;
1615
use std::{
1716
fs,
1817
mem::{ManuallyDrop, forget},
1918
path::{Path, PathBuf},
2019
process::Child,
21-
sync::Mutex,
20+
sync::{Mutex, OnceLock},
2221
time::Duration,
2322
};
2423
use tempfile::NamedTempFile;
2524
use tokio::{io, net::TcpStream, runtime::Handle, task::block_in_place};
2625

27-
static FPM_HANDLE: OnceCell<Mutex<FpmHandle>> = OnceCell::new();
26+
static FPM_HANDLE: OnceLock<Mutex<FpmHandle>> = OnceLock::new();
2827

2928
struct FpmHandle {
3029
lib_path: PathBuf,

phper/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ license = { workspace = true }
2525
cfg-if = "1.0.0"
2626
derive_more = { version = "2.0.1", features = ["from", "constructor"] }
2727
indexmap = "2.7.1"
28-
once_cell = "1.20.3"
2928
phper-alloc = { workspace = true }
3029
phper-macros = { workspace = true }
3130
phper-sys = { workspace = true }

0 commit comments

Comments
 (0)