/** * The Container class. * * @since 1.0 */class Container implements ContainerInterface{ /** * Holds the key aliases. * * Format: * * @since 3.4 */ public function loadClass($class) { if ($result = $this->loader->loadClass($class)) { \JLoader::applyAliasFor($class); } return $result; } * * @since 4.0.0 */ protected static function createContainer(): Container { $container = (new Container()) ->registerServiceProvider(new \Joomla\CMS\Service\Provider\Application()) ->registerServiceProvider(new \Joomla\CMS\Service\Provider\Authentication()) ->registerServiceProvider(new \Joomla\CMS\Service\Provider\CacheController()) ->registerServiceProvider(new \Joomla\CMS\Service\Provider\CaptchaRegistry()) ->registerServiceProvider(new \Joomla\CMS\Service\Provider\Config()) * @since 4.0.0 */ public static function getContainer(): Container { if (!self::$container) { self::$container = self::createContainer(); } return self::$container; } // ... die die();}// Run the application - All executable code should be triggered through this filerequire_once __DIR__ . '/includes/app.php';|
ClassNotFoundError
|
|---|
Symfony\Component\ErrorHandler\Error\ClassNotFoundError:
Attempted to load interface "ContainerInterface" from namespace "Psr\Container".
Did you forget a "use" statement for another namespace?
at /home/samdyer/public_html/libraries/vendor/joomla/di/src/Container.php:22
at include()
(/home/samdyer/public_html/libraries/vendor/composer/ClassLoader.php:576)
at Composer\Autoload\{closure}('/home/samdyer/public_html/libraries/vendor/composer/../joomla/di/src/Container.php')
(/home/samdyer/public_html/libraries/vendor/composer/ClassLoader.php:427)
at Composer\Autoload\ClassLoader->loadClass('Joomla\\DI\\Container')
(/home/samdyer/public_html/libraries/src/Autoload/ClassLoader.php:59)
at Joomla\CMS\Autoload\ClassLoader->loadClass('Joomla\\DI\\Container')
(/home/samdyer/public_html/libraries/src/Factory.php:605)
at Joomla\CMS\Factory::createContainer()
(/home/samdyer/public_html/libraries/src/Factory.php:241)
at Joomla\CMS\Factory::getContainer()
(/home/samdyer/public_html/includes/app.php:35)
at require_once('/home/samdyer/public_html/includes/app.php')
(/home/samdyer/public_html/index.php:51)
|