? Pending

User tests: Successful: Unsuccessful:

avatar twister65
twister65
30 Jun 2019

Pull Request for Issue #23845.

Summary of Changes

Use the getName function instead of getClientId function in the system/debug plugin.
Add the getName function in the ConsoleApplication class.
See the @SniperSister comment:
#23859 (comment)

Testing Instructions

Enable Debug System.
And try:
php cli/joomla.php list

avatar twister65 twister65 - open - 30 Jun 2019
avatar twister65 twister65 - change - 30 Jun 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jun 2019
Category Libraries
avatar twister65 twister65 - change - 30 Jun 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jun 2019
Category Libraries Administration Libraries
avatar SharkyKZ
SharkyKZ - comment - 30 Jun 2019

IMO, would be better to use application name. ID is so meaningless.

avatar richard67
richard67 - comment - 30 Jun 2019

@twister65 When doing a php cli/joomla.php list, I get a PHP fatal error in any case, with and without your PR applied, and with and without the debug system on:

PHP Fatal error: Declaration of Joomla\CMS\Application\ConsoleApplication::doExecute() must be compatible with Joomla\Console\Application::doExecute(): int in /home/richard/lamp/public_html/joomla-cms-4.0-dev/libraries/src/Application/ConsoleApplication.php on line 32

Am I making some mistake?

avatar mbabker
mbabker - comment - 30 Jun 2019

#25374

TL;DR someone needs to update the console application class to add missing typehints added to new API since the PHP minimum was raised from 7.0 to 7.2.

avatar richard67
richard67 - comment - 30 Jun 2019

Thanks Michael.

avatar richard67
richard67 - comment - 30 Jun 2019

@mbabker and/or @wilsonge Am I wrong or does the composer.json of J4 point to a 2.0-dev branch of the framework's console package (joomla/console), and that branch does not exist, so the console package is never updated with a composer update joomla/console in J4?

Sorry, was wrong.

avatar twister65
twister65 - comment - 30 Jun 2019

@richard67 , to test you can replace this line:
https://github.com/twister65/joomla-cms/blob/bd271abc484a5ac25a5d1d365d20440d9dafc3e9/libraries/src/Application/ConsoleApplication.php#L126
by:
protected function doExecute(): int

waiting for a new PR...

avatar richard67
richard67 - comment - 30 Jun 2019

@mbabker Hmm, composer update for the console package does not do anything. Maybe my previous comment was not so wrong?

avatar richard67
richard67 - comment - 30 Jun 2019

@twister65 To fix that 1 line leads to the next error, so it needs to pull the latest changes from the framework for the console package. But a composer update does not do anything, so I think there is something wrong, see my comments above. If that will be done, I am sure also #25374 will be fixed.

avatar mbabker
mbabker - comment - 30 Jun 2019

If a composer update is not doing anything then that means the CMS already has the latest code. The problem is not needing another composer update, the problem is the CMS subclass of Joomla\Console\Application needs updates to match changes from the parent repo.

avatar richard67
richard67 - comment - 30 Jun 2019

I see, thanks again Michael.
To all: Is there already anybody working on that?

avatar richard67
richard67 - comment - 1 Jul 2019

PR for synching the function signatures in the subclass of the console application to the changes in the framework package as explained by Michael is PR #25391 . Thanks to @HLeithner for that.

@twister65 That PR is requirement for this PR here to be tested. Please test it.

avatar richard67
richard67 - comment - 1 Jul 2019

@twister65 P.S.: When that other PR will be merged, you will have to rebase this here and solve merge conflicts.

avatar joomla-cms-bot joomla-cms-bot - change - 2 Jul 2019
Category Libraries Administration Administration Libraries Front End Plugins
avatar twister65 twister65 - change - 2 Jul 2019
Title
[4.0] Implement the getClientId function in the ConsoleApplication class
[4.0] Implement the getName function in the ConsoleApplication class
avatar twister65 twister65 - edited - 2 Jul 2019
avatar twister65 twister65 - change - 2 Jul 2019
The description was changed
avatar twister65 twister65 - edited - 2 Jul 2019
avatar richard67 richard67 - test_item - 2 Jul 2019 - Tested successfully
avatar richard67
richard67 - comment - 2 Jul 2019

I have tested this item successfully on 262e350


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

avatar richard67
richard67 - comment - 2 Jul 2019

I have tested this item successfully on 262e350


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

avatar wilsonge wilsonge - close - 2 Jul 2019
avatar wilsonge wilsonge - merge - 2 Jul 2019
avatar wilsonge wilsonge - change - 2 Jul 2019
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-07-02 22:58:25
Closed_By wilsonge
avatar wilsonge
wilsonge - comment - 2 Jul 2019

Thanks!

Add a Comment

Login with GitHub to post a comment