}
} while (false !== $locale = strstr($locale, '_', true));
}
if (!isset($this->compiledRoutes[$name])) {
throw new RouteNotFoundException(sprintf('Unable to generate a URL for the named route "%s" as such route does not exist.', $name));
}
[$variables, $defaults, $requirements, $tokens, $hostTokens, $requiredSchemes, $deprecations] = $this->compiledRoutes[$name] + [6 => []];
foreach ($deprecations as $deprecation) {
$this->configCacheFactory = $configCacheFactory;
}
public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH): string
{
return $this->getGenerator()->generate($name, $parameters, $referenceType);
}
public function match(string $pathinfo): array
{
return $this->getMatcher()->match($pathinfo);
*
* @see UrlGeneratorInterface
*/
protected function generateUrl(string $route, array $parameters = [], int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH): string
{
return $this->container->get('router')->generate($route, $parameters, $referenceType);
}
/**
* Forwards the request to another controller.
*
'fromDate' => (new \DateTime())->modify("+2 days"),
'toDate' => (new \DateTime())->modify("+3 days")
];
$form = $this->createForm(TravelType::class, $data, [
'action' => $this->generateUrl('travel_form')
]);
return $this->render('main/index.html.twig',[
'clientFeedbacks' => $provider->getReviews(10),
'page' => $provider->getHomePageData(),
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response, $event);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Throwable $e) {
if ($e instanceof \Error && !$this->handleAllThrowables) {
throw $e;
}
$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()
);
umask(0000);
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']);
};
No log messages
RouteNotFoundException
|
---|
Symfony\Component\Routing\Exception\RouteNotFoundException: Unable to generate a URL for the named route "travel_form" as such route does not exist. at vendor/symfony/routing/Generator/CompiledUrlGenerator.php:50 at Symfony\Component\Routing\Generator\CompiledUrlGenerator->generate() (vendor/symfony/routing/Router.php:209) at Symfony\Component\Routing\Router->generate() (vendor/symfony/framework-bundle/Controller/AbstractController.php:108) at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->generateUrl() (src/Controller/MainController.php:49) at App\Controller\MainController->index() (vendor/symfony/http-kernel/HttpKernel.php:163) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:74) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:184) at Symfony\Component\HttpKernel\Kernel->handle() (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35) at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (vendor/autoload_runtime.php:29) at require_once('/var/www/litcarrent/vendor/autoload_runtime.php') (public/index.php:7) |