You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
an error occurs during compilation. This happens because Purgatory is unable to resolve properties affected by this method.
In cases where a method accesses properties, this behavior is expected, and the #[TargetedProperties] attribute should be applied to indicate which properties are used by the method. However, even when a method returns data unrelated to any properties, the error is still triggered (which is not good).
One workaround is to use a placeholder #[TargetedProperties] attribute with an existing property for that serialization group, like so:
However, this is not ideal. I propose introducing a new attribute (#[DoesNotAccessProperties]?) to signal that the method does not interact with any properties and should therefore be exempt from this validation.
When using the
ForGroups
target for a serialization group that is defined for a method not linked to a specific property, such as:an error occurs during compilation. This happens because Purgatory is unable to resolve properties affected by this method.
In cases where a method accesses properties, this behavior is expected, and the
#[TargetedProperties]
attribute should be applied to indicate which properties are used by the method. However, even when a method returns data unrelated to any properties, the error is still triggered (which is not good).One workaround is to use a placeholder #[TargetedProperties] attribute with an existing property for that serialization group, like so:
However, this is not ideal. I propose introducing a new attribute (
#[DoesNotAccessProperties]
?) to signal that the method does not interact with any properties and should therefore be exempt from this validation.The text was updated successfully, but these errors were encountered: