-
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
Run builds with DBAL 4.0.x-dev #9727
Conversation
@derrabus do you have a recommendation on addressing this static analysis issue?
It's related to this bullet point:
One of the non-string occurrences is addressed by adding this:
But there are more. |
tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterTypeValueSqlTest.php
Show resolved
Hide resolved
This is a known issue with discriminator maps. Baseline it for now, fixing it is out of scope for this PR. |
composer.json
Outdated
@@ -25,7 +25,7 @@ | |||
"ext-ctype": "*", | |||
"doctrine/collections": "^1.5", | |||
"doctrine/common": "^3.3", | |||
"doctrine/dbal": "^3.3", | |||
"doctrine/dbal": "^3.4.x-dev", |
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.
Would it be acceptable to bump this version constraint temporarily (we can pin it to a specific commit)?
I plan to add a couple more upgrade path improvements to the DBAL 3.4 (see the description). Since they are not yet released, if we don't bump the constraint, we will either have to force the release in order to avoid the dependency of the dev ORM on dev DBAL, or we will have to refrain from merging all the changes related to the DBAL 4 until they are implemented in full and the scope of the upgrade path improvements is fully defined.
I believe this change is acceptable since it's unlikely that ORM 3 will be released before DBAL 3.4. Even if this happens, we can release DBAL 3.4 right before that.
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.
I think it's fine, as you say we can still force publish 3.4 in the unlikely event we want to publish ORM 3 before it is ready.
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.
This is fine, but let's use this constraint instead:
"doctrine/dbal": "^3.4.x-dev", | |
"doctrine/dbal": "^3.4@dev", |
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.
Yeah, we can use that. How is it better than the original constraint?
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.
It's consitent with what we usually use in those situations.
composer.json
Outdated
@@ -25,7 +25,7 @@ | |||
"ext-ctype": "*", | |||
"doctrine/collections": "^1.5", | |||
"doctrine/common": "^3.3", | |||
"doctrine/dbal": "^3.3", | |||
"doctrine/dbal": "^3.4.x-dev", |
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.
I think it's fine, as you say we can still force publish 3.4 in the unlikely event we want to publish ORM 3 before it is ready.
@@ -1063,6 +1063,9 @@ | |||
<PossiblyUndefinedVariable occurrences="1"> | |||
<code>$columnList</code> | |||
</PossiblyUndefinedVariable> | |||
<RedundantCastGivenDocblockType occurrences="1"> | |||
<code>(string) $discrValues[$subclassName]</code> | |||
</RedundantCastGivenDocblockType> |
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.
This should be fixed up into b291c4e
We want the 2.x series to run deprecation-free with DBAL 3.x. This PR seems to prepare the ORM for some deprecations coming with DBAL 3.4.0. Can we backport parts of this PR to 2.13.x? |
Yeah, about half of these commits could be backported to 2.13. Even though some of them wouldn't address runtime deprecations, they would set an example of writing code compatible with DBAL 4 (e.g. 9f0ff98, 96b1c37, 99aa247). I can start with backporting and once they are merged back up, we can continue here. In the meantime, I can address any issues regarding the code changes. |
Sounds good. |
Relevant changes from DBAL 4.0.x:
TODO:
Why do discriminator maps have numeric keys despite theirKnown issue to be baselined.<string,class-string>
type?Improve DBAL upgrade path:
Next steps:
^4@dev
on PostgreSQL.^4@dev
.^3.4
once it's released.