File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
5
5
and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
6
6
7
- ## [ Unreleased] ( https://gitlab.devsep.com/septech-php/septech-laravel/snowflake/-/compare/v1.0.2...master )
7
+ ## [ Unreleased] ( https://gitlab.devsep.com/septech-php/septech-laravel/snowflake/-/compare/v1.0.3...master )
8
+
9
+ ## [ v1.0.3 - 2020-11-11] ( https://github.com/SepteniTechnology/laravel-snowflake/compare/v1.0.2...v1.0.3 )
10
+ ### Fixed
11
+ - Fixed set resolver while redis not loaded
12
+
8
13
9
14
## [ v1.0.2 - 2020-09-01] ( https://github.com/SepteniTechnology/laravel-snowflake/compare/v1.0.1...v1.0.2 )
10
15
### Changed
Original file line number Diff line number Diff line change @@ -43,12 +43,18 @@ protected function registerSnowflakeInstance()
43
43
44
44
$ instance ->setStartTimeStamp (strtotime ($ config ->get ('snowflake.epoch ' )));
45
45
46
- if (! $ app ->runningUnitTests () && ! $ app ->isLocal ()) {
46
+
47
+ if (! $ app ->runningUnitTests () && ! $ app ->isLocal () && $ this ->hasRedis ()) {
47
48
$ cacheStore = $ app ->make ('cache ' )->store ($ config ->get ('snowflake.cache_store ' ));
48
49
$ instance ->setSequenceResolver (new LaravelSequenceResolver ($ cacheStore ));
49
50
}
50
51
51
52
return $ instance ;
52
53
});
53
54
}
55
+
56
+ protected function hasRedis ()
57
+ {
58
+ return extension_loaded ('redis ' );
59
+ }
54
60
}
You can’t perform that action at this time.
0 commit comments