Skip to content

Commit eef8f98

Browse files
added symfony 5 as dependency
1 parent 8f4f34c commit eef8f98

File tree

6 files changed

+32
-12
lines changed

6 files changed

+32
-12
lines changed

composer.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@
1212
"require": {
1313
"php": "^5.6 || ^7.0",
1414
"php-task/php-task": "^1.3",
15-
"symfony/http-kernel": "^2.8 || ^3.4 || ^4.0",
16-
"symfony/dependency-injection": "^2.8 || ^3.4 || ^4.0",
17-
"symfony/expression-language": "^2.8 || ^3.4 || ^4.0",
18-
"symfony/config": "^2.8 || ^3.4 || ^4.0",
19-
"symfony/console": "^2.8 || ^3.4 || ^4.0",
20-
"symfony/process": "^2.8 || ^3.4 || ^4.0",
15+
"symfony/http-kernel": "^2.8 || ^3.4 || ^4.0 || ^5.0",
16+
"symfony/dependency-injection": "^2.8 || ^3.4 || ^4.0 || ^5.0",
17+
"symfony/expression-language": "^2.8 || ^3.4 || ^4.0 || ^5.0",
18+
"symfony/config": "^2.8 || ^3.4 || ^4.0 || ^5.0",
19+
"symfony/console": "^2.8 || ^3.4 || ^4.0 || ^5.0",
20+
"symfony/process": "^2.8 || ^3.4 || ^4.0 || ^5.0",
2121
"doctrine/orm": "^2.5"
2222
},
2323
"require-dev": {
2424
"phpunit/phpunit": "^4.8 || ^5.0",
2525
"sebastian/comparator": "^1.2.3",
26-
"symfony/debug": "^2.8 || ^3.4 || ^4.0",
27-
"symfony/framework-bundle": "^2.8 || ^3.4 || ^4.0",
28-
"symfony/finder": "^2.8 || ^3.4 || ^4.0",
29-
"symfony/yaml": "^2.8 || ^3.4 || ^4.0",
26+
"symfony/debug": "^2.8 || ^3.4 || ^4.0 || ^5.0",
27+
"symfony/framework-bundle": "^2.8 || ^3.4 || ^4.0 || ^5.0",
28+
"symfony/finder": "^2.8 || ^3.4 || ^4.0 || ^5.0",
29+
"symfony/yaml": "^2.8 || ^3.4 || ^4.0 || ^5.0",
3030
"doctrine/doctrine-bundle": "^1.5",
3131
"doctrine/data-fixtures": "^1.1"
3232
},

src/Command/DebugTasksCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8484
}
8585

8686
$table->render();
87+
88+
return 0;
8789
}
8890
}

src/Command/RunCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
6767
{
6868
$this->runner->runTasks();
6969
$this->scheduler->scheduleTasks();
70+
71+
return 0;
7072
}
7173
}

src/Command/ScheduleSystemTasksCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ protected function execute(InputInterface $input, OutputInterface $output)
108108

109109
$output->writeln('');
110110
$output->writeln('System-tasks successfully scheduled');
111+
112+
return 0;
111113
}
112114

113115
/**

src/Command/ScheduleTaskCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
9494
}
9595

9696
$taskBuilder->schedule();
97+
98+
return 0;
9799
}
98100
}

src/DependencyInjection/Configuration.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Task\TaskBundle\DependencyInjection;
1313

14+
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
1415
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
1516
use Symfony\Component\Config\Definition\ConfigurationInterface;
1617

@@ -37,9 +38,9 @@ public function __construct(array $lockingStorageAliases)
3738
*/
3839
public function getConfigTreeBuilder()
3940
{
40-
$treeBuilder = new TreeBuilder();
41+
$treeBuilder = new TreeBuilder('task');
4142

42-
$treeBuilder->root('task')
43+
$this->getRootNodeWithoutDeprecation($treeBuilder, 'task')
4344
->children()
4445
->enumNode('storage')->values(['array', 'doctrine'])->defaultValue('doctrine')->end()
4546
->arrayNode('adapters')
@@ -120,4 +121,15 @@ public function getLockingStorageId($alias)
120121
{
121122
return $this->lockingStorageAliases[$alias];
122123
}
124+
125+
/**
126+
* @internal
127+
*
128+
* @return ArrayNodeDefinition|\Symfony\Component\Config\Definition\Builder\NodeDefinition
129+
*/
130+
public static function getRootNodeWithoutDeprecation(TreeBuilder $builder, string $name, string $type = 'array')
131+
{
132+
// BC layer for symfony/config 4.1 and older
133+
return \method_exists($builder, 'getRootNode') ? $builder->getRootNode() : $builder->root($name, $type);
134+
}
123135
}

0 commit comments

Comments
 (0)