8000 Merge branch '4.4' into 5.2 · symfony/symfony@1a2e101 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1a2e101

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: [FrameworkBundle] Replace var_export with VarExporter to use array short syntax Pin masterminds/html5 to the master branch for PHP 8.1
2 parents e85323f + 6f9f4be commit 1a2e101

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,8 @@ jobs:
218218
run: |
219219
echo "::group::fake PHP version"
220220
composer config platform.php 8.0.99
221+
echo "::group::Adjust dependencies"
222+
composer require --dev --no-update masterminds/html5:~2.7.5@dev
221223
echo "::group::composer update"
222224
composer update --no-progress --ansi
223225
echo "::endgroup::"

src/Symfony/Bundle/FrameworkBundle/Secrets/SodiumVault.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Bundle\FrameworkBundle\Secrets;
1313

1414
use Symfony\Component\DependencyInjection\EnvVarLoaderInterface;
15+
use Symfony\Component\VarExporter\VarExporter;
1516

1617
/**
1718
* @author Tobias Schultze <http://tobion.de>
@@ -89,7 +90,7 @@ public function seal(string $name, string $value): void
8990
$list = $this->list();
9091
$list[$name] = null;
9192
uksort($list, 'strnatcmp');
92-
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", var_export($list, true), \LOCK_EX));
93+
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list), \LOCK_EX));
9394

9495
$this->lastMessage = sprintf('Secret "%s" encrypted in "%s"; you can commit it.', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR));
9596
}
@@ -141,7 +142,7 @@ public function remove(string $name): bool
141142

142143
$list = $this->list();
143144
unset($list[$name]);
144-
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", var_export($list, true), \LOCK_EX));
145+
file_put_contents($this->pathPrefix.'list.php', sprintf("<?php\n\nreturn %s;\n", VarExporter::export($list), \LOCK_EX));
145146

146147
$this->lastMessage = sprintf('Secret "%s" removed from "%s".', $name, $this->getPrettyPath(\dirname($this->pathPrefix).\DIRECTORY_SEPARATOR));
147148

0 commit comments

Comments
 (0)
0