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

Removed hard dependencies on doctrine odm to run the tests #2703

Open
wants to merge 3 commits into
base: 2.4
from

Conversation

Projects
None yet
5 participants
@Toflar
Copy link
Contributor

Toflar commented Apr 6, 2019

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #2484
License MIT
Doc PR

@Toflar Toflar force-pushed the Toflar:optional-mongodb-tests branch 2 times, most recently from dd6c1d1 to b40effc Apr 6, 2019

@soyuka

soyuka approved these changes Apr 8, 2019

Copy link
Member

soyuka left a comment

Love it! Many thanks for this @Toflar it wasn't an easy task haha!

WDYT @api-platform/core-team ? IMO it'd be good to have this especially that new contributors won't have to install mongodb to run the tests!

@Toflar Toflar force-pushed the Toflar:optional-mongodb-tests branch from 390bb64 to 64a17c7 Apr 8, 2019

@Toflar Toflar force-pushed the Toflar:optional-mongodb-tests branch from 64a17c7 to e7f7813 Apr 8, 2019

@Toflar Toflar changed the title [WIP] Removed hard dependencies on doctrine odm to run the tests Removed hard dependencies on doctrine odm to run the tests Apr 8, 2019

@Toflar

This comment has been minimized.

Copy link
Contributor Author

Toflar commented Apr 8, 2019

Finally 😄 Cleaned up, rebased and squashed. The code coverage drop is because mongodb is now its own phpunit config. But I don't understand why we're testing on both, travis and circleci anyway? 😄

@teohhanhui
Copy link
Member

teohhanhui left a comment

Minor stuff but otherwise great work! 🎉

Show resolved Hide resolved .circleci/config.yml Outdated
Show resolved Hide resolved .circleci/config.yml Outdated
Show resolved Hide resolved .circleci/config.yml Outdated
Show resolved Hide resolved .circleci/config.yml Outdated
Show resolved Hide resolved .travis.yml Outdated
Show resolved Hide resolved .travis.yml Outdated
@@ -28,6 +28,7 @@
/**
* @author Alan Poulain <contact@alanpoulain.eu>
* @group mongodb

This comment has been minimized.

Copy link
@teohhanhui

teohhanhui Apr 8, 2019

Member

phpdoc and non-phpdoc annotations should not be grouped together (add a blank line). And probably the @group is much more important than the @author so it could go first.

This comment has been minimized.

Copy link
@Toflar

Toflar Apr 9, 2019

Author Contributor

Cleaned up

/**
* @group mongodb
*/
public function testLoadDefaultConfigWithOdm()

This comment has been minimized.

Copy link
@alanpoulain

alanpoulain Apr 8, 2019

Member
Suggested change
public function testLoadDefaultConfigWithOdm()
public function testLoadDefaultConfigWithMongoDbOdm()

Because there are other ones.

@@ -13,7 +13,7 @@
<env name="SYMFONY_DEPRECATIONS_HELPER" value="weak_vendors" />
<server name="KERNEL_DIR" value="tests/Fixtures/app/" />
<server name="KERNEL_CLASS" value="AppKernel" />
<server name="APP_ENV" value="test_mongodb" />
<server name="APP_ENV" value="mongodb" />

This comment has been minimized.

This comment has been minimized.

Copy link
@Toflar

Toflar Apr 9, 2019

Author Contributor

Well, tests are green so you tell me 😄

This comment has been minimized.

Copy link
@teohhanhui

teohhanhui Apr 9, 2019

Member

@Toflar But the config wouldn't get applied correctly. So the APP_ENV should be reverted to test_mongodb. 😄

This comment has been minimized.

Copy link
@teohhanhui

teohhanhui Apr 9, 2019

Member

Or better, rename the config files, since we do the same for elasticsearch.

/**
* @group mongodb
*/
public function testDisableDoctrineWithOdm()

This comment has been minimized.

Copy link
@alanpoulain

alanpoulain Apr 8, 2019

Member
Suggested change
public function testDisableDoctrineWithOdm()
public function testDisableDoctrineWithMongoDbOdm()

Toflar added some commits Apr 9, 2019

Apply suggestions from code review
Co-Authored-By: Toflar <yanick.witschi@terminal42.ch>
CS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.