Commit Graph

426 Commits

Author SHA1 Message Date
Joe Hoyle
650108229a Merge branch 'master' into process-globals 2023-07-19 13:29:16 +02:00
Joe Hoyle
e30f1272da Add file_globals_id to allowed bindings 2023-07-19 13:27:10 +02:00
Joe Hoyle
42ef04a8ae
Add function type_() method (#254) 2023-07-19 13:15:36 +02:00
Joe Hoyle
4e8bec7995
Add helper for class name (#255) 2023-07-19 13:13:12 +02:00
Joe Hoyle
3e378f8cdf
Add function for requesting VM interrupt (#257) 2023-07-19 13:12:35 +02:00
Joe Hoyle
7b35476d04
Implement IntoZvalDyn for Zval (#256) 2023-07-19 13:06:10 +02:00
Joe Hoyle
ef52ef60e3 Remove file.h 2023-07-19 13:04:55 +02:00
Joe Hoyle
0a2ecbcc39 Add helper function 2023-07-19 13:00:24 +02:00
Joe Hoyle
a616c4b4db ZTS support for file globals 2023-07-19 12:27:11 +02:00
Joe Hoyle
52525f249f Fix allowed bindings duplication 2023-07-19 11:36:08 +02:00
Joe Hoyle
95ce6527cf Merge branch 'process-globals' into streams-api 2023-07-19 11:35:13 +02:00
Joe Hoyle
06e190e08a fmt 2023-07-19 11:34:42 +02:00
Joe Hoyle
cb89c7b4d8 Revert change to function 2023-07-19 11:02:56 +02:00
Joe Hoyle
a13829623a Add php_var include for auto globals 2023-07-19 11:00:46 +02:00
Joe Hoyle
1c550852ab Add StreamWrapper API
This allows extensions to register and unregister custom stream wrappers
2023-07-19 10:59:32 +02:00
Joe Hoyle
c9db20c2e9 Merge branch 'master' into process-globals 2023-07-19 10:54:44 +02:00
Joe Hoyle
5acdfe67c2 Add FileGlobals too 2023-07-19 10:51:20 +02:00
Joe Hoyle
5d1ffcec05
Add helper to get global constants (#222)
ExecutorGlobals::constants() will return a hash map of the available constants.
2023-07-18 22:42:40 +02:00
Joe Hoyle
a9dffe08f5
Add ability to show PHP warnings (etc) (#231)
* Add ability to show PHP warnings (etc)

I don't believe there's a way for extensions to trigger PHP notices or warnings currently. This is done using the `php_error_docref` function. I've placed a function in `ext_php_rs::php_error()` however, there might be a better place?

* Remove uneeded empty value

* Fix url
2023-07-18 22:40:24 +02:00
Joe Hoyle
396c8740e4
Add support for post shutdown function (#251) 2023-07-18 22:38:50 +02:00
Joe Hoyle
48980a1d52 Bindings from php 8.2-debug 2023-07-13 21:38:04 +02:00
Joe Hoyle
9173f06392
Merge pull request #250 from davidcole1340/sapi-globals
Add support for SapiGlobals
2023-07-13 21:05:13 +02:00
Joe Hoyle
8464a255c4 Generate with debug 2023-07-13 21:04:51 +02:00
Joe Hoyle
910c55217a Update bindings 2023-07-13 20:52:49 +02:00
Joe Hoyle
aee2625ccb Clippy 2023-07-13 20:40:27 +02:00
Joe Hoyle
6db91acae3 formatting 2023-07-13 20:29:48 +02:00
Joe Hoyle
0f4f6f7315 Add docs / guide 2023-07-13 17:16:30 +02:00
Joe Hoyle
a396085a92 fmt 2023-07-13 16:54:35 +02:00
Joe Hoyle
b6a2d1861e Add missing binding 2023-07-13 16:32:53 +02:00
Joe Hoyle
368800b560 Merge branch 'process-globals' into sapi-globals 2023-07-13 16:30:22 +02:00
Joe Hoyle
b451d604df URL formatting 2023-07-13 16:24:00 +02:00
Joe Hoyle
c564f55183 Fix missing bindings 2023-07-13 15:57:29 +02:00
Joe Hoyle
64bf9e7366 fmt 2023-07-13 15:44:14 +02:00
Joe Hoyle
7d40ca544f Formatting 2023-07-13 15:39:44 +02:00
Joe Hoyle
68059bdda1 Fix mutable refs 2023-07-13 15:38:49 +02:00
Joe Hoyle
99439bf7f5 Clippy 2023-07-13 15:24:29 +02:00
Joe Hoyle
614f5b42be Support function args being passed by reference
Currently it's not possible for a function to accept args by reference. This PR adds early support for doing so, by transforming any function args that are `&mut T` into args that are passed by reference. E.g.:

```
\#[php_function]
fn my_function( arg: &mut Zval ) {
	arg.reference_mut().map( |zval| zval.set_bool(true) );
}
```
2023-07-13 14:42:40 +02:00
Joe Hoyle
a7780753dc Support registering ini definitions for modules
PHP extensions that want to provide ini settings can do so using `IniEntryDef::register()`; values can then be fetched via `GlobalExecutor::ini_values()`.
2023-07-13 14:42:08 +02:00
Joe Hoyle
5395f25d74 Import 2023-07-13 14:37:49 +02:00
Joe Hoyle
f3bf835ddb Add bindings for zend_llist 2023-07-13 14:36:30 +02:00
Joe Hoyle
003eb8a76a Add support for headers etc 2023-07-13 14:33:40 +02:00
Joe Hoyle
fcf9c2076e Add export 2023-07-12 20:15:11 +02:00
Joe Hoyle
ca04318cf8 Add support for SapiGlobals 2023-07-12 20:05:37 +02:00
Joe Hoyle
36d6159514 update bindings 2023-07-07 14:41:44 +02:00
Joe Hoyle
01060ff08e Support ZTS 2023-07-07 14:21:16 +02:00
Joe Hoyle
21c4bf68da Update bindings 2023-07-07 13:58:49 +02:00
Joe Hoyle
7b2dd27fd4 Add ProcessGlobals
This is akin to ExecutorGlobals, but for the process globals
2023-07-07 13:45:51 +02:00
c8c1df06e2
Fix construction of native classes and any class with properties 2023-06-29 14:20:04 +02:00
ab2af4581d
Fix class construction 2023-06-29 14:05:49 +02:00
eda544ceaf
Simplify 2023-06-29 13:46:01 +02:00