Conversation
|
Thanks |
|
What is the reason that there is not |
|
@dg In case of: /**
* Returns current test annotations.
*/
public static function getTestAnnotations(): array
{
$trace = debug_backtrace();
$file = $trace[count($trace) - 1]['file'] ?? null;
if ($file === null) {
echo \Tracy\Dumper::toTerminal($trace);
}
return Helpers::parseDocComment($file ? file_get_contents($file) : '') + ['file' => $file];
}First part looks ok: But last part not: Source: Source code: https://github.com/baraja-core/doctrine/blob/master/src/OrmSchemaUpdateTool.php#L24 Called command in Terminal: I think the bug is in my TestCase class, because I should use if (isset($_SERVER['NETTE_TESTER_RUNNER'])) {
$di = Booting::bootForTests()->createContainer();
(new QueryToLatexTest(
$di->getByType(Tokenizer::class),
$di->getByType(QueryNormalizer::class)
))->run();
}I think it's relatively complex problem. Do you understand the principle? |
|
And what is in |
|
@dg I use Nette sandbox: <?php
declare(strict_types=1);
require __DIR__ . '/../vendor/autoload.php';
App\Booting::boot()
->createContainer()
->getByType(Nette\Application\Application::class)
->run();But in OrmSchemaUpdateTool::setContainer($this);
register_shutdown_function([OrmSchemaUpdateTool::class, 'run']);When I think about it, it wasn't very smart. I use it as a hack to call a specific piece of code in CLI mode. |
|
So it is called via |
|
I think yes. |



In case of Doctrine ORM Schema update when all entities are loaded automatically,
$tracewith indexfilecan be undefined.