Skip to content

Releases: davidcole1340/ext-php-rs

Version 0.6.0

10 Oct 10:22
Compare
Choose a tag to compare
  • Reorganized project. #101
    • Changed (almost all) module paths. Too many changes to list them all, check
      out the docs.
    • Removed skel project.
  • Allow methods to accept references to ZendClassObject<T> instead of self.
    #103

Version 0.5.3

06 Oct 15:25
Compare
Choose a tag to compare
  • Fixed docs.rs PHP bindings file.

Version 0.5.2

06 Oct 15:13
Compare
Choose a tag to compare
  • Constructors that return Self can now be added to classes. #83
    • Default 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 or Result<Self, E>, where
      E: Into<PhpException>.
  • Added FromZendObject and IntoZendObject traits. #74
  • Added #[derive(ZvalConvert)] derive macro. Derives IntoZval and FromZval
    on arbitrary structs and enums. #78
  • Added ZBox<T>, similar to Box<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

28 Sep 12:09
Compare
Choose a tag to compare
  • PhpException no longer requires a lifetime #80.
  • Added PhpException and PhpResult to prelude #80.
  • Fixed ZendString missing last character #82.

Version 0.5.0

27 Sep 12:33
1e41b50
Compare
Choose a tag to compare

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, as String is to &str.
  • 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, as String is to &str.
  • 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 of void @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

11 Aug 00:43
Compare
Choose a tag to compare
  • 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 of ClassEntry::exception().
  • ClassEntry::build() now returns a reference - same reason as above.
  • Improve library 'safety' by removing unwrap calls:
    • .build() returns Result on FunctionBuilder, ClassBuilder and ModuleBuilder.
    • .property() and .constant() return Result on ClassBuilder.
    • .register_constant() returns Result.
    • .try_call() on callables now return Result rather than Option.
    • throw() and throw_with_code() now returns Result.
    • new() and new_interned() on ZendString now returns a Result.
    • For ZendHashTable:
      • insert(), insert_at_index() now returns a Result<HashTableInsertResult>, where Err failed,
        Ok(Ok) inserts successfully without overwrite, and Ok(OkWithOverwrite(&Zval)) inserts successfully
        with overwrite.
      • push() now returns a Result.
      • Converting from a Vec or HashMap to a ZendHashTable is fallible, so it now implementes TryFrom as
        opposed to From.
    • For Zval:
      • set_string() now returns a Result, and takes a second parameter (persistent).
      • set_persistent_string() has now been removed in favour of set_string().
      • set_interned_string() also returns a Result.
      • set_array() now only takes a ZendHashTable, you must convert your Vec or HashMap
        by calling try_into() and handling the error.

Version 0.0.7

21 May 05:16
c98bf49
Compare
Choose a tag to compare

Version 0.0.6

11 May 09:49
Compare
Choose a tag to compare

Version 0.0.5

24 Apr 01:43
Compare
Choose a tag to compare