Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update readme and remove dep once_cell #196

Merged
merged 3 commits into from
Apr 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 15 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,19 @@ The framework that allows us to write PHP extensions using pure and safe Rust wh

### Tested Support

| **Category** | **Item** | **Status** |
| --------------- | -------- | ---------- |
| **OS** | Linux | ✅ |
| | macOS | ✅ |
| | Windows | ❌ |
| **PHP Version** | 7.0 | ✅ |
| | 7.1 | ✅ |
| | 7.2 | ✅ |
| | 7.3 | ✅ |
| | 7.4 | ✅ |
| | 8.0 | ✅ |
| | 8.1 | ✅ |
| | 8.2 | ✅ |
| | 8.3 | ✅ |
| | 8.4 | ✅ |
| **PHP Mode** | NTS | ✅ |
| | ZTS | ❌ |
| **SAPI** | CLI | ✅ |
| | FPM | ✅ |
| **Debug** | Disable | ✅ |
| | Enable | ❌ |
| **Category** | **Item** | **Status** |
| --------------- | --------- | ---------- |
| **OS** | Linux | ✅ |
| | macOS | ✅ |
| | Windows | ❌ |
| **PHP Version** | 7.0 ~ 7.4 | ✅ |
| | 8.0 ~ 8.4 | ✅ |
| **PHP Mode** | NTS | ✅ |
| | ZTS | ❌ |
| **SAPI** | CLI | ✅ |
| | FPM | ✅ |
| **Debug** | Disable | ✅ |
| | Enable | ❌ |

## Examples

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

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

- [phper-framework/jieba-php](https://github.com/phper-framework/jieba-php) - The Jieba Chinese Word Segmentation Implemented in Rust Bound for PHP.

## License

[MulanPSL-2.0](https://github.com/phper-framework/phper/blob/master/LICENSE).
1 change: 0 additions & 1 deletion phper-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ license = { workspace = true }
[dependencies]
fastcgi-client = "0.9.0"
libc = "0.2.169"
once_cell = "1.20.3"
phper-macros = { workspace = true }
tempfile = "3.17.1"
tokio = { version = "1.43.0", features = ["full"] }
Expand Down
4 changes: 2 additions & 2 deletions phper-test/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
// See the Mulan PSL v2 for more details.

use crate::utils;
use once_cell::sync::OnceCell;
use std::{
env,
fs::read_to_string,
io::Write,
ops::{Deref, DerefMut},
path::Path,
process::Command,
sync::OnceLock,
};
use tempfile::NamedTempFile;

Expand All @@ -28,7 +28,7 @@ pub struct Context {

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

Expand Down
5 changes: 2 additions & 3 deletions phper-test/src/fpm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,18 @@
use crate::{context::Context, utils::spawn_command};
use fastcgi_client::{Client, Params, Request};
use libc::{SIGTERM, atexit, kill, pid_t};
use once_cell::sync::OnceCell;
use std::{
fs,
mem::{ManuallyDrop, forget},
path::{Path, PathBuf},
process::Child,
sync::Mutex,
sync::{Mutex, OnceLock},
time::Duration,
};
use tempfile::NamedTempFile;
use tokio::{io, net::TcpStream, runtime::Handle, task::block_in_place};

static FPM_HANDLE: OnceCell<Mutex<FpmHandle>> = OnceCell::new();
static FPM_HANDLE: OnceLock<Mutex<FpmHandle>> = OnceLock::new();

struct FpmHandle {
lib_path: PathBuf,
Expand Down
1 change: 0 additions & 1 deletion phper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ license = { workspace = true }
cfg-if = "1.0.0"
derive_more = { version = "2.0.1", features = ["from", "constructor"] }
indexmap = "2.7.1"
once_cell = "1.20.3"
phper-alloc = { workspace = true }
phper-macros = { workspace = true }
phper-sys = { workspace = true }
Expand Down
Loading