Database::get depreciated?

Permalink
If database::get is depreciated, what should it be replaced with? Inside API it says legacy. But its still being used in core concrete5 block. What is the new equivalent of Database::get() ???

ob7dev
 
ob7dev replied on at Permalink Reply
ob7dev
It seems Database::connection() is the correct way now?
ramonleenders replied on at Permalink Reply
ramonleenders
Correct!

There are a whole bunch of other database functions you should call differently. Someone (thought willemanchor) made a list of deprecated functions (I do think these are in there), but I'm not sure where to find the link to that.
OKDnet replied on at Permalink Reply
OKDnet
Is this cheat sheet what you are referring to? I recall it does compare legacy code to v. 7+ equivalents.
http://webli.us/cheatsheet/doku.php...
Gondwana replied on at Permalink Reply
Gondwana
WillemAnchor replied on at Permalink Best Answer Reply
WillemAnchor
Yes, I did :)

You can find it in the appendix of the developer docs, or ...here:
http://documentation.concrete5.org/developers/appendix/deprecated-c...

Most of the time, when you look at the code of a deprecated function, you will see the replacement code right there, but some other times it takes a bit more digging.

Yes, you can still find deprecated functions being used in the core. Those uses will be replaced at some point.
Deprecated functions may be totally removed at some point, so it's always better to use new code.