-
Notifications
You must be signed in to change notification settings - Fork 6
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
Added support for PDO exception mode, which is default in PHP 8 #52
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
"ext-pdo": "*", | ||
"mindplay/unbox": "^2", | ||
"psr/log": "^1" | ||
}, | ||
"require-dev": { | ||
"mindplay/testies": "^0.3.2", | ||
"mindplay/benchpress": "^0.1", | ||
"mockery/mockery": "^0.9", | ||
"mockery/mockery": "^1.5.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This supports newer versions of PHP
@@ -85,7 +85,7 @@ public function all() | |||
* | |||
* @return Iterator | |||
*/ | |||
public function getIterator() | |||
public function getIterator(): Iterator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must adhere to the updated interface in new PHP versions
Thanks, but I'm not currently maintaining this. If you need these changes anytime soon, you should fork. |
Okay, thank you for the reply 👍 😊 |
@@ -104,7 +105,13 @@ public function execute() | |||
{ | |||
$microtime_begin = microtime(true); | |||
|
|||
if (@$this->handle->execute()) { | |||
try { | |||
$execution_successful = @$this->handle->execute(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably shouldn't @
error-suppress in a try/catch
?
I've done some maintenance today, the project should be in a better state for PHP 8 now. I've reviewed the change - if you'd like to update this PR, I will merge it. |
Fixed in the next release |
Added support for PDO error mode set to
ERRMODE_EXCEPTION
, which is the new default in PHP 8.Added return type to the
getIterator
method within theResult
model extending theIteratorAggregate
. This has added return types in new PHP versions.Resolves #51