Skip to content

Conversation

paulinevos
Copy link
Contributor

@paulinevos paulinevos commented Sep 30, 2025

Q A
Bug fix? no
New feature? no
Docs? no
Issues Fix #18
License MIT

In an effort to support user land objects for the store, this PR introduces an Embeddable interface instead of relying on the TextDocument class. Please note this interface would require php ^8.4, as it uses interface properties. I chose this approach so as to introduce minimal change to the existing TextDocument class and usages. Instead of content, an Embeddable document has a data property. Any type embeddable document class can implement a hook for the data property if needed.

This PR also introduces union types for the document IDs so as to not make assumptions about the ID type.

@carsonbot carsonbot changed the title Introduce Embeddable interface Introduce Embeddable interface Sep 30, 2025
@paulinevos
Copy link
Contributor Author

Not sure why PHPStan fails on 8.4 -- is it a linking issue? The argument it's complaining about seems fine to me.

How do we feel about the rest? < 8.4 is going to fail because of the interface properties. Should we support 8.4 or should I solve this with getter methods on the interface instead of interface properties to accommodate for the earlier versions?

@paulinevos paulinevos force-pushed the userland-objects branch 5 times, most recently from b293f3a to 81b8bac Compare October 1, 2025 13:59
@OskarStark OskarStark added Platform Issues & PRs about the AI Platform component Store Issues & PRs about the AI Store component labels Oct 2, 2025
@carsonbot carsonbot changed the title Introduce Embeddable interface [Platform][Store] Introduce Embeddable interface Oct 2, 2025
@paulinevos paulinevos force-pushed the userland-objects branch 2 times, most recently from 40c11b9 to cd35c6e Compare October 3, 2025 15:10
@paulinevos paulinevos force-pushed the userland-objects branch 4 times, most recently from a13eb9f to 10608ce Compare October 6, 2025 11:53
@paulinevos paulinevos changed the title [Platform][Store] Introduce Embeddable interface [Platform][Store] Introduce EmbeddableDocumentInterface Oct 6, 2025
@OskarStark OskarStark changed the title [Platform][Store] Introduce EmbeddableDocumentInterface [Store] Introduce EmbeddableDocumentInterface Oct 6, 2025
@OskarStark OskarStark removed the Platform Issues & PRs about the AI Platform component label Oct 6, 2025
@OskarStark
Copy link
Contributor

Thank you Pauline.

@OskarStark OskarStark merged commit 0d880f6 into symfony:main Oct 6, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Reviewed Store Issues & PRs about the AI Store component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Store] Support user land objects for embedding instead of TextDocument

5 participants