diff --git a/phpstan-baseline.php b/phpstan-baseline.php index 997b5f0c8..c333a0fea 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -431,11 +431,6 @@ 'count' => 1, 'path' => __DIR__ . '/tests/Unit/UserTest.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', - 'count' => 1, - 'path' => __DIR__ . '/tests/_support/Config/Registrar.php', -]; $ignoreErrors[] = [ 'message' => '#^Call to function model with CodeIgniter\\\\Shield\\\\Models\\\\TokenLoginModel\\:\\:class is discouraged\\.$#', 'count' => 1, diff --git a/tests/_support/Config/Registrar.php b/tests/_support/Config/Registrar.php index 5258da8e6..7a08e4dc7 100644 --- a/tests/_support/Config/Registrar.php +++ b/tests/_support/Config/Registrar.php @@ -37,7 +37,7 @@ class Registrar 'DBDriver' => 'MySQLi', 'DBPrefix' => 'db_', 'pConnect' => false, - 'DBDebug' => (ENVIRONMENT !== 'production'), + 'DBDebug' => true, 'charset' => 'utf8', 'DBCollat' => 'utf8_general_ci', 'swapPre' => '', @@ -56,7 +56,7 @@ class Registrar 'DBDriver' => 'Postgre', 'DBPrefix' => 'db_', 'pConnect' => false, - 'DBDebug' => (ENVIRONMENT !== 'production'), + 'DBDebug' => true, 'charset' => 'utf8', 'DBCollat' => 'utf8_general_ci', 'swapPre' => '', @@ -75,7 +75,7 @@ class Registrar 'DBDriver' => 'SQLite3', 'DBPrefix' => 'db_', 'pConnect' => false, - 'DBDebug' => (ENVIRONMENT !== 'production'), + 'DBDebug' => true, 'charset' => 'utf8', 'DBCollat' => 'utf8_general_ci', 'swapPre' => '', @@ -95,7 +95,7 @@ class Registrar 'DBDriver' => 'SQLSRV', 'DBPrefix' => 'db_', 'pConnect' => false, - 'DBDebug' => (ENVIRONMENT !== 'production'), + 'DBDebug' => true, 'charset' => 'utf8', 'DBCollat' => 'utf8_general_ci', 'swapPre' => '', @@ -114,7 +114,7 @@ class Registrar 'DBDriver' => 'OCI8', 'DBPrefix' => 'db_', 'pConnect' => false, - 'DBDebug' => (ENVIRONMENT !== 'production'), + 'DBDebug' => true, 'charset' => 'utf8', 'DBCollat' => 'utf8_general_ci', 'swapPre' => '', @@ -136,7 +136,7 @@ public static function Database() // Under GitHub Actions, we can set an ENV var named 'DB' // so that we can test against multiple databases. - if (($group = getenv('DB')) && ! empty(self::$dbConfig[$group])) { + if (($group = getenv('DB')) && ! isset(self::$dbConfig[$group])) { $config['tests'] = self::$dbConfig[$group]; }