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

[WIP] Mongodb support #1293

Closed
wants to merge 31 commits into
base: master
from

Conversation

Projects
None yet
@Zayon
Copy link
Contributor

Zayon commented Jul 28, 2017

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

Filters need a rework because FilterInterface use Doctrine\ORM\QueryBuilder which is not compatible with mongodb (and other potential providers)

I removed fos_user from behat test for mongo db as didn't manage to understand the problem.

@dunglas @Simperfit @samvdb @ihr-it-projekt

samvdb and others added some commits Mar 16, 2016

- add behat on mongo
- add symfony mongo test
- add mongo on travis & appveyor
- add behat on mongo
- add symfony mongo test
- add mongo on travis & appveyor
Merge branch 'odm-support' of https://github.com/samvdb/DunglasApiBundle
 into samvdb-odm-support

# Conflicts:
#	appveyor.yml
#	composer.json
#	src/Bridge/Doctrine/Filter/AbstractFilter.php
#	src/Bridge/Symfony/Bundle/DependencyInjection/Compiler/DoctrineQueryExtensionPass.php
#	src/Bridge/Symfony/Bundle/DependencyInjection/Configuration.php
#	tests/Bridge/Symfony/Bundle/DependencyInjection/ApiPlatformExtensionTest.php
#	tests/Bridge/Symfony/Bundle/DependencyInjection/Compiler/DoctrineQueryExtensionPassTest.php
#	tests/Bridge/Symfony/Bundle/DependencyInjection/ConfigurationTest.php
Merge branch 'odm-support' of https://github.com/samvdb/DunglasApiBundle
 into samvdb-odm-support

# Conflicts:
#	appveyor.yml
#	composer.json
#	src/Bridge/Doctrine/Filter/AbstractFilter.php
#	src/Bridge/Symfony/Bundle/DependencyInjection/Compiler/DoctrineQueryExtensionPass.php
#	src/Bridge/Symfony/Bundle/DependencyInjection/Configuration.php
#	tests/Bridge/Symfony/Bundle/DependencyInjection/ApiPlatformExtensionTest.php
#	tests/Bridge/Symfony/Bundle/DependencyInjection/Compiler/DoctrineQueryExtensionPassTest.php
#	tests/Bridge/Symfony/Bundle/DependencyInjection/ConfigurationTest.php
declare(strict_types=1);
namespace ApiPlatform\Core\Bridge\Doctrine\Filter;

This comment has been minimized.

@soyuka

soyuka Jul 28, 2017

Member

Why is this file part of this PR?

This comment has been minimized.

@Zayon

Zayon Jul 28, 2017

Author Contributor

It was part of this one : #461 and I didn't removed it for now.

This comment has been minimized.

@soyuka

soyuka Jul 28, 2017

Member

I was surprised because there is no diff. But yeah, we moved this in ApiPlatform\Core\Bridge\Doctrine\Orm\Filter since this is why there are no diffs :p.
My bad!

*
* @author Kévin Dunglas <dunglas@gmail.com>
*/
interface FilterInterface extends BaseFilterInterface

This comment has been minimized.

@soyuka

soyuka Jul 28, 2017

Member

Same, should not be part of this PR

@soyuka

This comment has been minimized.

Copy link
Member

soyuka commented Aug 2, 2017

haha nice one 👍 !

So, if I understand correctly, some behat tests are actually running successfully on mongodb? Last thing we need to cover the full behat suite is to add filters right?

We should test against a demo application using mango to be sure that this is working properly, I didn't had the time to do so unfortunately.

@Simperfit not sure how this is relevant.

Next steps are:

  • code review
  • more code review
  • filters implementation
  • docs

To ease the git management of this, WDYT about having a mongodb branch on api-platform/core that we could keep up to date with master while it's being built? Just saying this because this may not end up in 3.0.

@Zayon

This comment has been minimized.

Copy link
Contributor Author

Zayon commented Aug 2, 2017

It also misses sub-resources. I don't know if this is relevant with mongodb.

Also, fos user as it use doctrine orm.

@Simperfit

This comment has been minimized.

Copy link
Member

Simperfit commented Aug 3, 2017

@soyuka soyuka referenced this pull request Aug 28, 2017

Closed

[WIP] MongoDB Support #461

1 of 7 tasks complete
@ad3n

This comment has been minimized.

Copy link

ad3n commented Aug 30, 2017

@Zayon : It's mean we can use orm and odm both? Or only use one between orm and odm?

@Zayon

This comment has been minimized.

Copy link
Contributor Author

Zayon commented Aug 30, 2017

I did not try to use both. In theory it might work with a bit of tweaking. There will be limitations I think. For example I don't think it will possible to mix 2 endpoints from 2 data sources.
If you really want to use 2 data sources you should consider not using doctrine?

@ad3n

This comment has been minimized.

Copy link

ad3n commented Aug 30, 2017

@Zayon : when you can add extra config in @ApiResource to handle data source, example @ApiResource(driver="odm"), may we can use both

@ad3n

This comment has been minimized.

Copy link

ad3n commented Aug 30, 2017

If we can do that, we can implement http://docs.doctrine-project.org/projects/doctrine-mongodb-odm/en/latest/cookbook/blending-orm-and-mongodb-odm.html this feature...

@dunglas

This comment has been minimized.

Copy link
Member

dunglas commented Oct 12, 2017

Any news on this one? Would be awesome to be able to merge it!

@Zayon

This comment has been minimized.

Copy link
Contributor Author

Zayon commented Oct 13, 2017

Hi, we are no longer working on this as our project as been postponed.

@aldelplace should have the lastest info on this.

EDIT: @dunglas we can talk about this on slack on occasion.

@soyuka

This comment has been minimized.

Copy link
Member

soyuka commented Oct 13, 2017

@dunglas AFAIR we successfully made tests pass on this one!

In my latest comment, what's needed to get this merged is:

  • code review
  • more code review
  • filters implementation
  • docs
@adelplace

This comment has been minimized.

Copy link
Contributor

adelplace commented Oct 16, 2017

Hi,

@dunglas to me there still lot of work. Actually the behat tests weren't well wired to work with doctrine odm. We need to create documents to "translate" the current testing entities and adapt some tests to fit with mongo limitations which is a heavy work and I don't talk about the filters implementation...

Unfortunately, as our project using this api is stopped for now I can't give myself enough time to finish this work.

@samvdb

This comment has been minimized.

Copy link
Contributor

samvdb commented Oct 17, 2017

The current filtering logic implemented in this branch should be reworked before merging into master.

@guizmo51

This comment has been minimized.

Copy link

guizmo51 commented Nov 3, 2017

hey, I would like to help you. I forked this repo but I can't retrieve the specific branch for mongodb.

@Zayon

This comment has been minimized.

Copy link
Contributor Author

Zayon commented Nov 3, 2017

Hi, you can do git fetch origin pull/1293/head:mongodb to create a "mongodb" branch based on this PR.
But you won't be able to update the PR directly, you'll have to either create your own PR or create a PR on my fork https://github.com/zayon/core

Maybe someone from the api-platform team should create a dedicated branch a this repo @dunglas @Simperfit @soyuka ?

@adelplace should push his last work on this PR.

@soyuka soyuka referenced this pull request Nov 6, 2017

Closed

ODM Integration #1248

@adelplace

This comment has been minimized.

Copy link
Contributor

adelplace commented Nov 8, 2017

My little contribution is now on this branch ;)

@adelplace adelplace force-pushed the Zayon:mongodb branch from ae8cdda to 933ea0e Nov 8, 2017

@giovannialbero1992

This comment has been minimized.

Copy link

giovannialbero1992 commented Jan 10, 2018

This PR is abandoned? What can we do to complete this enhancement? Ty

@soyuka

This comment has been minimized.

Copy link
Member

soyuka commented Jan 10, 2018

@giovannialbero1992 :

rebase against master
code review
more code review
filters implementation
docs

@ad3n

This comment has been minimized.

Copy link

ad3n commented Jan 15, 2018

any update? i still waiting for this feature

@guizmo51

This comment has been minimized.

Copy link

guizmo51 commented Jan 15, 2018

@ad3n unfortunately i can't help for this project but it's open source, you cannot come here and just ask "any update...?" and the previous message (written 5 days ago) is clear, @soyuka listed tasks to do before.

I'm also interested in this features but two options if I want to see this PR released :

  • be quiet, wait the work of others dev
    or
  • help by reading previous messages and by trying to work on tasks listed

@alanpoulain alanpoulain referenced this pull request May 24, 2018

Closed

MongoDB integration #699

johnathancurry pushed a commit to johnathancurry/core that referenced this pull request Jul 12, 2018

@alanpoulain alanpoulain referenced this pull request Aug 5, 2018

Merged

MongoDB support #2144

0 of 3 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment