Fix validation error and bootstrap order of operations issue.
Some checks are pending
Run unit tests / run-unit-tests (push) Waiting to run
Some checks are pending
Run unit tests / run-unit-tests (push) Waiting to run
This commit is contained in:
parent
f5123e5044
commit
c7acca6bb3
@ -25,6 +25,10 @@ if (!(preg_match('/setup$/', $path))) {
|
|||||||
// database validation
|
// database validation
|
||||||
$dbMgr = new Database();
|
$dbMgr = new Database();
|
||||||
$dbMgr->validate();
|
$dbMgr->validate();
|
||||||
|
|
||||||
|
// filesystem Migration
|
||||||
|
// TODO - delete
|
||||||
|
$fsMgr->migrate();
|
||||||
} catch (SetupException $e) {
|
} catch (SetupException $e) {
|
||||||
$e->handle();
|
$e->handle();
|
||||||
exit;
|
exit;
|
||||||
|
@ -12,7 +12,7 @@ class SetupException extends Exception {
|
|||||||
// Exceptions don't generally define their own handlers,
|
// Exceptions don't generally define their own handlers,
|
||||||
// but this is a very specific case.
|
// but this is a very specific case.
|
||||||
public function handle(){
|
public function handle(){
|
||||||
switch ($this->setupIssue()){
|
switch ($this->setupIssue){
|
||||||
case 'storage_missing':
|
case 'storage_missing':
|
||||||
case 'storage_permissions':
|
case 'storage_permissions':
|
||||||
case 'directory_creation':
|
case 'directory_creation':
|
||||||
|
@ -5,6 +5,10 @@ class Filesystem {
|
|||||||
public function validate(): void{
|
public function validate(): void{
|
||||||
$this->validateStorageDir();
|
$this->validateStorageDir();
|
||||||
$this->validateStorageSubdirs();
|
$this->validateStorageSubdirs();
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO - delete this
|
||||||
|
public function migrate(): void{
|
||||||
$this->migrateTickFiles();
|
$this->migrateTickFiles();
|
||||||
$this->moveTicksToDatabase();
|
$this->moveTicksToDatabase();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user