diff --git a/system/Database/BaseBuilder.php b/system/Database/BaseBuilder.php index f38d52dc9750..0dc305825af8 100644 --- a/system/Database/BaseBuilder.php +++ b/system/Database/BaseBuilder.php @@ -2260,24 +2260,6 @@ protected function _insertBatch(string $table, array $keys, array $values): stri return str_replace('{:_table_:}', $data, $sql); } - /** - * Allows key/value pairs to be set for batch inserts - * - * @param mixed $key - * - * @return $this|null - * - * @deprecated - */ - public function setInsertBatch($key, string $value = '', ?bool $escape = null) - { - if (! is_array($key)) { - $key = [[$key => $value]]; - } - - return $this->setData($key, $escape); - } - /** * Compiles an insert query and returns the sql * @@ -2709,28 +2691,6 @@ protected function _updateBatch(string $table, array $keys, array $values): stri return str_replace('{:_table_:}', $data, $sql); } - /** - * Allows key/value pairs to be set for batch updating - * - * @param array|object $key - * - * @return $this - * - * @throws DatabaseException - * - * @deprecated - */ - public function setUpdateBatch($key, string $index = '', ?bool $escape = null) - { - if ($index !== '') { - $this->onConstraint($index); - } - - $this->setData($key, $escape); - - return $this; - } - /** * Compiles a delete string and runs "DELETE FROM table" * @@ -3550,18 +3510,6 @@ protected function setBind(string $key, $value = null, bool $escape = true): str return $key . '.' . $count; } - /** - * Returns a clone of a Base Builder with reset query builder values. - * - * @return $this - * - * @deprecated - */ - protected function cleanClone() - { - return (clone $this)->from([], true)->resetQuery(); - } - /** * @param mixed $value */ diff --git a/system/Database/BaseConnection.php b/system/Database/BaseConnection.php index b7b94a2ae40e..5f92f87ed21f 100644 --- a/system/Database/BaseConnection.php +++ b/system/Database/BaseConnection.php @@ -45,7 +45,6 @@ * @property-read bool $pretend * @property-read string $queryClass * @property-read array $reservedIdentifiers - * @property-read bool $strictOn * @property-read string $subdriver * @property-read string $swapPre * @property-read int $transDepth @@ -193,17 +192,6 @@ abstract class BaseConnection implements ConnectionInterface */ protected $compress = false; - /** - * Strict ON flag - * - * Whether we're running in strict SQL mode. - * - * @var bool|null - * - * @deprecated 4.5.0 Will move to MySQLi\Connection. - */ - protected $strictOn; - /** * Settings for a failover connection. * diff --git a/system/Database/Forge.php b/system/Database/Forge.php index f6eb617fd389..f8a5ffa0a67e 100644 --- a/system/Database/Forge.php +++ b/system/Database/Forge.php @@ -108,15 +108,6 @@ class Forge */ protected $createTableStr = "%s %s (%s\n)"; - /** - * CREATE TABLE IF statement - * - * @var bool|string - * - * @deprecated This is no longer used. - */ - protected $createTableIfStr = 'CREATE TABLE IF NOT EXISTS'; - /** * CREATE TABLE keys flag * @@ -565,7 +556,7 @@ public function createTable(string $table, bool $ifNotExists = false, array $att return true; } - $sql = $this->_createTable($table, false, $attributes); + $sql = $this->_createTable($table, $attributes); if (($result = $this->db->query($sql)) !== false) { if (isset($this->db->dataCache['table_names']) && ! in_array($table, $this->db->dataCache['table_names'], true)) { @@ -586,13 +577,11 @@ public function createTable(string $table, bool $ifNotExists = false, array $att } /** - * @param array $attributes Table attributes + * @param array $attributes Table attributes * * @return string SQL string - * - * @deprecated $ifNotExists is no longer used, and will be removed. */ - protected function _createTable(string $table, bool $ifNotExists, array $attributes) + protected function _createTable(string $table, array $attributes) { $processedFields = $this->_processFields(true); diff --git a/system/Database/MySQLi/Connection.php b/system/Database/MySQLi/Connection.php index 3dbc29e4d442..8b08652f595a 100644 --- a/system/Database/MySQLi/Connection.php +++ b/system/Database/MySQLi/Connection.php @@ -93,6 +93,11 @@ class Connection extends BaseConnection */ public $foundRows = false; + /** + * Strict SQL mode + */ + protected bool $strictOn = false; + /** * Connect to the database. * @@ -124,22 +129,19 @@ public function connect(bool $persistent = false) $this->mysqli->options(MYSQLI_OPT_INT_AND_FLOAT_NATIVE, 1); } - // Build init command for strictOn and timezone $initCommands = []; - if ($this->strictOn !== null) { - if ($this->strictOn) { - $initCommands[] = "sql_mode = CONCAT(@@sql_mode, ',', 'STRICT_ALL_TABLES')"; - } else { - $initCommands[] = "sql_mode = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( - @@sql_mode, - 'STRICT_ALL_TABLES,', ''), - ',STRICT_ALL_TABLES', ''), - 'STRICT_ALL_TABLES', ''), - 'STRICT_TRANS_TABLES,', ''), - ',STRICT_TRANS_TABLES', ''), - 'STRICT_TRANS_TABLES', '')"; - } + if ($this->strictOn) { + $initCommands[] = "sql_mode = CONCAT(@@sql_mode, ',', 'STRICT_ALL_TABLES')"; + } else { + $initCommands[] = "sql_mode = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE( + @@sql_mode, + 'STRICT_ALL_TABLES,', ''), + ',STRICT_ALL_TABLES', ''), + 'STRICT_ALL_TABLES', ''), + 'STRICT_TRANS_TABLES,', ''), + ',STRICT_TRANS_TABLES', ''), + 'STRICT_TRANS_TABLES', '')"; } // Set session timezone if configured @@ -148,13 +150,10 @@ public function connect(bool $persistent = false) $initCommands[] = "time_zone = '{$timezoneOffset}'"; } - // Set init command if we have any commands - if ($initCommands !== []) { - $this->mysqli->options( - MYSQLI_INIT_COMMAND, - 'SET SESSION ' . implode(', ', $initCommands), - ); - } + $this->mysqli->options( + MYSQLI_INIT_COMMAND, + 'SET SESSION ' . implode(', ', $initCommands), + ); if (is_array($this->encrypt)) { $ssl = []; diff --git a/system/Database/OCI8/Forge.php b/system/Database/OCI8/Forge.php index 8f71169115ce..8e046aa7d2be 100644 --- a/system/Database/OCI8/Forge.php +++ b/system/Database/OCI8/Forge.php @@ -34,15 +34,6 @@ class Forge extends BaseForge */ protected $createDatabaseStr = false; - /** - * CREATE TABLE IF statement - * - * @var false - * - * @deprecated This is no longer used. - */ - protected $createTableIfStr = false; - /** * DROP TABLE IF EXISTS statement * diff --git a/system/Database/SQLSRV/Connection.php b/system/Database/SQLSRV/Connection.php index 98b9d77b09c4..3848e3cf28dd 100644 --- a/system/Database/SQLSRV/Connection.php +++ b/system/Database/SQLSRV/Connection.php @@ -565,40 +565,6 @@ private function isUniqueConstraintViolation(): bool return false; } - /** - * Returns the last error encountered by this connection. - * - * @return array - * - * @deprecated Use `error()` instead. - */ - public function getError() - { - $error = [ - 'code' => '00000', - 'message' => '', - ]; - - $sqlsrvErrors = sqlsrv_errors(SQLSRV_ERR_ERRORS); - - if (! is_array($sqlsrvErrors)) { - return $error; - } - - $sqlsrvError = array_shift($sqlsrvErrors); - if (isset($sqlsrvError['SQLSTATE'])) { - $error['code'] = isset($sqlsrvError['code']) ? $sqlsrvError['SQLSTATE'] . '/' . $sqlsrvError['code'] : $sqlsrvError['SQLSTATE']; - } elseif (isset($sqlsrvError['code'])) { - $error['code'] = $sqlsrvError['code']; - } - - if (isset($sqlsrvError['message'])) { - $error['message'] = $sqlsrvError['message']; - } - - return $error; - } - /** * The name of the platform in use (MySQLi, mssql, etc) */ diff --git a/system/Database/SQLSRV/Forge.php b/system/Database/SQLSRV/Forge.php index 0622de5e8e81..136cc7e3d6e7 100644 --- a/system/Database/SQLSRV/Forge.php +++ b/system/Database/SQLSRV/Forge.php @@ -94,15 +94,6 @@ class Forge extends BaseForge */ protected $fkAllowActions = ['CASCADE', 'SET NULL', 'NO ACTION', 'RESTRICT', 'SET DEFAULT']; - /** - * CREATE TABLE IF statement - * - * @var string - * - * @deprecated This is no longer used. - */ - protected $createTableIfStr; - /** * CREATE TABLE statement * diff --git a/system/Database/Seeder.php b/system/Database/Seeder.php index 632008176031..9448ea53e154 100644 --- a/system/Database/Seeder.php +++ b/system/Database/Seeder.php @@ -16,8 +16,6 @@ use CodeIgniter\CLI\CLI; use CodeIgniter\Exceptions\InvalidArgumentException; use Config\Database; -use Faker\Factory; -use Faker\Generator; /** * Class Seeder @@ -66,13 +64,6 @@ class Seeder */ protected $silent = false; - /** - * Faker Generator instance. - * - * @deprecated - */ - private static ?Generator $faker = null; - /** * Seeder constructor. */ @@ -104,20 +95,6 @@ public function __construct(Database $config, ?BaseConnection $db = null) } } - /** - * Gets the Faker Generator instance. - * - * @deprecated - */ - public static function faker(): ?Generator - { - if (! self::$faker instanceof Generator && class_exists(Factory::class)) { - self::$faker = Factory::create(); - } - - return self::$faker; - } - /** * Loads the specified seeder and runs it. * diff --git a/tests/_support/Config/Registrar.php b/tests/_support/Config/Registrar.php index d69d5c83e463..d1639afdbfd3 100644 --- a/tests/_support/Config/Registrar.php +++ b/tests/_support/Config/Registrar.php @@ -60,7 +60,6 @@ class Registrar 'swapPre' => '', 'encrypt' => false, 'compress' => false, - 'strictOn' => true, // @todo 4.7.0 to remove in v4.8.0 'failover' => [], 'port' => 5432, ], @@ -79,7 +78,6 @@ class Registrar 'swapPre' => '', 'encrypt' => false, 'compress' => false, - 'strictOn' => true, // @todo 4.7.0 to remove in v4.8.0 'failover' => [], 'port' => 3306, 'foreignKeys' => true, @@ -100,7 +98,6 @@ class Registrar 'swapPre' => '', 'encrypt' => false, 'compress' => false, - 'strictOn' => true, // @todo 4.7.0 to remove in v4.8.0 'failover' => [], 'port' => 1433, ], @@ -119,7 +116,6 @@ class Registrar 'swapPre' => '', 'encrypt' => false, 'compress' => false, - 'strictOn' => true, // @todo 4.7.0 to remove in v4.8.0 'failover' => [], ], ]; diff --git a/tests/system/Database/BaseConnectionTest.php b/tests/system/Database/BaseConnectionTest.php index ae4963d33885..ab779a8f5cb6 100644 --- a/tests/system/Database/BaseConnectionTest.php +++ b/tests/system/Database/BaseConnectionTest.php @@ -41,7 +41,6 @@ final class BaseConnectionTest extends CIUnitTestCase 'swapPre' => '', 'encrypt' => false, 'compress' => false, - 'strictOn' => true, 'failover' => [], 'dateFormat' => [ 'date' => 'Y-m-d', @@ -64,7 +63,6 @@ final class BaseConnectionTest extends CIUnitTestCase 'swapPre' => '', 'encrypt' => false, 'compress' => false, - 'strictOn' => true, 'failover' => [], ]; @@ -84,7 +82,6 @@ public function testSavesConfigOptions(): void $this->assertSame('', $db->swapPre); $this->assertFalse($db->encrypt); $this->assertFalse($db->compress); - $this->assertTrue($db->strictOn); $this->assertSame([], $db->failover); $this->assertSame([ 'date' => 'Y-m-d', diff --git a/tests/system/Database/Builder/UpdateTest.php b/tests/system/Database/Builder/UpdateTest.php index eb1cfc7d9c92..88a92777cec2 100644 --- a/tests/system/Database/Builder/UpdateTest.php +++ b/tests/system/Database/Builder/UpdateTest.php @@ -253,9 +253,7 @@ public function testUpdateBatch(): void public function testSetUpdateBatchWithoutEscape(): void { $builder = new BaseBuilder('jobs', $this->db); - $escape = false; - - $builder->setUpdateBatch([ + $builder->setData([ [ 'id' => 2, 'name' => 'SUBSTRING(name, 1)', @@ -266,7 +264,7 @@ public function testSetUpdateBatchWithoutEscape(): void 'name' => 'SUBSTRING(name, 2)', 'description' => 'SUBSTRING(description, 4)', ], - ], 'id', $escape); + ], false); $this->db->shouldReturn('execute', new class () {}); $builder->updateBatch(null, 'id'); diff --git a/tests/system/Database/ConfigTest.php b/tests/system/Database/ConfigTest.php index 1d2482e0ad87..22b94974c0e2 100644 --- a/tests/system/Database/ConfigTest.php +++ b/tests/system/Database/ConfigTest.php @@ -80,7 +80,6 @@ final class ConfigTest extends CIUnitTestCase 'swapPre' => '', 'encrypt' => false, 'compress' => false, - 'strictOn' => true, 'failover' => [], 'port' => 5432, ]; @@ -99,7 +98,6 @@ final class ConfigTest extends CIUnitTestCase 'swapPre' => '', 'encrypt' => false, 'compress' => false, - 'strictOn' => true, 'failover' => [], 'port' => 5432, ]; @@ -163,7 +161,6 @@ public function testConnectionGroupWithDSNPostgre(): void $this->assertFalse($this->getPrivateProperty($conn, 'pConnect')); $this->assertSame('utf8mb4', $this->getPrivateProperty($conn, 'charset')); $this->assertSame('utf8mb4_general_ci', $this->getPrivateProperty($conn, 'DBCollat')); - $this->assertTrue($this->getPrivateProperty($conn, 'strictOn')); $this->assertSame([], $this->getPrivateProperty($conn, 'failover')); $this->assertSame('5', $this->getPrivateProperty($conn, 'connect_timeout')); $this->assertSame('1', $this->getPrivateProperty($conn, 'sslmode')); @@ -191,7 +188,6 @@ public function testConnectionGroupWithDSNPostgreNative(): void $this->assertFalse($this->getPrivateProperty($conn, 'pConnect')); $this->assertSame('utf8mb4', $this->getPrivateProperty($conn, 'charset')); $this->assertSame('utf8mb4_general_ci', $this->getPrivateProperty($conn, 'DBCollat')); - $this->assertTrue($this->getPrivateProperty($conn, 'strictOn')); $this->assertSame([], $this->getPrivateProperty($conn, 'failover')); } diff --git a/tests/system/Database/DatabaseSeederTest.php b/tests/system/Database/DatabaseSeederTest.php index e00599e26507..a34f19eda88d 100644 --- a/tests/system/Database/DatabaseSeederTest.php +++ b/tests/system/Database/DatabaseSeederTest.php @@ -15,7 +15,6 @@ use CodeIgniter\Test\CIUnitTestCase; use Config\Database; -use Faker\Generator; use PHPUnit\Framework\Attributes\Group; use Tests\Support\Database\Seeds\SeederWithDBGroup; use Tests\Support\Database\Seeds\SeederWithoutDBGroup; @@ -52,14 +51,6 @@ public function testInstantiateNotDirSeedPath(): void new Seeder($config); } - /** - * @TODO remove this when Seeder::faker() is removed - */ - public function testFakerGet(): void - { - $this->assertInstanceOf(Generator::class, Seeder::faker()); - } - public function testCallOnEmptySeeder(): void { $this->expectException('InvalidArgumentException'); diff --git a/tests/system/Database/Live/ForgeTest.php b/tests/system/Database/Live/ForgeTest.php index 39433abde857..62594581dd0d 100644 --- a/tests/system/Database/Live/ForgeTest.php +++ b/tests/system/Database/Live/ForgeTest.php @@ -373,7 +373,7 @@ public function testCreateTableWithNullableFieldsGivesNullDataType(): void $createTable = self::getPrivateMethodInvoker($this->forge, '_createTable'); - $sql = $createTable('forge_nullable_table', false, []); + $sql = $createTable('forge_nullable_table', []); if ($this->db->DBDriver !== 'SQLSRV') { // @see https://regex101.com/r/bIHVNw/1 diff --git a/tests/system/Database/Live/MySQLi/RawSqlTest.php b/tests/system/Database/Live/MySQLi/RawSqlTest.php index b14f8d4d400d..a5a2bb9eb614 100644 --- a/tests/system/Database/Live/MySQLi/RawSqlTest.php +++ b/tests/system/Database/Live/MySQLi/RawSqlTest.php @@ -17,7 +17,6 @@ use CodeIgniter\Test\CIUnitTestCase; use CodeIgniter\Test\DatabaseTestTrait; use PHPUnit\Framework\Attributes\Group; -use stdClass; use Tests\Support\Database\Seeds\CITestSeeder; /** @@ -76,33 +75,6 @@ public function testRawSqlUpdateObject(): void $this->seeInDatabase('user', ['email' => 'ahmadinejad@world.com', 'created_at' => '2022-01-11 01:01:11']); } - /** - * @deprecated This test covers the deprecated setUpdateBatch() method. - */ - public function testRawSqlSetUpdateObject(): void - { - $data = []; - - $row = new stdClass(); - $row->email = 'derek@world.com'; - $row->created_at = new RawSql("setDateTime('2022-02-01')"); - $data[] = $row; - - $row = new stdClass(); - $row->email = 'ahmadinejad@world.com'; - $row->created_at = new RawSql("setDateTime('2022-02-01')"); - $data[] = $row; - - $this->db->table('user')->setUpdateBatch($data, 'email')->updateBatch(null, 'email'); - - $row->created_at = new RawSql("setDateTime('2022-02-11')"); - - $this->db->table('user')->set($row)->update(null, "email = 'ahmadinejad@world.com'"); - - $this->seeInDatabase('user', ['email' => 'derek@world.com', 'created_at' => '2022-02-01 01:01:11']); - $this->seeInDatabase('user', ['email' => 'ahmadinejad@world.com', 'created_at' => '2022-02-11 01:01:11']); - } - public function testRawSqlUpdateArray(): void { $this->db->table('user')->updateBatch([ @@ -174,46 +146,4 @@ public function testRawSqlInsertObject(): void $this->seeInDatabase('user', ['email' => 'sara@world.com', 'created_at' => '2022-05-01 01:01:11']); $this->seeInDatabase('user', ['email' => 'jessica@world.com', 'created_at' => '2022-05-11 01:01:11']); } - - /** - * @deprecated This test covers the deprecated setInsertBatch() method. - */ - public function testRawSqlSetInsertObject(): void - { - $data = []; - - $row = new stdClass(); - $row->name = 'Laura Palmer'; - $row->email = 'laura@world.com'; - $row->country = 'US'; - $row->created_at = new RawSql("setDateTime('2022-06-01')"); - $data[] = $row; - - $row = new stdClass(); - $row->name = 'Travis Touchdown'; - $row->email = 'travis@world.com'; - $row->country = 'US'; - $row->created_at = new RawSql("setDateTime('2022-06-01')"); - $data[] = $row; - - $this->db->table('user')->setInsertBatch($data)->insertBatch(); - $this->seeInDatabase('user', ['email' => 'laura@world.com', 'created_at' => '2022-06-01 01:01:11']); - $this->seeInDatabase('user', ['email' => 'travis@world.com', 'created_at' => '2022-06-01 01:01:11']); - - $row = new stdClass(); - $row->name = 'Steve Rogers'; - $row->email = 'steve@world.com'; - $row->country = 'US'; - $row->created_at = new RawSql("setDateTime('2022-06-11')"); - $this->db->table('user')->set($row)->insert(); - $this->seeInDatabase('user', ['email' => 'steve@world.com', 'created_at' => '2022-06-11 01:01:11']); - - $this->db->table('user') - ->set('name', 'Dan Brown') - ->set('email', 'dan@world.com') - ->set('country', 'US') - ->set('created_at', new RawSql("setDateTime('2022-06-13')")) - ->insert(); - $this->seeInDatabase('user', ['email' => 'dan@world.com', 'created_at' => '2022-06-13 01:01:11']); - } } diff --git a/user_guide_src/source/changelogs/v4.8.0.rst b/user_guide_src/source/changelogs/v4.8.0.rst index 46eb5cf32f83..430923884abf 100644 --- a/user_guide_src/source/changelogs/v4.8.0.rst +++ b/user_guide_src/source/changelogs/v4.8.0.rst @@ -47,6 +47,8 @@ Method Signature Changes - ``CodeIgniter\CodeIgniter::gatherOutput()`` no longer accepts the deprecated ``$cacheConfig`` parameter. As this is the first parameter, custom uses of this method will need to be updated to remove the parameter. - **Config:** ``CodeIgniter\Config\Services::request()`` no longer accepts any parameter. +- **Database:** The following methods have had their signatures updated to remove deprecated parameters: + - ``CodeIgniter\Database\Forge::_createTable()`` no longer accepts the deprecated ``$ifNotExists`` parameter. The method signature is now ``_createTable(string $table, array $attributes)``. Removed Deprecated Items ======================== @@ -84,6 +86,17 @@ Removed Deprecated Items - ``CodeIgniter\Test\MockCodeIgniter::callExit()`` - **Config:** Removed the following property deprecated: - ``CodeIgniter\Config\BaseService::$services`` (deprecated since v4.5.0) +- **Database:** Removed the following properties and methods deprecated: + - ``CodeIgniter\Database\BaseBuilder::setInsertBatch()`` + - ``CodeIgniter\Database\BaseBuilder::setUpdateBatch()`` + - ``CodeIgniter\Database\BaseBuilder::cleanClone()`` + - ``CodeIgniter\Database\BaseConnection::$strictOn`` + - ``CodeIgniter\Database\Forge::$createTableIfStr`` + - ``CodeIgniter\Database\Seeder::$faker`` + - ``CodeIgniter\Database\Seeder::faker()`` + - ``CodeIgniter\Database\OCI8\Forge::$createTableIfStr`` + - ``CodeIgniter\Database\OCI8\Forge::getError()`` + - ``CodeIgniter\Database\SQLSRV\Forge::$createTableIfStr`` - **Debug:** Removed the following deprecated properties and methods: - ``CodeIgniter\Debug\Toolbar\Collectors\BaseCollector::cleanPath()`` (deprecated since v4.2.0) - ``CodeIgniter\Debug\Exceptions::$ob_level`` (deprecated since v4.4.0) diff --git a/user_guide_src/source/database/configuration/006.php b/user_guide_src/source/database/configuration/006.php index ff63399207ad..6991cd2fa711 100644 --- a/user_guide_src/source/database/configuration/006.php +++ b/user_guide_src/source/database/configuration/006.php @@ -23,7 +23,7 @@ class Database extends Config 'swapPre' => '', 'compress' => false, 'encrypt' => false, - 'strictOn' => false, + 'strictOn' => true, 'failover' => [], ]; diff --git a/utils/phpstan-baseline/loader.neon b/utils/phpstan-baseline/loader.neon index 43c1f7e4d896..60df2b057555 100644 --- a/utils/phpstan-baseline/loader.neon +++ b/utils/phpstan-baseline/loader.neon @@ -1,4 +1,4 @@ -# total 2106 errors +# total 2100 errors includes: - argument.type.neon diff --git a/utils/phpstan-baseline/missingType.iterableValue.neon b/utils/phpstan-baseline/missingType.iterableValue.neon index 709e35a6f3c1..5a40c17e63bf 100644 --- a/utils/phpstan-baseline/missingType.iterableValue.neon +++ b/utils/phpstan-baseline/missingType.iterableValue.neon @@ -1,4 +1,4 @@ -# total 1248 errors +# total 1245 errors parameters: ignoreErrors: @@ -627,11 +627,6 @@ parameters: count: 1 path: ../../system/Database/BaseBuilder.php - - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:setUpdateBatch\(\) has parameter \$key with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:set\(\) has parameter \$key with no value type specified in iterable type array\.$#' count: 1 @@ -1132,11 +1127,6 @@ parameters: count: 1 path: ../../system/Database/Forge.php - - - message: '#^Method CodeIgniter\\Database\\Forge\:\:_createTable\(\) has parameter \$attributes with no value type specified in iterable type array\.$#' - count: 1 - path: ../../system/Database/Forge.php - - message: '#^Method CodeIgniter\\Database\\Forge\:\:_processColumn\(\) has parameter \$processedField with no value type specified in iterable type array\.$#' count: 1 diff --git a/utils/phpstan-baseline/property.phpDocType.neon b/utils/phpstan-baseline/property.phpDocType.neon index 0ba558aded06..999bb47ea489 100644 --- a/utils/phpstan-baseline/property.phpDocType.neon +++ b/utils/phpstan-baseline/property.phpDocType.neon @@ -1,4 +1,4 @@ -# total 44 errors +# total 42 errors parameters: ignoreErrors: @@ -37,11 +37,6 @@ parameters: count: 1 path: ../../system/Database/OCI8/Forge.php - - - message: '#^PHPDoc type false of property CodeIgniter\\Database\\OCI8\\Forge\:\:\$createTableIfStr is not the same as PHPDoc type bool\|string of overridden property CodeIgniter\\Database\\Forge\:\:\$createTableIfStr\.$#' - count: 1 - path: ../../system/Database/OCI8/Forge.php - - message: '#^PHPDoc type false of property CodeIgniter\\Database\\OCI8\\Forge\:\:\$dropDatabaseStr is not the same as PHPDoc type string\|false of overridden property CodeIgniter\\Database\\Forge\:\:\$dropDatabaseStr\.$#' count: 1 @@ -102,11 +97,6 @@ parameters: count: 1 path: ../../system/Database/SQLSRV/Forge.php - - - message: '#^PHPDoc type string of property CodeIgniter\\Database\\SQLSRV\\Forge\:\:\$createTableIfStr is not the same as PHPDoc type bool\|string of overridden property CodeIgniter\\Database\\Forge\:\:\$createTableIfStr\.$#' - count: 1 - path: ../../system/Database/SQLSRV/Forge.php - - message: '#^PHPDoc type string of property CodeIgniter\\Database\\SQLSRV\\Forge\:\:\$renameTableStr is not the same as PHPDoc type string\|false of overridden property CodeIgniter\\Database\\Forge\:\:\$renameTableStr\.$#' count: 1 diff --git a/utils/phpstan-baseline/return.type.neon b/utils/phpstan-baseline/return.type.neon index b181bcabebd9..40b214c3fce9 100644 --- a/utils/phpstan-baseline/return.type.neon +++ b/utils/phpstan-baseline/return.type.neon @@ -1,12 +1,7 @@ -# total 2 errors +# total 1 error parameters: ignoreErrors: - - - message: '#^Method CodeIgniter\\Database\\BaseBuilder\:\:cleanClone\(\) should return \$this\(CodeIgniter\\Database\\BaseBuilder\) but returns static\(CodeIgniter\\Database\\BaseBuilder\)\.$#' - count: 1 - path: ../../system/Database/BaseBuilder.php - - message: '#^Method CodeIgniter\\Router\\Router\:\:getRouteAttributes\(\) should return array\{class\: list\, method\: list\\} but returns array\{class\: list\, method\: list\\}\.$#' count: 1