File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,22 @@ $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
132132return new Application($kernel);
133133` ` `
134134
135+ [Single Command Application](https://symfony.com/doc/current/components/console/single_command_tool.html) :
136+
137+ ` ` ` php
138+ // tests/console-application.php
139+
140+ use App\A pplication; // where Application extends Symfony\C omponent\C onsole\S ingleCommandApplication
141+ use Symfony\C omponent\C onsole;
142+
143+ require __DIR__ . '/../vendor/autoload.php';
144+
145+ $application = new Console\A pplication();
146+ $application->add(new Application());
147+
148+ return $application;
149+ ` ` `
150+
135151You may then encounter an error with PhpParser :
136152
137153> Compile Error: Cannot Declare interface PhpParser\NodeVisitor, because the name is already in use
You can’t perform that action at this time.
0 commit comments