* Preliminary Windows support
* Start work on cross-platform build script
* Fix compilation on macOS
* Updated README, tidied up build script
* Check linker version before starting compilation
It doesn't seem like it's possible to change the linker from within the
build script, however, we can retrieve the linker in use and give the
user a suggestion if the linker will not work.
* Switch to using Github repository for bindgen
* Split Windows and Unix implementations into two files
* Fix building on Windows
* Remove `reqwest` and `zip` as dependencies on Unix
* Fix guide tests on Windows
* Started work on Windows CI
* runs -> run
* Use preinstalled LLVM on Windows
* Debugging for Windows CI
* Switch to upstream `rust-bindgen` master branch
* Switch to `rust-lld` for Windows linking
* Don't compile `cargo-php` on Windows
* Switch to using skeptic for tests
* cargo-php: Disable stub generation, fix ext install/remove
The plan is to replace the stub generation by generating them with PHP
code. This is cross-platform and means we don't need to worry about ABI.
We also don't need to embed information into the library.
* cargo-php: Fix on unix OS
* Fix clippy lint
* Updated README
* Re-add CI for Unix + PHP 8.0
* Fix building on thread-safe PHP
* Tidy up build scripts
* Use dynamic lookup on Linux, test with TS Windows
* Define `ZTS` when compiling PHP ZTS
* Combine Windows and Unix CI, fix linking for Win32TS
* Fix exclusions in build CI
* rust-toolchain -> rust
* Set LLVM version
* Only build docs.rs on Ubuntu PHP 8.1
* Fix build on Linux thread-safe
* Update guide example
* Attempt to fix CI on macOS by not installing LLVM
* Download LLVM even on macOS
* Only set LIBCLANG_PATH on non-macOS
* Fix yaml
* Try to set SDK path for macOS
* Multi-line run
* Clippy lint
* Only check docs on PHP 8.1
* When running with docs stub, use PHP 8.1
* Only build docs on Ubuntu
* Remove `macos-ci` branch from actions
* Trigger actions
* Bump PHP API version, remove flags removed from PHP API
See following commits:
- 70195c3561
- b5746a4c7f
* Add PHP 8.1 to CI
* Clippy lint
* Fix PHP 8.1 support with new features
* 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
* Added `ZBox` and `ZBoxable`
* Implement `ZBoxable` for `ZendStr`
Build for all f eatures on CI
* Replace `OwnedZendObject` with `ZBox<ZendObject>`
* Replace `ClassObject` with `ZBox<ZendClassObject>`
Fixed deserialization bug
Panic when uninitialized - better than UB
* Replace `OwnedHashTable` with `ZBox<HashTable>`
* Remove `MaybeUninit` from `ZendClassObject`
* 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
* Allowlist types generated by bindgen
Tidied up build script as well, layout tests are no longer generated
unless `EXT_PHP_RS_TEST` env variable is set. Much quicker build times
and smaller output size.
* Fix build
* Override Rust toolchain when running CI
* 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
* 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`
* Added support for PHP ZTS
* Added GitHub action for ZTS
Runs seperate from the other tests, as the setup-php action does not
support ZTS, therefore we run the tests in a Docker container.
* Source Rust env file before building
* No `source` command on docker
* Another attempt at fixing Rust in Docker