Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"require-dev": {
"doctrine/annotations": "^1.13.1 || ^2.0",
"doctrine/data-fixtures": "^1.4.4",
"doctrine/dbal": "^2.13.1 || ^3.1",
"doctrine/dbal": "^2.13.1 || ^3.1 || ^4.0",
"doctrine/doctrine-bundle": "^2.2",
"doctrine/doctrine-fixtures-bundle": "^3.4.4 || ^4.0",
"doctrine/mongodb-odm": "^2.2",
Expand All @@ -46,7 +46,7 @@
},
"conflict": {
"doctrine/annotations": "<1.13.1 || >=3.0",
"doctrine/dbal": "<2.13.1 || ~3.0.0 || >=4.0",
"doctrine/dbal": "<2.13.1 || ~3.0.0",
"doctrine/mongodb-odm": "<2.2 || >=3.0",
"doctrine/orm": "<2.14 || >=4.0"
},
Expand Down
4 changes: 2 additions & 2 deletions src/Services/DatabaseTools/AbstractDbalDatabaseTool.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
use Doctrine\DBAL\Platforms\AbstractMySQLPlatform;
use Doctrine\DBAL\Platforms\MySqlPlatform;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Platforms\SQLitePlatform;

abstract class AbstractDbalDatabaseTool extends AbstractDatabaseTool
{
Expand All @@ -36,7 +36,7 @@ protected function getPlatformName(): string
// AbstractMySQLPlatform was introduced in DBAL 3.3, keep the MySQLPlatform checks for compatibility with older versions
if ($platform instanceof AbstractMySQLPlatform || $platform instanceof MySqlPlatform) {
return 'mysql';
} elseif ($platform instanceof SqlitePlatform) {
} elseif ($platform instanceof SQLitePlatform) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
} elseif ($platform instanceof SQLitePlatform) {
} elseif ($platform instanceof SqlitePlatform || $platform instanceof SQLitePlatform) {

Is this needed to keep compatibility?

return 'sqlite';
} elseif ($platform instanceof PostgreSQLPlatform) {
return 'pgsql';
Expand Down
6 changes: 3 additions & 3 deletions src/Services/DatabaseTools/ORMSqliteDatabaseTool.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

use Doctrine\Common\DataFixtures\Executor\AbstractExecutor;
use Doctrine\Common\DataFixtures\ProxyReferenceRepository;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Platforms\SQLitePlatform;
use Doctrine\ORM\Configuration;
use Doctrine\ORM\Tools\SchemaTool;
use Liip\TestFixturesBundle\Event\FixtureEvent;
Expand All @@ -36,7 +36,7 @@ class ORMSqliteDatabaseTool extends ORMDatabaseTool

public function getDriverName(): string
{
return SqlitePlatform::class;
return SQLitePlatform::class;
}

public function loadFixtures(array $classNames = [], bool $append = false): AbstractExecutor
Expand Down Expand Up @@ -166,6 +166,6 @@ protected function enableForeignKeyChecksIfApplicable(): void

private function isSqlite(): bool
{
return $this->connection->getDatabasePlatform() instanceof SqlitePlatform;
return $this->connection->getDatabasePlatform() instanceof SQLitePlatform;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
return $this->connection->getDatabasePlatform() instanceof SQLitePlatform;
return $this->connection->getDatabasePlatform() instanceof SqlitePlatform || $this->connection->getDatabasePlatform() instanceof SQLitePlatform;

Is this needed to keep compatibility?

}
}