J4 Issue ?
avatar mbabker
mbabker
11 Sep 2019

Steps to reproduce the issue

git checkout 4.0-dev
git pull
composer install
rm libraries/autoload_psr4.php
php cli/joomla.php

Expected result

The CLI application can create the libraries/autoload_psr4.php file and it should not require a web request to do so.

Actual result

Michaels-Mac-mini:joomla-cms mbabker$ php cli/joomla.php 
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8" />
        <meta name="robots" content="noindex,nofollow" />
        <style>                body { background-color: #fff; color: #222; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0; }
                .container { margin: 30px; max-width: 600px; }
                h1 { color: #dc3545; font-size: 24px; }</style>
    </head>
    <body>
                        <div class="container">
                    <h1>Whoops, looks like something went wrong.</h1>
                </div>
    </body>
</html>

System information (as much as possible)

Git SHA 21c74a1, all other specs are immaterial to this issue

Additional comments

class Exception#133 (8) {
  protected $message =>
  string(27) "Failed to start application"
  private $string =>
  string(0) ""
  protected $code =>
  int(500)
  protected $file =>
  string(57) "/Users/mbabker/Sites/joomla-cms/libraries/src/Factory.php"
  protected $line =>
  int(139)
  private $trace =>
  array(11) {
    [0] =>
    array(6) {
      'file' =>
      string(69) "/Users/mbabker/Sites/joomla-cms/libraries/src/Client/ClientHelper.php"
      'line' =>
      int(42)
      'function' =>
      string(14) "getApplication"
      'class' =>
      string(18) "Joomla\CMS\Factory"
      'type' =>
      string(2) "::"
      'args' =>
      array(0) {
        ...
      }
    }
    [1] =>
    array(6) {
      'file' =>
      string(65) "/Users/mbabker/Sites/joomla-cms/libraries/src/Filesystem/File.php"
      'line' =>
      int(354)
      'function' =>
      string(14) "getCredentials"
      'class' =>
      string(30) "Joomla\CMS\Client\ClientHelper"
      'type' =>
      string(2) "::"
      'args' =>
      array(1) {
        ...
      }
    }
    [2] =>
    array(6) {
      'file' =>
      string(58) "/Users/mbabker/Sites/joomla-cms/libraries/namespacemap.php"
      'line' =>
      int(129)
      'function' =>
      string(5) "write"
      'class' =>
      string(26) "Joomla\CMS\Filesystem\File"
      'type' =>
      string(2) "::"
      'args' =>
      array(2) {
        ...
      }
    }
    [3] =>
    array(6) {
      'file' =>
      string(58) "/Users/mbabker/Sites/joomla-cms/libraries/namespacemap.php"
      'line' =>
      int(75)
      'function' =>
      string(18) "writeNamespaceFile"
      'class' =>
      string(17) "JNamespacePsr4Map"
      'type' =>
      string(2) "->"
      'args' =>
      array(1) {
        ...
      }
    }
    [4] =>
    array(6) {
      'file' =>
      string(58) "/Users/mbabker/Sites/joomla-cms/libraries/namespacemap.php"
      'line' =>
      int(91)
      'function' =>
      string(6) "create"
      'class' =>
      string(17) "JNamespacePsr4Map"
      'type' =>
      string(2) "->"
      'args' =>
      array(0) {
        ...
      }
    }
    [5] =>
    array(6) {
      'file' =>
      string(86) "/Users/mbabker/Sites/joomla-cms/libraries/src/Application/ExtensionNamespaceMapper.php"
      'line' =>
      int(33)
      'function' =>
      string(4) "load"
      'class' =>
      string(17) "JNamespacePsr4Map"
      'type' =>
      string(2) "->"
      'args' =>
      array(0) {
        ...
      }
    }
    [6] =>
    array(6) {
      'file' =>
      string(80) "/Users/mbabker/Sites/joomla-cms/libraries/src/Application/ConsoleApplication.php"
      'line' =>
      int(105)
      'function' =>
      string(27) "createExtensionNamespaceMap"
      'class' =>
      string(41) "Joomla\CMS\Application\ConsoleApplication"
      'type' =>
      string(2) "->"
      'args' =>
      array(0) {
        ...
      }
    }
    [7] =>
    array(6) {
      'file' =>
      string(78) "/Users/mbabker/Sites/joomla-cms/libraries/src/Service/Provider/Application.php"
      'line' =>
      int(105)
      'function' =>
      string(11) "__construct"
      'class' =>
      string(41) "Joomla\CMS\Application\ConsoleApplication"
      'type' =>
      string(2) "->"
      'args' =>
      array(5) {
        ...
      }
    }
    [8] =>
    array(6) {
      'file' =>
      string(84) "/Users/mbabker/Sites/joomla-cms/libraries/vendor/joomla/di/src/ContainerResource.php"
      'line' =>
      int(176)
      'function' =>
      string(37) "Joomla\CMS\Service\Provider\{closure}"
      'class' =>
      string(39) "Joomla\CMS\Service\Provider\Application"
      'type' =>
      string(2) "->"
      'args' =>
      array(1) {
        ...
      }
    }
    [9] =>
    array(6) {
      'file' =>
      string(76) "/Users/mbabker/Sites/joomla-cms/libraries/vendor/joomla/di/src/Container.php"
      'line' =>
      int(96)
      'function' =>
      string(11) "getInstance"
      'class' =>
      string(27) "Joomla\DI\ContainerResource"
      'type' =>
      string(2) "->"
      'args' =>
      array(0) {
        ...
      }
    }
    [10] =>
    array(6) {
      'file' =>
      string(46) "/Users/mbabker/Sites/joomla-cms/cli/joomla.php"
      'line' =>
      int(67)
      'function' =>
      string(3) "get"
      'class' =>
      string(19) "Joomla\DI\Container"
      'type' =>
      string(2) "->"
      'args' =>
      array(1) {
        ...
      }
    }
  }
  private $previous =>
  NULL
  public $xdebug_message =>
  string(1899) "
Exception: Failed to start application in /Users/mbabker/Sites/joomla-cms/libraries/src/Factory.php on line 139

Call Stack:
    0.0017     406832   1. {main}() /Users/mbabker/Sites/joomla-cms/cli/joomla.php:0
    0.1086    4523240   2. Joomla\DI\Container->get() /Users/mbabker/Sites/joomla-cms/cli/joomla.php:67
    0.1086    4523240   3. Joomla\DI\ContainerResource->getInstance() /Users/mbabker/Sites/joomla-cms/libraries/vendor/joomla/di/src/Container.php:96
    0.1086    4523240   4. Joomla\CMS\Service\P"...
}
avatar mbabker mbabker - open - 11 Sep 2019
avatar joomla-cms-bot joomla-cms-bot - change - 11 Sep 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 11 Sep 2019
avatar richard67 richard67 - change - 11 Sep 2019
Build staging 4.0-dev
avatar franz-wohlkoenig franz-wohlkoenig - change - 11 Sep 2019
Labels Added: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 11 Sep 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 12 Sep 2019
Status New Discussion
avatar wilsonge
wilsonge - comment - 12 Sep 2019

Thankyou! Nice spot. PR at #26272

avatar wilsonge wilsonge - change - 12 Sep 2019
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2019-09-12 08:11:23
Closed_By wilsonge
avatar wilsonge wilsonge - close - 12 Sep 2019

Add a Comment

Login with GitHub to post a comment