8000 [Cache] Add compatibility with Couchbase 3.0 · Issue #39132 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Cache] Add compatibility with Couchbase 3.0 #39132

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

Closed
jderusse opened this issue Nov 20, 2020 · 10 comments · Fixed by #40120
Closed

[Cache] Add compatibility with Couchbase 3.0 #39132

jderusse opened this issue Nov 20, 2020 · 10 comments · Fixed by #40120
Labels
Cache Feature Help wanted Issues and PRs which are looking for volunteers to complete them.

Comments

@jderusse
Copy link
Member

The version 3.0 of the couchbase extension breaks compatibility (as expected for a major bump) excluding on objects we are using in the Cache Component.

version 2.6 => https://docs.couchbase.com/php-sdk/2.6/managing-connections.html
version 3.0 => https://docs.couchbase.com/php-sdk/current/howtos/managing-connections.html

The symfony/cache's adapter is not compatible with version 3.0

/cc @ajcerezo

@jderusse jderusse added the Help wanted Issues and PRs which are looking for volunteers to complete them. label Nov 20, 2020
@ajcerezo
Copy link
Contributor

Hi @jderusse,
ok, I get to review it and work on it.

@fr4ngus
Copy link
fr4ngus commented Nov 25, 2020

I look at the PECL extension, there is no class alias.
Maybe it can be useful
toplevel.txt

@stof
Copy link
Member
stof commented Nov 26, 2020

We don't want to be defining class aliases. We should use the right class names for 2.x vs 3.x (the classes themselves might have other changes than the class names).
Thus, we absolutely don't want to define class aliases in Symfony for classes defined elsewhere. That would cause lots of issues in the ecosystem (think about other packages using class_exists for instance)

@ajcerezo
Copy link
Contributor

@fr4ngus very thanks! but I am thinking as @stof, class alias is very dangerous

@ajcerezo
Copy link
Contributor
ajcerezo commented Jan 3, 2021

Hi @jderusse

Happy new year!

This change is a new feature that should come out of the 5.x branch, right?

Thank you.

@jderusse
Copy link
Member Author
jderusse commented Jan 3, 2021

Hello @ajcerezo, Happy new year,

Hmm. I'm not sure, when fix is just about bumping composer it can be a bugfix (like @derrabus is doing in #39685)

But if you have to rewrite everything, and create new classes and bridges, I don't think it's a bugfix anymore. But I'm maybe wrong.

@ajcerezo
Copy link
Contributor
ajcerezo commented Jan 4, 2021

Thanks @jderusse,

This new version of the sdk Couchbase is very different with previous version, list of differences:

  • SDK 2.6.x: The all operations (get key, set key, delete key, has key and flush bucket) execute with Bucket class.
  • SDK 3.x: The operations (as get key, set key, delete key and has key) execute a Collection class, this concept is content in Scope at the same time this concept is content in a Bucket, at this operations affect at the Collection class, but in this situation we cannot delete an entire content of collection without deleting the entire bucket.

Therefore it would make sense to make a new adapter called CouchbaseCollectionAdapter to be able to operate with the 3.x version of the SDK, since now we would operate with the Collection class and not with the Bucket class and it has muchs changes exceptions and other classs.

Thank you very much!

@carsonbot
Copy link

Thank you for this suggestion.
There has not been a lot of activity here for a while. Would you still like to see this feature?

@derrabus
Copy link
Member
derrabus commented Jul 6, 2021

Let‘s keep this issue open since there‘s a WIP PR already.

@carsonbot carsonbot removed the Stalled label Jul 6, 2021
@ajcerezo
Copy link
Contributor
ajcerezo commented Jul 6, 2021

Sorry for the delay, but I'm done. thk!

@fabpot fabpot closed this as completed Sep 9, 2021
fabpot added a commit that referenced this issue Sep 9, 2021
…ith sdk 3.0.0 (ajcerezo)

This PR was squashed before being merged into the 5.4 branch.

Discussion
----------

[Cache] Add CouchbaseCollectionAdapter compatibility with sdk 3.0.0

| Q             | A
| ------------- | ---
| Branch?       | 5.4
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | Fix #39132
| License       | MIT
| Doc PR        | symfony/symfony-docs#15764

Adding Couchbase SDK 3 support

Commits
-------

78820ea [Cache] Add CouchbaseCollectionAdapter compatibility with sdk 3.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cache Feature Help wanted Issues and PRs which are looking for volunteers to complete them.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants
0