Skip to content

Commit 9a20a97

Browse files
minor symfony#24855 Random fixes (nicolas-grekas)
This PR was merged into the 3.3 branch. Discussion ---------- Random fixes | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- 49e5763 Random fixes
2 parents 39a5801 + 49e5763 commit 9a20a97

File tree

11 files changed

+53
-35
lines changed

11 files changed

+53
-35
lines changed

src/Symfony/Bundle/FrameworkBundle/CacheWarmer/SerializerCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ private function extractSupportedLoaders(array $loaders)
8080
if ($loader instanceof XmlFileLoader || $loader instanceof YamlFileLoader) {
8181
$supportedLoaders[] = $loader;
8282
} elseif ($loader instanceof LoaderChain) {
83-
$supportedLoaders = array_merge($supportedLoaders, $this->extractSupportedLoaders($loader->getDelegatedLoaders()));
83+
$supportedLoaders = array_merge($supportedLoaders, $this->extractSupportedLoaders($loader->getLoaders()));
8484
}
8585
}
8686

src/Symfony/Bundle/FrameworkBundle/CacheWarmer/ValidatorCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ private function extractSupportedLoaders(array $loaders)
9191
if ($loader instanceof XmlFileLoader || $loader instanceof YamlFileLoader) {
9292
$supportedLoaders[] = $loader;
9393
} elseif ($loader instanceof LoaderChain) {
94-
$supportedLoaders = array_merge($supportedLoaders, $this->extractSupportedLoaders($loader->getDelegatedLoaders()));
94+
$supportedLoaders = array_merge($supportedLoaders, $this->extractSupportedLoaders($loader->getLoaders()));
9595
}
9696
}
9797

src/Symfony/Component/Cache/Adapter/PdoAdapter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Cache\Adapter;
1313

14+
use Doctrine\DBAL\Connection;
1415
use Symfony\Component\Cache\Traits\PdoTrait;
1516

1617
class PdoAdapter extends AbstractAdapter

src/Symfony/Component/Cache/Traits/RedisTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function init($redisClient, $namespace = '', $defaultLifetime = 0)
4848
throw new InvalidArgumentException(sprintf('RedisAdapter namespace contains "%s" but only characters in [-+_.A-Za-z0-9] are allowed.', $match[0]));
4949
}
5050
if ($redisClient instanceof \RedisCluster) {
51-
$this->enableversioning();
51+
$this->enableVersioning();
5252
} elseif (!$redisClient instanceof \Redis && !$redisClient instanceof \RedisArray && !$redisClient instanceof \Predis\Client) {
5353
throw new InvalidArgumentException(sprintf('%s() expects parameter 1 to be Redis, RedisArray, RedisCluster or Predis\Client, %s given', __METHOD__, is_object($redisClient) ? get_class($redisClient) : gettype($redisClient)));
5454
}

src/Symfony/Component/Config/ResourceCheckerConfigCache.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,15 @@ public function write($content, array $metadata = null)
135135
$mode = 0666;
136136
$umask = umask();
137137
$filesystem = new Filesystem();
138-
$filesystem->dumpFile($this->file, $content, null);
138+
$filesystem->dumpFile($this->file, $content);
139139
try {
140140
$filesystem->chmod($this->file, $mode, $umask);
141141
} catch (IOException $e) {
142142
// discard chmod failure (some filesystem may not support it)
143143
}
144144

145145
if (null !== $metadata) {
146-
$filesystem->dumpFile($this->getMetaFile(), serialize($metadata), null);
146+
$filesystem->dumpFile($this->getMetaFile(), serialize($metadata));
147147
try {
148148
$filesystem->chmod($this->getMetaFile(), $mode, $umask);
149149
} catch (IOException $e) {

src/Symfony/Component/Console/Exception/CommandNotFoundException.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ class CommandNotFoundException extends \InvalidArgumentException implements Exce
2121
private $alternatives;
2222

2323
/**
24-
* @param string $message Exception message to throw
25-
* @param array $alternatives List of similar defined names
26-
* @param int $code Exception code
27-
* @param Exception $previous previous exception used for the exception chaining
24+
* @param string $message Exception message to throw
25+
* @param array $alternatives List of similar defined names
26+
* @param int $code Exception code
27+
* @param \Exception $previous Previous exception used for the exception chaining
2828
*/
2929
public function __construct($message, array $alternatives = array(), $code = 0, \Exception $previous = null)
3030
{

src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,9 @@ private function addServiceInstance($id, Definition $definition, $isSimpleInstan
423423
*
424424
* @return bool
425425
*/
426-
private function isSimpleInstance($id, Definition $definition)
426+
private function isSimpleInstance($id, Definition $definition, array $inlinedDefinitions)
427427
{
428-
foreach (array_merge(array($definition), $this->getInlinedDefinitions($definition)) as $sDefinition) {
428+
foreach (array_merge(array($definition), $inlinedDefinitions) as $sDefinition) {
429429
if ($definition !== $sDefinition && !$this->hasReference($id, $sDefinition->getMethodCalls())) {
430430
continue;
431431
}

src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ private function getContainerCompilerLogs()
149149
private function sanitizeLogs($logs)
150150
{
151151
$sanitizedLogs = array();
152+
$silencedLogs = array();
152153

153154
foreach ($logs as $log) {
154155
if (!$this->isSilencedOrDeprecationErrorLog($log)) {

src/Symfony/Component/Serializer/Mapping/Loader/LoaderChain.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,12 @@ public function loadClassMetadata(ClassMetadataInterface $metadata)
6060

6161
return $success;
6262
}
63+
64+
/**
65+
* @return LoaderInterface[]
66+
*/
67+
public function getLoaders()
68+
{
69+
return $this->loaders;
70+
}
6371
}

src/Symfony/Component/Validator/Mapping/Loader/LoaderChain.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,12 @@ public function loadClassMetadata(ClassMetadata $metadata)
5656

5757
return $success;
5858
}
59+
60+
/**
61+
* @return LoaderInterface[]
62+
*/
63+
public function getLoaders()
64+
{
65+
return $this->loaders;
66+
}
5967
}

0 commit comments

Comments
 (0)