Not sure this is the right topic...
What should I do, if anything, about deprecated functions?
The retain_parameters method has been deprecated. in /includes/system/versioned/1.0.8.5/href.php on line 79
The tep_require_login function has been deprecated. in/includes/functions/general.php on line 351
The tep_session_recreate function has been deprecated. in /includes/functions/sessions.php on line 32
The tep_reset_session_token function has been deprecated. in /includes/functions/sessions.php on line 37
1.0.8.5
Replacing deprecated functions
-
ecartz
- Core Team
- Posts: 3084
- Joined: Tue Nov 05, 2019 6:02 pm
- Phoenix Version:
- Has thanked: 4 times
- Been thanked: 208 times
Re: 1.0.8.5 Questions / Comments / Concerns
If you look at the functions themselves, you will see the deprecation message followed by what to do instead (with a few exceptions). E.g. https://github.com/CE-PhoenixCart/Phoen ... p#L78..L81edfaught wrote: ↑Tue Jul 26, 2022 6:48 pm The retain_parameters method has been deprecated. in /includes/system/versioned/1.0.8.5/href.php on line 79
The tep_require_login function has been deprecated. in/includes/functions/general.php on line 351
The tep_session_recreate function has been deprecated. in /includes/functions/sessions.php on line 32
The tep_reset_session_token function has been deprecated. in /includes/functions/sessions.php on line 37
Code: Select all
public function retain_parameters(array $excludes = []) {
trigger_error('The retain_parameters method has been deprecated.', E_USER_DEPRECATED);
return $this->retain_query_except($excludes);
}Similarly, https://github.com/CE-PhoenixCart/Phoen ... L350..L353 says to replace tep_require_login with Login::require -- again you can just replace one with the other.
From https://github.com/CE-PhoenixCart/Phoen ... ssions.php we see that tep_session_recreate can be replaced with Session::recreate and tep_reset_session_token can be replaced with Form::reset_session_token
Other functions may not have direct replacements like that, but those four do.
You can also look at raiwa's cheat sheet: https://docs.google.com/spreadsheets/d/ ... sp=sharing -- that may be easier than looking up the function in the source code.