Merge branch '4.4' into 5.2
* 4.4: [Contracts] Add missing `@return` annotations [FrameworkBundle] Fixed file operations in Sodium vault seal
This commit is contained in:
commit
8c75b86a0c
@ -90,7 +90,7 @@ class SodiumVault extends AbstractVault implements EnvVarLoaderInterface
|
||||
$list = $this->list();
|
||||
$list[$name] = null;
|
||||
uksort($list, 'strnatcmp');
|
||||
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list), \LOCK_EX));
|
||||
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list)), \LOCK_EX);
|
||||
|
||||
$this->lastMessage = sprintf('Secret "%s" encrypted in "%s"; you can commit it.', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR));
|
||||
}
|
||||
@ -142,7 +142,7 @@ class SodiumVault extends AbstractVault implements EnvVarLoaderInterface
|
||||
|
||||
$list = $this->list();
|
||||
unset($list[$name]);
|
||||
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list), \LOCK_EX));
|
||||
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list)), \LOCK_EX);
|
||||
|
||||
$this->lastMessage = sprintf('Secret "%s" removed from "%s".', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR));
|
||||
|
||||
|
@ -27,6 +27,8 @@ trait CacheTrait
|
||||
{
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null)
|
||||
{
|
||||
|
@ -18,6 +18,9 @@ class TestHttpServer
|
||||
{
|
||||
private static $process = [];
|
||||
|
||||
/**
|
||||
* @return Process
|
||||
*/
|
||||
public static function start(int $port = 8057)
|
||||
{
|
||||
if (isset(self::$process[$port])) {
|
||||
|
@ -52,6 +52,8 @@ trait ServiceSubscriberTrait
|
||||
|
||||
/**
|
||||
* @required
|
||||
*
|
||||
* @return ContainerInterface|null
|
||||
*/
|
||||
public function setContainer(ContainerInterface $container)
|
||||
{
|
||||
|
@ -17,6 +17,9 @@ use Symfony\Contracts\Service\ServiceLocatorTrait;
|
||||
|
||||
abstract class ServiceLocatorTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @return ContainerInterface
|
||||
*/
|
||||
protected function getServiceLocator(array $factories)
|
||||
{
|
||||
return new class($factories) implements ContainerInterface {
|
||||
|
@ -42,7 +42,7 @@ class ParentTestService
|
||||
{
|
||||
}
|
||||
|
||||
public function setContainer(ContainerInterface $container)
|
||||
public function setContainer(ContainerInterface $container): ContainerInterface
|
||||
{
|
||||
return $container;
|
||||
}
|
||||
|
@ -43,6 +43,9 @@ class TranslatorTest extends TestCase
|
||||
\Locale::setDefault($this->defaultLocale);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return TranslatorInterface
|
||||
*/
|
||||
public function getTranslator()
|
||||
{
|
||||
return new class() implements TranslatorInterface {
|
||||
|
Reference in New Issue
Block a user