- md5
- 9cb92d1b1d83b459e26d656412b89615
- sha1
- e7ce060e02ca139aa6edb82dd09c4ebe44cdd9f4
- sha256
- 498f938a5a743fb63cf9c32aa3d4e7b4405b2b07fc480665147c22849374d646
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
<?php
/**
* @package Joomla.Installation
* @subpackage Application
*
* @copyright (C) 2022 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
\defined('_JEXEC') or die;
// Define the base path and require the other defines
\define('JPATH_BASE', \dirname(__DIR__));
require_once __DIR__ . '/defines.php';
// Check for presence of vendor dependencies not included in the git repository
if (!file_exists(JPATH_LIBRARIES . '/vendor/autoload.php') || !is_dir(JPATH_ROOT . '/media/vendor')) {
echo 'It looks like you are trying to run Joomla! from our git repository.' . PHP_EOL;
echo 'To do so requires you complete a couple of extra steps first.' . PHP_EOL;
echo 'Please see https://guide.joomla.org/user-manual/hosting/local-environment-setup for further details.' . PHP_EOL;
exit;
}
// Get the framework.
require_once __DIR__ . '/framework.php';
// Check if the default log directory can be written to, add a logger for errors to use it
if (is_writable(JPATH_ADMINISTRATOR . '/logs')) {
\Joomla\CMS\Log\Log::addLogger(
[
'text_file' => 'error.php',
],
\Joomla\CMS\Log\Log::ALL,
['error']
);
}
// Register the Installation application
JLoader::registerNamespace('Joomla\\CMS\\Installation', JPATH_INSTALLATION . '/src', false, false);
// Get the dependency injection container
$container = \Joomla\CMS\Factory::getContainer();
$container->registerServiceProvider(new \Joomla\CMS\Installation\Service\Provider\Application());
/*
* Alias the session service keys to the CLI session service as that is the primary session backend for this application
*
* In addition to aliasing "common" service keys, we also create aliases for the PHP classes to ensure autowiring objects
* is supported. This includes aliases for aliased class names, and the keys for aliased class names should be considered
* deprecated to be removed when the class name alias is removed as well.
*/
$container->alias('session', 'session.cli')
->alias('JSession', 'session.cli')
->alias(\Joomla\CMS\Session\Session::class, 'session.cli')
->alias(\Joomla\Session\Session::class, 'session.cli')
->alias(\Joomla\Session\SessionInterface::class, 'session.cli');
/** @var \Joomla\CMS\Installation\Application\CliInstallationApplication $app */
$app = $container->get(\Joomla\CMS\Installation\Application\CliInstallationApplication::class);
\Joomla\CMS\Factory::$application = $app;
// Instantiate and execute the application
$app->execute();
The same content is in 26 releases, Joomla 6.1.0-beta3 to 6.2.1-rc1. See them all, or every version of this file.