-
Notifications
You must be signed in to change notification settings - Fork 118
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
Lucee 6 - queryToStruct is now a reserved word as it's a built in function, with different arguments #437
Comments
Thanks for the tip, @tomchiverton! I'm happy to make whatever the appropriate changes are. I'm surprised that I don't have a Lucee 6 env handy, don't have time to build one, and the version available on TryCF seems to be ~unusable at the moment. I would prefer to not break backwards compatibility if possible. Does Lucee 6 throw an exception because of Taffy's I think an ideal solution would allow existing code to continue using queryToStruct while adding something else ( |
Are you thinking Taffy could catch the exception caused by the argument mismatches? But the For CFC's that use the more modern "just return anything" it might be more possible? |
This is kind of what I was thinking: <cffunction name="qToStruct">...</cffunction>
<cftry>
<cffunction name="queryToStruct">
<cfscript>
return qToStruct(...);
</cfscript>
</cffunction>
<cfcatch> <!--- fail silently ---> </cfcatch>
</cftry> |
@tomchiverton I've created a branch that I'm hoping fixes the problem. Please give it a try: https://github.com/atuttle/Taffy/tree/feat/qToStruct It does the following:
This means that on Lucee 6, you would have the choice to use the built-in |
@tomchiverton were you able to try out my branch? |
I might have a chance to do so today, but certainly this week. We've migrated most of our code to use the |
Make that next week, sorry |
This branch doesn't seem to have any bad effects for our projects still using Lucee 5.x All our Lucee 6.x projects have already moved to using "this.queryToStruct()" so it's kinda hard to tell the impact :) I'd say merge the feature, then update the docs to refer to |
Probably the Taffy method should be renamed, or made available under a different name, and all the docs updated ?
Workaround, change every API resource from
return representationOf( queryToStruct(...
toreturn representationOf( this.queryToStruct(...
The text was updated successfully, but these errors were encountered: