File tree Expand file tree Collapse file tree
src/Vivait/StringGeneratorBundle/Generator Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 "symfony/polyfill-php70" : " ^1.3" ,
1818 "symfony/security" : " ^2.8|^3.0" ,
1919 "symfony/options-resolver" : " ^2.8|^3.0" ,
20- "ircmaxell/random-lib" : " ~1.0" ,
21- "ramsey/uuid" : " ^3.6"
20+ "ircmaxell/random-lib" : " ~1.0"
21+ },
22+ "suggest" : {
23+ "ramsey/uuid" : " To use the UUID generator you should require this package"
2224 },
2325 "require-dev" : {
2426 "phpspec/phpspec" : " ~2.0"
Original file line number Diff line number Diff line change @@ -38,6 +38,10 @@ public function __construct()
3838 */
3939 public function generate ()
4040 {
41+ if (!class_exists ('Ramsey\Uuid\Uuid ' )) {
42+ throw new \RuntimeException ('For use the UUID generator you should setup the ramsey/uuid package ' );
43+ }
44+
4145 switch ($ this ->version ) {
4246 case 1 :
4347 return Uuid::uuid1 ()->toString ();
You can’t perform that action at this time.
0 commit comments