Skip to content

Commit

Permalink
Merge pull request ezsystems#44 from ezsystems/feature-august-5-after…
Browse files Browse the repository at this point in the history
…noon

Feature august 5 afternoon
  • Loading branch information
Plopix committed Aug 5, 2018
2 parents ad950b1 + 857d991 commit f62c16d
Show file tree
Hide file tree
Showing 24 changed files with 162 additions and 226 deletions.
1 change: 1 addition & 0 deletions .cs/.php_cs.php
Expand Up @@ -21,6 +21,7 @@
'phpdoc_no_package' => false,
'phpdoc_inline_tag' => false,
'cast_spaces' => false,
'no_superfluous_phpdoc_tags' => true,
]
)
->setFinder($finder);
224 changes: 116 additions & 108 deletions composer.lock

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions payload/dev/docker-compose.yml
Expand Up @@ -110,3 +110,9 @@ services:
- BLACKFIRE_CLIENT_TOKEN
- BLACKFIRE_SERVER_ID
- BLACKFIRE_SERVER_TOKEN

# Mysql-Proxy
mysqlproxy:
image: plopix/docker-mysqlproxyprofiler
environment:
- 'BACKEND=db:3306'
18 changes: 16 additions & 2 deletions payload/dev/engine/php.ini
Expand Up @@ -11,11 +11,25 @@ memory_limit = 2048M
post_max_size = 40M
upload_max_filesize = 40M

##REDIS_CONFIG##
##SENDMAIL_CONFIG##
session.save_handler = redis
session.save_path = "tcp://redis:6379"

sendmail_path = /usr/bin/env catchmail --smtp-ip mailcatcher --smtp-port 1025 -f docker@localhost

extension=blackfire.so
blackfire.agent_socket=tcp://blackfire:8707

# X-Debug is disable by default, uncomment and run 'ez stop engine; ez build engine; ez up engine' to enable it
#zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20170718/xdebug.so
#xdebug.remote_enable=1
## Using Linux? define the correct host and if you find a automated way to do it: tell us on the channel #ez-launchpad
#xdebug.remote_host=host.docker.internal
#xdebug.remote_port=9000
#xdebug.max_nesting_level=1000
#xdebug.remote_autostart=1
#xdebug.remote_connect_back=0

[Date]
date.timezone = "America/Los_Angeles"


9 changes: 9 additions & 0 deletions payload/dev/nginx/nginx.conf
Expand Up @@ -15,6 +15,9 @@ server {
# Would be great to get that from ENV var PROJECTMAPPINGFOLDER
root "/var/www/html/project/ezplatform/web";

# FOR DFS
# include ez_params.d/ez_rewrite_dfsimage_params;

# ez rewrite rules
include ez_params.d/ez_rewrite_params;

Expand Down Expand Up @@ -45,6 +48,9 @@ server {

include ez_params.d/ez_prod_rewrite_params;

# FOR DFS
# include ez_params.d/ez_rewrite_dfsimage_params;

# ez rewrite rules
include ez_params.d/ez_rewrite_params;

Expand Down Expand Up @@ -77,6 +83,9 @@ server {

include ez_params.d/ez_prod_rewrite_params;

# FOR DFS
# include ez_params.d/ez_rewrite_dfsimage_params;

# ez rewrite rules
include ez_params.d/ez_rewrite_params;

Expand Down
18 changes: 9 additions & 9 deletions payload/platformsh/.platform.app.yaml
Expand Up @@ -68,15 +68,15 @@ hooks:
bin/console cache:pool:clear cache.redis
bin/console cache:clear
# The configuration of scheduled execution.
# see http://symfony.com/doc/current/components/console/introduction.html
#crons:
# symfony:
# spec: "*/20 * * * *"
# cmd: "php cron.php example:test"
# ezplatform:
# spec: "* * * * *"
# cmd: "cd ezplatform; php php bin/console ezplatform:cron:run --env=prod"
crons:
minute:
# NOTE: Platform.sh PS does not execute every minute, so might sometimes miss jobs scheduled for a given time
spec: "* * * * *"
cmd: "php bin/console ezplatform:cron:run"
weekly:
spec: "0 0 * * 0"
cmd: "php bin/console ezplatform:check-urls"


runtime:
extensions:
Expand Down
2 changes: 0 additions & 2 deletions src/Command/Docker/Create.php
Expand Up @@ -23,8 +23,6 @@ class Create extends DockerCommand

/**
* Status constructor.
*
* @param ProjectStatusDumper $projectStatusDumper
*/
public function __construct(ProjectStatusDumper $projectStatusDumper)
{
Expand Down
33 changes: 2 additions & 31 deletions src/Command/Docker/Initialize.php
Expand Up @@ -31,8 +31,6 @@ class Initialize extends Command

/**
* Status constructor.
*
* @param ProjectStatusDumper $projectStatusDumper
*/
public function __construct(ProjectStatusDumper $projectStatusDumper)
{
Expand Down Expand Up @@ -103,30 +101,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
0755
);

// PHP.ini ADAPTATION
$phpINIPath = "{$provisioningFolder}/dev/engine/php.ini";
$conf = <<<END
; redis configuration in dev
session.save_handler = redis
session.save_path = "tcp://redis:6379"
END;
$iniContent = file_get_contents($phpINIPath);
$iniContent = str_replace(
'##REDIS_CONFIG##',
$compose->hasService('redis') ? $conf : '',
$iniContent
);

$conf = <<<END
; mailcatcher configuration in dev
sendmail_path = /usr/bin/env catchmail --smtp-ip mailcatcher --smtp-port 1025 -f docker@localhost
END;
$iniContent = str_replace(
'##SENDMAIL_CONFIG##',
$compose->hasService('mailcatcher') ? $conf : '',
$iniContent
);
$fs->dumpFile($phpINIPath, $iniContent);
unset($selectedServices);

// Clean the Compose File
Expand Down Expand Up @@ -187,10 +161,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
}

/**
* @param Docker $dockerClient
* @param DockerCompose $compose
* @param string $composeFilePath
* @param InputInterface $input
* @param string $composeFilePath
*/
protected function innerInitialize(
Docker $dockerClient,
Expand Down Expand Up @@ -218,7 +189,7 @@ protected function innerInitialize(
$initialdata = $input->getArgument('initialdata');

if ('clean' === $initialdata && false !== strpos($repository, 'ezplatform-ee')) {
$initialdata = 'studio-clean';
$initialdata = 'ezplatform-ee-clean';
}

$executor->eZInstall($input->getArgument('version'), $repository, $initialdata);
Expand Down
2 changes: 0 additions & 2 deletions src/Command/Docker/Status.php
Expand Up @@ -24,8 +24,6 @@ class Status extends DockerCommand

/**
* Status constructor.
*
* @param ProjectStatusDumper $projectStatusDumper
*/
public function __construct(ProjectStatusDumper $projectStatusDumper)
{
Expand Down
2 changes: 0 additions & 2 deletions src/Configuration/Project.php
Expand Up @@ -78,7 +78,6 @@ public function get($name)

/**
* @param string $name
* @param mixed $value
*/
public function setLocal($name, $value)
{
Expand All @@ -87,7 +86,6 @@ public function setLocal($name, $value)

/**
* @param string $name
* @param mixed $value
*/
public function setGlobal($name, $value)
{
Expand Down
2 changes: 0 additions & 2 deletions src/Console/Application.php
Expand Up @@ -133,8 +133,6 @@ public function doRun(InputInterface $input, OutputInterface $output)

/**
* Load the configuration file.
*
* @param InputInterface $input
*/
protected function loadConfiguration(InputInterface $input)
{
Expand Down
21 changes: 1 addition & 20 deletions src/Core/Client/Docker.php
Expand Up @@ -36,9 +36,7 @@ class Docker
/**
* Docker constructor.
*
* @param array $options
* @param ProcessRunner $runner
* @param OptimizerInterface|null $optimizer
* @param array $options
*/
public function __construct($options, ProcessRunner $runner, OptimizerInterface $optimizer = null)
{
Expand Down Expand Up @@ -126,17 +124,11 @@ protected function getProvisioningFolderName()
return $this->options['provisioning-folder-name'];
}

/**
* @return mixed
*/
protected function getHostExportedPath()
{
return explode(':', $this->options['host-machine-mapping'])[0];
}

/**
* @return mixed
*/
protected function getMachineMountPath()
{
return explode(':', $this->options['host-machine-mapping'])[1];
Expand All @@ -153,7 +145,6 @@ public function start($service = '')
}

/**
* @param array $args
* @param string $service
*
* @return Process
Expand All @@ -164,7 +155,6 @@ public function build(array $args = [], $service = '')
}

/**
* @param array $args
* @param string $service
*
* @return Process
Expand All @@ -175,7 +165,6 @@ public function up(array $args = [], $service = '')
}

/**
* @param array $args
* @param string $service
*
* @return Process
Expand All @@ -196,8 +185,6 @@ public function stop($service = '')
}

/**
* @param array $args
*
* @return Process
*/
public function down(array $args = [])
Expand All @@ -206,8 +193,6 @@ public function down(array $args = [])
}

/**
* @param array $args
*
* @return Process
*/
public function ps(array $args = [])
Expand All @@ -216,7 +201,6 @@ public function ps(array $args = [])
}

/**
* @param array $args
* @param string $service
*
* @return Process
Expand All @@ -227,7 +211,6 @@ public function logs(array $args = [], $service = '')
}

/**
* @param array $args
* @param string $service
*
* @return Process
Expand All @@ -239,7 +222,6 @@ public function pull(array $args = [], $service = '')

/**
* @param string $command
* @param array $args
* @param string $service
*
* @return Process
Expand Down Expand Up @@ -296,7 +278,6 @@ public function getComposeEnvVariables()
/**
* @param string $action
* @param string $service
* @param array $args
* @param false $dryRun
*
* @return Process|string
Expand Down
3 changes: 0 additions & 3 deletions src/Core/Command.php
Expand Up @@ -57,9 +57,6 @@ protected function initialize(InputInterface $input, OutputInterface $output)
$this->io = new SymfonyStyle($input, $output);
}

/**
* @param ProjectConfiguration $configuration
*/
public function setProjectConfiguration(ProjectConfiguration $configuration)
{
$this->projectConfiguration = $configuration;
Expand Down
3 changes: 0 additions & 3 deletions src/Core/DockerCompose.php
Expand Up @@ -26,9 +26,6 @@ public function __construct($filePath)
$this->compose = Yaml::parse(file_get_contents($filePath));
}

/**
* @return mixed
*/
public function getServices()
{
return $this->compose['services'];
Expand Down
9 changes: 1 addition & 8 deletions src/Core/OSX/Optimizer/NFSAwareInterface.php
Expand Up @@ -24,8 +24,6 @@ interface NFSAwareInterface
const RESV = '/etc/nfs.conf';

/**
* @param SymfonyStyle $io
*
* @return bool
*/
public function restartNFSD(SymfonyStyle $io);
Expand All @@ -45,15 +43,10 @@ public function isExportReady($export);
*/
public function isResvReady();

/**
* @param SymfonyStyle $io
* @param string $exportLine
*/
public function setupNFS(SymfonyStyle $io, $exportOptions);

/**
* @param SymfonyStyle $io
* @param string $exportLine
* @param string $exportLine
*/
public function standardNFSConfigurationMessage(SymfonyStyle $io, $exportLine);

Expand Down
8 changes: 0 additions & 8 deletions src/Core/OSX/Optimizer/OptimizerInterface.php
Expand Up @@ -20,18 +20,10 @@ interface OptimizerInterface
public function isEnabled();

/**
* @param SymfonyStyle $io
*
* @return bool
*/
public function hasPermission(SymfonyStyle $io);

/**
* @param SymfonyStyle $io
* @param Command $command
*
* @return mixed
*/
public function optimize(SymfonyStyle $io, Command $command);

/**
Expand Down
2 changes: 0 additions & 2 deletions src/Core/ProjectStatusDumper.php
Expand Up @@ -33,8 +33,6 @@ class ProjectStatusDumper

/**
* ProjectStatusDumper constructor.
*
* @param ProjectConfiguration $projectConfiguration
*/
public function __construct(ProjectConfiguration $projectConfiguration)
{
Expand Down

0 comments on commit f62c16d

Please sign in to comment.