Tracking down use of functions marked for deprecation

proobioks

New Member
Following this thread: How to handle functions deprecation in library? I want to find a way to track all calls to the deprecated function so I can make sure I get them all replaced before the function is removed. Given the following PHP methods\[code\]/* @deprecated - just use getBar()*/function getFoo(){ return getBar();}function getBar(){ return "bar";}\[/code\]I came up with the following method of doing so and I'm looking for feedback.\[code\]function getFoo(){ try{ throw new Exception("Deprecated function used"); } catch(Exception $e){ //Log the Exception with stack trace .... // return value as normal return getBar(); }}\[/code\]
 
Back
Top