? ? Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
6 Oct 2020

Summary of Changes

Added some missing deprecations:

  • isAdmin()
  • isSite()
  • getCfg()

Testing Instructions

enable debug plugin
enable Log Depreated API
install some extensions that use one ofthose deprecated methods
or simply create a dummy sistem plugin like this one

class PlgSystemOldwaytest extends JPlugin
{
	function onAfterRoute()
	{
		$app = JFactory::getApplication();
		if ( $app->isAdmin() )
		{
			return;
		}
	}
}

Actual result BEFORE applying this Pull Request

no depreactions logged

Expected result AFTER applying this Pull Request

2020-10-06T09:41:08+00:00 WARNING 172.16.238.1 deprecated Joomla\CMS\Application\CMSApplication::isAdmin() is deprecated. Use JFactory->getApplication()->isClient('administrator') instead.

avatar alikon alikon - open - 6 Oct 2020
avatar alikon alikon - change - 6 Oct 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Oct 2020
Category Libraries
avatar HLeithner
HLeithner - comment - 6 Oct 2020

I'm not sure if it's a good idea to do it without flood protection but maybe you could add "will be removed in Joomla! 4.0" ? Don't know how the order deprecation warnings are named

avatar zero-24
zero-24 - comment - 6 Oct 2020

What kind of flood protection do you have in mind? This is only added when you have debug and api deprecations enabled right?

avatar alikon
alikon - comment - 6 Oct 2020

This is only added when you have debug and api deprecations enabled right?

yes

avatar HLeithner
HLeithner - comment - 6 Oct 2020

iirc we have some "log only once" if statements for other deprecations but maybe I'm wrong.

If this function is called really often it could lead to a performance penalty for 3.x series.

avatar alikon alikon - change - 6 Oct 2020
Labels Added: ?
avatar zero-24
zero-24 - comment - 6 Oct 2020

If this function is called really often it could lead to a performance penalty for 3.x series.

Only once you have debug + api deprecation logging enabled right? Else nothing is written right?

avatar brianteeman
brianteeman - comment - 6 Oct 2020

If this function is called really often it could lead to a performance penalty for 3.x series.

This only logs something if you enable debug and enable logging of deprecated api in the plugin. It is off by default. AND it warns you to only have it running for a short period of time. I guess you've never used it

avatar alikon
alikon - comment - 6 Oct 2020

If this function is called really often it could lead to a performance penalty for 3.x series.

yes that's true, but it is already like this when you enable LOG Api deprecations, and plus this should be done only on purpose

iirc we have some "log only once" if statements for other deprecations

i not aware about this.....

avatar sandewt sandewt - test_item - 6 Oct 2020 - Tested successfully
avatar sandewt
sandewt - comment - 6 Oct 2020

I have tested this item successfully on ecaa6c2

Joomla! 3.9.22-rc Release Candidate [ Amani ] 2-October-2020 11:00 GMT

Plugins: System - Debug > Log Deprecated API = Yes


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30938.

avatar brianteeman
brianteeman - comment - 6 Oct 2020

@alikon why are only your PR getting the hacktoberfest tag?

avatar alikon
alikon - comment - 6 Oct 2020

due to changed rules https://hacktoberfest.digitalocean.com/hacktoberfest-update
every pr should be marked with the label hacktoberfest-accepted to be eligible
feel free to send me or to any bug-squad members a list of pr's to be labelled as such

avatar brianteeman
brianteeman - comment - 6 Oct 2020
PRs count if:
Submitted during the month of October AND (
  The PR is labelled as hacktoberfest-accepted by a maintainer OR
  Submitted in a repo with the hacktoberfest topic AND (
    The PR is merged OR
    The PR has been approved
  )
)
avatar alikon
alikon - comment - 6 Oct 2020

yes exactly these are the new rules

avatar brianteeman
brianteeman - comment - 6 Oct 2020

In other words you do not need to add the label. but if you are going to choose that option then you should be applying it to all PRs not just yours or those that someone asks for the label. Most people dont know to ask.

I want everyone to plant a tree

avatar zero-24
zero-24 - comment - 6 Oct 2020

I want everyone to plant a tree

We have the hacktoberfest topic so that should not be a blocker.

avatar richard67
richard67 - comment - 6 Oct 2020

I don't join the hacktoberfest so about my PR(s) I don't care.

Update 2020-10-17: Meanwhile I've decided to join, too. Wanna plant a tree, too.

avatar alikon
alikon - comment - 6 Oct 2020

yes the label is just one of the options available, sometimes a pr need some time to be merged and /or approved
so the label in these case can be a shortcut

avatar brianteeman
brianteeman - comment - 6 Oct 2020

so we dont need the label - thats good to know!!

avatar gostn gostn - test_item - 25 Nov 2020 - Tested successfully
avatar gostn
gostn - comment - 25 Nov 2020

I have tested this item successfully on ecaa6c2


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30938.

avatar alikon alikon - change - 25 Nov 2020
Status Pending Ready to Commit
avatar alikon
alikon - comment - 25 Nov 2020

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30938.

avatar rdeutz rdeutz - change - 8 Feb 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-02-08 10:36:06
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 8 Feb 2021
avatar rdeutz rdeutz - merge - 8 Feb 2021

Add a Comment

Login with GitHub to post a comment