Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FeatureScopeable should only be resolved in Feature::serializeScope #124

Open
alaaemadelsayed opened this issue Oct 25, 2024 · 1 comment
Assignees

Comments

@alaaemadelsayed
Copy link

Pennant Version

1.12.0

Laravel Version

12

PHP Version

8

Database Driver & Version

No response

Description

As of right now, there's no way to create a custom scope that both gets passed as is to the resolver and gets serialized as a string. Either the scope is one of the supported serializable types (string, number, Model) and gets passed as is to the resolver. Or it implements FeatureScopeable and is passed down as one of those types anyway.

FeatureScopeable is useful for mapping to special scopes based on drivers, but doesn't solve this issue. Maybe a solution would be for the serialize method to support Serializable types. Only solution right now as far as I know is a custom driver that augments scope serialization. #

Steps To Reproduce

As mentioned in the description

@timacdonald
Copy link
Member

Duplicate of #97.

Think I'll take a look at solving this after Laracon AU. It has come up a few times and can see it being useful.

@timacdonald timacdonald self-assigned this Oct 27, 2024
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

No branches or pull requests

2 participants