BUGFIX: not all paths were correct

This commit is contained in:
Jeroen De Meerleer 2021-04-07 10:10:01 +02:00
parent 7eb8d899bb
commit bfadfbe721
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG Key ID: 28CCCB8F62BFADD6
4 changed files with 6 additions and 7 deletions

View File

@ -1,8 +1,7 @@
<?php <?php
session_start(); session_start();
require_once "../vendor/autoload.php";
require_once "vendor/autoload.php";
if( ini_get('safe_mode') ){ if( ini_get('safe_mode') ){
die("Cannot run in safe mode"); die("Cannot run in safe mode");

View File

@ -4,7 +4,7 @@ namespace JeroenED\Framework;
use Doctrine\DBAL\Connection; use Doctrine\DBAL\Connection;
use http\Env\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Twig\Environment; use Twig\Environment;
use Twig\Loader\FilesystemLoader; use Twig\Loader\FilesystemLoader;

View File

@ -70,7 +70,7 @@ class Kernel
public function handle(): Response public function handle(): Response
{ {
$this->parseDotEnv($this->getProjectDir() . '/.env'); $this->parseDotEnv($this->getProjectDir() . '/.env');
$routes = $this->parseRoutes($this->getConfigDir(), '/routes.yaml'); $routes = $this->parseRoutes($this->getConfigDir(), 'routes.yaml');
$request = $this->parseRequest(); $request = $this->parseRequest();
return $this->createResponse($request, $routes); return $this->createResponse($request, $routes);
} }

View File

@ -5,8 +5,8 @@ use JeroenED\Framework\Kernel;
require_once '../bootstrap.php'; require_once '../bootstrap.php';
$kernel = new Kernel(); $kernel = new Kernel();
$kernel->setProjectDir(__DIR__); $kernel->setProjectDir(__DIR__ . '/..');
$kernel->setConfigDir(__DIR__ . '/config/'); $kernel->setConfigDir(__DIR__ . '/../config/');
$kernel->setTemplateDir(__DIR__ . '/templates/'); $kernel->setTemplateDir(__DIR__ . '/../templates/');
$kernel->handle()->send(); $kernel->handle()->send();