* Added ability to `unpack` and `pack` from Rust
* Updated `Pack::pack_into` documentation
* Replaced constant with new flags, fixed example
* Accept slices/arrays when using `Zval::set_binary`
We shouldn't really be returning Zval objects, rather references to Zval
objects. There is currently a memory leak with arrays that need to be
resolved.
* Exceptions have static lifetimes
* Added functions for throwing exceptions
Changed the `ClassEntry` implementation to unwrap the result before
returning, as these types are guaranteed to be valid. Also replaced the
'a lifetime with 'static lifetimes.
* Initialize handlers on first touch
In the process of turning the two macros into one derive proc macro
* Changed the object handler macros into derive
* Add PHP thread safety to build matrix
* Revert "Add PHP thread safety to build matrix"
This reverts commit 7de868e6b6e329b87c412af8daf61cba1a3e29c5.
* Fixed arguments not being reconized by PHP
* Added function to create interned Zend string
* Changed statup/shutdown function types to Rust types
Prevents users having to import from bindings
* Added flags for classes
* WIP: class builder
* Added properties to classes
* Added class constants
* Added PHP base extensions
Added class inheritance
* Fixed memory leak with constants
Created C wrapper which is compiled and linked in the `build.rs`
script. In the process removed the `build_id()` function as now
we can just export the macro via a function which is defined in
`wrapper.c`.
* Fixed lint issue
* Added functions to set zval as different strings
Regular strings, persistent strings and interned strings
* Updated README with requirements
* Fixed lint issues
* Changed properties to use proper function
* Free zend string when it is changed for a persistent one
* WIP: overriding zend objects
* Added comments to the top of modules.
* Fixed some comments
* Initialize hash map with initial size when converting from HashMap and
Vec
* Removed unused imports
* WIP: object overrides
* Added DerefMut implementation for ZendClassObject
Tidied up lints that clippy was complaining about, removed debugging
statements.
* Fixed pointer dereference error in macro
* Added missing comments for trait
* All functions now take mutable references vs ptr
Removed SetZval implementation for *mut Zval.
Made bindings public, removed duplicate bindings.
Fixed `create_object` handler not working.
Note to self: smaller commits.
* Showcase ability to use shared object
* WIP: debugging property errors
Changed `function` to `method` in classes
Fixed doctest for `c_str`
* Disabled class properties temporarily
See #16
* Initialize args array with size
* Refactored types
Moved types into their own files within the types directory
* Moved Zval set logic into object
Updated example
* WIP: Implementation of hashtable
* Added ability to retrieve zend hashtable from Zval
* Change `ZendHashTable::push` to work with zend functions
Implement iterator for ZendHashTable
* Implemented immutable iterator for ZendHashTable
* Added implementations for converting HashMap and vectors to
ZendHashTable
* Changed ZendHashTable to a wrapper, zval array
Better design, allows for `Drop` implementation for arrays that
are created and unused.
* Allow `Zval::set_array` to be passed Vec and HashMap
* Added methods to retrieve values from Zend hashtable
* Added methods to remove values from Zend hashtable
* Added ability to set value of zval
This allows the return value to now be set.
See the example in `example/skel/src.lib`.
* Added PHP internals book to resources
* Pass self as pointer to keep consistency
* Added argument overloading
If a double is requested but a long is available, we can cast the
long into a double. This is required if the user gives an integer
into a double field.
As well as this, if a string is requested but a long or double is
available, we can cast both of these into a string.
* Check if zval is present before setting in arg
* Added optional argument example
* Updated documentation for ZendLong
* WIP: added null checks
* Moved not required argument logic into function
Seemed more logical, as you can't have a required argument after the
not required argument. Usage:
```rs
FunctionBuilder::new("skeleton_version", skeleton_version)
.arg(Arg::new("req_arg1", DataType::String))
.arg(Arg::new("req_arg1", DataType::String))
.not_required()
.arg(Arg::new("not_req_arg1", DataType::String))
.build()
```
* Added zend_value implementation
Helper functions to retrieve the value from zvals
* Started work on argument parser
* Added PHP version support notice
Due to the way the Zend API changes and the fact that the
stable interface is exposed via C macros, there is no
support for versions lower than PHP 8.0. In the future
we can support PHP 7.4 through Rust features.
* Added TryFrom implementations for Zval -> Types
* Added ability to select arguments from ExecutionData
* Added ability to parse arguments and retrieve val
See `example/skel/src/lib.rs` for usage.