container->get($validator); } catch (ContainerExceptionInterface $e) { //ignore and continue $this->logger->info('Could not get validator from container', ['validator' => $validator, 'exception' => $e]); continue; } try { $instance->validate($password, $context); } catch (HintException $e) { $errors[] = $e->getMessage(); $hints[] = $e->getHint(); } } if (!empty($errors)) { throw new HintException( implode(' ', $errors), implode(' ', $hints) ); } } }