11# Changelog
22
3+ ## Version 0.5.0
4+
5+ ### Breaking changes
6+
7+ - Method names are now renamed to snake case by default [ #63 ] .
8+ - Refactored ` ZendHashTable ` into an owned and borrowed variant [ #76 ] .
9+ - Creating a new hashtable is done through the ` OwnedHashTable ` struct, which
10+ is then dereferenced to ` &HashTable ` , as ` String ` is to ` &str ` .
11+ - Refactored ` ZendString ` into an owned and borrowed variant [ #77 ] .
12+ - Creating a new Zend string is done through the ` ZendString ` struct, which is
13+ then dereferenced to ` &ZendStr ` , as ` String ` is to ` &str ` .
14+ - Class properties are now defined as struct properties, removing the old
15+ property system in the process [ #69 ] .
16+
17+ ### Enhancements
18+
19+ - Added interfaces and parent class to the ` Debug ` implementation for
20+ ` ClassEntry ` [ @72b0491 ] .
21+ - Rust unit type ` () ` now has a datatype of ` void ` [ @8b3ed08 ] .
22+ - Functions returning Rust objects will now display their full classname in
23+ reflection [ #64 ] .
24+ - Fixed alignment of class objects in memory [ #66 ] .
25+
26+ Thanks to the contributors for this release:
27+
28+ - @davidcole1340
29+ - @vodik
30+
31+ [ #63 ] : https://github.com/davidcole1340/ext-php-rs/pull/63
32+ [ #76 ] : https://github.com/davidcole1340/ext-php-rs/pull/76
33+ [ #77 ] : https://github.com/davidcole1340/ext-php-rs/pull/77
34+ [ #69 ] : https://github.com/davidcole1340/ext-php-rs/pull/69
35+ [ #64 ] : https://github.com/davidcole1340/ext-php-rs/pull/64
36+ [ #66 ] : https://github.com/davidcole1340/ext-php-rs/pull/66
37+ [ @72b0491 ] : https://github.com/davidcole1340/ext-php-rs/commit/72b0491
38+ [ @8b3ed08 ] : https://github.com/davidcole1340/ext-php-rs/commit/8b3ed08
39+
40+ ## Version 0.2.0 - 0.4.0
41+
42+ - Added macros!
43+ - Missed a bit :(
44+
345## Version 0.1.0
446
547- ` Zval::reference() ` returns a reference instead of a dereferenced pointer.
648- Added ` ZendHashTable::iter() ` - note this is changing in a future version.
7- - ` ClassBuilder::extends() ` now takes a reference rather than a pointer to match the
8- return type of ` ClassEntry::exception() ` .
49+ - ` ClassBuilder::extends() ` now takes a reference rather than a pointer to match
50+ the return type of ` ClassEntry::exception() ` .
951- ` ClassEntry::build() ` now returns a reference - same reason as above.
1052- Improve library 'safety' by removing ` unwrap ` calls:
11- - ` .build() ` returns ` Result ` on ` FunctionBuilder ` , ` ClassBuilder ` and ` ModuleBuilder ` .
12- - ` .property() ` and ` .constant() ` return ` Result ` on ` ClassBuilder ` .
13- - ` .register_constant() ` returns ` Result ` .
14- - ` .try_call() ` on callables now return ` Result ` rather than ` Option ` .
15- - ` throw() ` and ` throw_with_code() ` now returns ` Result ` .
16- - ` new() ` and ` new_interned() ` on ` ZendString ` now returns a ` Result ` .
17- - For ` ZendHashTable ` :
18- - ` insert() ` , ` insert_at_index() ` now returns a ` Result<HashTableInsertResult> ` , where ` Err ` failed,
19- ` Ok(Ok) ` inserts successfully without overwrite, and ` Ok(OkWithOverwrite(&Zval)) ` inserts successfully
20- with overwrite.
21- - ` push() ` now returns a ` Result ` .
22- - Converting from a ` Vec ` or ` HashMap ` to a ` ZendHashTable ` is fallible, so it now implementes ` TryFrom ` as
23- opposed to ` From ` .
24- - For ` Zval ` :
25- - ` set_string() ` now returns a ` Result ` , and takes a second parameter (persistent).
26- - ` set_persistent_string() ` has now been removed in favour of ` set_string() ` .
27- - ` set_interned_string() ` also returns a ` Result ` .
28- - ` set_array() ` now only takes a ` ZendHashTable ` , you must convert your ` Vec ` or ` HashMap `
29- by calling ` try_into() ` and handling the error.
53+ - ` .build() ` returns ` Result ` on ` FunctionBuilder ` , ` ClassBuilder ` and
54+ ` ModuleBuilder ` .
55+ - ` .property() ` and ` .constant() ` return ` Result ` on ` ClassBuilder ` .
56+ - ` .register_constant() ` returns ` Result ` .
57+ - ` .try_call() ` on callables now return ` Result ` rather than ` Option ` .
58+ - ` throw() ` and ` throw_with_code() ` now returns ` Result ` .
59+ - ` new() ` and ` new_interned() ` on ` ZendString ` now returns a ` Result ` .
60+ - For ` ZendHashTable ` :
61+ - ` insert() ` , ` insert_at_index() ` now returns a
62+ ` Result<HashTableInsertResult> ` , where ` Err ` failed, ` Ok(Ok) ` inserts
63+ successfully without overwrite, and ` Ok(OkWithOverwrite(&Zval)) ` inserts
64+ successfully with overwrite.
65+ - ` push() ` now returns a ` Result ` .
66+ - Converting from a ` Vec ` or ` HashMap ` to a ` ZendHashTable ` is fallible, so
67+ it now implementes ` TryFrom ` as opposed to ` From ` .
68+ - For ` Zval ` :
69+ - ` set_string() ` now returns a ` Result ` , and takes a second parameter
70+ (persistent).
71+ - ` set_persistent_string() ` has now been removed in favour of
72+ ` set_string() ` .
73+ - ` set_interned_string() ` also returns a ` Result ` .
74+ - ` set_array() ` now only takes a ` ZendHashTable ` , you must convert your
75+ ` Vec ` or ` HashMap ` by calling ` try_into() ` and handling the error.
3076
3177## Version 0.0.7
3278
@@ -36,19 +82,28 @@ return type of `ClassEntry::exception()`.
3682
3783## Version 0.0.6
3884
39- - Fixed ` panic! ` when a PHP binary string was given to a function (@davidcole1340 ) [ c: d73788e ]
40- - Fixed memory leak when returning an array from Rust to PHP (@davidcole1340 ) #34
41- - Documentation is now deployed to [ GitHub Pages] ( https://davidcol1340.github.io/ext-php-rs ) (@davidcole1340 ) #35
42- - Added ability to unpack and pack binary strings similar to PHP (@davidcole1340 ) #32
85+ - Fixed ` panic! ` when a PHP binary string was given to a function
86+ (@davidcole1340 ) [ c: d73788e ]
87+ - Fixed memory leak when returning an array from Rust to PHP (@davidcole1340 )
88+ #34
89+ - Documentation is now deployed to
90+ [ GitHub Pages] ( https://davidcol1340.github.io/ext-php-rs ) (@davidcole1340 ) #35
91+ - Added ability to unpack and pack binary strings similar to PHP
92+ (@davidcole1340 ) #32
4393- Allowed ` default-features ` to be true for Bindgen (@willbrowningme ) #36
4494
4595## Version 0.0.5
4696
47- - Relicensed project under MIT or Apache 2.0 as per Rust crate guidelines (@davidcole1340 ) [ c:439f2ae]
48- - Added ` parse_args! ` macro to simplify argument parsing (@davidcole1340 ) [ c:45c7242]
49- - Added ability to throw exceptions from Rust to PHP (@davidcole1340 ) [ c:45c7242]
97+ - Relicensed project under MIT or Apache 2.0 as per Rust crate guidelines
98+ (@davidcole1340 ) [ c:439f2ae]
99+ - Added ` parse_args! ` macro to simplify argument parsing (@davidcole1340 )
100+ [ c:45c7242]
101+ - Added ability to throw exceptions from Rust to PHP (@davidcole1340 )
102+ [ c:45c7242]
50103- Added ability to register global constants (@davidcole1340 ) [ c:472e26e]
51104- Implemented ` From<ZendHashTable> ` for ` Vec ` (@davidcole1340 ) [ c:3917c41]
52- - Expanded implementations for converting to ` Zval ` from primitives (@davidcole1340 ) [ c: d4c6aa2 ]
105+ - Expanded implementations for converting to ` Zval ` from primitives
106+ (@davidcole1340 ) [ c: d4c6aa2 ]
53107- Replaced unit errors with an ` Error ` enum (@davidcole1340 ) [ c: f11451f ]
54- - Added ` Debug ` and ` Clone ` implementations for most structs (@davidcole1340 ) [ c:62a43e6]
108+ - Added ` Debug ` and ` Clone ` implementations for most structs (@davidcole1340 )
109+ [ c:62a43e6]
0 commit comments