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
Moving database connection from static variable to DI + related changes. #7490
Conversation
Hard to review, I reckon it's ok :) |
Forget about this PR for now, can do it later when LocalTracker isn't used. |
58e9c0d
to
e201eba
Compare
…me map when displayed on a page
b2e4ef9
to
8c7f816
Compare
…uired for tracker).
…fetch/query/exec methods to it. Will be used as primary low level DB access API by end of PR.
…o connect to the DB w/o having to go through DI or static methods. Separated DB creation/setup from Fixture::performSetUp.
…b adapter. Fix several (but not all) tests.
… test creates a connection & allow SystemTestCase to check if a database connection has been created through DI config. Has some test fixes, but there are still problems w/ this solution.
…tatable options through DI config instead of in TestingEnvironmentManipulator so DB connection is not automatically created during tests. Also removed the Db\Schema class since it is not needed (only the interface is necessary).
…tion and is required to not be created during tests.
…an AdapterInterface through DI. Add all missing methods to AdapterInterface.
…e to have 0 static methods.
…apterInterface instead of Db\Connection.
…one does not reset the DB config which allows us to reconnect to the DB when needed.
…a resetConfig() call, and quick fix for previous Fixture refactor which is now causing problems.
Thank you for this proposed pull request. Because it was last updated more than one month ago, it is our policy to close pull requests opened for a long time without updates. If you would like to continue work on the pull request, please simply ping us to have it re-opened (after you have pushed a new commit). We hope you understand this and we look forward to seeing an update from you on this pull request or another one! Thanks. |
As title, this pull request's purpose is to move the database connection to DI so it can be easily injected.
Includes many other changes since the connection code is highly coupled.
By the end, should include a proof of concept test that mocks the DB connection to test whether OPTIMIZE TABLES is done for MariaDB InnoDB tables.