mirror of
https://github.com/grocy/grocy.git
synced 2026-03-27 23:29:25 +01:00
Optimized Composer handling
This commit is contained in:
parent
1463a8d21b
commit
c70a7efd15
|
|
@ -1,4 +1,5 @@
|
|||
pushd ..
|
||||
set COMPOSER_FUND=0
|
||||
call composer install
|
||||
call yarn install
|
||||
popd
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
pushd ..
|
||||
set COMPOSER_FUND=0
|
||||
call composer update
|
||||
call yarn upgrade
|
||||
popd
|
||||
|
|
|
|||
5
app.php
5
app.php
|
|
@ -14,7 +14,6 @@ require_once __DIR__ . '/packages/autoload.php';
|
|||
// Load config files
|
||||
require_once GROCY_DATAPATH . '/config.php';
|
||||
require_once __DIR__ . '/config-dist.php'; // For not in own config defined values we use the default ones
|
||||
require_once __DIR__ . '/helpers/ConfigurationValidator.php';
|
||||
|
||||
// Error reporting definitions
|
||||
if (GROCY_MODE === 'dev')
|
||||
|
|
@ -44,9 +43,9 @@ if (GROCY_DISABLE_AUTH === true)
|
|||
// Check if any invalid entries in config.php have been made
|
||||
try
|
||||
{
|
||||
(new ConfigurationValidator())->validateConfig();
|
||||
(new Grocy\Helpers\ConfigurationValidator())->validateConfig();
|
||||
}
|
||||
catch (EInvalidConfig $ex)
|
||||
catch (\Grocy\Helpers\EInvalidConfig $ex)
|
||||
{
|
||||
exit('Invalid setting in config.php: ' . $ex->getMessage());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
class EInvalidConfig extends Exception
|
||||
namespace Grocy\Helpers;
|
||||
|
||||
class EInvalidConfig extends \Exception
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
class ERequirementNotMet extends Exception
|
||||
namespace Grocy\Helpers;
|
||||
|
||||
class ERequirementNotMet extends \Exception
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -81,7 +83,7 @@ class PrerequisiteChecker
|
|||
|
||||
private function getSqlVersionAsString()
|
||||
{
|
||||
$dbh = new PDO('sqlite::memory:');
|
||||
$dbh = new \PDO('sqlite::memory:');
|
||||
return $dbh->query('select sqlite_version()')->fetch()[0];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,9 +35,9 @@ require_once __DIR__ . '/../helpers/PrerequisiteChecker.php';
|
|||
|
||||
try
|
||||
{
|
||||
(new PrerequisiteChecker())->checkRequirements();
|
||||
(new Grocy\Helpers\PrerequisiteChecker())->checkRequirements();
|
||||
}
|
||||
catch (ERequirementNotMet $ex)
|
||||
catch (Grocy\Helpers\ERequirementNotMet $ex)
|
||||
{
|
||||
exit('Unable to run Grocy: ' . $ex->getMessage());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user