vendor/symfony/dependency-injection/Container.php line 257

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Symfony package.
  4.  *
  5.  * (c) Fabien Potencier <fabien@symfony.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace Symfony\Component\DependencyInjection;
  11. use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
  12. use Symfony\Component\DependencyInjection\Argument\ServiceLocator as ArgumentServiceLocator;
  13. use Symfony\Component\DependencyInjection\Exception\EnvNotFoundException;
  14. use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
  15. use Symfony\Component\DependencyInjection\Exception\ParameterCircularReferenceException;
  16. use Symfony\Component\DependencyInjection\Exception\RuntimeException;
  17. use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException;
  18. use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
  19. use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
  20. use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
  21. use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
  22. use Symfony\Contracts\Service\ResetInterface;
  23. // Help opcache.preload discover always-needed symbols
  24. class_exists(RewindableGenerator::class);
  25. class_exists(ArgumentServiceLocator::class);
  26. /**
  27.  * Container is a dependency injection container.
  28.  *
  29.  * It gives access to object instances (services).
  30.  * Services and parameters are simple key/pair stores.
  31.  * The container can have four possible behaviors when a service
  32.  * does not exist (or is not initialized for the last case):
  33.  *
  34.  *  * EXCEPTION_ON_INVALID_REFERENCE: Throws an exception (the default)
  35.  *  * NULL_ON_INVALID_REFERENCE:      Returns null
  36.  *  * IGNORE_ON_INVALID_REFERENCE:    Ignores the wrapping command asking for the reference
  37.  *                                    (for instance, ignore a setter if the service does not exist)
  38.  *  * IGNORE_ON_UNINITIALIZED_REFERENCE: Ignores/returns null for uninitialized services or invalid references
  39.  *
  40.  * @author Fabien Potencier <fabien@symfony.com>
  41.  * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  42.  */
  43. class Container implements ResettableContainerInterface
  44. {
  45.     protected $parameterBag;
  46.     protected $services = [];
  47.     protected $privates = [];
  48.     protected $fileMap = [];
  49.     protected $methodMap = [];
  50.     protected $factories = [];
  51.     protected $aliases = [];
  52.     protected $loading = [];
  53.     protected $resolving = [];
  54.     protected $syntheticIds = [];
  55.     private $envCache = [];
  56.     private $compiled false;
  57.     private $getEnv;
  58.     public function __construct(ParameterBagInterface $parameterBag null)
  59.     {
  60.         $this->parameterBag $parameterBag ?? new EnvPlaceholderParameterBag();
  61.     }
  62.     /**
  63.      * Compiles the container.
  64.      *
  65.      * This method does two things:
  66.      *
  67.      *  * Parameter values are resolved;
  68.      *  * The parameter bag is frozen.
  69.      */
  70.     public function compile()
  71.     {
  72.         $this->parameterBag->resolve();
  73.         $this->parameterBag = new FrozenParameterBag($this->parameterBag->all());
  74.         $this->compiled true;
  75.     }
  76.     /**
  77.      * Returns true if the container is compiled.
  78.      *
  79.      * @return bool
  80.      */
  81.     public function isCompiled()
  82.     {
  83.         return $this->compiled;
  84.     }
  85.     /**
  86.      * Gets the service container parameter bag.
  87.      *
  88.      * @return ParameterBagInterface A ParameterBagInterface instance
  89.      */
  90.     public function getParameterBag()
  91.     {
  92.         return $this->parameterBag;
  93.     }
  94.     /**
  95.      * Gets a parameter.
  96.      *
  97.      * @param string $name The parameter name
  98.      *
  99.      * @return array|bool|string|int|float|\UnitEnum|null
  100.      *
  101.      * @throws InvalidArgumentException if the parameter is not defined
  102.      */
  103.     public function getParameter($name)
  104.     {
  105.         return $this->parameterBag->get($name);
  106.     }
  107.     /**
  108.      * Checks if a parameter exists.
  109.      *
  110.      * @param string $name The parameter name
  111.      *
  112.      * @return bool The presence of parameter in container
  113.      */
  114.     public function hasParameter($name)
  115.     {
  116.         return $this->parameterBag->has($name);
  117.     }
  118.     /**
  119.      * Sets a parameter.
  120.      *
  121.      * @param string                                     $name  The parameter name
  122.      * @param array|bool|string|int|float|\UnitEnum|null $value The parameter value
  123.      */
  124.     public function setParameter($name$value)
  125.     {
  126.         $this->parameterBag->set($name$value);
  127.     }
  128.     /**
  129.      * Sets a service.
  130.      *
  131.      * Setting a synthetic service to null resets it: has() returns false and get()
  132.      * behaves in the same way as if the service was never created.
  133.      *
  134.      * @param string      $id      The service identifier
  135.      * @param object|null $service The service instance
  136.      */
  137.     public function set($id$service)
  138.     {
  139.         // Runs the internal initializer; used by the dumped container to include always-needed files
  140.         if (isset($this->privates['service_container']) && $this->privates['service_container'] instanceof \Closure) {
  141.             $initialize $this->privates['service_container'];
  142.             unset($this->privates['service_container']);
  143.             $initialize();
  144.         }
  145.         if ('service_container' === $id) {
  146.             throw new InvalidArgumentException('You cannot set service "service_container".');
  147.         }
  148.         if (!(isset($this->fileMap[$id]) || isset($this->methodMap[$id]))) {
  149.             if (isset($this->syntheticIds[$id]) || !isset($this->getRemovedIds()[$id])) {
  150.                 // no-op
  151.             } elseif (null === $service) {
  152.                 throw new InvalidArgumentException(sprintf('The "%s" service is private, you cannot unset it.'$id));
  153.             } else {
  154.                 throw new InvalidArgumentException(sprintf('The "%s" service is private, you cannot replace it.'$id));
  155.             }
  156.         } elseif (isset($this->services[$id])) {
  157.             throw new InvalidArgumentException(sprintf('The "%s" service is already initialized, you cannot replace it.'$id));
  158.         }
  159.         if (isset($this->aliases[$id])) {
  160.             unset($this->aliases[$id]);
  161.         }
  162.         if (null === $service) {
  163.             unset($this->services[$id]);
  164.             return;
  165.         }
  166.         $this->services[$id] = $service;
  167.     }
  168.     /**
  169.      * Returns true if the given service is defined.
  170.      *
  171.      * @param string $id The service identifier
  172.      *
  173.      * @return bool true if the service is defined, false otherwise
  174.      */
  175.     public function has($id)
  176.     {
  177.         if (isset($this->aliases[$id])) {
  178.             $id $this->aliases[$id];
  179.         }
  180.         if (isset($this->services[$id])) {
  181.             return true;
  182.         }
  183.         if ('service_container' === $id) {
  184.             return true;
  185.         }
  186.         return isset($this->fileMap[$id]) || isset($this->methodMap[$id]);
  187.     }
  188.     /**
  189.      * Gets a service.
  190.      *
  191.      * @param string $id              The service identifier
  192.      * @param int    $invalidBehavior The behavior when the service does not exist
  193.      *
  194.      * @return object|null The associated service
  195.      *
  196.      * @throws ServiceCircularReferenceException When a circular reference is detected
  197.      * @throws ServiceNotFoundException          When the service is not defined
  198.      * @throws \Exception                        if an exception has been thrown when the service has been resolved
  199.      *
  200.      * @see Reference
  201.      */
  202.     public function get($id$invalidBehavior /* self::EXCEPTION_ON_INVALID_REFERENCE */ 1)
  203.     {
  204.         $service $this->services[$id]
  205.             ?? $this->services[$id $this->aliases[$id] ?? $id]
  206.             ?? ('service_container' === $id $this : ($this->factories[$id] ?? [$this'make'])($id$invalidBehavior));
  207.         if (!\is_object($service) && null !== $service) {
  208.             @trigger_error(sprintf('Non-object services are deprecated since Symfony 4.4, please fix the "%s" service which is of type "%s" right now.'$id, \gettype($service)), \E_USER_DEPRECATED);
  209.         }
  210.         return $service;
  211.     }
  212.     /**
  213.      * Creates a service.
  214.      *
  215.      * As a separate method to allow "get()" to use the really fast `??` operator.
  216.      */
  217.     private function make(string $idint $invalidBehavior)
  218.     {
  219.         if (isset($this->loading[$id])) {
  220.             throw new ServiceCircularReferenceException($idarray_merge(array_keys($this->loading), [$id]));
  221.         }
  222.         $this->loading[$id] = true;
  223.         try {
  224.             if (isset($this->fileMap[$id])) {
  225.                 return /* self::IGNORE_ON_UNINITIALIZED_REFERENCE */ === $invalidBehavior null $this->load($this->fileMap[$id]);
  226.             } elseif (isset($this->methodMap[$id])) {
  227.                 return /* self::IGNORE_ON_UNINITIALIZED_REFERENCE */ === $invalidBehavior null $this->{$this->methodMap[$id]}();
  228.             }
  229.         } catch (\Exception $e) {
  230.             unset($this->services[$id]);
  231.             throw $e;
  232.         } finally {
  233.             unset($this->loading[$id]);
  234.         }
  235.         if (/* self::EXCEPTION_ON_INVALID_REFERENCE */ === $invalidBehavior) {
  236.             if (!$id) {
  237.                 throw new ServiceNotFoundException($id);
  238.             }
  239.             if (isset($this->syntheticIds[$id])) {
  240.                 throw new ServiceNotFoundException($idnullnull, [], sprintf('The "%s" service is synthetic, it needs to be set at boot time before it can be used.'$id));
  241.             }
  242.             if (isset($this->getRemovedIds()[$id])) {
  243.                 throw new ServiceNotFoundException($idnullnull, [], sprintf('The "%s" service or alias has been removed or inlined when the container was compiled. You should either make it public, or stop using the container directly and use dependency injection instead.'$id));
  244.             }
  245.             $alternatives = [];
  246.             foreach ($this->getServiceIds() as $knownId) {
  247.                 if ('' === $knownId || '.' === $knownId[0]) {
  248.                     continue;
  249.                 }
  250.                 $lev levenshtein($id$knownId);
  251.                 if ($lev <= \strlen($id) / || str_contains($knownId$id)) {
  252.                     $alternatives[] = $knownId;
  253.                 }
  254.             }
  255.             throw new ServiceNotFoundException($idnullnull$alternatives);
  256.         }
  257.         return null;
  258.     }
  259.     /**
  260.      * Returns true if the given service has actually been initialized.
  261.      *
  262.      * @param string $id The service identifier
  263.      *
  264.      * @return bool true if service has already been initialized, false otherwise
  265.      */
  266.     public function initialized($id)
  267.     {
  268.         if (isset($this->aliases[$id])) {
  269.             $id $this->aliases[$id];
  270.         }
  271.         if ('service_container' === $id) {
  272.             return false;
  273.         }
  274.         return isset($this->services[$id]);
  275.     }
  276.     /**
  277.      * {@inheritdoc}
  278.      */
  279.     public function reset()
  280.     {
  281.         $services $this->services $this->privates;
  282.         $this->services $this->factories $this->privates = [];
  283.         foreach ($services as $service) {
  284.             try {
  285.                 if ($service instanceof ResetInterface) {
  286.                     $service->reset();
  287.                 }
  288.             } catch (\Throwable $e) {
  289.                 continue;
  290.             }
  291.         }
  292.     }
  293.     /**
  294.      * Gets all service ids.
  295.      *
  296.      * @return string[] An array of all defined service ids
  297.      */
  298.     public function getServiceIds()
  299.     {
  300.         return array_map('strval'array_unique(array_merge(['service_container'], array_keys($this->fileMap), array_keys($this->methodMap), array_keys($this->aliases), array_keys($this->services))));
  301.     }
  302.     /**
  303.      * Gets service ids that existed at compile time.
  304.      *
  305.      * @return array
  306.      */
  307.     public function getRemovedIds()
  308.     {
  309.         return [];
  310.     }
  311.     /**
  312.      * Camelizes a string.
  313.      *
  314.      * @param string $id A string to camelize
  315.      *
  316.      * @return string The camelized string
  317.      */
  318.     public static function camelize($id)
  319.     {
  320.         return strtr(ucwords(strtr($id, ['_' => ' ''.' => '_ ''\\' => '_ '])), [' ' => '']);
  321.     }
  322.     /**
  323.      * A string to underscore.
  324.      *
  325.      * @param string $id The string to underscore
  326.      *
  327.      * @return string The underscored string
  328.      */
  329.     public static function underscore($id)
  330.     {
  331.         return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/''/([a-z\d])([A-Z])/'], ['\\1_\\2''\\1_\\2'], str_replace('_''.'$id)));
  332.     }
  333.     /**
  334.      * Creates a service by requiring its factory file.
  335.      */
  336.     protected function load($file)
  337.     {
  338.         return require $file;
  339.     }
  340.     /**
  341.      * Fetches a variable from the environment.
  342.      *
  343.      * @param string $name The name of the environment variable
  344.      *
  345.      * @return mixed The value to use for the provided environment variable name
  346.      *
  347.      * @throws EnvNotFoundException When the environment variable is not found and has no default value
  348.      */
  349.     protected function getEnv($name)
  350.     {
  351.         if (isset($this->resolving[$envName "env($name)"])) {
  352.             throw new ParameterCircularReferenceException(array_keys($this->resolving));
  353.         }
  354.         if (isset($this->envCache[$name]) || \array_key_exists($name$this->envCache)) {
  355.             return $this->envCache[$name];
  356.         }
  357.         if (!$this->has($id 'container.env_var_processors_locator')) {
  358.             $this->set($id, new ServiceLocator([]));
  359.         }
  360.         if (!$this->getEnv) {
  361.             $this->getEnv = \Closure::fromCallable([$this'getEnv']);
  362.         }
  363.         $processors $this->get($id);
  364.         if (false !== $i strpos($name':')) {
  365.             $prefix substr($name0$i);
  366.             $localName substr($name$i);
  367.         } else {
  368.             $prefix 'string';
  369.             $localName $name;
  370.         }
  371.         $processor $processors->has($prefix) ? $processors->get($prefix) : new EnvVarProcessor($this);
  372.         $this->resolving[$envName] = true;
  373.         try {
  374.             return $this->envCache[$name] = $processor->getEnv($prefix$localName$this->getEnv);
  375.         } finally {
  376.             unset($this->resolving[$envName]);
  377.         }
  378.     }
  379.     /**
  380.      * @param string|false $registry
  381.      * @param string|bool  $load
  382.      *
  383.      * @return mixed
  384.      *
  385.      * @internal
  386.      */
  387.     final protected function getService($registrystring $id, ?string $method$load)
  388.     {
  389.         if ('service_container' === $id) {
  390.             return $this;
  391.         }
  392.         if (\is_string($load)) {
  393.             throw new RuntimeException($load);
  394.         }
  395.         if (null === $method) {
  396.             return false !== $registry $this->{$registry}[$id] ?? null null;
  397.         }
  398.         if (false !== $registry) {
  399.             return $this->{$registry}[$id] ?? $this->{$registry}[$id] = $load $this->load($method) : $this->{$method}();
  400.         }
  401.         if (!$load) {
  402.             return $this->{$method}();
  403.         }
  404.         return ($factory $this->factories[$id] ?? $this->factories['service_container'][$id] ?? null) ? $factory() : $this->load($method);
  405.     }
  406.     private function __clone()
  407.     {
  408.     }
  409. }
The Swiftmailer URL "null://" is not valid. (500 Internal Server Error)

Symfony Exception

InvalidArgumentException

HTTP 500 Internal Server Error

The Swiftmailer URL "null://" is not valid.

Exception

InvalidArgumentException

  1.             'stream_options' => [],
  2.         ];
  3.         if (isset($options['url'])) {
  4.             if (false === $parts parse_url($options['url'])) {
  5.                 throw new \InvalidArgumentException(sprintf('The Swiftmailer URL "%s" is not valid.'$options['url']));
  6.             }
  7.             if (isset($parts['scheme'])) {
  8.                 $options['transport'] = $parts['scheme'];
  9.             }
  10.             if (isset($parts['user'])) {
  1.      *
  2.      * @throws \InvalidArgumentException if the scheme is not a built-in Swiftmailer transport
  3.      */
  4.     public static function createTransport(array $optionsRequestContext $requestContext null, \Swift_Events_EventDispatcher $eventDispatcher)
  5.     {
  6.         $options = static::resolveOptions($options);
  7.         self::validateConfig($options);
  8.         if ('smtp' === $options['transport']) {
  9.             $smtpAuthHandler = new \Swift_Transport_Esmtp_AuthHandler([
  10.                 new \Swift_Transport_Esmtp_Auth_CramMd5Authenticator(),
  1.         include_once \dirname(__DIR__4).'/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport.php';
  2.         include_once \dirname(__DIR__4).'/vendor/symfony/swiftmailer-bundle/DependencyInjection/SwiftmailerTransportFactory.php';
  3.         include_once \dirname(__DIR__4).'/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/EventDispatcher.php';
  4.         include_once \dirname(__DIR__4).'/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Events/SimpleEventDispatcher.php';
  5.         return $this->services['swiftmailer.mailer.default.transport.real'] = \Symfony\Bundle\SwiftmailerBundle\DependencyInjection\SwiftmailerTransportFactory::createTransport(['transport' => 'smtp''url' => $this->getEnv('MAILER_URL'), 'username' => NULL'password' => NULL'host' => 'localhost''port' => NULL'timeout' => 30'source_ip' => NULL'local_domain' => NULL'encryption' => NULL'auth_mode' => NULL'command' => '/usr/sbin/sendmail -t -i''stream_options' => []], ($this->privates['router.request_context'] ?? $this->getRouter_RequestContextService()), ($this->privates['swiftmailer.mailer.default.transport.eventdispatcher'] ?? ($this->privates['swiftmailer.mailer.default.transport.eventdispatcher'] = new \Swift_Events_SimpleEventDispatcher())));
  6.     }
  7.     /**
  8.      * Gets the public 'swiftmailer.transport' shared service.
  9.      *
in vendor/symfony/dependency-injection/Container.php -> getSwiftmailer_Mailer_Default_Transport_RealService (line 257)
  1.         try {
  2.             if (isset($this->fileMap[$id])) {
  3.                 return /* self::IGNORE_ON_UNINITIALIZED_REFERENCE */ === $invalidBehavior null $this->load($this->fileMap[$id]);
  4.             } elseif (isset($this->methodMap[$id])) {
  5.                 return /* self::IGNORE_ON_UNINITIALIZED_REFERENCE */ === $invalidBehavior null $this->{$this->methodMap[$id]}();
  6.             }
  7.         } catch (\Exception $e) {
  8.             unset($this->services[$id]);
  9.             throw $e;
  1.      */
  2.     public function get($id$invalidBehavior /* self::EXCEPTION_ON_INVALID_REFERENCE */ 1)
  3.     {
  4.         $service $this->services[$id]
  5.             ?? $this->services[$id $this->aliases[$id] ?? $id]
  6.             ?? ('service_container' === $id $this : ($this->factories[$id] ?? [$this'make'])($id$invalidBehavior));
  7.         if (!\is_object($service) && null !== $service) {
  8.             @trigger_error(sprintf('Non-object services are deprecated since Symfony 4.4, please fix the "%s" service which is of type "%s" right now.'$id, \gettype($service)), \E_USER_DEPRECATED);
  9.         }
  1.                     $transport $mailer->getTransport();
  2.                     if ($transport instanceof \Swift_Transport_SpoolTransport) {
  3.                         $spool $transport->getSpool();
  4.                         if ($spool instanceof \Swift_MemorySpool) {
  5.                             try {
  6.                                 $spool->flushQueue($this->container->get(sprintf('swiftmailer.mailer.%s.transport.real'$name)));
  7.                             } catch (\Swift_TransportException $exception) {
  8.                                 if (null !== $this->logger) {
  9.                                     $this->logger->error(sprintf('Exception occurred while flushing email queue: %s'$exception->getMessage()));
  10.                                 }
  11.                             }
  1.         $this->called true;
  2.         $this->priority $dispatcher->getListenerPriority($eventName$this->listener);
  3.         $e $this->stopwatch->start($this->name'event_listener');
  4.         ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         if ($e->isStarted()) {
  6.             $e->stop();
  7.         }
  1.     {
  2.         foreach ($listeners as $listener) {
  3.             if ($event->isPropagationStopped()) {
  4.                 break;
  5.             }
  6.             $listener($event$eventName$this);
  7.         }
  8.     }
  9.     /**
  10.      * Sorts the internal list of listeners for the given event by priority.
  1.      * @param object     $event     The event object to pass to the event handlers/listeners
  2.      */
  3.     protected function callListeners(iterable $listenersstring $eventName$event)
  4.     {
  5.         if ($event instanceof Event) {
  6.             $this->doDispatch($listeners$eventName$event);
  7.             return;
  8.         }
  9.         $stoppable $event instanceof ContractsEvent || $event instanceof StoppableEventInterface;
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     public function terminate(Request $requestResponse $response)
  5.     {
  6.         $this->dispatcher->dispatch(new TerminateEvent($this$request$response), KernelEvents::TERMINATE);
  7.     }
  8.     /**
  9.      * @internal
  10.      */
in vendor/symfony/http-kernel/Kernel.php -> terminate (line 166)
  1.         if (false === $this->booted) {
  2.             return;
  3.         }
  4.         if ($this->getHttpKernel() instanceof TerminableInterface) {
  5.             $this->getHttpKernel()->terminate($request$response);
  6.         }
  7.     }
  8.     /**
  9.      * {@inheritdoc}
Kernel->terminate(object(Request), object(Response)) in public/index.php (line 27)
  1. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  2. $request Request::createFromGlobals();
  3. $response $kernel->handle($request);
  4. $response->send();
  5. $kernel->terminate($request$response);

Logs 2

Level Channel Message
INFO 18:10:14 php User Deprecated: The "Symfony\Component\Debug\DebugClassLoader" class is deprecated since Symfony 4.4, use "Symfony\Component\ErrorHandler\DebugClassLoader" instead.
{
    "exception": {}
}
INFO 18:10:14 request Matched route "_profiler_open_file".
{
    "route": "_profiler_open_file",
    "route_parameters": {
        "_route": "_profiler_open_file",
        "_controller": "web_profiler.controller.profiler::openAction"
    },
    "request_uri": "https://www.upgrade.nrso.ch/_profiler/open?file=vendor%2Fsymfony%2Fdependency-injection%2FContainer.php&line=257",
    "method": "GET"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure".
{
    "event": "kernel.request",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener::configure"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ValidateRequestListener::onKernelRequest".
{
    "event": "kernel.request",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener::onKernelRequest"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\SessionListener::onKernelRequest".
{
    "event": "kernel.request",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\SessionListener::onKernelRequest"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::setDefaultLocale".
{
    "event": "kernel.request",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener::setDefaultLocale"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelRequest".
{
    "event": "kernel.request",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\RouterListener::onKernelRequest"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\ResolveControllerNameSubscriber::resolveControllerName".
{
    "event": "kernel.request",
    "listener": "Symfony\\Bundle\\FrameworkBundle\\EventListener\\ResolveControllerNameSubscriber::resolveControllerName"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "App\EventSubscriber\LocaleSubscriber::onKernelRequest".
{
    "event": "kernel.request",
    "listener": "App\\EventSubscriber\\LocaleSubscriber::onKernelRequest"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelRequest".
{
    "event": "kernel.request",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener::onKernelRequest"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleAwareListener::onKernelRequest".
{
    "event": "kernel.request",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\LocaleAwareListener::onKernelRequest"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener::configureLogoutUrlGenerator".
{
    "event": "kernel.request",
    "listener": "Symfony\\Bundle\\SecurityBundle\\Debug\\TraceableFirewallListener::configureLogoutUrlGenerator"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener::onKernelRequest".
{
    "event": "kernel.request",
    "listener": "Symfony\\Bundle\\SecurityBundle\\Debug\\TraceableFirewallListener::onKernelRequest"
}
DEBUG 18:10:14 event Notified event "kernel.controller" to listener "Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector::onKernelController".
{
    "event": "kernel.controller",
    "listener": "Symfony\\Bundle\\FrameworkBundle\\DataCollector\\RouterDataCollector::onKernelController"
}
DEBUG 18:10:14 event Notified event "kernel.controller" to listener "Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::onKernelController".
{
    "event": "kernel.controller",
    "listener": "Symfony\\Component\\HttpKernel\\DataCollector\\RequestDataCollector::onKernelController"
}
DEBUG 18:10:14 event Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ControllerListener::onKernelController".
{
    "event": "kernel.controller",
    "listener": "Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ControllerListener::onKernelController"
}
DEBUG 18:10:14 event Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ParamConverterListener::onKernelController".
{
    "event": "kernel.controller",
    "listener": "Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ParamConverterListener::onKernelController"
}
DEBUG 18:10:14 event Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\HttpCacheListener::onKernelController".
{
    "event": "kernel.controller",
    "listener": "Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener::onKernelController"
}
DEBUG 18:10:14 event Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::onKernelController".
{
    "event": "kernel.controller",
    "listener": "Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\TemplateListener::onKernelController"
}
DEBUG 18:10:14 event Notified event "kernel.controller_arguments" to listener "Symfony\Component\HttpKernel\EventListener\ErrorListener::onControllerArguments".
{
    "event": "kernel.controller_arguments",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\ErrorListener::onControllerArguments"
}
DEBUG 18:10:14 event Notified event "kernel.controller_arguments" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\SecurityListener::onKernelControllerArguments".
{
    "event": "kernel.controller_arguments",
    "listener": "Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener::onKernelControllerArguments"
}
DEBUG 18:10:14 event Notified event "kernel.controller_arguments" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\IsGrantedListener::onKernelControllerArguments".
{
    "event": "kernel.controller_arguments",
    "listener": "Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\IsGrantedListener::onKernelControllerArguments"
}
DEBUG 18:10:14 event Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\ResponseListener::onKernelResponse".
{
    "event": "kernel.response",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener::onKernelResponse"
}
DEBUG 18:10:14 event Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::onKernelResponse".
{
    "event": "kernel.response",
    "listener": "Symfony\\Component\\HttpKernel\\DataCollector\\RequestDataCollector::onKernelResponse"
}
DEBUG 18:10:14 event Notified event "kernel.response" to listener "Symfony\Component\WebLink\EventListener\AddLinkHeaderListener::onKernelResponse".
{
    "event": "kernel.response",
    "listener": "Symfony\\Component\\WebLink\\EventListener\\AddLinkHeaderListener::onKernelResponse"
}
DEBUG 18:10:14 event Notified event "kernel.response" to listener "Symfony\Component\Security\Http\RememberMe\ResponseListener::onKernelResponse".
{
    "event": "kernel.response",
    "listener": "Symfony\\Component\\Security\\Http\\RememberMe\\ResponseListener::onKernelResponse"
}
DEBUG 18:10:14 event Notified event "kernel.response" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\HttpCacheListener::onKernelResponse".
{
    "event": "kernel.response",
    "listener": "Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener::onKernelResponse"
}
DEBUG 18:10:14 event Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\ProfilerListener::onKernelResponse".
{
    "event": "kernel.response",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\ProfilerListener::onKernelResponse"
}
DEBUG 18:10:14 event Notified event "kernel.response" to listener "Symfony\Bundle\WebProfilerBundle\EventListener\WebDebugToolbarListener::onKernelResponse".
{
    "event": "kernel.response",
    "listener": "Symfony\\Bundle\\WebProfilerBundle\\EventListener\\WebDebugToolbarListener::onKernelResponse"
}
DEBUG 18:10:14 event Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\DisallowRobotsIndexingListener::onResponse".
{
    "event": "kernel.response",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\DisallowRobotsIndexingListener::onResponse"
}
DEBUG 18:10:14 event Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\SessionListener::onKernelResponse".
{
    "event": "kernel.response",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\SessionListener::onKernelResponse"
}
DEBUG 18:10:14 event Notified event "kernel.response" to listener "Symfony\Component\HttpKernel\EventListener\StreamedResponseListener::onKernelResponse".
{
    "event": "kernel.response",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\StreamedResponseListener::onKernelResponse"
}
DEBUG 18:10:14 event Notified event "kernel.finish_request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelFinishRequest".
{
    "event": "kernel.finish_request",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener::onKernelFinishRequest"
}
DEBUG 18:10:14 event Notified event "kernel.finish_request" to listener "Symfony\Component\HttpKernel\EventListener\SessionListener::onFinishRequest".
{
    "event": "kernel.finish_request",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\SessionListener::onFinishRequest"
}
DEBUG 18:10:14 event Notified event "kernel.finish_request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelFinishRequest".
{
    "event": "kernel.finish_request",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\RouterListener::onKernelFinishRequest"
}
DEBUG 18:10:14 event Notified event "kernel.finish_request" to listener "Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener::onKernelFinishRequest".
{
    "event": "kernel.finish_request",
    "listener": "Symfony\\Bundle\\SecurityBundle\\Debug\\TraceableFirewallListener::onKernelFinishRequest"
}
DEBUG 18:10:14 event Notified event "kernel.finish_request" to listener "Symfony\WebpackEncoreBundle\EventListener\ResetAssetsEventListener::resetAssets".
{
    "event": "kernel.finish_request",
    "listener": "Symfony\\WebpackEncoreBundle\\EventListener\\ResetAssetsEventListener::resetAssets"
}
DEBUG 18:10:14 event Notified event "kernel.finish_request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleAwareListener::onKernelFinishRequest".
{
    "event": "kernel.finish_request",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\LocaleAwareListener::onKernelFinishRequest"
}
CRITICAL 18:10:14 request Uncaught PHP Exception InvalidArgumentException: "The Swiftmailer URL "null://" is not valid." at /home/web154/upgrade.nrso.ch/public/www/vendor/symfony/swiftmailer-bundle/DependencyInjection/SwiftmailerTransportFactory.php line 99
{
    "exception": {}
}
DEBUG 18:10:14 event Notified event "kernel.terminate" to listener "Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener::onTerminate".
{
    "event": "kernel.terminate",
    "listener": "Symfony\\Bundle\\SwiftmailerBundle\\EventListener\\EmailSenderListener::onTerminate"
}
CRITICAL 18:10:14 php Uncaught Exception: The Swiftmailer URL "null://" is not valid.
{
    "exception": {}
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::configure".
{
    "event": "kernel.request",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\DebugHandlersListener::configure"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\ValidateRequestListener::onKernelRequest".
{
    "event": "kernel.request",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\ValidateRequestListener::onKernelRequest"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\SessionListener::onKernelRequest".
{
    "event": "kernel.request",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\SessionListener::onKernelRequest"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::setDefaultLocale".
{
    "event": "kernel.request",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener::setDefaultLocale"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\RouterListener::onKernelRequest".
{
    "event": "kernel.request",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\RouterListener::onKernelRequest"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Bundle\FrameworkBundle\EventListener\ResolveControllerNameSubscriber::resolveControllerName".
{
    "event": "kernel.request",
    "listener": "Symfony\\Bundle\\FrameworkBundle\\EventListener\\ResolveControllerNameSubscriber::resolveControllerName"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "App\EventSubscriber\LocaleSubscriber::onKernelRequest".
{
    "event": "kernel.request",
    "listener": "App\\EventSubscriber\\LocaleSubscriber::onKernelRequest"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelRequest".
{
    "event": "kernel.request",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\LocaleListener::onKernelRequest"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Component\HttpKernel\EventListener\LocaleAwareListener::onKernelRequest".
{
    "event": "kernel.request",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\LocaleAwareListener::onKernelRequest"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener::configureLogoutUrlGenerator".
{
    "event": "kernel.request",
    "listener": "Symfony\\Bundle\\SecurityBundle\\Debug\\TraceableFirewallListener::configureLogoutUrlGenerator"
}
DEBUG 18:10:14 event Notified event "kernel.request" to listener "Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener::onKernelRequest".
{
    "event": "kernel.request",
    "listener": "Symfony\\Bundle\\SecurityBundle\\Debug\\TraceableFirewallListener::onKernelRequest"
}
DEBUG 18:10:14 event Notified event "kernel.controller" to listener "Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector::onKernelController".
{
    "event": "kernel.controller",
    "listener": "Symfony\\Bundle\\FrameworkBundle\\DataCollector\\RouterDataCollector::onKernelController"
}
DEBUG 18:10:14 event Notified event "kernel.controller" to listener "Symfony\Component\HttpKernel\DataCollector\RequestDataCollector::onKernelController".
{
    "event": "kernel.controller",
    "listener": "Symfony\\Component\\HttpKernel\\DataCollector\\RequestDataCollector::onKernelController"
}
DEBUG 18:10:14 event Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ControllerListener::onKernelController".
{
    "event": "kernel.controller",
    "listener": "Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ControllerListener::onKernelController"
}
DEBUG 18:10:14 event Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\ParamConverterListener::onKernelController".
{
    "event": "kernel.controller",
    "listener": "Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\ParamConverterListener::onKernelController"
}
DEBUG 18:10:14 event Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\HttpCacheListener::onKernelController".
{
    "event": "kernel.controller",
    "listener": "Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\HttpCacheListener::onKernelController"
}
DEBUG 18:10:14 event Notified event "kernel.controller" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener::onKernelController".
{
    "event": "kernel.controller",
    "listener": "Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\TemplateListener::onKernelController"
}
DEBUG 18:10:14 event Notified event "kernel.controller_arguments" to listener "Symfony\Component\HttpKernel\EventListener\ErrorListener::onControllerArguments".
{
    "event": "kernel.controller_arguments",
    "listener": "Symfony\\Component\\HttpKernel\\EventListener\\ErrorListener::onControllerArguments"
}
DEBUG 18:10:14 event Notified event "kernel.controller_arguments" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\SecurityListener::onKernelControllerArguments".
{
    "event": "kernel.controller_arguments",
    "listener": "Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\SecurityListener::onKernelControllerArguments"
}
DEBUG 18:10:14 event Notified event "kernel.controller_arguments" to listener "Sensio\Bundle\FrameworkExtraBundle\EventListener\IsGrantedListener::onKernelControllerArguments".
{
    "event": "kernel.controller_arguments",
    "listener": "Sensio\\Bundle\\FrameworkExtraBundle\\EventListener\\IsGrantedListener::onKernelControllerArguments"
}

Stack Trace

InvalidArgumentException

InvalidArgumentException:
The Swiftmailer URL "null://" is not valid.

  at vendor/symfony/swiftmailer-bundle/DependencyInjection/SwiftmailerTransportFactory.php:99
  at Symfony\Bundle\SwiftmailerBundle\DependencyInjection\SwiftmailerTransportFactory::resolveOptions(array('transport' => 'smtp', 'url' => 'null://', 'username' => null, 'password' => null, 'host' => 'localhost', 'port' => null, 'timeout' => 30, 'source_ip' => null, 'local_domain' => null, 'encryption' => null, 'auth_mode' => null, 'command' => '/usr/sbin/sendmail -t -i', 'stream_options' => array()))
     (vendor/symfony/swiftmailer-bundle/DependencyInjection/SwiftmailerTransportFactory.php:30)
  at Symfony\Bundle\SwiftmailerBundle\DependencyInjection\SwiftmailerTransportFactory::createTransport(array('transport' => 'smtp', 'url' => 'null://', 'username' => null, 'password' => null, 'host' => 'localhost', 'port' => null, 'timeout' => 30, 'source_ip' => null, 'local_domain' => null, 'encryption' => null, 'auth_mode' => null, 'command' => '/usr/sbin/sendmail -t -i', 'stream_options' => array()), object(RequestContext), object(Swift_Events_SimpleEventDispatcher))
     (var/cache/dev/ContainerJH46TNM/srcApp_KernelDevDebugContainer.php:2620)
  at ContainerJH46TNM\srcApp_KernelDevDebugContainer->getSwiftmailer_Mailer_Default_Transport_RealService()
     (vendor/symfony/dependency-injection/Container.php:257)
  at Symfony\Component\DependencyInjection\Container->make('swiftmailer.mailer.default.transport.real', 1)
     (vendor/symfony/dependency-injection/Container.php:231)
  at Symfony\Component\DependencyInjection\Container->get('swiftmailer.mailer.default.transport.real')
     (vendor/symfony/swiftmailer-bundle/EventListener/EmailSenderListener.php:61)
  at Symfony\Bundle\SwiftmailerBundle\EventListener\EmailSenderListener->onTerminate(object(TerminateEvent), 'kernel.terminate', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:126)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(TerminateEvent), 'kernel.terminate', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:264)
  at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener)), 'kernel.terminate', object(TerminateEvent))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:239)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener)), 'kernel.terminate', object(TerminateEvent))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:73)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(TerminateEvent), 'kernel.terminate')
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:168)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(TerminateEvent), 'kernel.terminate')
     (vendor/symfony/http-kernel/HttpKernel.php:103)
  at Symfony\Component\HttpKernel\HttpKernel->terminate(object(Request), object(Response))
     (vendor/symfony/http-kernel/Kernel.php:166)
  at Symfony\Component\HttpKernel\Kernel->terminate(object(Request), object(Response))
     (public/index.php:27)