Releases: davidcole1340/ext-php-rs
Releases · davidcole1340/ext-php-rs
Version 0.6.0
Version 0.5.3
- Fixed docs.rs PHP bindings file.
Version 0.5.2
- Constructors that return
Self
can now be added to classes. #83Default
is no longer required to be implemented on classes, however, a
constructor must be specified if you want to construct the class from PHP.- Constructors can return
Self
orResult<Self, E>
, where
E: Into<PhpException>
.
- Added
FromZendObject
andIntoZendObject
traits. #74 - Added
#[derive(ZvalConvert)]
derive macro. DerivesIntoZval
andFromZval
on arbitrary structs and enums. #78 - Added
ZBox<T>
, similar toBox<T>
, to allocate on the Zend heap. #94 - Changed execution data functions to take mutable references. #100
&mut T
is now valid as a function parameter. #100
Thanks to the contributors for this release:
Version 0.5.1
Version 0.5.0
Breaking changes
- Method names are now renamed to snake case by default #63.
- Refactored
ZendHashTable
into an owned and borrowed variant #76.- Creating a new hashtable is done through the
OwnedHashTable
struct, which
is then dereferenced to&HashTable
, asString
is to&str
.
- Creating a new hashtable is done through the
- Refactored
ZendString
into an owned and borrowed variant #77.- Creating a new Zend string is done through the
ZendString
struct, which is
then dereferenced to&ZendStr
, asString
is to&str
.
- Creating a new Zend string is done through the
- Class properties are now defined as struct properties, removing the old
property system in the process #69.
Enhancements
- Added interfaces and parent class to the
Debug
implementation for
ClassEntry
@72b0491. - Rust unit type
()
now has a datatype ofvoid
@8b3ed08. - Functions returning Rust objects will now display their full classname in
reflection #64. - Fixed alignment of class objects in memory #66.
Thanks to the contributors for this release:
Version 0.1.0
Zval::reference()
returns a reference instead of a dereferenced pointer.- Added
ZendHashTable::iter()
- note this is changing in a future version. ClassBuilder::extends()
now takes a reference rather than a pointer to match the
return type ofClassEntry::exception()
.ClassEntry::build()
now returns a reference - same reason as above.- Improve library 'safety' by removing
unwrap
calls:.build()
returnsResult
onFunctionBuilder
,ClassBuilder
andModuleBuilder
..property()
and.constant()
returnResult
onClassBuilder
..register_constant()
returnsResult
..try_call()
on callables now returnResult
rather thanOption
.throw()
andthrow_with_code()
now returnsResult
.new()
andnew_interned()
onZendString
now returns aResult
.- For
ZendHashTable
:insert()
,insert_at_index()
now returns aResult<HashTableInsertResult>
, whereErr
failed,
Ok(Ok)
inserts successfully without overwrite, andOk(OkWithOverwrite(&Zval))
inserts successfully
with overwrite.push()
now returns aResult
.- Converting from a
Vec
orHashMap
to aZendHashTable
is fallible, so it now implementesTryFrom
as
opposed toFrom
.
- For
Zval
:set_string()
now returns aResult
, and takes a second parameter (persistent).set_persistent_string()
has now been removed in favour ofset_string()
.set_interned_string()
also returns aResult
.set_array()
now only takes aZendHashTable
, you must convert yourVec
orHashMap
by callingtry_into()
and handling the error.
Version 0.0.7
- Added support for thread-safe PHP (@davidcole1340) #37
- Added ability to add properties to classes (@davidcole1340) #39
- Added better interactions with objects (@davidcole1340) #41
Version 0.0.6
- Fixed
panic!
when a PHP binary string was given to a function (@davidcole1340) [c:d73788e] - Fixed memory leak when returning an array from Rust to PHP (@davidcole1340) #34
- Documentation is now deployed to GitHub Pages (@davidcole1340) #35
- Added ability to unpack and pack binary strings similar to PHP (@davidcole1340) #32
- Allowed
default-features
to be true for Bindgen (@willbrowningme) #36
Version 0.0.5
- Relicensed project under MIT or Apache 2.0 as per Rust crate guidelines (@davidcole1340) 439f2ae
- Added
parse_args!
macro to simplify argument parsing (@davidcole1340) 45c7242 - Added ability to throw exceptions from Rust to PHP (@davidcole1340) 45c7242
- Added ability to register global constants (@davidcole1340) 472e26e
- Implemented
From<ZendHashTable>
forVec
(@davidcole1340) 3917c41 - Expanded implementations for converting to
Zval
from primitives (@davidcole1340) d4c6aa2 - Replaced unit errors with an
Error
enum (@davidcole1340) f11451f - Added
Debug
andClone
implementations for most structs (@davidcole1340) 62a43e6