DEP PHP Support in CMS5 (#66)

This commit is contained in:
Sabina Talipova 2023-01-10 13:33:07 +13:00 committed by GitHub
parent ee7f0e4d25
commit 25304fa8aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 13 deletions

View File

@ -1,5 +0,0 @@
<?php
use SilverStripe\Dev\Deprecation;
Deprecation::notification_version('1.4.0', 'sqlite3');

View File

@ -540,7 +540,7 @@ class SQLite3Database extends Database
return $this->transactionNesting; return $this->transactionNesting;
} }
public function transactionEnd($chain = false) public function transactionEnd(): bool|null
{ {
// Fail if transaction isn't available // Fail if transaction isn't available
if (!$this->transactionDepth()) { if (!$this->transactionDepth()) {
@ -556,10 +556,6 @@ class SQLite3Database extends Database
$this->resetTransactionNesting(); $this->resetTransactionNesting();
} }
if ($chain) {
$this->transactionStart();
}
return true; return true;
} }

View File

@ -72,7 +72,8 @@ class SQLite3Query extends Query
return $c; return $c;
} }
public function nextRecord() #[\ReturnTypeWillChange]
public function getIterator()
{ {
if ($data = $this->handle->fetchArray(SQLITE3_ASSOC)) { if ($data = $this->handle->fetchArray(SQLITE3_ASSOC)) {
return $data; return $data;

View File

@ -14,8 +14,8 @@
} }
], ],
"require": { "require": {
"silverstripe/framework": "~4.0", "silverstripe/framework": "^5",
"silverstripe/vendor-plugin": "^1.0" "silverstripe/vendor-plugin": "^2"
}, },
"require-dev": { "require-dev": {
"squizlabs/php_codesniffer": "^3" "squizlabs/php_codesniffer": "^3"