Skip to content

Commit

Permalink
Merge branch '2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Łukasz Serwatka committed Aug 3, 2018
2 parents 3c1c943 + 98dfbe3 commit bc5a69b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/config/config.yml
Expand Up @@ -65,8 +65,8 @@ framework:
session:
# https://symfony.com/doc/current/reference/configuration/framework.html#handler-id
# if handler_id set to null will use default session handler from php.ini
handler_id: '%session.handler_id%'
save_path: '%session.save_path%'
handler_id: '%ezplatform.session.handler_id%'
save_path: '%ezplatform.session.save_path%'
# Note: eZ Platform also allows session name and session cookie configuration to be per SiteAccess, by
# default session name will be set to "eZSESSID{siteaccess_hash}" (unique session name per siteaccess)
# Further reading on sessions: http://doc.ezplatform.com/en/latest/guide/sessions/
Expand Down
6 changes: 3 additions & 3 deletions app/config/default_parameters.yml
Expand Up @@ -48,7 +48,7 @@ parameters:
httpcache_default_ttl: '%env(HTTPCACHE_DEFAULT_TTL)%'

# Session save path as used by symfony session handlers (eg. used for dsn with redis)
session.save_path: '%env(SESSION_SAVE_PATH)%'
ezplatform.session.save_path: '%env(SESSION_SAVE_PATH)%'

# Recommendation Bundle params
ez_recommendation.default.yoochoose.customer_id: '%env(RECOMMENDATIONS_CUSTOMER_ID)%'
Expand Down Expand Up @@ -102,9 +102,9 @@ parameters:
# env: HTTPCACHE_PURGE_TYPE
purge_type: local

## Session handler, by default set to file based in order to be able to use %session.save_path%
## Session handler, by default set to file based (instead of ~) in order to be able to use %ezplatform.session.save_path%
# env: SESSION_HANDLER_ID
session.handler_id: session.handler.native_file
ezplatform.session.handler_id: session.handler.native_file

# Admin siteaccess group name
admin_group_name: admin_group
2 changes: 1 addition & 1 deletion app/config/env/generic.php
Expand Up @@ -69,5 +69,5 @@
}

if ($value = getenv('SESSION_HANDLER_ID')) {
$container->setParameter('session.handler_id', $value);
$container->setParameter('ezplatform.session.handler_id', $value);
}
8 changes: 4 additions & 4 deletions app/config/env/platformsh.php
Expand Up @@ -104,16 +104,16 @@
continue;
}

$container->setParameter('session.handler_id', 'ezplatform.core.session.handler.native_redis');
$container->setParameter('session.save_path', sprintf('%s:%d', $endpoint['host'], $endpoint['port']));
$container->setParameter('ezplatform.session.handler_id', 'ezplatform.core.session.handler.native_redis');
$container->setParameter('ezplatform.session.save_path', sprintf('%s:%d', $endpoint['host'], $endpoint['port']));
}
} elseif (isset($relationships['rediscache'])) {
foreach ($relationships['rediscache'] as $endpoint) {
if ($endpoint['scheme'] !== 'redis') {
continue;
}

$container->setParameter('session.handler_id', 'ezplatform.core.session.handler.native_redis');
$container->setParameter('session.save_path', sprintf('%s:%d', $endpoint['host'], $endpoint['port']));
$container->setParameter('ezplatform.session.handler_id', 'ezplatform.core.session.handler.native_redis');
$container->setParameter('ezplatform.session.save_path', sprintf('%s:%d', $endpoint['host'], $endpoint['port']));
}
}

0 comments on commit bc5a69b

Please sign in to comment.