Answer the question
In order to leave comments, you need to log in
Controller without Symfony\Bundle\FrameworkBundle\Controller\Controller?
If my controller does not inherit the class, then it gives an error 500, this is what it writes in the logs.
2018/08/09 20:50:14 [error] 539#539: *1216 FastCGI sent in stderr: "\ORM\Query\P
arser->parse() /var/www/sitename/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php:28
3
PHP message: PHP 25. Doctrine\ORM\Query\Parser->getAST() /var/www/sitename/vendor
/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:359
PHP message: PHP 26. Doctrine\ORM\Query\Parser->QueryLanguage() /var/www/sitename
/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:260
PHP message: PHP 27. Doctrine\ORM\Query\Parser->SelectStatement() /var/www/grab
gg/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:847
PHP message: PHP 28. Doctrine\ORM\Query\Parser->FromClause() /var/www/sitename/ve
ndor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:878
PHP message: PHP 29. Doctrine\ORM\Query\Parser->IdentificationVariableDeclarati
on() /var/www/sitename/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:1319
PHP message: PHP 30. Doctrine\ORM\Query\Parser->RangeVariableDeclaration() /var
/www/sitename/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:1584
PHP message: PHP 31. Doctrine\ORM\EntityManager->getClassMetadata() /var/www/gr
abgg/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php:1742
PHP message: PHP 32. Doctrine\ORM\Mapping\ClassMetadataFactory->getMetadataFor(
) /var/www/sitename/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:283
PHP message: PHP 33. Doctrine\ORM\Mapping\ClassMetadataFactory->loadMetadata()
/var/www/sitename/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapp
ing/AbstractClassMetadataFactory.php:183
PHP message: PHP 34. Doctrine\ORM\Mapping\ClassMetadataFactory->loadMetadata()
/var/www/sitename/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactor
y.php:78
PHP message: PHP 35. Doctrine\ORM\Mapping\ClassMetadataFactory->doLoadMetadata(
) /var/www/sitename/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Ma
pping/AbstractClassMetadataFactory.php:305
....
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;
class AdminBaseController
{
/**
* @var EngineInterface
*/
protected $templateEngine;
/**
* self constructor.
*
* @param EngineInterface $templateEngine
*/
public function __construct(
EngineInterface $templateEngine
) {
$this->templateEngine = $templateEngine;
}
Answer the question
In order to leave comments, you need to log in
the decision turned out to be elementary, it was necessary to sit and think only how it would work under the hood.
<service id="App\Application\Controller\AdminPanel\Auth\LogInController"
public="true"
>
<tag name="controller.service_arguments" />
</service>
<service id="App\Application\Controller\AdminPanel\AdminBaseController"
public="true"
>
<tag name="controller.service_arguments" />
</service>
framework:
templating:
engine: ['twig']
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question