Skip to content

Commit

Permalink
[Env] Rename session params back to previus value to avoid BC break a…
Browse files Browse the repository at this point in the history
…dded in #308

ref: #308 (comment)
  • Loading branch information
andrerom committed Jul 27, 2018
1 parent 518c1eb commit 8b3d4e0
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,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 @@ -95,9 +95,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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 8b3d4e0

Please sign in to comment.