final class UnrecognizedField extends PersisterException
{
public static function byName(string $field): self
{
return new self(sprintf('Unrecognized field: %s', $field));
}
}
}
continue;
}
throw UnrecognizedField::byName($fieldName);
}
return ' ORDER BY ' . implode(', ', $orderByList);
}
if (isset($assoc['orderBy'])) {
$orderBy = $assoc['orderBy'];
}
if ($orderBy) {
$orderBySql = $this->getOrderBySQL($orderBy, $this->getSQLTableAlias($this->class->name));
}
$conditionSql = $criteria instanceof Criteria
? $this->getSelectConditionCriteriaSQL($criteria)
: $this->getSelectConditionSQL($criteria, $assoc);
*/
public function loadAll(array $criteria = [], ?array $orderBy = null, $limit = null, $offset = null)
{
$this->switchPersisterContext($offset, $limit);
$sql = $this->getSelectSQL($criteria, null, null, $limit, $offset, $orderBy);
[$params, $types] = $this->expandParameters($criteria);
$stmt = $this->conn->executeQuery($sql, $params, $types);
$hydrator = $this->em->newHydrator($this->currentPersisterContext->selectJoinSql ? Query::HYDRATE_OBJECT : Query::HYDRATE_SIMPLEOBJECT);
*/
public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null)
{
$persister = $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName);
return $persister->loadAll($criteria, $orderBy, $limit, $offset);
}
/**
* Finds a single entity by a set of criteria.
*
#[Route('blog/tag/{word}', name: 'base_front_blog_noteslistwithkeyword')]
public function notesListWithKeywordAction(ManagerRegistry $doctrine, $word)
{
$keywords = $doctrine->getRepository(BlogKeyword::class)->findBy(
['name' => $word],
['publishedDate' => 'DESC']
);
$blogNotes = $doctrine->getRepository(BlogNote::class)->findBlogPostsForKeyword($keywords);
$bestAuthors = $doctrine->getRepository(BlogNote::class)->findMostPostedAuthors();
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response, $event);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Throwable $e) {
if ($e instanceof \Error && !$this->handleAllThrowables) {
throw $e;
}
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
$this->request = $request;
}
public function run(): int
{
$response = $this->kernel->handle($this->request);
$response->send();
if ($this->kernel instanceof TerminableInterface) {
$this->kernel->terminate($this->request, $response);
}
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
<?php
use App\Kernel;
use Symfony\Component\HttpFoundation\Request;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
$request = Request::createFromGlobals();
if($request->getClientIp() == "95.217.17.2") {
No log messages
UnrecognizedField
|
---|
Doctrine\ORM\Persisters\Exception\UnrecognizedField: Unrecognized field: publishedDate at vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Exception/UnrecognizedField.php:15 at Doctrine\ORM\Persisters\Exception\UnrecognizedField::byName() (vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:1202) at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->getOrderBySQL() (vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:1087) at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->getSelectSQL() (vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/Entity/BasicEntityPersister.php:914) at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->loadAll() (vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:225) at Doctrine\ORM\EntityRepository->findBy() (src/Controller/Front/BlogController.php:168) at App\Controller\Front\BlogController->notesListWithKeywordAction() (vendor/symfony/http-kernel/HttpKernel.php:163) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:74) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:184) at Symfony\Component\HttpKernel\Kernel->handle() (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35) at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (vendor/autoload_runtime.php:29) at require_once('/home/adopt/web/adopciaki.pl/public_html/vendor/autoload_runtime.php') (public/index.php:6) |