Exceptions
Exception
TypeError
*/
#[ReturnTypeWillChange]
public function setValue($object, $value = null)
{
if (! ($object instanceof Proxy && ! $object->__isInitialized())) {
parent::setValue($object, $value);
return;
}
if ($object instanceof CommonProxy) {
in
vendor/doctrine/persistence/src/Persistence/Reflection/RuntimeReflectionProperty.php
->
setValue
(line 61)
*/
#[ReturnTypeWillChange]
public function setValue($object, $value = null)
{
if (! ($object instanceof Proxy && ! $object->__isInitialized())) {
parent::setValue($object, $value);
return;
}
if ($object instanceof CommonProxy) {
in
vendor/doctrine/orm/src/UnitOfWork.php
->
setValue
(line 2978)
}
}
foreach ($data as $field => $value) {
if (isset($class->fieldMappings[$field])) {
$class->reflFields[$field]->setValue($entity, $value);
}
}
// Loading the entity right here, if its in the eager loading map get rid of it there.
unset($this->eagerLoadingEntities[$class->rootEntityName][$idHash]);
in
vendor/doctrine/orm/src/Internal/Hydration/SimpleObjectHydrator.php
->
createEntity
(line 173)
if (isset($this->_hints[Query::HINT_REFRESH_ENTITY])) {
$this->registerManaged($this->class, $this->_hints[Query::HINT_REFRESH_ENTITY], $data);
}
$uow = $this->_em->getUnitOfWork();
$entity = $uow->createEntity($entityName, $data, $this->_hints);
$result[] = $entity;
if (isset($this->_hints[Query::HINT_INTERNAL_ITERATION]) && $this->_hints[Query::HINT_INTERNAL_ITERATION]) {
$this->_uow->hydrationComplete();
in
vendor/doctrine/orm/src/Internal/Hydration/SimpleObjectHydrator.php
->
hydrateRowData
(line 65)
protected function hydrateAllData()
{
$result = [];
while ($row = $this->statement()->fetchAssociative()) {
$this->hydrateRowData($row, $result);
}
$this->_em->getUnitOfWork()->triggerEagerLoads();
return $result;
in
vendor/doctrine/orm/src/Internal/Hydration/AbstractHydrator.php
->
hydrateAllData
(line 272)
$this->_em->getEventManager()->addEventListener([Events::onClear], $this);
$this->prepare();
try {
$result = $this->hydrateAllData();
} finally {
$this->cleanup();
}
return $result;
in
vendor/doctrine/orm/src/Persisters/Entity/BasicEntityPersister.php
->
hydrateAll
(line 948)
[$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);
return $hydrator->hydrateAll($stmt, $this->currentPersisterContext->rsm, [UnitOfWork::HINT_DEFEREAGERLOAD => true]);
}
/**
* {@inheritDoc}
*/
in
vendor/doctrine/orm/src/EntityRepository.php
->
loadAll
(line 225)
*/
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.
*
foreach ($prods as $k => $v) {
$ids[] = $v['id'];
}
$prods = $this->findBy(['id' => $ids]);
foreach ($prods as $k => $prod) {
$prods[$k]->prices = $this->ModelProd->getPrices($prod);
}
}
$showcont = 0;
}
$show_prods = $this->Prods->prodArrayToEntity($show_prods);
if ($request->get('order') == 'prior') {
uasort($show_prods, '\App\Repository\ProdRepository::sortByPriorDesc');
} elseif ($request->get('order') == 'changed' || (empty($request->get('order')) && $spec == 'new')) {
uasort($show_prods, '\App\Repository\ProdRepository::sortByChangedAsc');
in
vendor/symfony/http-kernel/HttpKernel.php
->
prodList
(line 163)
$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);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 75)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 202)
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
in
vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php
->
handle
(line 86)
if (!IpUtils::checkIp('127.0.0.1', $trustedProxies)) {
Request::setTrustedProxies(array_merge($trustedProxies, ['127.0.0.1']), Request::getTrustedHeaderSet());
}
try {
return $kernel->handle($request, $type, $catch);
} finally {
// restore global state
Request::setTrustedProxies($trustedProxies, $trustedHeaderSet);
}
}
in
vendor/symfony/http-kernel/HttpCache/HttpCache.php
::
handle
(line 457)
if ($this->surrogate) {
$this->surrogate->addSurrogateCapability($request);
}
// always a "master" request (as the real master request can be in cache)
$response = SubRequestHandler::handle($this->kernel, $request, HttpKernelInterface::MAIN_REQUEST, $catch);
/*
* Support stale-if-error given on Responses or as a config option.
* RFC 7234 summarizes in Section 4.2.4 (but also mentions with the individual
* Cache-Control directives) that
in
vendor/symfony/framework-bundle/HttpCache/HttpCache.php
->
forward
(line 71)
protected function forward(Request $request, bool $catch = false, Response $entry = null): Response
{
$this->getKernel()->boot();
$this->getKernel()->getContainer()->set('cache', $this);
return parent::forward($request, $catch, $entry);
}
/**
* Returns an array of options to customize the Cache configuration.
*/
in
vendor/symfony/http-kernel/HttpCache/HttpCache.php
->
forward
(line 430)
// avoid that the backend sends no content
$subRequest->headers->remove('If-Modified-Since');
$subRequest->headers->remove('If-None-Match');
$response = $this->forward($subRequest, $catch);
if ($response->isCacheable()) {
$this->store($request, $response);
}
in
vendor/symfony/http-kernel/HttpCache/HttpCache.php
->
fetch
(line 328)
}
if (null === $entry) {
$this->record($request, 'miss');
return $this->fetch($request, $catch);
}
if (!$this->isFreshEnough($request, $entry)) {
$this->record($request, 'stale');
in
vendor/symfony/http-kernel/HttpCache/HttpCache.php
->
lookup
(line 212)
reload the cache by fetching a fresh response and caching it (if possible).
*/
$this->record($request, 'reload');
$response = $this->fetch($request, $catch);
} else {
$response = $this->lookup($request, $catch);
}
$this->restoreResponseBody($request, $response);
if (HttpKernelInterface::MAIN_REQUEST === $type) {
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 193)
{
if (!$this->booted) {
$container = $this->container ?? $this->preBoot();
if ($container->has('http_cache')) {
return $container->get('http_cache')->handle($request, $type, $catch);
}
}
$this->boot();
++$this->requestStackSize;
in
vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php
->
handle
(line 35)
$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);
}
in
vendor/autoload_runtime.php
->
run
(line 29)
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
require_once('/home/test.dombusin.com/public_html/vendor/autoload_runtime.php')
in
public/index.php
(line 5)
<?php
use App\Kernel;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel('dev', true);
};
Stack Trace
TypeError
|
---|
TypeError: Cannot assign int to property App\Entity\Prod::$numdiscountopt of type array at vendor/doctrine/persistence/src/Persistence/Reflection/RuntimeReflectionProperty.php:61 at ReflectionProperty->setValue() (vendor/doctrine/persistence/src/Persistence/Reflection/RuntimeReflectionProperty.php:61) at Doctrine\Persistence\Reflection\RuntimeReflectionProperty->setValue() (vendor/doctrine/orm/src/UnitOfWork.php:2978) at Doctrine\ORM\UnitOfWork->createEntity() (vendor/doctrine/orm/src/Internal/Hydration/SimpleObjectHydrator.php:173) at Doctrine\ORM\Internal\Hydration\SimpleObjectHydrator->hydrateRowData() (vendor/doctrine/orm/src/Internal/Hydration/SimpleObjectHydrator.php:65) at Doctrine\ORM\Internal\Hydration\SimpleObjectHydrator->hydrateAllData() (vendor/doctrine/orm/src/Internal/Hydration/AbstractHydrator.php:272) at Doctrine\ORM\Internal\Hydration\AbstractHydrator->hydrateAll() (vendor/doctrine/orm/src/Persisters/Entity/BasicEntityPersister.php:948) at Doctrine\ORM\Persisters\Entity\BasicEntityPersister->loadAll() (vendor/doctrine/orm/src/EntityRepository.php:225) at Doctrine\ORM\EntityRepository->findBy() (src/Repository/ProdRepository.php:247) at App\Repository\ProdRepository->prodArrayToEntity() (src/Controller/CatalogController.php:403) at App\Controller\CatalogController->prodList() (vendor/symfony/http-kernel/HttpKernel.php:163) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle() (vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php:86) at Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle() (vendor/symfony/http-kernel/HttpCache/HttpCache.php:457) at Symfony\Component\HttpKernel\HttpCache\HttpCache->forward() (vendor/symfony/framework-bundle/HttpCache/HttpCache.php:71) at Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache->forward() (vendor/symfony/http-kernel/HttpCache/HttpCache.php:430) at Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch() (vendor/symfony/http-kernel/HttpCache/HttpCache.php:328) at Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup() (vendor/symfony/http-kernel/HttpCache/HttpCache.php:212) at Symfony\Component\HttpKernel\HttpCache\HttpCache->handle() (vendor/symfony/http-kernel/Kernel.php:193) 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/test.dombusin.com/public_html/vendor/autoload_runtime.php') (public/index.php:5) |