Skip to content

Add SDK-author resource constructor dependencies - #27

Merged
andrepimpao merged 2 commits into
3.xfrom
PAS-19-add-sdk-author-resource-constructor-dependencies
Aug 8, 2026
Merged

Add SDK-author resource constructor dependencies#27
andrepimpao merged 2 commits into
3.xfrom
PAS-19-add-sdk-author-resource-constructor-dependencies

Conversation

@andrepimpao

Copy link
Copy Markdown
Contributor

Summary

  • Add typed, SDK-author-only constructor dependencies for resources.
  • Keep resource-private data out of shared SDK configuration.
  • Preserve the existing resource() contract and behavior.

Changes

  • Add protected Api::resourceWith(string $class, mixed ...$arguments).
  • Inject Runtime automatically as the first resource constructor argument.
  • Forward additional positional or named arguments to the concrete resource.

Compatibility

  • Existing resource() calls and overrides remain unchanged.
  • resourceWith() is additive and intended for resources requiring typed constructor dependencies.
  • A source TODO records merging this capability into resource() in a future major release.

@andrepimpao
andrepimpao merged commit e81b35a into 3.x Aug 8, 2026
5 checks passed
@andrepimpao
andrepimpao deleted the PAS-19-add-sdk-author-resource-constructor-dependencies branch August 8, 2026 13:54
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