Skip to content
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

Address MasterSlaveConnection rename #1096

Merged
merged 1 commit into from
Dec 5, 2020

Conversation

greg0ire
Copy link
Member

@greg0ire greg0ire commented Dec 2, 2020

Q A
Type bug
BC Break no
Fixed issues n/a

Summary

MasterSlaveConnection has been deprecated in favor of
PrimaryReadReplicaConnection, which it extends before being removed in
DBAL 3. This ensure both cases are handled when it comes to making sure
we connect to the primary, while not bumping the requirement to
doctrine/dbal 2.11 (which requires PHP 7.3, although subsequent version
might restore compatibility with 7.1).

* simplest to set up for.
*
* @see https://github.com/doctrine/migrations/issues/336
*/
Copy link
Member Author

Choose a reason for hiding this comment

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

I copy/pasted the comment of the method above.

MasterSlaveConnection has been deprecated in favor of
PrimaryReadReplicaConnection, which it extends before being removed in
DBAL 3. This ensure both cases are handled when it comes to making sure
we connect to the primary, while not bumping the requirement to
doctrine/dbal 2.11 (which requires PHP 7.3, although subsequent version
might restore compatibility with 7.1).
@greg0ire greg0ire force-pushed the address-master-slave-rename branch from 69300c5 to dbbd7b3 Compare December 2, 2020 22:12
@@ -17,6 +17,8 @@ parameters:
- '~^Parameter #1 \$files of method Doctrine\\Migrations\\Finder\\Finder::loadMigrationClasses\(\) expects array<string>, array<int, string\|false> given\.\z~'
- '~^Class Doctrine\\Migrations\\Tests\\DoesNotExistAtAll not found\.\z~'
- '~^Call to method getVersion\(\) of deprecated class PackageVersions\\Versions\.$~'
# Drop when bumping to doctrine/dbal 2.11+
- '~^.*PrimaryReadReplicaConnection.*$~'
Copy link
Member Author

Choose a reason for hiding this comment

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

phpstan is ran on 7.1, which prevents installing a recent enough version of doctrine/dbal, and generates quite a few errors because the class does not exist. The errors can be seen (for now) at https://github.com/doctrine/migrations/runs/1489165823?check_suite_focus=true

@greg0ire greg0ire marked this pull request as ready for review December 2, 2020 22:15
@greg0ire greg0ire requested review from goetas and stof December 2, 2020 22:16
@greg0ire greg0ire merged commit af91502 into doctrine:2.3.x Dec 5, 2020
@greg0ire greg0ire deleted the address-master-slave-rename branch December 5, 2020 19:14
@greg0ire greg0ire added this to the 2.3.1 milestone Dec 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants