8000 Merge branch '2.7' into 2.8 · PBWebMedia/symfony@0606d9c · GitHub
[go: up one dir, main page]

Skip to content

Commit 0606d9c

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: updated copyright year Update copyright year [2.3] Static Code Analysis for Components
2 parents eb7f2f7 + 6dbef8c commit 0606d9c

File tree

55 files changed

+61
-67
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+61
-67
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Bridge/Doctrine/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Bridge/Monolog/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Bridge/PhpUnit/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014-2015 Fabien Potencier
1+
Copyright (c) 2014-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Bridge/ProxyManager/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Bridge/Swiftmailer/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Bridge/Twig/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Bundle/DebugBundle/Resources/meta/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014-2015 Fabien Potencier
1+
Copyright (c) 2014-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Bundle/FrameworkBundle/Resources/meta/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Bundle/SecurityBundle/Resources/meta/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Bundle/TwigBundle/Resources/meta/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Bundle/WebProfilerBundle/Resources/meta/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Asset/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/BrowserKit/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/ClassLoader/ClassCollectionLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ public static function load($classes, $cacheDir, $name, $autoReload, $adaptive =
116116
}
117117

118118
// cache the core classes
119-
if (!is_dir(dirname($cache))) {
120-
mkdir(dirname($cache), 0777, true);
119+
if (!is_dir($cacheDir) && !@mkdir($cacheDir, 0777, true) && !is_dir($cacheDir)) {
120+
throw new \RuntimeException(sprintf('Class Collection Loader was not able to create directory "%s"', $cacheDir));
121121
}
122122
self::writeCacheFile($cache, '<?php '.$content);
123123

src/Symfony/Component/ClassLoader/ClassMapGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private static function findClasses($path)
134134
}
135135

136136
if ($isClassConstant) {
137-
continue;
137+
break;
138138
}
139139

140140
// Find the classname

src/Symfony/Component/ClassLoader/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Config/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Console/Descriptor/TextDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ protected function describeApplication(Application $application, array $options
173173
$width = $this->getColumnWidth($description->getCommands());
174174

175175
foreach ($description->getCommands() as $command) {
176-
$this->writeText(sprintf("%-${width}s %s", $command->getName(), $command->getDescription()), $options);
176+
$this->writeText(sprintf("%-{$width}s %s", $command->getName(), $command->getDescription()), $options);
177177
$this->writeText("\n");
178178
}
179179
} else {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function select(OutputInterface $output, $question, $choices, $default =
5858

5959
$messages = (array) $question;
6060
foreach ($choices as $key => $value) {
61-
$messages[] = sprintf(" [<info>%-${width}s</info>] %s", $key, $value);
61+
$messages[] = sprintf(" [<info>%-{$width}s</info>] %s", $key, $value);
6262
}
6363

6464
$output->writeln($messages);

src/Symfony/Component/Console/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/CssSelector/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Debug/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/DependencyInjection/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/DomCrawler/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/EventDispatcher/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/ExpressionLanguage/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Filesystem/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Finder/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Form/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/HttpFoundation/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/HttpFoundation/Session/Storage/Handler/NativeFileSessionHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ public function __construct($savePath = null)
4848
$baseDir = ltrim(strrchr($savePath, ';'), ';');
4949
}
5050

51-
if ($baseDir && !is_dir($baseDir)) {
52-
mkdir($baseDir, 0777, true);
51+
if ($baseDir && !is_dir($baseDir) && !@mkdir($baseDir, 0777, < 10000 /span>true) && !is_dir($baseDir)) {
52+
throw new \RuntimeException(sprintf('Session Storage was not able to create directory "%s"', $baseDir));
5353
}
5454

5555
ini_set('session.save_path', $savePath);

src/Symfony/Component/HttpFoundation/Session/Storage/MockFileSessionStorage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ public function __construct($savePath = null, $name = 'MOCKSESSID', MetadataBag
4242
$savePath = sys_get_temp_dir();
4343
}
4444

45-
if (!is_dir($savePath)) {
46-
mkdir($savePath, 0777, true);
45+
if (!is_dir($savePath) && !@mkdir($savePath, 0777, true) && !is_dir($savePath)) {
46+
throw new \RuntimeException(sprintf('Session Storage was not able to create directory "%s"', $savePath));
4747
}
4848

4949
$this->savePath = $savePath;

src/Symfony/Component/HttpKernel/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Intl/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Ldap/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Locale/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/OptionsResolver/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Process/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/PropertyAccess/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Routing/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Security/Core/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Security/Csrf/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Security/Http/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Security/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Serializer/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Stopwatch/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Templating/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Templating/Loader/CacheLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ public function load(TemplateReferenceInterface $template)
7272

7373
$content = $storage->getContent();
7474

75-
if (!is_dir($dir)) {
76-
mkdir($dir, 0777, true);
75+
if (!is_dir($dir) && !@mkdir($dir, 0777, true) && !is_dir($dir)) {
76+
throw new \RuntimeException(sprintf('Cache Loader was not able to create directory "%s"', $dir));
7777
}
7878

7979
file_put_contents($path, $content);

src/Symfony/Component/Translation/Dumper/IcuResFileDumper.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,7 @@ public function formatCatalogue(MessageCatalogue $messages, $domain, array $opti
8989
1, 4, 0, 0 // Unicode version
9090
);
9191

92-
$output = $header
93-
.$root
94-
.$data;
95-
96-
return $output;
92+
return $header.$root.$data;
9793
}
9894

9995
private function writePadding($data)
@@ -107,9 +103,7 @@ private function writePadding($data)
107103

108104
private function getPosition($data)
109105
{
110-
$position = (strlen($data) + 28) / 4;
111-
112-
return $position;
106+
return (strlen($data) + 28) / 4;
113107
}
114108

115109
/**

src/Symfony/Component/Translation/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Translation/Writer/TranslationWriter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public function writeTranslations(MessageCatalogue $catalogue, $format, $options
7777
// get the right dumper
7878
$dumper = $this->dumpers[$format];
7979

80-
if (isset($options['path']) && !is_dir($options['path'])) {
81-
mkdir($options['path'], 0777, true);
80+
if (isset($options['path']) && !is_dir($options['path']) && !@mkdir($options['path'], 0777, true) && !is_dir($options['path'])) {
81+
throw new \RuntimeException(sprintf('Translation Writer was not able to create directory "%s"', $options['path']));
8282
}
8383

8484
// save

src/Symfony/Component/Validator/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/VarDumper/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014-2015 Fabien Potencier
1+
Copyright (c) 2014-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

src/Symfony/Component/Yaml/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2004-2015 Fabien Potencier
1+
Copyright (c) 2004-2016 Fabien Potencier
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy
44
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)
0