[2.0] Fixed reporting issue with TaskNamespace and some small cosmetic changes
This commit is contained in:
parent
64077ac65f
commit
af63f2cb6d
@ -237,7 +237,7 @@ class TaskNamespace extends AbstractNamespace
|
||||
$message .= PHP_EOL . PHP_EOL . $e->getTraceAsString();
|
||||
}
|
||||
|
||||
$printer->writeln($messageMessage, 'ERROR');
|
||||
$printer->writeln($message, 'ERROR');
|
||||
|
||||
// Unable instantiate task or task is not valid
|
||||
if ($task !== null) {
|
||||
|
@ -457,11 +457,13 @@ class EntityManager
|
||||
|
||||
$metadata = $this->getClassMetadata($entityName);
|
||||
$customRepositoryClassName = $metadata->getCustomRepositoryClass();
|
||||
|
||||
if ($customRepositoryClassName !== null) {
|
||||
$repository = new $customRepositoryClassName($this, $metadata);
|
||||
} else {
|
||||
$repository = new EntityRepository($this, $metadata);
|
||||
}
|
||||
|
||||
$this->_repositories[$entityName] = $repository;
|
||||
|
||||
return $repository;
|
||||
@ -476,8 +478,8 @@ class EntityManager
|
||||
public function contains($entity)
|
||||
{
|
||||
return $this->_unitOfWork->isScheduledForInsert($entity) ||
|
||||
$this->_unitOfWork->isInIdentityMap($entity) &&
|
||||
! $this->_unitOfWork->isScheduledForDelete($entity);
|
||||
$this->_unitOfWork->isInIdentityMap($entity) &&
|
||||
! $this->_unitOfWork->isScheduledForDelete($entity);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -536,6 +538,7 @@ class EntityManager
|
||||
if ( ! isset($this->_hydrators[$hydrationMode])) {
|
||||
$this->_hydrators[$hydrationMode] = $this->newHydrator($hydrationMode);
|
||||
}
|
||||
|
||||
return $this->_hydrators[$hydrationMode];
|
||||
}
|
||||
|
||||
@ -563,6 +566,7 @@ class EntityManager
|
||||
default:
|
||||
throw ORMException::invalidHydrationMode($hydrationMode);
|
||||
}
|
||||
|
||||
return $hydrator;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user