Skip to content
This repository has been archived by the owner on Feb 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #126 from spryker/bugfix/php7-comp
Browse files Browse the repository at this point in the history
CORE-372 BC check for PHP7 changes incl new devvm
  • Loading branch information
dereuromark authored Nov 14, 2016
2 parents 99dd316 + 6fedce2 commit 7e2f177
Show file tree
Hide file tree
Showing 11 changed files with 225 additions and 51 deletions.
2 changes: 1 addition & 1 deletion codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ modules:
coverage:
enabled: true
remote: true
c3_url: 'http://zed.de.spryker.dev'
c3_url: 'http://zed.de.project.local'
whitelist: { include: ['src/Pyz/*.php'] }

extensions:
Expand Down
52 changes: 26 additions & 26 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/Shared/ci/travis/travis-ci-apache-yves
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<VirtualHost *:80>

DocumentRoot %TRAVIS_BUILD_DIR%/public/Yves
ServerName www.de.spryker.dev
ServerName www.de.spryker.local

<FilesMatch \.php$>
SetHandler application/x-httpd-php
Expand Down
2 changes: 1 addition & 1 deletion config/Shared/ci/travis/travis-ci-apache-zed
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<VirtualHost *:80>

DocumentRoot %TRAVIS_BUILD_DIR%/public/Zed
ServerName zed.de.spryker.dev
ServerName zed.de.spryker.local

ErrorLog /tmp/zed-error.log

Expand Down
10 changes: 5 additions & 5 deletions config/Shared/config_default-development_DE.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
$config[PropelConstants::ZED_DB_ENGINE] = $config[PropelConstants::ZED_DB_ENGINE_PGSQL];
$config[PropelConstants::ZED_DB_PORT] = 5432;

$yvesHost = 'www.de.spryker.dev';
$yvesHost = 'www.de.project.local';
$config[ApplicationConstants::HOST_YVES] = 'http://' . $yvesHost;
$config[ApplicationConstants::HOST_STATIC_ASSETS] = $config[ApplicationConstants::HOST_STATIC_MEDIA] = $yvesHost;
$config[SessionConstants::YVES_SESSION_COOKIE_DOMAIN] = $yvesHost;

$config[ApplicationConstants::HOST_SSL_YVES] = 'https://' . $yvesHost;
$config[ApplicationConstants::HOST_SSL_STATIC_ASSETS] = $config[ApplicationConstants::HOST_SSL_STATIC_MEDIA] = $yvesHost;

$zedHost = 'zed.de.spryker.dev';
$zedHost = 'zed.de.project.local';
$config[ApplicationConstants::HOST_ZED_GUI]
= 'http://' . $zedHost;
$config[ApplicationConstants::HOST_ZED_API] = $zedHost;
Expand All @@ -32,12 +32,12 @@
$config[SessionConstants::ZED_SESSION_COOKIE_NAME] = $zedHost;
$config[SessionConstants::ZED_SESSION_COOKIE_SECURE] = false;

$config[ApplicationConstants::CLOUD_CDN_STATIC_MEDIA_HTTP] = 'http://static.de.spryker.dev';
$config[ApplicationConstants::CLOUD_CDN_STATIC_MEDIA_HTTPS] = 'https://static.de.spryker.dev';
$config[ApplicationConstants::CLOUD_CDN_STATIC_MEDIA_HTTP] = 'http://static.project.local';
$config[ApplicationConstants::CLOUD_CDN_STATIC_MEDIA_HTTPS] = 'https://static.project.local';

$config[ApplicationConstants::JENKINS_BASE_URL] = 'http://localhost:10007/';
$config[MailConstants::MAILCATCHER_GUI] = 'http://' . $config[ApplicationConstants::HOST_ZED_GUI] . ':1080';
$config[ApplicationConstants::YVES_TRUSTED_HOSTS] = [$yvesHost, $zedHost];
$config[ApplicationConstants::YVES_TRUSTED_HOSTS] = [];

/* Elasticsearch */
$config[ApplicationConstants::ELASTICA_PARAMETER__INDEX_NAME] = 'de_search';
Expand Down
14 changes: 7 additions & 7 deletions config/Shared/config_default-development_US.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,34 @@
use Spryker\Shared\Application\ApplicationConstants;
use Spryker\Shared\Mail\MailConstants;

$yvesHost = 'www.com.spryker.dev';
$yvesHost = 'www.com.project.local';
$config[ApplicationConstants::HOST_YVES] = 'http://' . $yvesHost;
$config[ApplicationConstants::HOST_STATIC_ASSETS] = $config[ApplicationConstants::HOST_STATIC_MEDIA] = $yvesHost;

$config[ApplicationConstants::HOST_SSL_YVES] = 'https://' . $yvesHost;
$config[ApplicationConstants::HOST_SSL_STATIC_ASSETS] = $config[ApplicationConstants::HOST_SSL_STATIC_MEDIA] = $yvesHost;

$zedHost = 'zed.com.spryker.dev';
$zedHost = 'zed.com.project.local';
$config[ApplicationConstants::HOST_ZED_GUI]
= $config[ApplicationConstants::HOST_ZED_API]
= 'http://' . $zedHost;
$config[ApplicationConstants::HOST_SSL_ZED_GUI]
= $config[ApplicationConstants::HOST_SSL_ZED_API]
= 'https://' . $zedHost;

$config[ApplicationConstants::YVES_TRUSTED_HOSTS] = [$yvesHost, $zedHost];
$config[ApplicationConstants::YVES_TRUSTED_HOSTS] = [];

$config[ApplicationConstants::CLOUD_CDN_STATIC_MEDIA_HTTP] = 'http://static.com.spryker.dev';
$config[ApplicationConstants::CLOUD_CDN_STATIC_MEDIA_HTTPS] = 'https://static.com.spryker.dev';
$config[ApplicationConstants::CLOUD_CDN_STATIC_MEDIA_HTTP] = 'http://static.project.local';
$config[ApplicationConstants::CLOUD_CDN_STATIC_MEDIA_HTTPS] = 'https://static.project.local';

$config[MailConstants::MAILCATCHER_GUI] = 'http://' . $config[ApplicationConstants::HOST_ZED_GUI] . ':1080';

/* RabbitMQ */
$config[ApplicationConstants::ZED_RABBITMQ_HOST] = 'localhost';
$config[ApplicationConstants::ZED_RABBITMQ_PORT] = '5672';
$config[ApplicationConstants::ZED_RABBITMQ_USERNAME] = 'DE_development';
$config[ApplicationConstants::ZED_RABBITMQ_USERNAME] = 'US_development';
$config[ApplicationConstants::ZED_RABBITMQ_PASSWORD] = 'mate20mg';
$config[ApplicationConstants::ZED_RABBITMQ_VHOST] = '/DE_development_zed';
$config[ApplicationConstants::ZED_RABBITMQ_VHOST] = '/US_development_zed';

/* Elasticsearch */
$config[ApplicationConstants::ELASTICA_PARAMETER__INDEX_NAME] = 'us_search';
41 changes: 41 additions & 0 deletions config/Shared/config_default-devtest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

/**
* This is the global runtime configuration for Yves and Generated_Yves_Zed in a development environment.
*/

use Spryker\Shared\Application\ApplicationConstants;
use Spryker\Shared\Payone\PayoneConstants;
use Spryker\Shared\Session\SessionConstants;
use Spryker\Shared\Storage\StorageConstants;

$config[SessionConstants::YVES_SESSION_SAVE_HANDLER] = SessionConstants::SESSION_HANDLER_REDIS;
$config[SessionConstants::ZED_SESSION_SAVE_HANDLER] = SessionConstants::SESSION_HANDLER_FILE;

$config[StorageConstants::STORAGE_REDIS_PROTOCOL] = 'tcp';
$config[StorageConstants::STORAGE_REDIS_HOST] = '127.0.0.1';
$config[StorageConstants::STORAGE_REDIS_PORT] = '10009';
$config[StorageConstants::STORAGE_REDIS_PASSWORD] = '';
$config[StorageConstants::STORAGE_REDIS_DATABASE] = 3;

$config[SessionConstants::YVES_SESSION_REDIS_PROTOCOL] = $config[StorageConstants::STORAGE_REDIS_PROTOCOL];
$config[SessionConstants::YVES_SESSION_REDIS_HOST] = $config[StorageConstants::STORAGE_REDIS_HOST];
$config[SessionConstants::YVES_SESSION_REDIS_PORT] = $config[StorageConstants::STORAGE_REDIS_PORT];
$config[SessionConstants::YVES_SESSION_REDIS_PASSWORD] = $config[StorageConstants::STORAGE_REDIS_PASSWORD];
$config[SessionConstants::YVES_SESSION_REDIS_DATABASE] = 4;

$config[SessionConstants::ZED_SESSION_REDIS_PROTOCOL] = $config[SessionConstants::YVES_SESSION_REDIS_PROTOCOL];
$config[SessionConstants::ZED_SESSION_REDIS_HOST] = $config[SessionConstants::YVES_SESSION_REDIS_HOST];
$config[SessionConstants::ZED_SESSION_REDIS_PORT] = $config[SessionConstants::YVES_SESSION_REDIS_PORT];
$config[SessionConstants::ZED_SESSION_REDIS_PASSWORD] = $config[SessionConstants::YVES_SESSION_REDIS_PASSWORD];

$config[SessionConstants::SESSION_IS_TEST] = false;

$config[PayoneConstants::PAYONE] = [
PayoneConstants::PAYONE_MODE => '',
];

$config[ApplicationConstants::JENKINS_BASE_URL] = 'http://' . $config[ApplicationConstants::HOST_ZED_GUI] . ':10007/jenkins';
$config[ApplicationConstants::JENKINS_DIRECTORY] = '/data/shop/development/shared/data/common/jenkins';

$config[ApplicationConstants::APPLICATION_SPRYKER_ROOT] = APPLICATION_ROOT_DIR . '/vendor/spryker/spryker/Bundles';
16 changes: 16 additions & 0 deletions config/Shared/config_default-devtest_DE.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

/**
* This is the global runtime configuration for Yves and Generated_Yves_Zed in a devtest environment.
*/

use Spryker\Shared\Application\ApplicationConstants;

$config[ApplicationConstants::ZED_DB_ENGINE] = $config[ApplicationConstants::ZED_DB_ENGINE_PGSQL];
$config[ApplicationConstants::ZED_DB_USERNAME] = 'devtest';
$config[ApplicationConstants::ZED_DB_PASSWORD] = 'mate20mg';
$config[ApplicationConstants::ZED_DB_DATABASE] = 'DE_devtest_zed';
$config[ApplicationConstants::ZED_DB_HOST] = '127.0.0.1';
$config[ApplicationConstants::ZED_DB_PORT] = 5432;

$config[ApplicationConstants::ELASTICA_PARAMETER__INDEX_NAME] = 'de_search_devtest';
2 changes: 1 addition & 1 deletion config/Shared/config_default.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
= $config[ApplicationConstants::HOST_ZED_API]
= $config[ApplicationConstants::HOST_SSL_ZED_GUI]
= $config[ApplicationConstants::HOST_SSL_ZED_API]
= 'zed.de.spryker.dev';
= 'zed.de.project.local';

$config[ApplicationConstants::YVES_TRUSTED_HOSTS] = [];

Expand Down
34 changes: 25 additions & 9 deletions deploy/setup/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,27 +80,43 @@ function dumpDevelopmentDatabase {
export PGPASSWORD=$DATABASE_PASSWORD
export LC_ALL="en_US.UTF-8"

pg_dump -i -h 127.0.0.1 -U $DATABASE_USER -F c -b -v -f $DATABASE_NAME.backup $DATABASE_NAME
if [[ -z "$1" ]]; then
DATABASE_BACKUP_PATH=$DATABASE_NAME.backup;
else
DATABASE_BACKUP_PATH=$1
fi

pg_dump -i -h 127.0.0.1 -U $DATABASE_USER -F c -b -v -f $DATABASE_BACKUP_PATH $DATABASE_NAME
}

function restoreDevelopmentDatabase {
read -r -p "Restore database ${DATABASE_NAME} ? [y/N] " response
case $response in
[yY][eE][sS]|[yY])
export PGPASSWORD=$DATABASE_PASSWORD
export LC_ALL="en_US.UTF-8"

sudo pg_ctlcluster 9.4 main restart --force
sudo dropdb $DATABASE_NAME
sudo createdb $DATABASE_NAME
pg_restore -i -h 127.0.0.1 -p 5432 -U $DATABASE_USER -d $DATABASE_NAME -v $DATABASE_NAME.backup
dropAndRestoreDatabase
;;
*)
echo "Nothing done."
;;
esac
}

function dropAndRestoreDatabase {
if [[ -z "$1" ]]; then
DATABASE_BACKUP_PATH=$DATABASE_NAME.backup;
else
DATABASE_BACKUP_PATH=$1
fi

export PGPASSWORD=$DATABASE_PASSWORD
export LC_ALL="en_US.UTF-8"

sudo pg_ctlcluster 9.4 main restart --force
sudo dropdb $DATABASE_NAME
sudo createdb $DATABASE_NAME
pg_restore -i -h 127.0.0.1 -p 5432 -U $DATABASE_USER -d $DATABASE_NAME -v $DATABASE_BACKUP_PATH
}

function installDemoshop {
labelText "Preparing to install Spryker Platform..."

Expand All @@ -114,7 +130,7 @@ function installDemoshop {
configureCodeception

successText "Setup successful"
infoText "\nYves URL: http://www.de.spryker.dev/\nZed URL: http://zed.de.spryker.dev/\n"
infoText "\nYves URL: http://www.de.project.local/\nZed URL: http://zed.de.project.local/\n"
}

function installZed {
Expand Down
Loading

0 comments on commit 7e2f177

Please sign in to comment.