Hi,
something in the moving of libraries (#17441) breaks the JInputCLI alias for CLI scripts.
Run a CLI script, it should find JInputCLI by invoking
$var = new JInputCLI();
It finds JInputCLI.
It does not find JInputCLI.
Application breaks.
I attach a test cli script (based on this script by Nicholas) that finds JInputCLI on a 3.7.4 and below but does not in 3.8.0 beta 1.
To run the the test, put the file in the cli folder of a joomla and run
php cli/jinputcli-test.php
I have found a workaround using this
if (class_exists('JInputCLI'))
{
echo "JInputCLI exists\n";
$this->input = new JInputCLI();
}
else
{
echo "JInputCLI does NOT exist\n";
$this->input = new \Joomla\CMS\Input\Cli();
}
Is this expected behaviour? Or do we have to include other class loader, on top of JLoader::import('joomla.application.cli')
?
If it is not expected, maybe other aliases are affected.
Labels |
Added:
?
|
Category | ⇒ | Libraries |
Labels |
Added:
?
|
Labels |
Removed:
?
|
Status | New | ⇒ | Information Required |
@cheiff if Information solves Issue please close it, thanks.
OK. Thank you.
Status | Information Required | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-08-14 09:50:02 |
Closed_By | ⇒ | cheiff |
Since 3.2.0 the correct casing of the class name has been
JInputCli
and that's what it must be called as for the class aliasing system to correctly pick it up.