This is an automated email from the ASF dual-hosted git repository.

Xuanwo pushed a commit to branch xuanwo/publish-php-write-utf8-docs
in repository https://gitbox.apache.org/repos/asf/opendal.git

commit daf27c6efb6255b553af7840ddfb20aae077cbc4
Author: Xuanwo <[email protected]>
AuthorDate: Fri Nov 27 15:55:05 2026 +0100

    docs: explain PHP write errors for invalid UTF-8 content
---
 core/core/src/docs/upgrade.md | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/core/core/src/docs/upgrade.md b/core/core/src/docs/upgrade.md
index 5edf6b39d0..350326a9e8 100644
--- a/core/core/src/docs/upgrade.md
+++ b/core/core/src/docs/upgrade.md
@@ -266,6 +266,18 @@ passed directly to another operator method while the owner 
is alive.
 epoch, or `-1` when absent. Update exhaustive switches for `Code.CANCELLED`
 and `error.Cancelled` in `OpendalError`.
 
+## PHP binding
+
+After the upgrade from `ext-php-rs` 0.15.15 to 0.16.5,
+`OpenDAL\Operator::write($path, $content)` throws `\TypeError` when the
+content string contains invalid UTF-8. The earlier build threw `\Exception`,
+so a `catch (\Exception $e)` handler for this input must be updated.
+
+If your application handles invalid UTF-8 specifically, validate the content
+string before calling `write()`. This works with both binding versions and
+lets storage errors propagate to your usual `OpenDAL\Exception` handler.
+To store arbitrary bytes, pass an array of byte values to `write_binary()`.
+
 # Upgrade to v0.59
 
 ## Public API

Reply via email to