0.15.4 - 2026-01-12
- (deps) Bump parking_lot required version to 0.12.3 (by @TobiasBengtsson) [#640]
0.15.3 - 2025-12-28
- (cargo-php) Atomic extension installation and smoke testing (by @kakserpom) [#619] [#518]
- (class) Static properties and methods #252 (#627) (by @kakserpom) [#252] [#627]
- (is_scalar) Zval::is_scalar() #237 (#614) (by @kakserpom) [#237] [#614]
- (php_write) A binary-safe way to write to PHP's stdout/stderr #508 (#613) (by @kakserpom) [#508] [#613]
- (types) Argument coercion into HashSet/BTreeSet #493 (#598) (by @kakserpom) [#493] [#598]
- Add support for empty immutable shared arrays (by @kakserpom) [#631] [#355]
- (binary) Avoid leaking in Pack::pack_into (#610) (by @Nova-Static) [#610]
- (bindings) Exclude
preserve_noneinstruction from bindings (#620) (by @ptondereau) [#620] - (ci) Disable TS build for embed tests (#600) (by @ptondereau) [#600]
- (class) Check property visibility (by @kakserpom) [#633] [#375]
- (class) Return Self ($this) #502 (#626) (by @kakserpom) [#502] [#626]
- (clippy) Default hasher for ArrayKey (#608) (by @ptondereau) [#608]
- (clippy) Clippy v1.92.0 (#605) (by @ptondereau) [#605]
- (macro) Identifier-related bugs #536 (#616) (by @kakserpom) [#536] [#616]
- (macro) Nullable parameters #538 (#617) (by @kakserpom) [#538] [#617]
- (macro) Reference mutability inside Option #515 (#615) (by @kakserpom) [#515] [#615]
- (zend_bailout) Fix zend_bailout handling #537 (#625) (by @kakserpom) [#537] [#625]
- (zval) Heap corruption with persistent=true #424 (#622) (by @kakserpom) [#424] [#622]
- (deps) Update zip requirement from 6.0 to 7.0 (#634) (by @dependabot[bot]) [#634]
- (deps) Bump actions/cache from 4 to 5 (#607) (by @dependabot[bot]) [#607]
- (deps) Bump JamesIves/github-pages-deploy-action (#606) (by @dependabot[bot]) [#606]
- (superglobals) A guide chapter on Superglobals #499 (#612) (by @kakserpom) [#499] [#612]
- Remove outdated
ClassBuilder::property()documentation (#603) (by @DanielEScherzer) [#603] [#372]
0.15.2 - 2025-12-06
- (builders) Add send_headers setter to SapiBuilder (by @Qard)
- (interface) Add support for interfaces (by @Norbytus) [#533]
- (php) Add PHP 8.5 support (#592) (by @ptondereau) [#592]
- (musl) Use Alpine 3.22 for musl tests (#595) (by @ptondereau) [#595]
- (release-plz) Update workflow to run release-plz (#578) (by @ptondereau) [#578]
- (releaze-plz) Trusted publishing token (#579) (by @ptondereau) [#579]
- (deps) Update convert_case requirement from 0.9.0 to 0.10.0 (#593) (by @dependabot[bot]) [#593]
- (deps) Bump JamesIves/github-pages-deploy-action (by @dependabot[bot])
- (deps) Update convert_case requirement from 0.8.0 to 0.9.0 (by @dependabot[bot])
- (deps) Update libloading requirement from 0.8 to 0.9 (by @dependabot[bot])
- (docs) Fix docs workflow permissions (by @Xenira)
- (release) Pass github pat to release workflow (by @Xenira)
- (release) Fix permissions again (by @Xenira)
- (release) Add missing permissions to release trigger (by @Xenira) [#580]
- (release) Trigger release via reusable workflow (by @Xenira) [#579] [#578]
- Add musl build step (#561) (by @ptondereau) [#561]
- Restructure master and pr workflows (by @Xenira)
0.15.1 - 2025-10-29
- (release) Switch to trusted publishing (by @Xenira)
- Update build warning to reflect support status of php 8.0 (by @Xenira)
- Remove tests for eol PHP 8.0 (by @Xenira)
- Change links for org move (by @Xenira) [#500]
0.15.0 - 2025-10-28
- (stubs) [breaking] Add stubs for
RustClosure(by @Xenira) [#373]
New field
variadicadded toParameterstruct.
New field
enumsadded toModulestruct.
- (array) Introducing BTreeMap conversion and refactoring HashMap conversion (by @kakserpom) [#535]
- (array) Support
Vec<(K,V)>for hashtables (by @Xenira) [#425] - (module) Add
ModuleBuildername and version setters (by @kakserpom) [#534] - (zval) Add
Zval::null()(by @kakserpom) [#521] - Add constructor visibility (by @Norbytus) [#542]
- (array) Don't convert array keys with leading zeros (by @tomterl)
- (embed) Add missing zend_destroy_file_handle (by @el7cosmos) [#556]
- (array) Split
array.rstypes into smaller files (by @ptondereau) [#524] - (clippy) Fix new clippy errors (by @Xenira) [#558]
- (clippy) Fix new clippy findings (by @Xenira) [#543]
- (deps) Upgrade bindgen to 0.72 (by @ptondereau)
- (deps) Update zip requirement from 5.1 to 6.0 (by @dependabot[bot])
- (deps) Bump actions/stale from 9 to 10 (by @dependabot[bot])
- (deps) Update cargo_metadata requirement from 0.22 to 0.23 (by @dependabot[bot])
- (deps) Update zip requirement from 4.0 to 5.1 (by @dependabot[bot])
- (deps) Remove unused deps (by @robem)
- (deps) Update dialoguer requirement from 0.11 to 0.12 (by @dependabot[bot])
- (deps) Update cargo_metadata requirement from 0.21 to 0.22 (by @dependabot[bot])
- (deps) Bump actions/checkout from 4 to 5 (by @dependabot[bot])
- (macro) Add test infrastructure for macro crate (by @Xenira) [#530]
- (php) Use PHP 8.4 for linting (by @ptondereau)
- (readme) Update example in readme (by @joehoyle) [#539]
- Add ptondereau to maintainer list (by @ptondereau)
- Remove old ZTS docker and remove docker for embed tests (by @ptondereau)
- Update guide url and authors (by @Xenira) [#500]
0.14.2 - 2025-07-13
- Make Sapi work with ZTS builds (by @Qard) [#488]
- (clippy) Fix new clippy rule (by @Xenira)
- (macro) Allow multiple refs with
self_(by @Xenira) [#506] - (macro) Fix
self_reference when multiple method arguments supplied (by @Xenira) [#504] - (stubs) Include doc comments in
__construct()stubs (by @Xenira) [#497]
- (args) Add missing
embedfeature guard (by @Xenira) [#501] - (deps) Upgrade bindgen to
v0.70(by @Xenira) - (release-plz) Only run release workflow on build and lint success (by @Xenira)
0.14.1 - 2025-07-06
- (error) Deprecate
E_USER_ERRORin PHP 8.4 (by @Xenira) [#476]
- Support defaults for calls with named arguments (by @Stranger6667) [#490]
- Add missing parenthesis (by @Stranger6667) [#486]
0.14.0 - 2025-07-04
Methods and Properties are renamed to camelCase by default. Classes to PascalCase, constants to UPPER_CASE and functions to snake_case
- (class) [breaking] Generate correct stubs for extends and implements (by @Xenira) [#326]
extendsandimplementsattributes now require thestubproperty containing the class/interface name to be used in stubs.
- (macro) [breaking] Uinify attributes in
#[php]attribute (by @Xenira) [#391]
Attributes like
#[prop],#[rename], etc. have been moved to#[php]attributes like#[php(prop)],#[php(name = "Foo")],#[php(change_case = CamelCase)], etc.
- (macro) [breaking] Switch to builder pattern (by @davidcole1340, @danog, @ptondereau, @Xenira) [#99] [#131] [#327] [#174] [#335]
The old macros were dependent on execution order and have been causing trouble with language servers. They are replaced by a builder. See the migration guide at https://davidcole1340.github.io/ext-php-rs/migration-guides/v0.14.html for information on how to migrate.
- (alloc) Add estrdup (by @Qard) [#444]
- (builders) Add IniBuilder (by @Qard) [#442]
- (cargo-php) --features, --all-features, --no-default-features (by @kakserpom)
- (ffi) Allow definging additional bindings (by @Xenira) [#403]
- (globals) Add
CompilerGlobals(by @Qard) [#445] - (sapi) Expand
SapiBuilder(by @Qard) [#471] - (zts) Set lock per thread on zts build (#408) (by @joelwurtz) [#408]
- Argument defaults can be any expr valid in const scope (by @alekitto) [#433]
- (FunctionBuilder) Remove
nulltype from non-nullable typesvoidandmixed(by @kakserpom) [#457] - (args) Fix variadic args (by @Xenira) [#337]
- (array) Cast numeric string keys into
zend_ulongand allow negative keys (by @kakserpom) [#453] [#454] [#456] - (build) Take only the first line of which/where when searching for php executable (by @alekitto) [#430]
- (cargo-php)
get_ext_dir()/get_php_ini()stdout noise tolerance (by @kakserpom) [#459] - (clippy) Fix new clippy findings (by @Xenira)
- (globals) Split sapi header value containing
:correctly (by @Qard) [#441] - (macro) Add missing static flags in
php_implmacro (by @Norbytus) [#419] - (macro) Add missing separator pipe in flags (by @Norbytus) [#412]
- Ensure update_bindings runs as amd64 (by @Qard) [#446] [#448]
- Fix object access in object write/read/has_property handlers (by @alekitto) [#313] [#438]
- (bindings) Update
docsrs_bindings.rsto PHP 8.4 (by @Xenira) [#447] - (bindings) Add tooling to generate
docsrs_bindings.rs(by @Xenira) [#443] - (build) Fix typo in
build.rs(by @Xenira) [#439] - (cargo-php) Add locked option to install guide (#370) (by @Xenira) [#370] [#314]
- (cli) Enforce docs for cli (by @Xenira) [#392]
- (clippy) Apply pedantic rules (by @Xenira) [#418]
- (coverage) Add coverage badge (by @Xenira)
- (coverage) Ignore release pr (by @Xenira)
- (coverage) Add coverage reporting (by @Xenira) [#415]
- (dependabot) Remove redundant directories included in workspace (#386) (by @Xenira) [#386]
- (dependabot) Add cargo ecosystem (#378) (by @Xenira) [#378]
- (deps) Update cargo_metadata requirement from 0.19 to 0.20 (#437) (by @dependabot[bot]) [#437]
- (deps) Update zip requirement from 3.0 to 4.0 (#435) (by @dependabot[bot]) [#435]
- (deps) Update zip requirement from 2.2 to 3.0 (#432) (by @dependabot[bot]) [#432]
- (deps) Update cargo_metadata requirement from 0.15 to 0.19 (#404) (by @dependabot[bot]) [#404]
- (deps) Update syn and darling (#400) (by @Xenira) [#400]
- (deps) Update ureq requirement from 2.4 to 3.0 (#379) (by @dependabot[bot]) [#379]
- (deps) Update libloading requirement from 0.7 to 0.8 (#389) (by @dependabot[bot]) [#389]
- (deps) Update dialoguer requirement from 0.10 to 0.11 (#387) (by @dependabot[bot]) [#387]
- (deps) Update zip requirement from 0.6 to 2.2 (#381) (by @dependabot[bot]) [#381]
- (deps) Bump JamesIves/github-pages-deploy-action (#374) (by @dependabot[bot]) [#374]
- (github) Add issue and pr templates (by @Xenira) [#455]
- (guide) Directly include doc comments (by @Xenira)
- (hooks) Add check for outdated macro documentation (by @Xenira) [#466]
- (integration) Reorganise integration tests (by @Xenira) [#414]
- (macro) Change
renametochange_case(by @Xenira) - (macro) Improve
namevsrenamedocumentation (by @Xenira) [#422] - (macro) Use
#[php]attribute for startup function (by @Xenira) [#423] - (macro) Trait rename for general and method names (by @Norbytus) [#420]
- (macro) Update documentation for builder pattern (by @Xenira)
- (macro) Add stubs for new builder pattern (by @Xenira) [#183]
- (php-tokio) Move documentation into separate section (by @Xenira) [#322]
- (release-plz) Move breaking changes to section on top of changelog (#393) (by @Xenira) [#393]
- (sapi) Use builder pattern in sapi test (by @Xenira)
- (test) Fix embed test on php 8.4 (#396) (by @joelwurtz) [#396]
- (test) Disable inline example tests for macos unstable (#377) (by @Xenira) [#377]
- Add git hooks and
CONTRIBUTING.md(by @Xenira) [#475] - Improve test reliability and ease of use (by @Qard) [#450]
- Add missing cfg gate to anyhow exception test (by @Qard) [#449]
- Enforce doc comments for
ext-php-rs(by @Xenira) [#392]
0.13.1 - 2025-02-13
- (array) Fix double ended iterator implementation (#351) (by @Xenira) [#351] [#316]
- (globals) Correctly fetch
$_REQUESTsuper global (#334) (by @Xenira) [#334] [#331]
- (cfg) Change php81 cfg to 8.1+ (#365) (by @Xenira) [#365]
0.13.0 - 2025-02-06
- (array) Fix null dereference in iterator (#358) (by @Xenira) [#358] [#357]
- (globals) [breaking] Disabled
$_REQUESTsuper global function (#332) (by @Xenira) [#332] [#331]
If you used
http_request_vars()before it will now panic until a proper implementation is found.
- (clippy) Fix new clippy checks (#352) (by @Xenira) [#352]
- (clippy) Fix new clippy errors (by @Xenira)
- (php) Add deprecation warning for php 8.0 (#353) (by @Xenira) [#353] [#343]
- (release) Add release bot (#346) (by @Xenira) [#346] [#340]
- (windows) Add a debug build with debugging symbols (#350) (by @EdmondDantes) [#350]
- Fix typos (by @Xenira)
- Windows build should try archives (by @joehoyle)
- Fmt (by @joehoyle)
- Use vs17 on php 8.4+ (by @joehoyle)
- Don't use archive for 8.4.1 (by @joehoyle)
- Fmt (by @joehoyle)
- Support php 8.4 internal api changes (by @joehoyle)
- PHP 8.4 (by @joehoyle)
- Fix pipeline (#320) (by @Xenira) [#320]
- Update README.md (#317) (by @s00d) [#317]
- chore: Bitflags upgrade to v2 by @ptondereau #221
- chore: Update to bindgen 0.65.1 @ptondereau #220
- fix: Switch to use zend apis for array iteration by @joehoyle #219
- docs: Fix some typos + badges by @striezel #218
- fix: Stop watching Cargo.lock for changes by @rmccue #217
- fix: Fix Zval IS_PTR type detection by @joehoyle #216
- feat: Pass args to startup function by @joehoyle #215
- chore: Mate GlobalExecutor::get_mut() public by @joehoyle #214
- feat: Add is_identical for zvals by @Christian-Rades #213
- feat: Add PHP 8.2 support by @ptondereau #212
- ci+docs: honour PHP_CONFIG & rebuild automatically when env vars change by @julius #210
- chore: Update generated FFI bindings with bindgen 0.63 by @ptondereau #211
BC changes
- feat: allows ZendStr to contain null bytes by @julius #202
Migration See: #202
- build: Check docs warnings in CI by @davidcole1340 in #180
- fix: Fixes infinite loop in ClassEntry::instance_of() by @ju1ius in #188
- fix: Fix binary slice lifetimes by @davidcole1340 in #181
- build: Fixes CI workflow configuration by @ju1ius in #195
- feat: Add get_id() and hash() methods on ZendObject by @ju1ius in #196
- docs: Describes restrictions on generic parameters for
php_classby @ju1ius in #194 - feat: Add instance_of() and get_class_entry() methods on ZendObject by @ju1ius in #197
- Update changelog for latest versions by @striezel in #161
- fix building docs on docs.rs by @davidcole1340 in #165
- Add some standard zend interfaces by @nikeee in #164
- Correct parameter name. by @denzyldick in #168
- fix describe when using
#[implements]by @davidcole1340 in #169 - Add example that shows how to implement an interface by @nikeee in #167
- add
beforeflag to#[php_startup]by @davidcole1340 in #170 - add ability to define abstract methods by @davidcole1340 in #171
- chore(cli): Bump Clap for CLI tool by @ptondereau in #177
- fix type links in docs.rs by @davidcole1340 in #179
- 404 /guide doesn't exists. by @denzyldick in #149
- Fixed some typos by @denzyldick in #148
- Fix a few typos by @striezel in #150
- fix causes of some clippy warnings by @striezel in #152
- fix more causes of clippy warnings by @striezel in #157
- attempt to fix errors related to clap by @striezel in #158
- ci: run clippy only on stable Rust channel by @striezel in #159
- update actions/checkout in GitHub Actions workflows to v3 by @striezel in #151
- Add ability to set function name on php_function macro by @joehoyle in #153
- Specify classes as fully-qualified names in stubs by @joehoyle in #156
- Support marking classes as interfaces by @joehoyle in #155
- Support marking methods as abstract by @joehoyle in #154
- Add php-scrypt as a example project by @PineappleIOnic in #146
- Fix ini file duplication and truncation when using cargo-php command by @roborourke in #136
- Allow passing --yes parameter to bypass prompts by @roborourke in #135
- Windows support by @davidcole1340 in #128
- Support for binary slice to avoid extra allocation by @TobiasBengtsson in #139
- Bump dependencies by @ptondereau in #144
- Fix is_true() / is_false() in Zval by @joehoyle in #116
- readme: fix link to guide by @TorstenDittmann in #120
- Fix request_(startup|shutdown)_function in ModuleBuilder by @glyphpoch in #119
- Fix CI on macOS by @davidcole1340 in #126
- Add ability to pass modifier function for classes by @davidcole1340 in #127
- Upgrade
clapto3.0.0-rc3. #113 - Build properties hashmap once and cache inside class metadata. #114
- Add
impl FromZval for &Zvalandimpl FromZvalMut for &mut Zval. - Add
has_numerical_keysandhas_sequential_keystoZendHashTable. #115
Thanks to the following contributors:
- @davidcole1340
- @vkill
- Add preliminary PHP 8.1 support. #109
- Extensions should now compile for PHP 8.1. This doesn't implement any of the new PHP 8.1 features.
- Add
anyhowcargo feature to implementFrom<anyhow::Error> for PhpException. #110 - Made
ClassMetadata: Send + Sync. #111 - Fixed registering constants with expressions. #112
- Ensure stable ABI between
cargo-phpand downstream extensions. #108ext-php-rsversions used when compiling CLI and extension are now compared.
- Disabled serialization and unserialization of Rust structs exported as PHP
classes. #105
- You can't serialize an associated Rust struct so this would have never worked, but disabling them fixes crashes when running in an environment like psysh.
- Replaced boxed module inside
ModuleBuilderwith in-struct module. - Fixed builds failing on Linux AArch64 systems. #106
- Added
cargo-phpfor creating stubs, installing and uninstalling extensions. #107- Check out the guide for more information on this.
- Reorganized project. #101
- Changed (almost all) module paths. Too many changes to list them all, check out the docs.
- Removed
skelproject.
- Allow methods to accept references to
ZendClassObject<T>instead ofself. #103
- Fixed docs.rs PHP bindings file.
- Constructors that return
Selfcan now be added to classes. #83Defaultis 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
SelforResult<Self, E>, whereE: Into<PhpException>.
- Added
FromZendObjectandIntoZendObjecttraits. #74 - Added
#[derive(ZvalConvert)]derive macro. DerivesIntoZvalandFromZvalon 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 Tis now valid as a function parameter. #100
Thanks to the contributors for this release:
- @davidcole1340
- @vodik
PhpExceptionno longer requires a lifetime #80.- Added
PhpExceptionandPhpResultto prelude #80. - Fixed
ZendStringmissing last character #82.
- Method names are now renamed to snake case by default #63.
- Refactored
ZendHashTableinto an owned and borrowed variant #76.- Creating a new hashtable is done through the
OwnedHashTablestruct, which is then dereferenced to&HashTable, asStringis to&str.
- Creating a new hashtable is done through the
- Refactored
ZendStringinto an owned and borrowed variant #77.- Creating a new Zend string is done through the
ZendStringstruct, which is then dereferenced to&ZendStr, asStringis 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.
- Added interfaces and parent class to the
Debugimplementation forClassEntry@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:
- @davidcole1340
- @vodik
- Added macros!
- Missed a bit :(
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
unwrapcalls:.build()returnsResultonFunctionBuilder,ClassBuilderandModuleBuilder..property()and.constant()returnResultonClassBuilder..register_constant()returnsResult..try_call()on callables now returnResultrather thanOption.throw()andthrow_with_code()now returnsResult.new()andnew_interned()onZendStringnow returns aResult.- For
ZendHashTable:insert(),insert_at_index()now returns aResult<HashTableInsertResult>, whereErrfailed,Ok(Ok)inserts successfully without overwrite, andOk(OkWithOverwrite(&Zval))inserts successfully with overwrite.push()now returns aResult.- Converting from a
VecorHashMapto aZendHashTableis fallible, so it now implementsTryFromas 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 yourVecorHashMapby callingtry_into()and handling the error.
- Added support for thread-safe PHP (@davidcole1340) #37
- Added ability to add properties to classes (@davidcole1340) #39
- Added better interactions with objects (@davidcole1340) #41
- 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-featuresto be true for Bindgen (@willbrowningme) #36
- Relicensed project under MIT or Apache 2.0 as per Rust crate guidelines (@davidcole1340) [c:439f2ae]
- Added
parse_args!macro to simplify argument parsing (@davidcole1340) [c:45c7242] - Added ability to throw exceptions from Rust to PHP (@davidcole1340) [c:45c7242]
- Added ability to register global constants (@davidcole1340) [c:472e26e]
- Implemented
From<ZendHashTable>forVec(@davidcole1340) [c:3917c41] - Expanded implementations for converting to
Zvalfrom primitives (@davidcole1340) [c:d4c6aa2] - Replaced unit errors with an
Errorenum (@davidcole1340) [c:f11451f] - Added
DebugandCloneimplementations for most structs (@davidcole1340) [c:62a43e6]