Skip to content

Commit

Permalink
Merge pull request #95 from studoo-app/94-fatal-error-uncaught-dotenv…
Browse files Browse the repository at this point in the history
…exceptioninvalidpathexception-unable-to-read-any-of-the-environment-files

#94 fix patch root
  • Loading branch information
bfoujols authored May 24, 2024
2 parents 62d3e4f + ef5f17e commit 5bb652c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/EduFramework/Commands/Extends/AppCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct()
{
(new ConfigCore(
[
'base_path' => __DIR__ . '/../../../../',
'base_path' => "./",
]
));
parent::__construct(ConfigCore::getConfig('name'), ConfigCore::getConfig('version'));
Expand Down
4 changes: 2 additions & 2 deletions src/EduFramework/Core/ConfigCore.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ public function __construct(array $config)
self::$config = array_merge(
[
'name' => 'EduFramework',
'version' => 'v2.0.1@rc',
'date_version' => '2024-05-13', // Date de la livraison de la version
'version' => 'v2.0.2@rc',
'date_version' => '2024-05-24', // Date de la livraison de la version
'php_version' => '8.1', // Warning : bin/edu require PHP 8.1 or higher
'base_path' => '/',
'twig_path' => '/app/Template',
Expand Down
14 changes: 7 additions & 7 deletions tests/Controller/FastRouteCoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function testGetDispatcher()

$_SERVER['REQUEST_METHOD'] = 'GET';
$_SERVER['REQUEST_URI'] = '/';
$this->assertEquals('df50808e9806dd3e0cceed154c35303d92a90ad6', sha1($route->getRoute()));
$this->assertEquals('d7045e6af8910d38af6c42f0b610e51c644e5ec1', sha1($route->getRoute()));
}

public function testGetDispatcherWithExceptionNotFound()
Expand All @@ -36,7 +36,7 @@ public function testGetDispatcherWithExceptionNotFound()

$_SERVER['REQUEST_METHOD'] = 'GET';
$_SERVER['REQUEST_URI'] = '/test';
$this->assertEquals('2280909eada820cab67a82fbdf5dfeba4024aa13', sha1($route->getRoute()));
$this->assertEquals('1ab50275de77fa6215e882b0833350c32cfcd7a2', sha1($route->getRoute()));
}

public function testGetDispatcherWithExceptionMethodNotAllowed()
Expand All @@ -46,7 +46,7 @@ public function testGetDispatcherWithExceptionMethodNotAllowed()

$_SERVER['REQUEST_METHOD'] = 'POST';
$_SERVER['REQUEST_URI'] = '/';
$this->assertEquals('ca8755da6c4454c8d769b2eeaedcb6ef689b583c', sha1($route->getRoute()));
$this->assertEquals('ed2ad24f02864b53319ab611d414ceac5c322751', sha1($route->getRoute()));
}

public function testGetDispatcherWithExceptionMethodNotAllowedAndNotFound()
Expand All @@ -56,7 +56,7 @@ public function testGetDispatcherWithExceptionMethodNotAllowedAndNotFound()

$_SERVER['REQUEST_METHOD'] = 'POST';
$_SERVER['REQUEST_URI'] = '/test';
$this->assertEquals('ca9cc12e0274e65bdda697a8b662f0713c5a3650', sha1($route->getRoute()));
$this->assertEquals('1ab50275de77fa6215e882b0833350c32cfcd7a2', sha1($route->getRoute()));
}

public function testLoadRoutesMatchSuccess()
Expand All @@ -66,7 +66,7 @@ public function testLoadRoutesMatchSuccess()

$_SERVER['REQUEST_METHOD'] = 'GET';
$_SERVER['REQUEST_URI'] = '/';
$this->assertEquals('df50808e9806dd3e0cceed154c35303d92a90ad6', sha1($route->getRoute()));
$this->assertEquals('d7045e6af8910d38af6c42f0b610e51c644e5ec1', sha1($route->getRoute()));
}

public function testLoadRoutesMatchSuccessWithExceptionNotFound()
Expand All @@ -76,7 +76,7 @@ public function testLoadRoutesMatchSuccessWithExceptionNotFound()

$_SERVER['REQUEST_METHOD'] = 'GET';
$_SERVER['REQUEST_URI'] = '/test';
$this->assertEquals('2280909eada820cab67a82fbdf5dfeba4024aa13', sha1($route->getRoute()));
$this->assertEquals('1ab50275de77fa6215e882b0833350c32cfcd7a2', sha1($route->getRoute()));
}

public function testLoadRoutesMatchSuccessWithExceptionMethodNotAllowedAndNotFound()
Expand All @@ -86,6 +86,6 @@ public function testLoadRoutesMatchSuccessWithExceptionMethodNotAllowedAndNotFou

$_SERVER['REQUEST_METHOD'] = 'POST';
$_SERVER['REQUEST_URI'] = '/';
$this->assertEquals('ca8755da6c4454c8d769b2eeaedcb6ef689b583c', sha1($route->getRoute()));
$this->assertEquals('ed2ad24f02864b53319ab611d414ceac5c322751', sha1($route->getRoute()));
}
}

0 comments on commit 5bb652c

Please sign in to comment.