Skip to content

Commit

Permalink
Merge branch 'symfony_3_compatibility'
Browse files Browse the repository at this point in the history
  • Loading branch information
agentsib committed May 23, 2016
2 parents 33850b1 + 0f834aa commit ffc7a7b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Command/CronjobsCronCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ private function executeCommand(AbstractCronjob $cronjob, InputInterface $input,
$builder = new ProcessBuilder();
$builder->setPrefix($php);
$builder->setArguments(array(
'app/console',
$this->container->getParameter('agentsib_crontab.cronjob_console'),
'agentsib:crontab:execute',
$cronjob->getId()
));
Expand Down
1 change: 1 addition & 0 deletions DependencyInjection/AgentSIBCrontabExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function load(array $configs, ContainerBuilder $container)
$container->setParameter($this->getAlias().'.db_driver', $config['db_driver']);
$container->setParameter($this->getAlias().'.model_manager_name', $config['model_manager_name']);
$container->setParameter($this->getAlias().'.cronjob_class', $config['cronjob_class']);
$container->setParameter($this->getAlias().'.cronjob_console', $config['cronjob_console']);
$container->setParameter($this->getAlias().'.logs_path', $config['logs_path']);

if ('orm' === $config['db_driver']) {
Expand Down
5 changes: 5 additions & 0 deletions DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
use Symfony\Component\HttpKernel\Kernel;

/**
* This is the class that validates and merges configuration from your app/config files
Expand Down Expand Up @@ -38,6 +39,10 @@ public function getConfigTreeBuilder()
->isRequired()
->cannotBeEmpty()
->end()
->scalarNode('cronjob_console')
->defaultValue(Kernel::MAJOR_VERSION > 2 ? 'bin/console' : 'app/console')
->cannotBeEmpty()
->end()
->scalarNode('logs_path')
->defaultValue('%kernel.logs_dir%/crontab')
->cannotBeEmpty()
Expand Down

0 comments on commit ffc7a7b

Please sign in to comment.