Skip to content

Commit 92e40cc

Browse files
authored
Migrate to edition 2024 (#179)
1 parent 901d6a7 commit 92e40cc

File tree

46 files changed

+817
-756
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+817
-756
lines changed

Cargo.lock

Lines changed: 177 additions & 193 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ members = [
2727
[workspace.package]
2828
version = "0.14.1"
2929
authors = ["PHPER Framework Team", "jmjoy <jmjoy@apache.org>"]
30-
edition = "2021"
30+
edition = "2024"
3131
license = "MulanPSL-2.0"
3232
repository = "https://github.com/phper-framework/phper"
33-
rust-version = "1.79"
33+
rust-version = "1.85"
3434

3535
[workspace.dependencies]
3636
phper = { version = "0.14.1", path = "./phper" }

README.md

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,36 +18,33 @@ The framework that allows us to write PHP extensions using pure and safe Rust wh
1818

1919
### Necessary
2020

21-
- **rust** 1.79 or later
21+
- **rust** 1.85 or later
2222
- **libclang** 9.0 or later
2323
- **php** 7.0 or later
2424

2525
### Tested Support
2626

27-
- **OS**
28-
- [x] linux
29-
- [x] macos
30-
- [ ] ~~windows~~
31-
- **PHP**
32-
- **version**
33-
- [x] 7.0
34-
- [x] 7.1
35-
- [x] 7.2
36-
- [x] 7.3
37-
- [x] 7.4
38-
- [x] 8.0
39-
- [x] 8.1
40-
- [x] 8.2
41-
- [x] 8.3
42-
- **mode**
43-
- [x] nts
44-
- [ ] ~~zts~~
45-
- **sapi**
46-
- [x] cli
47-
- [x] fpm
48-
- **debug**
49-
- [x] disable
50-
- [ ] ~~enable~~
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 ||
5148

5249
## Examples
5350

examples/complex/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use phper::{
1212
arrays::ZArray,
1313
classes::{ClassEntity, Visibility},
1414
functions::Argument,
15-
ini::{ini_get, Policy},
15+
ini::{Policy, ini_get},
1616
modules::Module,
1717
objects::StateObj,
1818
php_get_module,

examples/http-client/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ crate-type = ["lib", "cdylib"]
2323

2424
[dependencies]
2525
phper = { workspace = true }
26-
reqwest = { version = "0.12.5", features = ["blocking", "cookies"] }
27-
thiserror = "1.0.63"
26+
reqwest = { version = "0.12.12", features = ["blocking", "cookies"] }
27+
thiserror = "2.0.11"
2828

2929
[dev-dependencies]
3030
phper-test = { workspace = true }

examples/http-client/src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use phper::{
1212
classes::{ClassEntity, ClassEntry},
13-
errors::{exception_class, Throwable},
13+
errors::{Throwable, exception_class},
1414
};
1515

1616
/// The exception class name of extension.

examples/http-server/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ name = "http_server"
2222
crate-type = ["lib", "cdylib"]
2323

2424
[dependencies]
25-
hyper = { version = "1.4.1", features = ["http1", "server"] }
26-
axum = "0.7.5"
25+
hyper = { version = "1.6.0", features = ["http1", "server"] }
26+
axum = "0.8.1"
2727
phper = { workspace = true }
28-
thiserror = "1.0.63"
29-
tokio = { version = "1.39.2", features = ["full"] }
30-
reqwest = { version = "0.12.5", features = ["blocking"] }
28+
thiserror = "2.0.11"
29+
tokio = { version = "1.43.0", features = ["full"] }
30+
reqwest = { version = "0.12.12", features = ["blocking"] }
3131

3232
[dev-dependencies]
3333
phper-test = { workspace = true }
34-
reqwest = "0.12.5"
34+
reqwest = "0.12.12"

examples/http-server/src/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
use phper::{
1212
classes::{ClassEntity, ClassEntry},
13-
errors::{exception_class, Throwable},
13+
errors::{Throwable, exception_class},
1414
};
1515
use std::error::Error;
1616

examples/http-server/src/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010

1111
use crate::{errors::HttpServerError, request::RequestClass, response::ResponseClass};
1212
use axum::{
13+
Router,
1314
body::{self, Body},
1415
http::{Request, Response, StatusCode},
1516
routing::any,
16-
Router,
1717
};
1818
use phper::{
1919
alloc::ToRefOwned,

phper-alloc/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ mod macros;
1818
use phper_sys::*;
1919
use std::{
2020
borrow::Borrow,
21-
mem::{size_of, ManuallyDrop},
21+
mem::{ManuallyDrop, size_of},
2222
ops::{Deref, DerefMut},
2323
};
2424

0 commit comments

Comments
 (0)