(str_starts_with($method, 'findOneBy')) {
return $this->resolveMagicCall('findOneBy', substr($method, 9), $arguments);
}
if (str_starts_with($method, 'countBy')) {
return $this->resolveMagicCall('count', substr($method, 7), $arguments);
}
throw new BadMethodCallException(sprintf('Undefined method "%s". The method name must start with ' . 'either findBy, findOneBy or countBy!', $method));
}
protected function getEntityName()
{
return $this->_entityName;
}
public function getClassName()
{
return $this->getEntityName();
}
protected function getEntityManager()
{
return $this->_em;
}
protected function getClassMetadata()
{
return $this->_class;
}
public function matching(Criteria $criteria)
{
$persister = $this->_em->getUnitOfWork()->getEntityPersister($this->_entityName);
return new LazyCriteriaCollection($persister, $criteria);
}
private function resolveMagicCall(string $method, string $by, array $arguments)
{
if (!$arguments) {
throw InvalidMagicMethodCall::onMissingParameter($method . $by);
}
if (self::$inflector === null) {
self::$inflector = InflectorFactory::create()->build();
}
$fieldName = lcfirst(self::$inflector->classify($by));
if (!($this->_class->hasField($fieldName) || $this->_class->hasAssociation($fieldName))) {
throw InvalidMagicMethodCall::becauseFieldNotFoundIn($this->_entityName, $fieldName, $method . $by);
}
return $this->{$method}([$fieldName => $arguments[0]], ...array_slice($arguments, 1));
}
}
Fatal error: Uncaught Error: Class "MailPoetVendor\Doctrine\ORM\EntityRepository" not found in /htdocs/wp-content/plugins/mailpoet/lib/Doctrine/Repository.php:37
Stack trace:
#0 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4908): MailPoet\Doctrine\Repository->__construct(Object(MailPoetVendor\Doctrine\ORM\EntityManager))
#1 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(4898): MailPoetGenerated\FreeCachedContainer->getSettingsRepositoryService()
#2 /htdocs/wp-content/plugins/mailpoet/generated/FreeCachedContainer.php(2633): MailPoetGenerated\FreeCachedContainer->getSettingsController2Service()
#3 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(122): MailPoetGenerated\FreeCachedContainer->getInitializerService()
#4 /htdocs/wp-content/plugins/mailpoet/vendor-prefixed/symfony/dependency-injection/Container.php(110): MailPoetVendor\Symfony\Component\DependencyInjection\Container->make('MailPoet\\Config...', 1)
#5 /htdocs/wp-content/plugins/mailpoet/lib/DI/ContainerWrapper.php(39): MailPoetVendor\Symfony\Component\DependencyInjection\Container->get('MailPoet\\Config...')
#6 /htdocs/wp-content/plugins/mailpoet/mailpoet_initializer.php(89): MailPoet\DI\ContainerWrapper->get('MailPoet\\Config...')
#7 /htdocs/wp-content/plugins/mailpoet/mailpoet.php(194): require_once('/htdocs/wp-cont...')
#8 /htdocs/wp-settings.php(545): include_once('/htdocs/wp-cont...')
#9 /htdocs/wp-config.php(85): require_once('/htdocs/wp-sett...')
#10 /htdocs/wp-load.php(50): require_once('/htdocs/wp-conf...')
#11 /htdocs/wp-blog-header.php(13): require_once('/htdocs/wp-load...')
#12 /htdocs/index.php(17): require('/htdocs/wp-blog...')
#13 {main}
thrown in /htdocs/wp-content/plugins/mailpoet/lib/Doctrine/Repository.php on line 37