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

TESTBOX-408 Allow toHaveKey to support struct like objects #159

Merged
merged 1 commit into from
Dec 16, 2024

Conversation

zspitzer
Copy link
Contributor

@@ -1454,16 +1454,13 @@ component {
* @throws InvalidTargetType - If we can normalize it to a struct
*/
private function normalizeToStruct( any target ){
if ( isStruct( arguments.target ) ) {
return arguments.target;
}
if ( isQuery( arguments.target ) ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I see your request, but then this introduces exceptions to be thrown in other locations when the normalization can't happen for things like NON structs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

which was the previous behaviour?

plus those exceptions are more informative and actionable?

https://trycf.com/gist/5e3f5ecfe2d926faa28be26eed532bb1/acf2023?theme=monokai

image

image

@lmajano lmajano merged commit a39276e into Ortus-Solutions:development Dec 16, 2024
4 of 9 checks passed
@zspitzer zspitzer deleted the TESTBOX-408 branch December 16, 2024 21:33
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.

2 participants