* started work on stub generator
* Worked on stub CLI tool
* Unused import
* Account for namespaces in function and class names
* Add support for docblocks on structs
* Push Rust comments to stubs
* Add indentation to stub generation
* Add CLI application to install and generate stubs
This time CLI application is defined on user side, called with `cargo
run -- ..args..`
* Export anyhow result
* Add constants to stub file
* Removed stub symbols
No longer required as we are now building while also linking to PHP.
Keeping the stubs causes the stubs to override the real symbols in the
extension.
* Fix stubs for real this time
Removed stub symbols as they were being included in the extension
dylib, fix by loading the PHP executable as a dylib, loading the
required symbols globally.
* Maybe actually fix stubs this time
* Forgot to remove PHP binary loading
* let's give this another go... cargo subcommand
Now called via `cargo php <install,stubs>`.
* Added `remove` command
* Tidied up cargo-php, commented, set up CI
* Fix return types with non-ident types
* define namespace ordering
* Fix tests, replace `Self` when in outer context
* Moved allowed bindings into separate file
* Update guide with CLI instructions
* Remove lifetime from `PhpException`
All class entries are effectively static (module start to module end) so
it's just a hassle carrying the lifetime everywhere.
* Removed forgotten lifetimes
* Implement `IntoZval` for `Result<T, E>`
Fixes function return error with `PhpResult` as the return type
* Updated changelog
* Rough implementation of struct properties
* Store properties hashtable once
* Tidy up handler functions with exceptions
* Add stub `get_properties` function for codegen structs
* Remove nightly features
* Revert storing properties
Technically, the zend object _could_ move in memory, leaving dangling
references in the properties hashtable. We will just build the hashtable
when required.
* Added `#[prop]` attribute
* Add pointer type to zval, tidy up zend string
* Add support for method properties
* Add `#[getter]` and `#[setter]` attributes
* Update documentation with method properties
* Tidy up macros code
* Remove string gc checks (done on PHP side)
* Move `RegisteredClass` implementation to module, update docs
* Fix read property `rv` segfault
* Fixed doctests
* Start work on returning new objects
Change `IntoZval` to consume `self`
* Add conversion from vector reference to PHP hashtable through clones
* `set_binary` now only takes `Vec`
Used to take `AsRef<[T]>` to allow users to pass arrays, however, this
causes the data to be cloned even if the user passes a `Vec`.
* Rename `as_zval` to `into_zval` to match Rust conventions
* Started work on closures
* Finish implementation of closures
* Document closures, add to prelude, feature gate
* Fixed closure example
* Panic instead of return result when adding property
This will almost always be unwrapped
* Remove unused `set_refcount` function
Wasn't valid either way
* Add ability to get and set properties on class objects
* Updated documentation adding properties
* Allow returning of object references
`TYPE` is now also on `IntoZval` which means `FromZval` does not need to
be implemented on return types
* Clippy lints
* Replace `ZendObjectOverride` derive macro with `#[php_class]`
* Updated guide with `#[php_class]` macro
* Panic rather than return error when implementing interface
It's gonna panic either way so might as well make it easier for the
builder
* Remove `libc` dependency
* Started work on guide, added types
* Rewrite argument parser to allow referencs
Primarly so that `&str` is a valid parameter type.
* Remove generic `Into<String>` conversion to exception
* Worked on guide, added macros
* Build guide when building docs
* Allow manual trigger of docs build
* `cargo fmt`