CFML based technology, Lucee gives a Warning Bell 🔔

Wanna upgrade your Lucee server to the next version, check out the below functions. Hurry up, they are going to remove anytime. Per Lucee documentation, they are declared as deprecated. Surprised! I know you are thinking that “There is no list available on the internet about the functions, and also, Lucee never raises a list. how do you get the list of the functions? Chill, it’s very simple. It is already mentioned in the Lucee Docs.

I got the functions with help of getFunctionList & getFunctionData using below simple code.

<cfscript>
	variables.functions = [];
	variables.functionList = getFunctionList();
	variables.functionList.each((key, value) => {
		var funInfo = getFunctionData(key);
		if(funInfo.description contains 'deprecated') {
			variables.functions.append({
				name: key,
				description: funInfo.description
			})
		}
	})
</cfscript>
<table>
	<tr>
		<td>Function Name</td>
		<td>Description. Hint of the new function</td>
	</tr>
	<cfoutput>
	<cfloop array="#variables.functions#" item="variables.function">
		<tr>
			<td>#variables.function.name#</td>
			<td>#variables.function.description#</td>
		</tr>
	</cfloop>
	</cfoutput>
</table>
Function Name Description. Hint of the new function
valuelist Returns a list of all the values, for a given column within the query, delimited by the value given.
this function is deprecated, use instead the function queryColumnData
valuearray Returns a array of all the values, for a given column within the query.
this function is deprecated, use instead the function queryColumnData
getcurrentcontext this function is deprecated, use function CallStackGet instead.
componentinfo this function is deprecated, use function getMetadata instead.
listtrim this function is deprecated, use instead ListCompact
cacheremoveall this function is deprecated, use instead cacheClear. Removes all elements from the cache
getk2serverdoccount This function is deprecated.
imagedrawimage this function is deprecated, use ImagePaste instead. Draws a image on a image with the baseline of the first character positioned at (x,y) in the image.
incrementvalue this function is deprecated, use instead the ++ operator;Increments the current number by one
decrementvalue this function is deprecated, use instead the — operator;Decrements the current number by one
empty this function is deprecated, use instead “IsEmpty“.
this function returns true if a value exists and is not “empty”.
The following things are considered to be empty:
– string:”” (an empty string)
– number:return always false
– boolean: return always false
– array: [] (an empty array)
– struct: {} (an empty struct)
cachekeyexists this function is deprecated, use instead CacheIdExists. Returns true/false whether the cache contains an element with the certain keyname.
quotedvaluelist Returns a quoted list of all the values, for a given column within the query, delimited by the value given.
this function is deprecated, use instead the function queryColumnData
decodefromurl Decodes a string that has been encoded in the URL using the encodeForURL.
this function is deprecated, use function ESAPIDecode(‘url’,…) instead.
nowserver this function is deprecated, returns the current time on the server independent on lucee timezone definition
getk2serverdoccountlimit This function is deprecated.
querygetrow this function is deprecated, use function QueryRowData instead.

Why the big step?

Since in today’s era, we are discussing about modern programming so that technology also need to improve and remove depended or similar function to manage code better. What do you say?

I have stared cleaning my project’s code as per above list. Did you?

I hope this information will help to clean your project’s code and make ready for the new version.

Happy Coding!