?
avatar brianteeman
brianteeman
5 Oct 2020

Perhaps this is my misunderstanding but I assumed that if I enabled "Log Deprecated API" then I would quickly get a log of all deprecated code as I navigate the site. This would enable me to check to see if any extension not explicitly marked as J4 compatible could be safely used on J4 (not using deprecated api) or could be easily edited to be used on j4 (updating the code whenever it was using deprecated code)

However this only happens (afaict) if there is a specific code to add a log eg

	/**
	 * Refresh the list of include paths
	 *
	 * @return  self
	 *
	 * @since   3.2
	 *
	 * @deprecated  3.5  Use FileLayout::clearIncludePaths()
	 */
	protected function refreshIncludePaths()
	{
		// Log usage of deprecated function
		\JLog::add(__METHOD__ . '() is deprecated, use FileLayout::clearIncludePaths() instead.', \JLog::WARNING, 'deprecated');

		$this->clearIncludePaths();

		return $this;
	}

However in a few (important) cases there is no logging at all just a comment in the code. How is anyone supposed to know the code is deprecated in this case? Are we expected to read every line of code?

	/**
	 * Is site interface?
	 *
	 * @return  boolean  True if this application is site.
	 *
	 * @since       3.2
	 * @deprecated  4.0 Use isClient('site') instead.
	 */
	public function isSite()
	{
		return $this->isClient('site');
	}

avatar brianteeman brianteeman - open - 5 Oct 2020
avatar joomla-cms-bot joomla-cms-bot - change - 5 Oct 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 5 Oct 2020
avatar brianteeman
brianteeman - comment - 5 Oct 2020

duplicate

avatar brianteeman brianteeman - change - 5 Oct 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-10-05 12:51:04
Closed_By brianteeman
avatar brianteeman brianteeman - close - 5 Oct 2020

Add a Comment

Login with GitHub to post a comment