| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3.2098 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | 1 | public function process(ContainerBuilder $container) |
|
| 30 | { |
||
| 31 | // Check if session support is enabled |
||
| 32 | 1 | if (!$container->hasParameter('cache.session')) { |
|
| 33 | return; |
||
| 34 | } |
||
| 35 | |||
| 36 | // If there is no active session support, throw |
||
| 37 | 1 | if (!$container->hasAlias('session.storage')) { |
|
| 38 | throw new \Exception('Session cache support cannot be enabled if there is no session.storage service'); |
||
| 39 | } |
||
| 40 | |||
| 41 | 1 | $container->setAlias('session.handler', 'cache.service.session'); |
|
| 42 | 1 | } |
|
| 43 | } |
||
| 44 |