Skip to content

Commit 2f5209a

Browse files
author
Amrouche Hamza
committed
reproduce 25355
1 parent e6509ff commit 2f5209a

File tree

6 files changed

+99
-3
lines changed

6 files changed

+99
-3
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"symfony/config": "^3.4-dev",
1010
"symfony/console": "^3.4-dev",
1111
"symfony/debug": "^3.4-dev",
12+
"symfony/expression-language": "^4.1@dev",
1213
"symfony/form": "^4.1@dev",
1314
"symfony/framework-bundle": "^3.4-dev",
1415
"symfony/maker-bundle": "dev-master",

composer.lock

Lines changed: 52 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Command/DebugTestCommand.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Symfony\Component\Console\Output\OutputInterface;
1212
use Symfony\Component\Debug\Debug;
1313
use Symfony\Component\Debug\Exception\FatalErrorException;
14+
use Symfony\Component\DependencyInjection\ExpressionLanguage;
1415

1516
class DebugTestCommand extends Command
1617
{
@@ -35,9 +36,13 @@ public function configure(): void
3536
protected function execute(InputInterface $input, OutputInterface $output)
3637
{
3738
// throws a Symfony\Component\Debug\Exception\FatalThrowableError
38-
Debug::enable();
39+
/*Debug::enable();
3940
$a = new \stdClass();
4041
$a->foo = 'bar';
4142
var_export($a['foo']);
43+
44+
*/
45+
$language = new \Symfony\Component\ExpressionLanguage\ExpressionLanguage();
46+
$parsedExpression = $language->parse('node.', ['node']);
4247
}
4348
}

src/Command/ProcessTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ public function __construct()
2121
public function configure(): void
2222
{
2323
$this
24-
->setName('app:test:process')
24+
->setName('test-titi')
25+
->setAliases(['test'])
2526
->setDescription('testProcess');
2627
}
2728

src/Command/TestToto.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
4+
namespace App\Command;
5+
6+
use Symfony\Component\Console\Command\Command;
7+
use Symfony\Component\Console\Input\InputInterface;
8+
use Symfony\Component\Console\Output\OutputInterface;
9+
use Symfony\Component\Process\Process;
10+
11+
class TestToto extends Command
12+
{
13+
public function __construct()
14+
{
15+
parent::__construct();
16+
}
17+
18+
/**
19+
* {@inheritdoc}
20+
*/
21+
public function configure(): void
22+
{
23+
$this
24+
->setName('test-toto')
25+
->setDescription('testProcess');
26+
}
27+
28+
/**
29+
* {@inheritdoc}
30+
*/
31+
protected function execute(InputInterface $input, OutputInterface $output)
32+
{
33+
var_dump('hello');
34+
}
35+
}

symfony.lock

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,5 +142,8 @@
142142
"version": "4.0",
143143
"ref": "aaddfdf43cdecd4cf91f992052d76c2cadc04543"
144144
}
145+
},
146+
"symfony/expression-language": {
147+
"version": "4.1-dev"
145148
}
146149
}

0 commit comments

Comments
 (0)