diff --git a/src/Abstract/Model/Connection.php b/src/Abstract/Model/Connection.php index 86fda371..748aa3b5 100644 --- a/src/Abstract/Model/Connection.php +++ b/src/Abstract/Model/Connection.php @@ -11,10 +11,10 @@ abstract class Connection implements \Yggverse\Yoda\Interface\Model\Connection private Pool $_pool; public function __construct( - Pool $pool + ?Pool $pool = null ) { // Use shared memory pool for async operations - $this->_pool = $pool; + $this->_pool = $pool ? $pool : new Pool; // Set defaults $this->_pool->set( diff --git a/src/Interface/Model/Connection.php b/src/Interface/Model/Connection.php index f1e362c9..5f268b1b 100644 --- a/src/Interface/Model/Connection.php +++ b/src/Interface/Model/Connection.php @@ -13,7 +13,7 @@ use \Yggverse\Yoda\Interface\Model\Pool; interface Connection { public function __construct( - Pool $pool + ?Pool $pool = null ); public function request(