Repository navigation
Conversation
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.
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.
Summary
FMScriptError. Handles both nested (v26+) and flat (older FMS) response envelopes via the spec-phpScriptsfacade.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-phpContainersfacade.Client::script()/Client::scriptById(),Query::script(),EntityRef::script()/EntityRef::container()/EntityRef::patchContainers()(multi-field container + regular field updates in a single PATCH).ContainerDownloadResultDTO withsizefield for parity with JS/Python clients.Test plan
composer test— 238 tests, 381 assertions (197 existing + 41 new)composer analyse— PHPStan level max, no errorscomposer check— tests + static analysis pass