fix(antd-php): use cost-estimate fields in example 02 to avoid stringification fatal#74
Open
Nic-dorman wants to merge 1 commit into
Open
fix(antd-php): use cost-estimate fields in example 02 to avoid stringification fatal#74Nic-dorman wants to merge 1 commit into
Nic-dorman wants to merge 1 commit into
Conversation
…ification fatal The example interpolated the whole UploadCostEstimate object into a string, which lacks __toString() and so fatals on PHP 8.3: PHP Fatal error: Object of class Autonomi\Antd\Models\UploadCostEstimate could not be converted to string in 02-data.php:17 Print individual fields instead, matching the Python/Rust/Kotlin examples. Also adds a round-trip assertion and an OK marker so the example self-verifies. Closes #66
This was referenced May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #66.
The example interpolated the whole
UploadCostEstimateobject into a string, which lacks__toString()and so fatals on PHP 8.3:Print individual cost-estimate fields instead, matching what the Python / Rust / Kotlin examples already do. Also adds a round-trip assertion and an OK marker so the example self-verifies (useful for any cross-language e2e harness).
Test plan
php examples/02-data.phpagainst a local devnet — exits 0, prints estimate fields, stored address, and "Public data round-trip OK!"Sample output
(The
Actual cost:line being blank is unrelated —PutResult.costarrives as an empty string from the daemon; not addressed in this PR.)