Nette Dibi Class ‚Dibi\Bridges\Nette\DibiNette22Extension‘ not found
- Domki
- Člen | 310
Ted jsem přes composer stahl nette sandox – nette se mi stahlo 2.2
a nasledne pomoci composer require dibi/dibi 2.2.x stáhl dibi
to se bi objevilo ve slozce vendor.
V tuto chvili to fungovalo, ale když jsem bootstrap upravil na
<?php
<?php
require __DIR__ . '/../vendor/autoload.php';
$configurator = new Nette\Configurator;
//$configurator->setDebugMode(TRUE); // debug mode MUST NOT be enabled on production server
$configurator->enableDebugger(__DIR__ . '/../log');
$configurator->setTempDirectory(__DIR__ . '/../temp');
$configurator->createRobotLoader()
->addDirectory(__DIR__)
->addDirectory(__DIR__ . '/../vendor/others')
->register();
$configurator->onCompile[] = function ($configurator, $compiler) {
$compiler->addExtension('dibi', new Dibi\Bridges\Nette\DibiNette22Extension);
};
$configurator->addConfig(__DIR__ . '/config/config.neon');
$configurator->addConfig(__DIR__ . '/config/config.local.neon');
$container = $configurator->createContainer();
return $container;
?>
Tak mi laděnka píše:
Fatal Error
Class ‚Dibi\Bridges\Nette\DibiNette22Extension‘ not found search►
Source file
File: …\app\bootstrap.php:18
8: $configurator->enableDebugger(__DIR__ . ‚/../log‘);
9:
10: $configurator->setTempDirectory(__DIR__ . ‚/../temp‘);
11:
12: $configurator->createRobotLoader()
13: ->addDirectory(__DIR__)
14: ->addDirectory(__DIR__ . ‚/../vendor/others‘)
15: ->register();
16:
17: $configurator->onCompile[] = function ($configurator, $compiler) {
18: $compiler->addExtension(‚dibi‘, new
Dibi\Bridges\Nette\DibiNette22Extension);
19: };
20:
21: $configurator->addConfig(__DIR__ . ‚/config/config.neon‘);
22: $configurator->addConfig(__DIR__ . ‚/config/config.local.neon‘);
Ten soubor je v cestě:
\vendor\dibi\dibi\dibi\bridges\Nette-2.2\DibiNette22Extension.php
a vypadá :
<?php
<?php
/**
* This file is part of the "dibi" - smart database abstraction layer.
* Copyright (c) 2005 David Grudl (http://davidgrudl.com)
*/
namespace Dibi\Bridges\Nette;
use dibi,
Nette;
/**
* Dibi extension for Nette Framework 2.2. Creates 'connection' & 'panel' services.
*
* @author David Grudl
* @package dibi\nette
*/
class DibiExtension22 extends Nette\DI\CompilerExtension
{
public function loadConfiguration()
{
$container = $this->getContainerBuilder();
$config = $this->getConfig();
.
.
.
?>
Pls Nevítě někdo co s tím?
Díky
- Pavel Macháň
- Člen | 282
Domki napsal(a):
No ok ale ten soubor byl takto stáhlej composerem
Takže mám v ty registraci to změnit na
new Dibi\Bridges\Nette\DibiExtension22);nebo jak?
Tak jasný že použiješ to co tam je a ne to co tam není :D
- Domki
- Člen | 310
no vypadá že to pomohlo
ale ted mi vyskocilo:
Class \MessageRepository used in service ‚message‘ has not been found or is
not instantiable. search►
Source file
File: …\vendor\nette\di\src\DI\ContainerBuilder.php:260
250: }
251: }
252: }
253:
254: // check if services are instantiable
255: foreach ($this->definitions as $name ⇒ $def) {
256: $factory = $def->factory->entity =
$this->normalizeEntity($def->factory->entity);
257:
258: if (is_string($factory) && preg_match(‚#^[\w\\\\]+\z#‘,
$factory) && $factory !== self::THIS_SERVICE) {
259: if (!class_exists($factory) ||
!Reflection\ClassType::from($factory)->isInstantiable()) {
260: throw new ServiceCreationException(„Class $factory used in service
‚$name‘ has not been found or is not instantiable.“);
261: }
262: }
263: }
264:
Co stím?
- David Grudl
- Nette Core | 8233
Tady přímo je návod, jak to použít https://github.com/….sample.neon,
žádné $configurator->onCompile[]
není třeba.
Kde jsi vůbec přišel na to DibiNette22Extension
?