mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-02 22:36:21 -04:00
Minor fixes
- Corrected CodeIgniter Framework version to specific version - Added checks in Database seeder Signed-off-by: objec <objecttothis@gmail.com>
This commit is contained in:
@@ -9,9 +9,18 @@ class TestDatabaseBootstrapSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
if (ENVIRONMENT !== 'testing') {
|
||||
throw new \RuntimeException('TestDatabaseBootstrapSeeder can only run in the testing environment.');
|
||||
}
|
||||
|
||||
$config = config('Database');
|
||||
$group = $config->tests;
|
||||
$dbName = $group['database'];
|
||||
|
||||
if ($dbName === '' || !str_contains(strtolower($dbName), 'test')) {
|
||||
throw new \RuntimeException("Refusing to reset non-test database: {$dbName}");
|
||||
}
|
||||
|
||||
$serverConn = Database::connect([
|
||||
'hostname' => $group['hostname'],
|
||||
'username' => $group['username'],
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"require": {
|
||||
"ext-intl": "*",
|
||||
"php": "^8.1",
|
||||
"codeigniter4/framework": "^4.6.3",
|
||||
"codeigniter4/framework": "4.6.3",
|
||||
"dompdf/dompdf": "^2.0.3",
|
||||
"ezyang/htmlpurifier": "^4.17",
|
||||
"laminas/laminas-escaper": "2.17.0",
|
||||
|
||||
Reference in New Issue
Block a user