Skip to content

Commit

Permalink
Merge branch 'studio_2.2' into studio_master
Browse files Browse the repository at this point in the history
  • Loading branch information
andrerom committed Jul 23, 2018
2 parents 66618c1 + e41b2fe commit 4cf858b
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 30 deletions.
10 changes: 5 additions & 5 deletions app/config/config.yml
Expand Up @@ -64,12 +64,12 @@ framework:
trusted_hosts: ~
session:
# https://symfony.com/doc/current/reference/configuration/framework.html#handler-id
# handler_id set to null will use default session handler from php.ini
handler_id: '%ezplatform.session.handler_id%'
save_path: '%ezplatform.session.save_path%'
# Note: eZ Publish also allows session name and session cookie configuration to be per SiteAccess, by
# if handler_id set to null will use default session handler from php.ini
handler_id: '%session.handler_id%'
save_path: '%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/master/guide/sessions/
# Further reading on sessions: http://doc.ezplatform.com/en/latest/guide/sessions/
fragments: ~
http_method_override: true
assets: true
Expand Down
25 changes: 22 additions & 3 deletions app/config/default_parameters.yml
@@ -1,8 +1,6 @@
# This file contains defaults for optional parameters, which you can override in parameters.yml
parameters:
locale_fallback: en
ezplatform.session.handler_id: session.handler.native_file
ezplatform.session.save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%'

# A secret key that's used to generate certain security-related tokens
secret: '%env(SYMFONY_SECRET)%'
Expand Down Expand Up @@ -48,6 +46,14 @@ parameters:
# using EzSystemsPlatformHttpCacheBundle (default as of v1.12) which by design expires affected cache on changes
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)%'

# Recommendation Bundle params
ez_recommendation.default.yoochoose.customer_id: '%env(RECOMMENDATIONS_CUSTOMER_ID)%'
ez_recommendation.default.yoochoose.license_key: '%env(RECOMMENDATIONS_LICENSE_KEY)%'
ez_recommendation.default.server_uri: '%env(PUBLIC_SERVER_URI)%'

# Fallback values for when environment variables do not exist

env(MAILER_HOST): 127.0.0.1
Expand All @@ -69,19 +75,32 @@ parameters:

env(HTTPCACHE_DEFAULT_TTL): 86400

env(SESSION_SAVE_PATH): '%kernel.project_dir%/var/sessions/%kernel.environment%'

env(RECOMMENDATIONS_CUSTOMER_ID): ~
env(RECOMMENDATIONS_LICENSE_KEY): ~
env(PUBLIC_SERVER_URI): ~


# Compile time handlers
## These are defined at compile time, and hence can't be set at runtime using env()
## app/config/env/generic.php takes care about letting you set them by env variables

## Log type is one of "stream", "error_log" or other types supported by monolog
# env: LOG_TYPE
log_type: stream

## Mail transport used by SwiftMailer
# env: MAILER_TRANSPORT
mailer_transport: smtp

# Purge type used by HttpCache system ("local", "varnish"/"http", and on ee also "fastly")
## Purge type used by HttpCache system ("local", "varnish"/"http", and on ee also "fastly")
# 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%
# env: SESSION_HANDLER_ID
session.handler_id: session.handler.native_file

# Admin siteaccess group name
admin_group_name: admin_group
20 changes: 1 addition & 19 deletions app/config/env/generic.php
Expand Up @@ -68,26 +68,8 @@
$container->setParameter('log_type', $value);
}

// EzSystemsRecommendationsBundle settings
// @todo Move to use env() and params
if ($value = getenv('RECOMMENDATIONS_CUSTOMER_ID')) {
$container->setParameter('ez_recommendation.default.yoochoose.customer_id', $value);
}

if ($value = getenv('RECOMMENDATIONS_LICENSE_KEY')) {
$container->setParameter('ez_recommendation.default.yoochoose.license_key', $value);
}

if ($value = getenv('PUBLIC_SERVER_URI')) {
$container->setParameter('ez_recommendation.default.server_uri', $value);
}

if ($value = getenv('SESSION_HANDLER_ID')) {
$container->setParameter('ezplatform.session.handler_id', $value);
}

if ($value = getenv('SESSION_SAVE_PATH')) {
$container->setParameter('ezplatform.session.save_path', $value);
$container->setParameter('session.handler_id', $value);
}

// EzSystemsPlatformFastlyCacheBundle settings
Expand Down
4 changes: 2 additions & 2 deletions app/config/env/platformsh.php
Expand Up @@ -104,7 +104,7 @@
continue;
}

$container->setParameter('ezplatform.session.handler_id', 'ezplatform.core.session.handler.native_redis');
$container->setParameter('session.handler_id', 'ezplatform.core.session.handler.native_redis');
$container->setParameter('session.save_path', sprintf('%s:%d', $endpoint['host'], $endpoint['port']));
}
} elseif (isset($relationships['rediscache'])) {
Expand All @@ -113,7 +113,7 @@
continue;
}

$container->setParameter('ezplatform.session.handler_id', 'ezplatform.core.session.handler.native_redis');
$container->setParameter('session.handler_id', 'ezplatform.core.session.handler.native_redis');
$container->setParameter('session.save_path', sprintf('%s:%d', $endpoint['host'], $endpoint['port']));
}
}
6 changes: 5 additions & 1 deletion app/config/parameters.yml.dist
@@ -1,7 +1,11 @@
# This file is a "template" of what your parameters.yml file should look like
#
# NB!: Some parameters are on purpose placed in default_parameters.yml to not
# prompt on all possible parameters during install with no info to go with it.
# (This will change once we move to use Symfony flex)
parameters:
# A secret key that's used to generate certain security-related tokens
env(SYMFONY_SECRET): ThisEzPlatformTokenIsNotSoSecretChangeIt
env(SYMFONY_SECRET): ThisEzPlatformTokenIsNotSoSecret_PleaseChangeIt

# Settings for database backend used by Doctrine DBAL
# In turn used for default storage engine & default search engine (if legacy is configured as search engine)
Expand Down

0 comments on commit 4cf858b

Please sign in to comment.