Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEP PHP Support in CMS5 #66

Merged
merged 1 commit into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions _config.php

This file was deleted.

6 changes: 1 addition & 5 deletions code/SQLite3Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ public function transactionDepth()
return $this->transactionNesting;
}

public function transactionEnd($chain = false)
public function transactionEnd(): bool|null
{
// Fail if transaction isn't available
if (!$this->transactionDepth()) {
Expand All @@ -556,10 +556,6 @@ public function transactionEnd($chain = false)
$this->resetTransactionNesting();
}

if ($chain) {
$this->transactionStart();
}

return true;
}

Expand Down
3 changes: 2 additions & 1 deletion code/SQLite3Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ public function numRecords()
return $c;
}

public function nextRecord()
#[\ReturnTypeWillChange]
public function getIterator()
Copy link
Member

@emteknetnz emteknetnz Dec 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add the #[\ReturnTypeWillChange] above this method e.g. /~https://github.com/silverstripe/silverstripe-framework/blob/5/src/ORM/Connect/MySQLQuery.php#L48

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DONE

{
if ($data = $this->handle->fetchArray(SQLITE3_ASSOC)) {
return $data;
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
}
],
"require": {
"silverstripe/framework": "~4.0",
"silverstripe/vendor-plugin": "^1.0"
"silverstripe/framework": "^5",
"silverstripe/vendor-plugin": "^2"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3"
Expand Down