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

feat: support for encrypted and parameterized casts #1439

Merged

Conversation

jdjfisher
Copy link
Contributor

  • Added or updated tests
  • Documented user facing changes
  • Updated CHANGELOG.md

Changes

Added support for resolving encrypted eloquent cast types.

Added support for resolving underlying eloquent cast types with cast parameters (e.g decimal with precision, datetime with format etc).

@jdjfisher jdjfisher marked this pull request as ready for review November 6, 2022 11:24
@jdjfisher jdjfisher changed the title Encrypted and parameterized casts Support for encrypted and parameterized casts Nov 6, 2022
}

// Truncate cast parameters
$type = Str::before($type, ':');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking through the framework, it appears to be explicitly looking for decimal:, date:, datetime: etc for the built-in parameterized casts. That said, I think for the interest maintainibility here, we can reasonably assume that everything following the : is parameters and not part of the underlying cast type.

@canvural canvural changed the title Support for encrypted and parameterized casts feat: support for encrypted and parameterized casts Nov 6, 2022
@canvural canvural merged commit 055d689 into larastan:master Nov 6, 2022
@canvural
Copy link
Collaborator

canvural commented Nov 6, 2022

Thank you! Looks good.

@jdjfisher jdjfisher deleted the encrypted-and-parameterized-casts branch November 14, 2022 21:31
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.

None yet

2 participants