Skip to content

Match with enable logging and profiling#314

Open
ziaratban wants to merge 18 commits into
yiisoft:masterfrom
ziaratban:match-with-enableLogging-and-Profiling
Open

Match with enable logging and profiling#314
ziaratban wants to merge 18 commits into
yiisoft:masterfrom
ziaratban:match-with-enableLogging-and-Profiling

Conversation

@ziaratban
Copy link
Copy Markdown
Contributor

Q A
Is bugfix? yes
New feature? no
Breaks BC? no
Tests pass? yes

ziaratban added 3 commits July 2, 2020 20:14
see yii\mongodb\Connection::enableLogging and yii\mongodb\Connection::enableProfiling
Comment thread src/BatchQueryResult.php
Comment thread src/Query.php Outdated
Comment thread src/Query.php Outdated
@samdark samdark added the type:enhancement Enhancement label Jul 3, 2020
@ziaratban
Copy link
Copy Markdown
Contributor Author

main purpose
in my console application when i set enableLogging and enableProfiling to false but logging and profiling still worked. seems some part of codes like current committed file not correctly working base this rules.

Comment thread src/Query.php Outdated
Comment thread src/Query.php Outdated
Comment thread src/Query.php Outdated
Comment thread src/Query.php Outdated
Comment thread src/Query.php Outdated
Comment thread src/Connection.php Outdated
Comment thread src/Connection.php Outdated
Comment thread src/Connection.php Outdated
Comment thread src/Connection.php Outdated
ziaratban and others added 9 commits July 6, 2020 19:42
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
Co-authored-by: Alexander Makarov <sam@rmcreative.ru>
ziaratban added a commit to ziaratban/yii2-mongodb that referenced this pull request Jul 9, 2020
@samdark
Copy link
Copy Markdown
Member

samdark commented Jul 14, 2020

@ziaratban ziaratban force-pushed the match-with-enableLogging-and-Profiling branch 3 times, most recently from 70d76cc to 1e760fe Compare July 17, 2020 05:38
@ziaratban
Copy link
Copy Markdown
Contributor Author

https://travis-ci.com/github/yiisoft/yii2-mongodb/jobs/357995598#L1572 - fails tests on connection.

@samdark
fixed. but some errors is related to other bugs.

please see
yiisoft/yii2#18184
#315
#316

@samdark
Copy link
Copy Markdown
Member

samdark commented Jul 17, 2020

@ziaratban referencing Yii::$app->mongodb is incorrect. You should use connection.

ziaratban added a commit to ziaratban/yii2-mongodb that referenced this pull request Oct 1, 2020
@ziaratban
Copy link
Copy Markdown
Contributor Author

@samdark

@ziaratban referencing Yii::$app->mongodb is incorrect. You should use connection.

fixed.

@samdark
Copy link
Copy Markdown
Member

samdark commented Oct 30, 2020

Seems tests aren't alright with new code.

@ziaratban
Copy link
Copy Markdown
Contributor Author

Seems tests aren't alright with new code.

1) yiiunit\extensions\mongodb\ActiveDataProviderTest::testQuery
yii\base\InvalidConfigException: Unknown component ID: mongodb

I think this is about test case. (#316 )

@samdark
Copy link
Copy Markdown
Member

samdark commented Oct 31, 2020

I think this is about test case. (#316 )

No, it should not be since tests are alright in master branch.

@ziaratban
Copy link
Copy Markdown
Contributor Author

ziaratban commented Oct 31, 2020

i merged branch test-case-db-problem into match-with-enableLogging-and-Profiling and all checks have passed.
i will drop the last commit if you confirm this issue.(also a bug existed)

@samdark
Copy link
Copy Markdown
Member

samdark commented Oct 31, 2020

The change looks valid, yes. I wonder why tests do pass then in master. Must be uncovered case...

@ziaratban
Copy link
Copy Markdown
Contributor Author

No, I think no uncovered cases exist. A wrong direction has gone through, across the 'test case' project. Mongodb's component is not used.

Docs say this about the Query::all() :

The Mongo connection used to execute the query. If this parameter is not given, the mongodb application component will be used.

@ziaratban ziaratban force-pushed the match-with-enableLogging-and-Profiling branch from 61e732c to dd7c555 Compare October 31, 2020 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:enhancement Enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants