Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit11f3c45

Browse files
committed
Hide short exception trace by default
1 parent95ceeab commit11f3c45

17 files changed

+49
-28
lines changed

‎src/Symfony/Bridge/Twig/Command/LintCommand.php‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
namespaceSymfony\Bridge\Twig\Command;
1313

1414
useSymfony\Component\Console\Command\Command;
15+
useSymfony\Component\Console\Exception\InvalidArgumentException;
16+
useSymfony\Component\Console\Exception\RuntimeException;
1517
useSymfony\Component\Console\Input\InputArgument;
1618
useSymfony\Component\Console\Input\InputInterface;
1719
useSymfony\Component\Console\Input\InputOption;
@@ -119,7 +121,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
119121

120122
if (0 ===count($filenames)) {
121123
if (0 !==ftell(STDIN)) {
122-
thrownew\RuntimeException('Please provide a filename or pipe template content to STDIN.');
124+
thrownewRuntimeException('Please provide a filename or pipe template content to STDIN.');
123125
}
124126

125127
$template ='';
@@ -155,7 +157,7 @@ protected function findFiles($filename)
155157
return Finder::create()->files()->in($filename)->name('*.twig');
156158
}
157159

158-
thrownew\RuntimeException(sprintf('File or directory "%s" is not readable',$filename));
160+
thrownewRuntimeException(sprintf('File or directory "%s" is not readable',$filename));
159161
}
160162

161163
privatefunctionvalidate($template,$file)
@@ -184,7 +186,7 @@ private function display(InputInterface $input, OutputInterface $output, Symfony
184186
case'json':
185187
return$this->displayJson($output,$files);
186188
default:
187-
thrownew\InvalidArgumentException(sprintf('The format "%s" is not supported.',$input->getOption('format')));
189+
thrownewInvalidArgumentException(sprintf('The format "%s" is not supported.',$input->getOption('format')));
188190
}
189191
}
190192

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespaceSymfony\Bundle\FrameworkBundle\Command;
1313

1414
useSymfony\Component\Config\Definition\ConfigurationInterface;
15+
useSymfony\Component\Console\Exception\LogicException;
1516
useSymfony\Component\Console\Helper\Table;
1617
useSymfony\Component\Console\Style\StyleInterface;
1718
useSymfony\Component\DependencyInjection\Extension\ExtensionInterface;
@@ -98,7 +99,7 @@ protected function findExtension($name)
9899
$message .=sprintf("\n\nDid you mean\"%s\"?",$guess);
99100
}
100101

101-
thrownew\LogicException($message);
102+
thrownewLogicException($message);
102103
}
103104

104105
publicfunctionvalidateConfiguration(ExtensionInterface$extension,$configuration)

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

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

1212
namespaceSymfony\Bundle\FrameworkBundle\Command;
1313

14+
useSymfony\Component\Console\Exception\InvalidArgumentException;
1415
useSymfony\Component\Console\Input\InputArgument;
1516
useSymfony\Component\Console\Input\InputInterface;
1617
useSymfony\Component\Console\Input\InputOption;
@@ -115,7 +116,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
115116
if (is_dir(dirname($targetArg).'/web')) {
116117
$targetArg =dirname($targetArg).'/web';
117118
}else {
118-
thrownew\InvalidArgumentException(sprintf('The target directory "%s" does not exist.',$input->getArgument('target')));
119+
thrownewInvalidArgumentException(sprintf('The target directory "%s" does not exist.',$input->getArgument('target')));
119120
}
120121
}
121122
}

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

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

1212
namespaceSymfony\Bundle\FrameworkBundle\Command;
1313

14+
useSymfony\Component\Console\Exception\RuntimeException;
1415
useSymfony\Component\Console\Input\InputInterface;
1516
useSymfony\Component\Console\Input\InputOption;
1617
useSymfony\Component\Console\Output\OutputInterface;
@@ -104,7 +105,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
104105
$fs->remove($oldCacheDir);
105106

106107
if (!is_writable($realCacheDir)) {
107-
thrownew\RuntimeException(sprintf('Unable to write in the "%s" directory',$realCacheDir));
108+
thrownewRuntimeException(sprintf('Unable to write in the "%s" directory',$realCacheDir));
108109
}
109110

110111
$io->comment(sprintf('Clearing the cache for the <info>%s</info> environment with debug <info>%s</info>',$kernel->getEnvironment(),var_export($kernel->isDebug(),true)));

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespaceSymfony\Bundle\FrameworkBundle\Command;
1313

1414
usePsr\Cache\CacheItemPoolInterface;
15+
useSymfony\Component\Console\Exception\InvalidArgumentException;
1516
useSymfony\Component\Console\Input\InputInterface;
1617
useSymfony\Component\Console\Input\InputArgument;
1718
useSymfony\Component\Console\Output\OutputInterface;
@@ -93,7 +94,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
9394
}elseif ($poolinstanceof Psr6CacheClearer) {
9495
$clearers[$id] =$pool;
9596
}else {
96-
thrownew\InvalidArgumentException(sprintf('"%s" is not a cache pool nor a cache clearer.',$id));
97+
thrownewInvalidArgumentException(sprintf('"%s" is not a cache pool nor a cache clearer.',$id));
9798
}
9899
}
99100
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
useSymfony\Component\Config\Definition\Dumper\YamlReferenceDumper;
1515
useSymfony\Component\Config\Definition\Dumper\XmlReferenceDumper;
16+
useSymfony\Component\Console\Exception\InvalidArgumentException;
1617
useSymfony\Component\Console\Input\InputArgument;
1718
useSymfony\Component\Console\Input\InputOption;
1819
useSymfony\Component\Console\Input\InputInterface;
@@ -124,7 +125,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
124125
break;
125126
default:
126127
$io->writeln($message);
127-
thrownew\InvalidArgumentException('Only the yaml and xml formats are supported.');
128+
thrownewInvalidArgumentException('Only the yaml and xml formats are supported.');
128129
}
129130

130131
$io->writeln(null ===$path ?$dumper->dump($configuration,$extension->getNamespace()) :$dumper->dumpAtPath($configuration,$path));

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
useSymfony\Bundle\FrameworkBundle\Console\Helper\DescriptorHelper;
1515
useSymfony\Component\Config\ConfigCache;
16+
useSymfony\Component\Console\Exception\InvalidArgumentException;
1617
useSymfony\Component\Console\Input\InputArgument;
1718
useSymfony\Component\Console\Input\InputOption;
1819
useSymfony\Component\Console\Input\InputInterface;
@@ -167,9 +168,9 @@ protected function validateInput(InputInterface $input)
167168

168169
$name =$input->getArgument('name');
169170
if ((null !==$name) && ($optionsCount >0)) {
170-
thrownew\InvalidArgumentException('The options tags, tag, parameters & parameter can not be combined with the service name argument.');
171+
thrownewInvalidArgumentException('The options tags, tag, parameters & parameter can not be combined with the service name argument.');
171172
}elseif ((null ===$name) &&$optionsCount >1) {
172-
thrownew\InvalidArgumentException('The options tags, tag, parameters & parameter can not be combined together.');
173+
thrownewInvalidArgumentException('The options tags, tag, parameters & parameter can not be combined together.');
173174
}
174175
}
175176

@@ -208,7 +209,7 @@ private function findProperServiceName(InputInterface $input, SymfonyStyle $io,
208209

209210
$matchingServices =$this->findServiceIdsContaining($builder,$name);
210211
if (empty($matchingServices)) {
211-
thrownew\InvalidArgumentException(sprintf('No services found that match "%s".',$name));
212+
thrownewInvalidArgumentException(sprintf('No services found that match "%s".',$name));
212213
}
213214

214215
$default =1 ===count($matchingServices) ?$matchingServices[0] :null;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
useSymfony\Bundle\FrameworkBundle\Console\Helper\DescriptorHelper;
1515
useSymfony\Bundle\FrameworkBundle\Controller\ControllerNameParser;
16+
useSymfony\Component\Console\Exception\InvalidArgumentException;
1617
useSymfony\Component\Console\Input\InputArgument;
1718
useSymfony\Component\Console\Input\InputInterface;
1819
useSymfony\Component\Console\Input\InputOption;
@@ -116,7 +117,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
116117

117118
if ($name) {
118119
if (!$route =$routes->get($name)) {
119-
thrownew\InvalidArgumentException(sprintf('The route "%s" does not exist.',$name));
120+
thrownewInvalidArgumentException(sprintf('The route "%s" does not exist.',$name));
120121
}
121122

122123
$callable =$this->extractCallable($route);

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

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

1212
namespaceSymfony\Bundle\FrameworkBundle\Command;
1313

14+
useSymfony\Component\Console\Exception\InvalidArgumentException;
1415
useSymfony\Component\Console\Style\SymfonyStyle;
1516
useSymfony\Component\Console\Input\InputInterface;
1617
useSymfony\Component\Console\Input\InputArgument;
@@ -182,7 +183,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
182183
$viewsPaths =array($input->getArgument('bundle').'/Resources/views');
183184

184185
if (!is_dir($transPaths[0])) {
185-
thrownew\InvalidArgumentException(sprintf('"%s" is neither an enabled bundle nor a directory.',$transPaths[0]));
186+
thrownewInvalidArgumentException(sprintf('"%s" is neither an enabled bundle nor a directory.',$transPaths[0]));
186187
}
187188
}
188189
}elseif ($input->getOption('all')) {

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

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

1212
namespaceSymfony\Bundle\FrameworkBundle\Command;
1313

14+
useSymfony\Component\Console\Exception\InvalidArgumentException;
1415
useSymfony\Component\Console\Style\SymfonyStyle;
1516
useSymfony\Component\HttpKernel\KernelInterface;
1617
useSymfony\Component\Translation\Catalogue\TargetOperation;
@@ -192,7 +193,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
192193
$currentName =$transPaths[0];
193194

194195
if (!is_dir($transPaths[0])) {
195-
thrownew\InvalidArgumentException(sprintf('<error>"%s" is neither an enabled bundle nor a directory.</error>',$transPaths[0]));
196+
thrownewInvalidArgumentException(sprintf('<error>"%s" is neither an enabled bundle nor a directory.</error>',$transPaths[0]));
196197
}
197198
}
198199
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp