Skip to content

Support virtual entity properties with PHP property hooks [closes #684] - #849

Merged
hrach merged 3 commits into
mainfrom
virtual-property-hooks
Nov 8, 2026
Merged

hrach merged 3 commits into
mainfrom
virtual-property-hooks

Conversation

@hrach

@hrach hrach commented Nov 8, 2026

Copy link
Copy Markdown
Member

Support virtual entity properties with PHP property hooks [closes #684]

Register native virtual properties with the VirtualEntityProperty attribute and expose them through entity metadata and collection expressions. Preserve legacy virtual properties and exclude computed values from persistence.

Reject computed virtual properties in DBAL collections [closes #684]

Throw NotSupportedException for computed virtual properties in database expressions, including related-property paths, and direct callers to toMemoryCollection(). Preserve relationship and primary-proxy handling.

hrach added 2 commits November 8, 2026 22:03
Register native virtual properties with the VirtualEntityProperty attribute and expose them through entity metadata and collection expressions. Preserve legacy virtual properties and exclude computed values from persistence.
Throw NotSupportedException for computed virtual properties in database expressions, including related-property paths, and direct callers to toMemoryCollection(). Preserve relationship and primary-proxy handling.
@hrach

hrach commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

This change is part of the following stack:

Change managed by git-spice.

Run PHPStan on PHP 8.5 with matrix-selected analysis targets for PHP 8.1 through 8.6. Use one configuration to select phpVersion and exclude hook tests only for targets before PHP 8.4, retaining reflection API narrowing for older targets.
@hrach
hrach force-pushed the virtual-property-hooks branch from a743f41 to 572bc69 Compare November 8, 2026 21:54
@hrach
hrach merged commit 285955b into main Nov 8, 2026
15 checks passed
@hrach
hrach deleted the virtual-property-hooks branch November 8, 2026 21:58
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.

Property hooks from PHP 8.4

1 participant