You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: Cannot assign MongoDB\Client to property Liip\TestFixturesBundle\Services\DatabaseTools\AbstractDatabaseTool::$connection of type Doctrine\DBAL\Connection
.../vendor/liip/test-fixtures-bundle/src/Services/DatabaseTools/AbstractDatabaseTool.php:109
.../vendor/liip/test-fixtures-bundle/src/Services/DatabaseToolCollection.php:62
Explenation / Recommendation
The property $connection in AbstractDatabaseTool changed from PHPDoc-Typehint to strict PHP Typing. The MongoDB Manager doesn't use DBAL (as it is NoSQL),
I would recommend:
Create an DatabaseToolInterface (to be used as the typings in DatabaseToolCollection)
Move the property $connection to an inbetween-class AbstractDbalTool which is used by ORMDatabaseTool and ORMSqliteDatbaseTool
Implement the Interface in MongoDBDAtabaseTool and PHPCRDatabaseTool without AbstractDbalTool (may still share some other methods using AbstractDatabaseTool)
The text was updated successfully, but these errors were encountered:
Would you be able to open a PR? What about just reverting the change from PHPDoc to typing? (in other words, restore the previous code that accepted a MongoDB connection)
Preconditions
Steps to reproduce
Expected result
Actual result
Explenation / Recommendation
The property $connection in AbstractDatabaseTool changed from PHPDoc-Typehint to strict PHP Typing. The MongoDB Manager doesn't use DBAL (as it is NoSQL),
I would recommend:
DatabaseToolInterface
(to be used as the typings in DatabaseToolCollection)AbstractDbalTool
which is used by ORMDatabaseTool and ORMSqliteDatbaseToolAbstractDbalTool
(may still share some other methods usingAbstractDatabaseTool
)The text was updated successfully, but these errors were encountered: