throw new \RuntimeException(sprintf('Please check your configuration. You are trying to use FileStorage with an invalid dsn "%s". The expected format is "file:/path/to/the/storage/folder".', $dsn));
}
$this->folder = substr($dsn, 5);
if (!is_dir($this->folder) && false === @mkdir($this->folder, 0777, true) && !is_dir($this->folder)) {
throw new \RuntimeException(sprintf('Unable to create the storage directory (%s).', $this->folder));
}
}
/**
* {@inheritdoc}
$b->pushHandler(($this->privates['monolog.handler.console'] ?? $this->getMonolog_Handler_ConsoleService()));
$b->pushHandler(($this->privates['monolog.handler.main'] ?? $this->getMonolog_Handler_MainService()));
$b->pushHandler($a);
\Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\AddDebugLogProcessorPass::configureLogger($b);
$this->services['.container.private.profiler'] = $instance = new \Symfony\Component\HttpKernel\Profiler\Profiler(new \Symfony\Component\HttpKernel\Profiler\FileProfilerStorage(('file:'.$this->targetDir.''.'/profiler')), $b, true);
$c = ($this->services['kernel'] ?? $this->get('kernel'));
$d = ($this->services['request_stack'] ?? ($this->services['request_stack'] = new \Symfony\Component\HttpFoundation\RequestStack()));
$e = new \Symfony\Component\Cache\DataCollector\CacheDataCollector();
$e->addInstance('cache.app', ($this->services['cache.app'] ?? $this->getCache_AppService()));
*
* @return \Symfony\Component\HttpKernel\EventListener\ProfilerListener
*/
protected function getProfilerListenerService()
{
$a = ($this->services['.container.private.profiler'] ?? $this->get_Container_Private_ProfilerService());
if (isset($this->privates['profiler_listener'])) {
return $this->privates['profiler_listener'];
}
}, 1 => 'onNotification'], -255);
$instance->addListener('kernel.response', [0 => function () {
return ($this->privates['profiler_listener'] ?? $this->getProfilerListenerService());
}, 1 => 'onKernelResponse'], -100);
$instance->addListener('kernel.exception', [0 => function () {
return ($this->privates['profiler_listener'] ?? $this->getProfilerListenerService());
}, 1 => 'onKernelException'], 0);
$instance->addListener('kernel.terminate', [0 => function () {
return ($this->privates['profiler_listener'] ?? $this->getProfilerListenerService());
}, 1 => 'onKernelTerminate'], -1024);
$instance->addListener('kernel.controller', [0 => function () {
$this->sorted[$eventName] = [];
foreach ($this->listeners[$eventName] as &$listeners) {
foreach ($listeners as $k => &$listener) {
if (\is_array($listener) && isset($listener[0]) && $listener[0] instanceof \Closure && 2 >= \count($listener)) {
$listener[0] = $listener[0]();
$listener[1] = $listener[1] ?? '__invoke';
}
$this->sorted[$eventName][] = $listener;
}
}
if (empty($this->listeners[$eventName])) {
return [];
}
if (!isset($this->sorted[$eventName])) {
$this->sortListeners($eventName);
}
return $this->sorted[$eventName];
}
$this->orphanedEvents[$this->currentRequestHash][] = $eventName;
return;
}
foreach ($this->dispatcher->getListeners($eventName) as $listener) {
$priority = $this->getListenerPriority($eventName, $listener);
$wrappedListener = new WrappedListener($listener instanceof WrappedListener ? $listener->getWrappedListener() : $listener, null, $this->stopwatch, $this);
$this->wrappedListeners[$eventName][] = $wrappedListener;
$this->dispatcher->removeListener($eventName, $listener);
$this->dispatcher->addListener($eventName, $wrappedListener, $priority);
if (null !== $this->logger && $event instanceof StoppableEventInterface && $event->isPropagationStopped()) {
$this->logger->debug(sprintf('The "%s" event is already stopped. No listeners have been called.', $eventName));
}
$this->preProcess($eventName);
try {
$this->beforeDispatch($eventName, $event);
try {
$e = $this->stopwatch->start($eventName, 'section');
try {
* @throws \Exception
*/
private function handleThrowable(\Throwable $e, Request $request, int $type): Response
{
$event = new ExceptionEvent($this, $request, $type, $e);
$this->dispatcher->dispatch($event, KernelEvents::EXCEPTION);
// a listener might have replaced the exception
$e = $event->getThrowable();
if (!$event->hasResponse()) {
$this->finishRequest($request, $type);
throw $e;
}
return $this->handleThrowable($e, $request, $type);
} finally {
$this->requestStack->pop();
}
}
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
$this->request = $request;
}
public function run(): int
{
$response = $this->kernel->handle($this->request);
$response->send();
if ($this->kernel instanceof TerminableInterface) {
$this->kernel->terminate($this->request, $response);
}
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
<?php
use App\Kernel;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};
RuntimeException
|
---|
RuntimeException: Unable to create the storage directory (/home/backoffice/public_html/var/cache/dev/profiler). at /home/backoffice/public_html/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php:43 at Symfony\Component\HttpKernel\Profiler\FileProfilerStorage->__construct('file:/home/backoffice/public_html/var/cache/dev/profiler') (/home/backoffice/public_html/var/cache/dev/ContainerRWVaTR1/App_KernelDevDebugContainer.php:1132) at ContainerRWVaTR1\App_KernelDevDebugContainer->get_Container_Private_ProfilerService() (/home/backoffice/public_html/var/cache/dev/ContainerRWVaTR1/App_KernelDevDebugContainer.php:5788) at ContainerRWVaTR1\App_KernelDevDebugContainer->getProfilerListenerService() (/home/backoffice/public_html/var/cache/dev/ContainerRWVaTR1/App_KernelDevDebugContainer.php:2312) at ContainerRWVaTR1\App_KernelDevDebugContainer->ContainerRWVaTR1\{closure}() (/home/backoffice/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php:245) at Symfony\Component\EventDispatcher\EventDispatcher->sortListeners('kernel.exception') (/home/backoffice/public_html/vendor/symfony/event-dispatcher/EventDispatcher.php:76) at Symfony\Component\EventDispatcher\EventDispatcher->getListeners('kernel.exception') (/home/backoffice/public_html/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:293) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->preProcess('kernel.exception') (/home/backoffice/public_html/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:148) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(ExceptionEvent), 'kernel.exception') (/home/backoffice/public_html/vendor/symfony/http-kernel/HttpKernel.php:223) at Symfony\Component\HttpKernel\HttpKernel->handleThrowable(object(ErrorException), object(Request), 1) (/home/backoffice/public_html/vendor/symfony/http-kernel/HttpKernel.php:86) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (/home/backoffice/public_html/vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (/home/backoffice/public_html/vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35) at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (/home/backoffice/public_html/vendor/autoload_runtime.php:35) at require_once('/home/backoffice/public_html/vendor/autoload_runtime.php') (/home/backoffice/public_html/public/index.php:5) |