Skip to content

feat: add script execution and container field I/O - #2

Merged
fsans merged 3 commits into
mainfrom
develop
Jul 16, 2026
Merged

fsans merged 3 commits into
mainfrom
develop

Conversation

@fsans

@fsans fsans commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Port ScriptInvoker from fms-odata-js/fms-odata-py: FileMaker script invocation at three scopes (database, entity-set, record) by name or by FMSID (v26+). Non-zero script errors promoted to FMScriptError. Handles both nested (v26+) and flat (older FMS) response envelopes via the spec-php Scripts facade.
  • Port ContainerRef from fms-odata-js/fms-odata-py: container field download (get(), getStream()), upload (binary + base64 encoding), and clear (delete()). MIME sniffing from magic bytes, Content-Disposition parsing (RFC 6266 + RFC 5987), and base64 JSON annotation building reused from the spec-php Containers facade.
  • Integrated into Client::script() / Client::scriptById(), Query::script(), EntityRef::script() / EntityRef::container() / EntityRef::patchContainers() (multi-field container + regular field updates in a single PATCH).
  • Added ContainerDownloadResult DTO with size field for parity with JS/Python clients.
  • Updated README (status, examples, architecture, roadmap), CHANGELOG, and AGENTS.md.

Test plan

  • composer test — 238 tests, 381 assertions (197 existing + 41 new)
  • composer analyse — PHPStan level max, no errors
  • composer check — tests + static analysis pass

fsans added 3 commits July 15, 2026 17:41
Port ScriptInvoker (3 scopes: database, entity-set, record; by name and
FMSID for v26+) and ContainerRef (download, upload binary/base64, clear,
patchContainers) from fms-odata-js/fms-odata-py, reusing spec-php helpers
for MIME sniffing, Content-Disposition, base64, and script envelope parsing.

Integrated into Client::script()/scriptById(), Query::script(),
EntityRef::script()/container()/patchContainers(). Non-zero script errors
promoted to FMScriptError. 41 new tests (238 total). PHPStan clean.
@fsans
fsans merged commit 1ce9867 into main Jul 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant