gabordemooij / redbean

ORM layer that creates models, config and database on the fly
https://www.redbeanphp.com
2.31k stars 280 forks source link

Problems with 8.1.2 #888

Closed rivets closed 2 years ago

rivets commented 2 years ago

Deprecation warnings for passing NULL in several places and also return type errors for quite a few functions.

UPDATE these may all have been fixed already - composer was behaving very oddly for me yesterday and I am not sure what was going on, some old files seemed to appear in another package.

rivets commented 2 years ago

diff --git a/RedBeanPHP/Driver/RPDO.php b/RedBeanPHP/Driver/RPDO.php index cfed9e2..994552f 100644 --- a/RedBeanPHP/Driver/RPDO.php +++ b/RedBeanPHP/Driver/RPDO.php @@ -187,7 +187,7 @@ class RPDO implements Driver $this->resultArray = array(); return $statement; }

diff --git a/RedBeanPHP/QueryWriter/AQueryWriter.php b/RedBeanPHP/QueryWriter/AQueryWriter.php index 77b494c..8197b92 100644 --- a/RedBeanPHP/QueryWriter/AQueryWriter.php +++ b/RedBeanPHP/QueryWriter/AQueryWriter.php @@ -864,7 +864,7 @@ abstract class AQueryWriter { static $snippetCache = array();

@@ -975,7 +975,7 @@ abstract class AQueryWriter */ public function parseJoin( $type, $sql, $cteType = NULL ) {

rivets commented 2 years ago

However

$this->resultArray = $statement->fetchAll( $fetchStyle != NULL ? $fetchStyle : \PDO::FETCH_DEFAULT );

should probably be

$this->resultArray = $statement->fetchAll( $fetchStyle ?? \PDO::FETCH_DEFAULT );

Unless there is a backward compatibility issue.

gabordemooij commented 2 years ago

I try to keep it backward compatible as much as possible. Seems like those statements are functionally the same right? Or do I miss something here?

rivets commented 2 years ago

They are functionally the same, so no problem with either and the long one is backward compatible. (I confess to being all in on 8.* in my code :-)

gabordemooij commented 2 years ago

Ok, the I'll close this issue if you don't mind. If any other issue pops up, feel free to re-open.