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

Match with enable logging and profiling #314

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

ziaratban
Copy link
Contributor

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

see yii\mongodb\Connection::enableLogging and yii\mongodb\Connection::enableProfiling
src/BatchQueryResult.php Show resolved Hide resolved
src/Query.php Outdated Show resolved Hide resolved
src/Query.php Outdated Show resolved Hide resolved
@samdark samdark added the type:enhancement Enhancement label Jul 3, 2020
@ziaratban
Copy link
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.

src/Query.php Outdated Show resolved Hide resolved
src/Query.php Outdated Show resolved Hide resolved
src/Query.php Outdated Show resolved Hide resolved
src/Query.php Outdated Show resolved Hide resolved
src/Query.php Outdated Show resolved Hide resolved
src/Connection.php Outdated Show resolved Hide resolved
src/Connection.php Outdated Show resolved Hide resolved
src/Connection.php Outdated Show resolved Hide resolved
src/Connection.php Outdated Show resolved Hide resolved
ziaratban and others added 9 commits July 6, 2020 19:42
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
Co-authored-by: Alexander Makarov <[email protected]>
ziaratban added a commit to ziaratban/yii2-mongodb that referenced this pull request Jul 9, 2020
@samdark
Copy link
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
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
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
Contributor Author

@samdark

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

fixed.

@samdark
Copy link
Member

samdark commented Oct 30, 2020

Seems tests aren't alright with new code.

@ziaratban
Copy link
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
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
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
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
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