-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add doctrine/dbal 3 support #8347
Conversation
The discussion and PR about the LockModes in DBAL is also relevant here, I had to do some magick tricks to make the tests pass in both DBAL 2 and 3 |
@@ -91,13 +91,16 @@ public static function createApplication(HelperSet $helperSet, array $commands = | |||
*/ | |||
public static function addCommands(Application $cli) : void | |||
{ | |||
$cli->addCommands( | |||
[ | |||
if (class_exists(DBALConsole\Command\ImportCommand::class)) { |
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.
Should the ORM expose DBAL console commands? The new commands are not really compatible, not sure how to make them.
a5b0ed9
to
e609b67
Compare
Also DBAL removed the orm/lib/Doctrine/ORM/Configuration.php Line 67 in 3d46e07
|
Also, PHP was bumped to 7.3 in order to support DBAL 2.12 |
Also, the |
@acasademont this is something we want to do ourselves to learn from the API changes. I would advise not to put too much work into this before we map this out, sorry :-( Edit: Also we don't want to support DBAL 3 in ORM 2, we will branch of ORM 3 of 2.* soon master will need to become ORM 4/NEXT. |
@beberlei sure! I just wanted to give it a first try, happy to help you in any way I can. I think it's a good idea to branch ORM 3 and put DBAL support there. |
@beberlei, I couldn't find any other issue talking about DBAL 3.0 support. Should we create an issue for it in milestone 3.0.0 and close this PR ? or should we track progress through this existing PR ? |
Closed by #8964 |
Hi all,
This is a first attempt into having DBAL 3 support on the 2.x ORM branches. There are some things that should we discussed, namely:
Some Platforms do no longer exist on DBAL (
PostgreSqlPlatfrom
,PostgreSql91Platfrom
,PostgreSql92Platfrom
,SQLServerPlatform
,SQLServer2005Platform
,SQLServer2008Platform
). As DBAL is most of the times fetched as a dependency of ORM this can be a problem if someone still relies on those platforms. Not sure if this should be considered a BC-break, and hence DBAL 3 would not be possible on ORM 2. Some tests that relied on those platforms have then changed.Some methods that the ORM uses are no longer present on DBAL 3, namely
AbstractPlatform::prefersSequences()
,AbstractPlatform::getSQLResultCasing()
andAbstractPlatform::fixSchemaElementName()
. ForprefersSequences
I think I have found an acceptable workaround that should not break anything. ForgetSQLResultCasing
I have created a newSQLResultCaser
class to do it, same withfixSchemaElementName()
and a newSchemaElementNameFixer
. See the discussion with @morozov on Deprecate more AbstractPlatform methods dbal#4229Should we trigger deprecation warnings somewhere?
Tests pass with both DBAL 2 and DBAL 3. I have raised the minimum DBAL version to 2.12.