J4 Issue ?
avatar twister65
twister65
30 Jun 2019

Steps to reproduce the issue

Install the latest nightly build of Joomla 4 (alpha11).
https://developer.joomla.org/nightly-builds.html#joomla-40

Open a terminal, go to the Joomla root folder, and type:
php cli/joomla/php list

Expected result

Something like that:

Joomla! 4.0.0-alpha10-dev

Usage:
command [options] [arguments]

Options:
-h, --help Display the help information
-q, --quiet Flag indicating that all output should be silenced
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Flag to disable interacting with the user
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
help Show the help for a command
list List the application's available commands
cache
cache:clean Cleans expired cache entries
database
database:export Exports the database
database:import Import the database
session
session:gc Performs session garbage collection
session:metadata:gc Performs session metadata garbage collection
update
update:extensions:check Checks for pending extension updates
update:joomla:remove-old-files Removes old system files

Actual result

PHP Fatal error: Declaration of Joomla\CMS\Application\ConsoleApplication::doExecute() must be compatible with Joomla\Console\Application::doExecute(): int in /var/www/html/alpha11/libraries/src/Application/ConsoleApplication.php on line 32
PHP Stack trace:
PHP 1. {main}() /var/www/html/alpha11/cli/joomla.php:0
PHP 2. Joomla\DI\Container->get() /var/www/html/alpha11/cli/joomla.php:67
PHP 3. Joomla\DI\ContainerResource->getInstance() /var/www/html/alpha11/libraries/vendor/joomla/di/src/Container.php:96
PHP 4. Joomla\CMS\Service\Provider\Application->Joomla\CMS\Service\Provider{closure}() /var/www/html/alpha11/libraries/vendor/joomla/di/src/ContainerResource.php:176
PHP 5. spl_autoload_call() /var/www/html/alpha11/libraries/src/Service/Provider/Application.php:105
PHP 6. Joomla\CMS\Autoload\ClassLoader->loadClass() /var/www/html/alpha11/libraries/src/Service/Provider/Application.php:105
PHP 7. Composer\Autoload\ClassLoader->loadClass() /var/www/html/alpha11/libraries/src/Autoload/ClassLoader.php:56
PHP 8. Composer\Autoload\includeFile() /var/www/html/alpha11/libraries/vendor/composer/ClassLoader.php:322
PHP 9. include() /var/www/html/alpha11/libraries/vendor/composer/ClassLoader.php:444

System information (as much as possible)

Database Type mysql
Database Version 10.3.16-MariaDB-1:10.3.16+maria~bionic
Database Collation utf8mb4_general_ci
Database Connection Collation utf8mb4_general_ci
PHP Version 7.2.19-0ubuntu0.18.04.1
Joomla! Version Joomla! 4.0.0-alpha11-dev Development [ Amani ] 29-June-2019 11:27 GMT

Additional comments

It worked fine with Joomla! 4.0.0-alpha10

avatar twister65 twister65 - open - 30 Jun 2019
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jun 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Jun 2019
avatar twister65 twister65 - change - 30 Jun 2019
Title
[4.0] CLI Joomla fatal error
[4.0] CLI Joomla Console fatal error
avatar twister65 twister65 - edited - 30 Jun 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Jun 2019
Labels Added: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 30 Jun 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 30 Jun 2019
Status New Discussion
avatar twister65
twister65 - comment - 30 Jun 2019
avatar mbabker
mbabker - comment - 30 Jun 2019

Not my fault people don't test things when running a composer update.

avatar ghazal
ghazal - comment - 1 Jul 2019

@twister65
Did you try a new install via git ?

git clone --depth=1 -b 4.0-dev https://github.com/joomla/joomla-cms/

then update composer.json with mbabker instructions, or:

composer require joomla/console "~2.0@dev"
avatar mbabker
mbabker - comment - 1 Jul 2019

Again, the problem has nothing to do with outdated Composer dependencies. As mentioned by the error message in this issue, this comment from @twister65, and this comment from me the libraries/src/Application/ConsoleApplication.php file needs to be updated to match a change made in an upstream repository. No amount of composer update runs is going to fix files in this repository.

avatar HLeithner
HLeithner - comment - 1 Jul 2019

Closed we have a pull request #25391

avatar HLeithner HLeithner - close - 1 Jul 2019
avatar HLeithner HLeithner - change - 1 Jul 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-07-01 19:24:00
Closed_By HLeithner

Add a Comment

Login with GitHub to post a comment