Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cb010e9

Browse filesBrowse files
committed
[FrameworkBundle][ContainerLintCommand] Style messages
1 parent 1b6c712 commit cb010e9
Copy full SHA for cb010e9

File tree

1 file changed

+10
-1
lines changed
Filter options

1 file changed

+10
-1
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Command/ContainerLintCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/ContainerLintCommand.php
+10-1Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
2323
use Symfony\Component\DependencyInjection\Container;
2424
use Symfony\Component\DependencyInjection\ContainerBuilder;
25+
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
2526
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
2627
use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag;
2728
use Symfony\Component\HttpKernel\Kernel;
@@ -64,7 +65,15 @@ protected function execute(InputInterface $input, OutputInterface $output): int
6465

6566
$container->setParameter('container.build_time', time());
6667

67-
$container->compile();
68+
try {
69+
$container->compile();
70+
} catch (InvalidArgumentException $e) {
71+
$errorIo->error($e->getMessage());
72+
73+
return 1;
74+
}
75+
76+
$errorIo->success('The container was lint successfully: all services are injected with values that are compatible with their type declarations.');
6877

6978
return 0;
7079
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.