8000 removed usage of \Exception as PHPUnit won't allow to catch them anym… · symfony/symfony@6a73593 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6a73593

Browse files
committed
removed usage of \Exception as PHPUnit won't allow to catch them anymore in the next major version
1 parent 41210b0 commit 6a73593

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/Symfony/Bundle/DoctrineBundle/Command/InfoDoctrineCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
5656
->getAllClassNames();
5757

5858
if (!$entityClassNames) {
59-
throw new \Exception(
59+
throw new \LogicException(
6060
'You do not have any mapped Doctrine ORM entities for any of your bundles. '.
6161
'Create a class inside the Entity namespace of any of your bundles and provide '.
6262
'mapping information for it with Annotations directly in the classes doc blocks '.

src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto
275275
}
276276

277277
if (!preg_match('#'.$firewall['pattern'].'#', $firewall[$k]['check_path'])) {
278-
throw new \Exception(sprintf('The check_path "%s" for login method "%s" is not matched by the firewall pattern "%s".', $firewall[$k]['check_path'], $k, $firewall['pattern']));
278+
throw new \LogicException(sprintf('The check_path "%s" for login method "%s" is not matched by the firewall pattern "%s".', $firewall[$k]['check_path'], $k, $firewall['pattern']));
279279
}
280280
}
281281

src/Symfony/Component/Console/Helper/DialogHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function ask(OutputInterface $output, $question, $default = null)
3636
$output->write($question);
3737

3838
if (false === $ret = stream_get_line(null === $this->inputStream ? STDIN : $this->inputStream, 4096, "\n")) {
39-
throw new \Exception('Aborted');
39+
throw new \RuntimeException('Aborted');
4040
}
4141
$ret = trim($ret);
4242

src/Symfony/Component/Translation/Loader/XliffFileLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ private function pa 98D6 rseFile($file)
5353
$dom = new \DOMDocument();
5454
$current = libxml_use_internal_errors(true);
5555
if (!@$dom->load($file, LIBXML_COMPACT)) {
56-
throw new \Exception(implode("\n", $this->getXmlErrors()));
56+
throw new \RuntimeException(implode("\n", $this->getXmlErrors()));
5757
}
5858

5959
$location = str_replace('\\', '/', __DIR__).'/schema/dic/xliff-core/xml.xsd';
@@ -73,7 +73,7 @@ private function parseFile($file)
7373
$source = str_replace('http://www.w3.org/2001/xml.xsd', $location, $source);
7474

7575
if (!@$dom->schemaValidateSource($source)) {
76-
throw new \Exception(implode("\n", $this->getXmlErrors()));
76+
throw new \RuntimeException(implode("\n", $this->getXmlErrors()));
7777
}
7878
$dom->validateOnParse = true;
7979
$dom->normalizeDocument();

0 commit comments

Comments
 (0)
0