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

feat(iterator): add helper for zend_object_iterator and iterable type #268

Merged
merged 132 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from 122 commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
d5e05f0
Add support for throwing Exception objects
joehoyle Dec 20, 2022
33c6732
Merge branch 'master' into throw-exception-object
joehoyle Dec 20, 2022
94fb7c7
Fix docs example
joehoyle Dec 20, 2022
8d6850a
Format
joehoyle Dec 20, 2022
15ea6e4
Merge branch 'master' into throw-exception-object
ptondereau Dec 20, 2022
4fabeb2
Update doc bindings.
ptondereau Dec 20, 2022
709ad4b
Merge branch 'master' into throw-exception-object
ptondereau Dec 23, 2022
7b2dd27
Add ProcessGlobals
joehoyle Jul 7, 2023
21c4bf6
Update bindings
joehoyle Jul 7, 2023
01060ff
Support ZTS
joehoyle Jul 7, 2023
36d6159
update bindings
joehoyle Jul 7, 2023
ca04318
Add support for SapiGlobals
joehoyle Jul 12, 2023
fcf9c20
Add export
joehoyle Jul 12, 2023
003eb8a
Add support for headers etc
joehoyle Jul 13, 2023
f3bf835
Add bindings for zend_llist
joehoyle Jul 13, 2023
5395f25
Import
joehoyle Jul 13, 2023
c564f55
Fix missing bindings
joehoyle Jul 13, 2023
368800b
Merge branch 'process-globals' into sapi-globals
joehoyle Jul 13, 2023
b6a2d18
Add missing binding
joehoyle Jul 13, 2023
a396085
fmt
joehoyle Jul 13, 2023
aee2625
Clippy
joehoyle Jul 13, 2023
910c552
Update bindings
joehoyle Jul 13, 2023
8464a25
Generate with debug
joehoyle Jul 13, 2023
9173f06
Merge pull request #250 from davidcole1340/sapi-globals
joehoyle Jul 13, 2023
48980a1
Bindings from php 8.2-debug
joehoyle Jul 13, 2023
5acdfe6
Add FileGlobals too
joehoyle Jul 19, 2023
c9db20c
Merge branch 'master' into process-globals
joehoyle Jul 19, 2023
1c55085
Add StreamWrapper API
joehoyle Jul 19, 2023
a138296
Add php_var include for auto globals
joehoyle Jul 19, 2023
cb89c7b
Revert change to function
joehoyle Jul 19, 2023
06e190e
fmt
joehoyle Jul 19, 2023
95ce652
Merge branch 'process-globals' into streams-api
joehoyle Jul 19, 2023
52525f2
Fix allowed bindings duplication
joehoyle Jul 19, 2023
a616c4b
ZTS support for file globals
joehoyle Jul 19, 2023
0a2ecbc
Add helper function
joehoyle Jul 19, 2023
ef52ef6
Remove file.h
joehoyle Jul 19, 2023
e30f127
Add file_globals_id to allowed bindings
joehoyle Jul 19, 2023
6501082
Merge branch 'master' into process-globals
joehoyle Jul 19, 2023
89c7758
Add helper method for function table
joehoyle Jul 19, 2023
7803a45
Merge branch 'process-globals' into streams-api
joehoyle Jul 19, 2023
38cbba0
Add function type helper function
joehoyle Jul 19, 2023
87ab718
Remove additional unrelated functions
joehoyle Jul 19, 2023
b5adbb9
Merge branch 'streams-api' of github.com:davidcole1340/ext-php-rs int…
joehoyle Jul 19, 2023
e7bbcfe
Add helper to get the sapi name
joehoyle Jul 19, 2023
0bf6424
feat(iterator): add helper for zend_object_iterator
joelwurtz Oct 17, 2023
8f425fe
feat(iterator): use an iter key for both array and iterator
joelwurtz Oct 17, 2023
e5b1ebd
feat(iterator): add iterable, add method to get traversable or iterable
joelwurtz Oct 17, 2023
26e06ad
reduce duplicated code for iter key
joelwurtz Oct 17, 2023
b95bade
fix clippy feedback
joelwurtz Oct 18, 2023
524a18d
feat(iterator): add documentation
joelwurtz Oct 18, 2023
57577b6
fix doc
joelwurtz Oct 18, 2023
a8f15d8
feat(iterator): handle exception
joelwurtz Oct 19, 2023
cf6c362
feat(iterator): simply stop when there is an exception, do not take i…
joelwurtz Oct 20, 2023
1b55652
feat(embed): correctly handle panic inside embed (#272)
joelwurtz Oct 20, 2023
55724c9
Add async support using php-tokio
danog Oct 21, 2023
596768c
Fix typo
danog Oct 21, 2023
e4a450f
Add reqwest to dev deps
danog Oct 21, 2023
942ec64
Test
danog Oct 21, 2023
ea078bb
Test
danog Oct 21, 2023
0dae466
Bump
danog Oct 21, 2023
c0206ce
Add async feature
danog Oct 21, 2023
ce4ca06
Make dependency optional
danog Oct 21, 2023
924a99e
Platform-specific dependencies
danog Oct 21, 2023
8890767
Just add docs
danog Oct 21, 2023
a595e1d
Cleanup
danog Oct 21, 2023
e80bebf
Cleanup
danog Oct 21, 2023
8462005
Cleanup
danog Oct 21, 2023
aa88f5a
Add async support using php-tokio
danog Oct 21, 2023
dddc07f
feat(test): add an example on how to test a module (#276)
joelwurtz Oct 23, 2023
fbb0b41
Forward ClassEntry in create_object
joehoyle Oct 24, 2023
5fdd8fa
feat(zend): add helper for try catch and bailout in PHP (#275)
joelwurtz Oct 25, 2023
3688aac
Check instance_of() so subclasses also work
joehoyle Oct 25, 2023
8009a91
Cargo fmt
joehoyle Oct 25, 2023
20c0d9c
Remove unused class
joehoyle Oct 26, 2023
bd54b38
Fix #279
danog Nov 17, 2023
602a583
Bump
danog Nov 17, 2023
c87dc4b
Fmt
danog Nov 17, 2023
2ebc015
Merge pull request #280 from davidcole1340/fix_279
danog Nov 17, 2023
d8a5a09
Cleanup docs
danog Nov 17, 2023
426e2eb
Merge pull request #281 from davidcole1340/cleanup_docs
danog Nov 17, 2023
b81128a
Fix typo
danog Nov 17, 2023
57c53b6
Merge pull request #282 from davidcole1340/fix_typo
danog Nov 17, 2023
f621e60
Add PHP 8.3, SAPI globals support
danog Nov 21, 2023
53d7249
Fixup
danog Nov 21, 2023
fc6a8ae
Fixup
danog Nov 21, 2023
116c698
Add version
danog Nov 21, 2023
2067c31
Merge pull request #284 from danog/php_8.3_sapi
danog Nov 21, 2023
10eac24
Expose SAPI module
danog Nov 24, 2023
0fbf54a
Expose SAPI module
danog Nov 24, 2023
917d7e2
Fmt
danog Nov 24, 2023
3081630
Update docsrs_bindings.rs
danog Nov 24, 2023
032e40e
Merge pull request #285 from danog/php_8.3_sapi
danog Nov 24, 2023
b59dcd9
Bump
danog Nov 24, 2023
1af2d54
Merge pull request #286 from danog/php_8.3_sapi
danog Nov 24, 2023
6c0719c
Run tests using clang 16
danog Nov 24, 2023
8761816
Test more combos
danog Nov 24, 2023
5bb9ab1
Test more combos
danog Nov 24, 2023
27d4aa8
Merge pull request #287 from danog/clang
danog Nov 24, 2023
23dcef8
Merge branch 'master' into php-sapi-name
danog Nov 24, 2023
3cd7a8a
Add support for Zval IS_INDIRECT
joehoyle Feb 5, 2023
1f5e63b
Merge branch 'master' into function-helper
danog Nov 24, 2023
05eb9fc
Use better name
danog Nov 24, 2023
ede1d8e
Merge branch 'master' into functions-table-mut
danog Nov 24, 2023
4186cc4
Merge pull request #277 from davidcole1340/subclass-ce
danog Nov 24, 2023
50dad0c
Manually drop zval
joehoyle Nov 24, 2023
10d5f3a
Fmt
danog Nov 24, 2023
e1851e5
Merge pull request #261 from davidcole1340/php-sapi-name
danog Nov 24, 2023
6fdd6a3
fmt
joehoyle Nov 24, 2023
9fa97a4
Merge pull request #224 from davidcole1340/zval-indirect-support
danog Nov 24, 2023
3f50e7e
Merge pull request #214 from davidcole1340/throw-exception-object
danog Nov 24, 2023
80e448c
Merge pull request #259 from davidcole1340/function-helper
danog Nov 24, 2023
bb8f608
Merge pull request #258 from davidcole1340/functions-table-mut
danog Nov 24, 2023
21134fb
Merge remote-tracking branch 'origin/master' into process-globals
danog Nov 24, 2023
025f603
Fixup
danog Nov 24, 2023
9ff4bd4
Merge branch 'streams-api' into process-globals
danog Nov 24, 2023
582a387
Cleanup
danog Nov 24, 2023
28b190a
Cleanup
danog Nov 24, 2023
75eb6d7
fmt
joehoyle Nov 24, 2023
2c5bd2a
Cleanup
danog Nov 24, 2023
961b948
Fmt
danog Nov 24, 2023
5de7c7f
Merge pull request #249 from davidcole1340/process-globals
danog Nov 24, 2023
8d77b9e
Merge remote-tracking branch 'joel/feat/iterator'
danog Nov 24, 2023
678073a
Cleanup
danog Nov 24, 2023
7614f3a
Rename
danog Nov 24, 2023
3418b04
Refactoring
danog Nov 24, 2023
91dcc38
Refactor
danog Nov 24, 2023
e5d7a32
Fixup
danog Nov 24, 2023
bc4405d
Fixup bailout test
danog Nov 24, 2023
050c017
Cleanup
danog Nov 24, 2023
ebe4e8f
Merge branch 'fix' into iterator
danog Nov 24, 2023
0f40186
Cleanup
danog Nov 24, 2023
f449f4e
Cleanup
danog Nov 24, 2023
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
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 <david.cole1340@gmail.com>"]
edition = "2018"
categories = ["api-bindings"]
Expand Down
40 changes: 39 additions & 1 deletion 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 @@ -92,6 +94,7 @@ bind! {
zend_internal_arg_info,
zend_is_callable,
zend_is_identical,
zend_is_iterable,
zend_long,
zend_lookup_class_ex,
zend_module_entry,
Expand All @@ -110,6 +113,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 +145,7 @@ bind! {
IS_CONSTANT_AST_EX,
IS_DOUBLE,
IS_FALSE,
IS_INDIRECT,
IS_INTERNED_STRING_EX,
IS_LONG,
IS_MIXED,
Expand All @@ -159,6 +164,7 @@ bind! {
IS_UNDEF,
IS_VOID,
IS_PTR,
IS_ITERABLE,
MAY_BE_ANY,
MAY_BE_BOOL,
PHP_INI_USER,
Expand Down Expand Up @@ -241,6 +247,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,14 +258,45 @@ 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,
zend_file_handle,
zend_stream_init_filename,
php_execute_script
php_execute_script,
zend_register_module_ex,
_zend_bailout
}
10 changes: 9 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 All @@ -248,6 +254,8 @@ fn main() -> Result<()> {
for path in [
manifest.join("src").join("wrapper.h"),
manifest.join("src").join("wrapper.c"),
manifest.join("src").join("embed").join("embed.h"),
manifest.join("src").join("embed").join("embed.c"),
manifest.join("allowed_bindings.rs"),
manifest.join("windows_build.rs"),
manifest.join("unix_build.rs"),
Expand Down
Loading
Loading