N°7920 - laminas-mail is an abandoned package, replace it with symfony/mailer (#742)

* N°7920 - laminas-mail is an abandoned package, replace it with symfony/mailer

* Fix composer following merge
This commit is contained in:
Stephen Abello
2025-09-17 16:04:20 +02:00
committed by GitHub
parent 8982f7e0e3
commit 428d2c6356
645 changed files with 20889 additions and 81911 deletions

View File

@@ -26,16 +26,15 @@ class_exists(NotFoundExceptionInterface::class);
*/
trait ServiceLocatorTrait
{
private array $factories;
private array $loading = [];
private array $providedTypes;
/**
* @param array<string, callable> $factories
*/
public function __construct(array $factories)
{
$this->factories = $factories;
public function __construct(
private array $factories,
) {
}
public function has(string $id): bool
@@ -91,16 +90,16 @@ trait ServiceLocatorTrait
} else {
$last = array_pop($alternatives);
if ($alternatives) {
$message = sprintf('only knows about the "%s" and "%s" services.', implode('", "', $alternatives), $last);
$message = \sprintf('only knows about the "%s" and "%s" services.', implode('", "', $alternatives), $last);
} else {
$message = sprintf('only knows about the "%s" service.', $last);
$message = \sprintf('only knows about the "%s" service.', $last);
}
}
if ($this->loading) {
$message = sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s', end($this->loading), $id, $message);
$message = \sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s', end($this->loading), $id, $message);
} else {
$message = sprintf('Service "%s" not found: the current service locator %s', $id, $message);
$message = \sprintf('Service "%s" not found: the current service locator %s', $id, $message);
}
return new class($message) extends \InvalidArgumentException implements NotFoundExceptionInterface {
@@ -109,7 +108,7 @@ trait ServiceLocatorTrait
private function createCircularReferenceException(string $id, array $path): ContainerExceptionInterface
{
return new class(sprintf('Circular reference detected for service "%s", path: "%s".', $id, implode(' -> ', $path))) extends \RuntimeException implements ContainerExceptionInterface {
return new class(\sprintf('Circular reference detected for service "%s", path: "%s".', $id, implode(' -> ', $path))) extends \RuntimeException implements ContainerExceptionInterface {
};
}
}