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
When you pair the ORM with DBAL 2.5.0, then getting the targetPlatform means that a connection will be made to the database. For that reason, it's really important to not get the targetPlatform unless it's absolutely needed. Currently, if you call ClassMetadataFactor::getAllMetadata(), it will try to determine targetPlatform (in initialize()), which will make a connection. And if that connection fails (e.g. no db yet), it will blow up - even though getAllMetadata() doesn't need the targetPlatform.
This fixes that, and in an absolutely BC way, since targetPlatform is private (yay!). This should fix a number of issues in userland, like symfony/symfony-standard#748 and symfony/symfony-standard#774.
This is a PR to master (per the guidelines), but the real target is 2.4, since it's the latest stable. The patch won't apply cleanly, but it's simple: remove from initialize, then replace all references to the new private method.
Thanks in advance! More details are on the commit message.
The text was updated successfully, but these errors were encountered:
Jira issue originally created by user @doctrinebot:
This issue is created automatically through a Github pull request on behalf of weaverryan:
Url: #1294
Message:
Hi guys!
When you pair the ORM with DBAL 2.5.0, then getting the
targetPlatform
means that a connection will be made to the database. For that reason, it's really important to not get thetargetPlatform
unless it's absolutely needed. Currently, if you callClassMetadataFactor::getAllMetadata()
, it will try to determinetargetPlatform
(ininitialize()
), which will make a connection. And if that connection fails (e.g. no db yet), it will blow up - even thoughgetAllMetadata()
doesn't need thetargetPlatform
.This fixes that, and in an absolutely BC way, since
targetPlatform
is private (yay!). This should fix a number of issues in userland, like symfony/symfony-standard#748 and symfony/symfony-standard#774.This is a PR to master (per the guidelines), but the real target is 2.4, since it's the latest stable. The patch won't apply cleanly, but it's simple: remove from initialize, then replace all references to the new private method.
Thanks in advance! More details are on the commit message.
The text was updated successfully, but these errors were encountered: