Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into sapi
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Nov 24, 2023
2 parents 411ee6c + 5de7c7f commit 5ee907d
Show file tree
Hide file tree
Showing 29 changed files with 2,019 additions and 284 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
php: ["8.0", "8.1", "8.2"]
php: ["8.0", "8.1", "8.2", "8.3"]
rust: [stable, nightly]
clang: ["14"]
clang: ["15", "17"]
phpts: [ts, nts]
exclude:
# ext-php-rs requires nightly Rust when on Windows.
Expand All @@ -28,6 +28,12 @@ jobs:
phpts: ts
- os: ubuntu-latest
phpts: ts
- os: macos-latest
clang: "17"
- os: ubuntu-latest
clang: "15"
- os: windows-latest
clang: "15"
env:
CARGO_TERM_COLOR: always
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
matrix:
os: ["ubuntu-latest"]
php: ["8.2"]
clang: ["14"]
clang: ["17"]
mdbook: ["latest"]
steps:
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repository = "https://github.com/davidcole1340/ext-php-rs"
homepage = "https://github.com/davidcole1340/ext-php-rs"
license = "MIT OR Apache-2.0"
keywords = ["php", "ffi", "zend"]
version = "0.10.3"
version = "0.10.5"
authors = ["David Cole <[email protected]>"]
edition = "2018"
categories = ["api-bindings"]
Expand Down
34 changes: 34 additions & 0 deletions allowed_bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ bind! {
_efree,
_emalloc,
_zend_executor_globals,
_sapi_globals_struct,
_sapi_module_struct,
_zend_expected_type,
_zend_expected_type_Z_EXPECTED_ARRAY,
_zend_expected_type_Z_EXPECTED_BOOL,
Expand Down Expand Up @@ -110,6 +112,7 @@ bind! {
zend_string,
zend_string_init_interned,
zend_throw_exception_ex,
zend_throw_exception_object,
zend_type,
zend_value,
zend_wrong_parameters_count_error,
Expand Down Expand Up @@ -141,6 +144,7 @@ bind! {
IS_CONSTANT_AST_EX,
IS_DOUBLE,
IS_FALSE,
IS_INDIRECT,
IS_INTERNED_STRING_EX,
IS_LONG,
IS_MIXED,
Expand Down Expand Up @@ -241,6 +245,7 @@ bind! {
zend_class_serialize_deny,
zend_class_unserialize_deny,
zend_executor_globals,
sapi_module_struct,
zend_objects_store_del,
zend_hash_move_forward_ex,
zend_hash_get_current_key_type_ex,
Expand All @@ -251,10 +256,39 @@ bind! {
gc_possible_root,
ZEND_ACC_NOT_SERIALIZABLE,
executor_globals,
php_core_globals,
core_globals,
sapi_globals_struct,
sapi_globals,
sapi_module,
php_printf,
__zend_malloc,
tsrm_get_ls_cache,
executor_globals_offset,
core_globals_offset,
sapi_globals_offset,
php_file_globals,
file_globals,
file_globals_id,
TRACK_VARS_POST,
TRACK_VARS_GET,
TRACK_VARS_COOKIE,
TRACK_VARS_SERVER,
TRACK_VARS_ENV,
TRACK_VARS_FILES,
TRACK_VARS_REQUEST,
sapi_request_info,
sapi_header_struct,
zend_is_auto_global,
zend_llist_get_next_ex,
zend_llist_get_prev_ex,
php_register_url_stream_wrapper,
php_stream_locate_url_wrapper,
php_unregister_url_stream_wrapper,
php_unregister_url_stream_wrapper_volatile,
php_register_url_stream_wrapper_volatile,
php_stream_wrapper,
php_stream_stdio_ops,
zend_atomic_bool_store,
zend_interrupt_function,
zend_eval_string,
Expand Down
8 changes: 7 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use bindgen::RustTarget;
use impl_::Provider;

const MIN_PHP_API_VER: u32 = 20200930;
const MAX_PHP_API_VER: u32 = 20220829;
const MAX_PHP_API_VER: u32 = 20230831;

pub trait PHPProvider<'a>: Sized {
/// Create a new PHP provider.
Expand Down Expand Up @@ -228,6 +228,8 @@ fn check_php_version(info: &PHPInfo) -> Result<()> {

const PHP_82_API_VER: u32 = 20220829;

const PHP_83_API_VER: u32 = 20230831;

println!("cargo:rustc-cfg=php80");

if (PHP_81_API_VER..PHP_82_API_VER).contains(&version) {
Expand All @@ -238,6 +240,10 @@ fn check_php_version(info: &PHPInfo) -> Result<()> {
println!("cargo:rustc-cfg=php82");
}

if version >= PHP_83_API_VER {
println!("cargo:rustc-cfg=php83");
}

Ok(())
}

Expand Down
Loading

0 comments on commit 5ee907d

Please sign in to comment.