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

Create Serializable Redis Adapter and ApcuAdapter disabled in CLI #17

Merged
merged 8 commits into from
Apr 21, 2023

Conversation

koriym
Copy link
Member

@koriym koriym commented Apr 19, 2023

  • Create Serializable Redis Adapter
  • ApcuAdapter disabled in CLI

RedisAdapterはシリアライズ不可能で、またRedisそのものもシリアライズしてしまうと復元したときに機能しないようでその点を対策したPRです。

@codecov
Copy link

codecov bot commented Apr 19, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (65625a3) 100.00% compared to head (aef4fb3) 100.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##                 1.x       #17   +/-   ##
===========================================
  Coverage     100.00%   100.00%           
- Complexity        42        46    +4     
===========================================
  Files             23        24    +1     
  Lines            106       110    +4     
===========================================
+ Hits             106       110    +4     
Impacted Files Coverage Δ
src/Php73BcSerializableTrait.php 100.00% <ø> (ø)
src/LocalCacheProvider.php 100.00% <100.00%> (ø)
src/Psr6RedisModule.php 100.00% <100.00%> (ø)
src/RedisAdapter.php 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@koriym koriym force-pushed the serializable-redis-adapter branch from 5e648f6 to 7726b41 Compare April 19, 2023 05:33
@koriym koriym force-pushed the serializable-redis-adapter branch from 7726b41 to 9de40ee Compare April 19, 2023 05:40
@koriym koriym force-pushed the serializable-redis-adapter branch from b3e2e43 to 3350617 Compare April 19, 2023 14:32
@koriym koriym force-pushed the serializable-redis-adapter branch from cc97860 to ffcf079 Compare April 19, 2023 17:46
@koriym koriym force-pushed the serializable-redis-adapter branch from ffcf079 to c894dad Compare April 19, 2023 17:49
@koriym koriym force-pushed the serializable-redis-adapter branch from 53ffdab to aca7043 Compare April 19, 2023 18:34
@koriym koriym marked this pull request as ready for review April 19, 2023 18:37
@koriym koriym requested a review from NaokiTsuchiya April 19, 2023 18:37
@koriym koriym changed the title Create Serializable Redis Adapter Create Serializable Redis Adapter and ApcuAdapter disabled in CLI Apr 19, 2023
@koriym koriym requested a review from jingu April 20, 2023 02:09
@koriym koriym force-pushed the serializable-redis-adapter branch from 95049e1 to aca7043 Compare April 20, 2023 02:35
@koriym koriym force-pushed the serializable-redis-adapter branch 2 times, most recently from 4a6e855 to 75b0f2c Compare April 20, 2023 07:20
@koriym koriym force-pushed the serializable-redis-adapter branch from 75b0f2c to 7ce73db Compare April 20, 2023 07:34
Redis is not serializable.
@koriym koriym force-pushed the serializable-redis-adapter branch from fde3884 to 583db6f Compare April 20, 2023 07:51
Copy link
Member

@NaokiTsuchiya NaokiTsuchiya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a

// @codeCoverageIgnoreEnd
}

$this->bind(Redis::class);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

新しく実装された RedisAdapter はシリアライズ可能にするために Providerを注入されるようになりましたが、
ここでのアンターゲット束縛は上記とは関係ないという理解であっていますかね?

Redis を束縛する場合は RedisProvider を使わないとコネクション情報などを利用できないのでこのアンターゲット束縛自体は意味がないのかなと。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確かにここ不要です。suggest してもらっていいでしょうか?

* @Named("redisProvider=redis")
*/
#[CacheNamespace('namespace')]
#[Named('redisProvider=redis')]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Provider注入であれば、 #Set を使うのはどうですかね?

Redis が Provider束縛であれば使えるんですかね。

redis is obtained from provider, so no bundling is required

Co-authored-by: Naoki Tsuchiya <tsuchiya@bengo4.com>
@koriym koriym requested a review from NaokiTsuchiya April 21, 2023 07:19
@koriym koriym merged commit f20394b into 1.x Apr 21, 2023
@koriym koriym deleted the serializable-redis-adapter branch April 21, 2023 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants