From 7ee6fcdf33ef27fc09222ca922653850cca7084f Mon Sep 17 00:00:00 2001 From: Yonel Ceruto Date: Tue, 2 May 2017 13:10:35 -0400 Subject: [PATCH] Use single quotes and project_dir parameter --- app/config/config.yml | 6 +++--- app/config/config_dev.yml | 2 +- app/config/parameters.yml.dist | 2 +- src/AppBundle/Controller/DefaultController.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/config/config.yml b/app/config/config.yml index 50db6b10dd..cefd8d868c 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -13,7 +13,7 @@ framework: #translator: { fallbacks: ['%locale%'] } secret: '%secret%' router: - resource: '%kernel.root_dir%/config/routing.yml' + resource: '%kernel.project_dir%/app/config/routing.yml' strict_requirements: ~ form: ~ csrf_protection: ~ @@ -26,7 +26,7 @@ framework: session: # http://symfony.com/doc/current/reference/configuration/framework.html#handler-id handler_id: session.handler.native_file - save_path: "%kernel.root_dir%/../var/sessions/%kernel.environment%" + save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%' fragments: ~ http_method_override: true assets: ~ @@ -50,7 +50,7 @@ doctrine: charset: UTF8 # if using pdo_sqlite as your database driver: # 1. add the path in parameters.yml - # e.g. database_path: "%kernel.root_dir%/../var/data/data.sqlite" + # e.g. database_path: "%kernel.project_dir%/var/data/data.sqlite" # 2. Uncomment database_path in parameters.yml.dist # 3. Uncomment next line: #path: '%database_path%' diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml index 38f5c74767..6bbbd7569f 100644 --- a/app/config/config_dev.yml +++ b/app/config/config_dev.yml @@ -3,7 +3,7 @@ imports: framework: router: - resource: '%kernel.root_dir%/config/routing_dev.yml' + resource: '%kernel.project_dir%/app/config/routing_dev.yml' strict_requirements: true profiler: { only_exceptions: false } diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist index fa1af657da..653ff3b0f1 100644 --- a/app/config/parameters.yml.dist +++ b/app/config/parameters.yml.dist @@ -8,7 +8,7 @@ parameters: database_user: root database_password: ~ # You should uncomment this if you want to use pdo_sqlite - #database_path: '%kernel.root_dir%/../var/data/data.sqlite' + #database_path: '%kernel.project_dir%/var/data/data.sqlite' mailer_transport: smtp mailer_host: 127.0.0.1 diff --git a/src/AppBundle/Controller/DefaultController.php b/src/AppBundle/Controller/DefaultController.php index 5216afebac..cecd334e13 100644 --- a/src/AppBundle/Controller/DefaultController.php +++ b/src/AppBundle/Controller/DefaultController.php @@ -15,7 +15,7 @@ public function indexAction(Request $request) { // replace this example code with whatever you need return $this->render('default/index.html.twig', [ - 'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR, + 'base_dir' => realpath($this->getParameter('kernel.project_dir')).DIRECTORY_SEPARATOR, ]); } }