? ? ? Pending

User tests: Successful: Unsuccessful:

avatar ditsuke
ditsuke
1 Jan 2022

Summary of Changes

  • Add @property-reads docs for better IDE/static analysis support.
  • Refactor TaskOption::type to TaskOption::id

Testing Instructions

  • Create a new Scheduled Task with a short interval-based schedule (1 minute).
  • Let it run organically at planned time (should be a minute after created).
  • Run it manually from the button in the Scheduled Tasks manager.

Actual result BEFORE applying this Pull Request

  • Everything works as expected; but:

  • TaskOption::type doesn't make sense.

  • Poor IDE support for $taskOption->{property} since they're accessed only through TaskOption::__get().

Expected result AFTER applying this Pull Request

  • Everything works as expected; but:

  • TaskOption::id makes more sense.

  • IDE doesn't complain about valid $taskOption->{property{ reads.

Documentation Changes Required

-

avatar ditsuke ditsuke - open - 1 Jan 2022
avatar ditsuke ditsuke - change - 1 Jan 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 1 Jan 2022
Category Administration
avatar bembelimen bembelimen - change - 1 Jan 2022
Labels Added: ?
avatar ditsuke
ditsuke - comment - 15 Jan 2022

Tests, please!

avatar ditsuke ditsuke - change - 31 Jan 2022
The description was changed
avatar ditsuke ditsuke - edited - 31 Jan 2022
avatar Quy
Quy - comment - 2 Feb 2022

Create a new task.

Cannot use object of type Joomla\CMS\Object\CMSObject as array

JROOT\administrator\components\com_scheduler\src\Traits\TaskPluginTrait.php:214

avatar ditsuke
ditsuke - comment - 2 Feb 2022

Create a new task.

Cannot use object of type Joomla\CMS\Object\CMSObject as array

JROOT\administrator\components\com_scheduler\src\Traits\TaskPluginTrait.php:214

@Quy should be resolved with 0525674. Requesting a retest.

avatar Quy
Quy - comment - 2 Feb 2022

Manually running the task.

36516

avatar ditsuke
ditsuke - comment - 3 Feb 2022

Manually running the task.

36516

@Quy I'm unable to reproduce. Can you please share the configuration of the failing task?

Edit: I succeeding in reproducing.

avatar ditsuke
ditsuke - comment - 3 Feb 2022

@Quy apologies, my efforts to test were being hampered by an outdated JS build and changes from #36518! We should be good to go now with 56d5b7b ?

avatar Quy Quy - test_item - 3 Feb 2022 - Tested successfully
avatar Quy
Quy - comment - 3 Feb 2022

I have tested this item successfully on 56d5b7b


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

avatar jwaisner jwaisner - test_item - 23 Feb 2022 - Tested successfully
avatar jwaisner
jwaisner - comment - 23 Feb 2022

I have tested this item successfully on 56d5b7b


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

avatar jwaisner jwaisner - change - 23 Feb 2022
Status Pending Ready to Commit
avatar jwaisner
jwaisner - comment - 23 Feb 2022

RTC


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

avatar bembelimen
bembelimen - comment - 3 Mar 2022

I guess this will break all 3rd party extension, using ->type already, so you need to add the fallback into the magic get method (if "type" use "id") and deprecate it the same moment to make it work.

avatar ditsuke ditsuke - change - 3 Mar 2022
Labels Added: ? ?
avatar ditsuke
ditsuke - comment - 3 Mar 2022

I guess this will break all 3rd party extension, using ->type already, so you need to add the fallback into the magic get method (if "type" use "id") and deprecate it the same moment to make it work.

@bembelimen added back with deprecated status. Please review.

avatar ditsuke ditsuke - change - 5 Mar 2022
Labels Removed: ?
avatar richard67
richard67 - comment - 11 Mar 2022

@bembelimen Does it need 2 tests again? Or is it ok to keep RTC and you review?

avatar bembelimen
bembelimen - comment - 11 Mar 2022

We should use the log class instead throwing a PHP depreciation:

https://github.com/joomla/joomla-cms/blob/4.1-dev/libraries/src/Application/CMSApplication.php#L418

Then review is enough

avatar richard67
richard67 - comment - 11 Mar 2022

We should use the log class instead throwing a PHP depreciation:

https://github.com/joomla/joomla-cms/blob/4.1-dev/libraries/src/Application/CMSApplication.php#L418

Then review is enough

@ditsuke Could you implement that suggestion? Thanks in advance.

avatar ditsuke ditsuke - change - 12 Mar 2022
Labels Added: ?
avatar ditsuke
ditsuke - comment - 12 Mar 2022

@richard67 thanks for tagging. Implemented with ef13678.

avatar bembelimen bembelimen - change - 12 Mar 2022
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2022-03-12 09:34:54
Closed_By bembelimen
avatar bembelimen bembelimen - close - 12 Mar 2022
avatar bembelimen bembelimen - merge - 12 Mar 2022
avatar bembelimen
bembelimen - comment - 12 Mar 2022

Thx

avatar ditsuke
ditsuke - comment - 12 Mar 2022

thanks

Add a Comment

Login with GitHub to post a comment