minor fixes

This commit is contained in:
Nicolas Grekas 2018-07-09 17:54:21 +02:00
parent a5709ee9ba
commit 3cfdc9e9d7
5 changed files with 6 additions and 6 deletions

View File

@ -53,7 +53,7 @@ class ProxyDumper implements DumperInterface
$instantiation = 'return';
if ($definition->isShared()) {
$instantiation .= sprintf(' $this->%s[\'%s\'] =', \method_exists(ContainerBuilder::class, 'addClassResource') || ($definition->isPublic() && !$definition->isPrivate()) ? 'services' : 'privates', $id);
$instantiation .= sprintf(' $this->%s[\'%s\'] =', $definition->isPublic() && !$definition->isPrivate() ? 'services' : 'privates', $id);
}
if (null === $factoryCode) {

View File

@ -99,7 +99,7 @@ class ProxyDumperTest extends TestCase
array(
(new Definition(__CLASS__))
->setPublic(false),
\method_exists(ContainerBuilder::class, 'addClassResource') ? 'services' : 'privates',
'privates',
),
array(
(new Definition(__CLASS__))

View File

@ -17,7 +17,7 @@
],
"require": {
"php": "^7.1.3",
"symfony/dependency-injection": "~3.4|~4.0",
"symfony/dependency-injection": "~4.0",
"ocramius/proxy-manager": "~2.1"
},
"require-dev": {

View File

@ -76,12 +76,12 @@ class DefaultMarshaller implements MarshallerInterface
return $value;
}
} elseif (false === $igbinaryNull) {
throw new \RuntimeException('Failed to unserialize cached value, did you forget to install the "igbinary" extension?');
throw new \RuntimeException('Failed to unserialize values, did you forget to install the "igbinary" extension?');
} elseif (null !== $value = igbinary_unserialize($value)) {
return $value;
}
throw new \DomainException(error_get_last() ? error_get_last()['message'] : 'Failed to unserialize cached value');
throw new \DomainException(error_get_last() ? error_get_last()['message'] : 'Failed to unserialize values.');
} catch (\Error $e) {
throw new \ErrorException($e->getMessage(), $e->getCode(), E_ERROR, $e->getFile(), $e->getLine());
} finally {

View File

@ -14,7 +14,7 @@ namespace Symfony\Component\Cache\Marshaller;
/**
* Serializes/unserializes PHP values.
*
* Implementations of this interface MUST deal with errors carefuly. They MUST
* Implementations of this interface MUST deal with errors carefully. They MUST
* also deal with forward and backward compatibility at the storage format level.
*
* @author Nicolas Grekas <p@tchwork.com>