Skip to content

Commit ad39f82

Browse files
Merge branch '4.4' into 5.4
* 4.4: [PhpUnitBridge] Fix test Bump Symfony version to 4.4.41 Update VERSION for 4.4.40 Update CONTRIBUTORS for 4.4.40 Update CHANGELOG for 4.4.40 [Messenger] reset connection on worker shutdown reset Twig form theme resources between requests
2 parents 7526793 + 227322a commit ad39f82

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

AbstractRendererEngine.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@
1111

1212
namespace Symfony\Component\Form;
1313

14+
use Symfony\Contracts\Service\ResetInterface;
15+
1416
/**
1517
* Default implementation of {@link FormRendererEngineInterface}.
1618
*
1719
* @author Bernhard Schussek <[email protected]>
1820
*/
19-
abstract class AbstractRendererEngine implements FormRendererEngineInterface
21+
abstract class AbstractRendererEngine implements FormRendererEngineInterface, ResetInterface
2022
{
2123
/**
2224
* The variable in {@link FormView} used as cache key.
@@ -193,4 +195,12 @@ private function loadResourceForBlockNameHierarchy(string $cacheKey, FormView $v
193195

194196
return false;
195197
}
198+
199+
public function reset(): void
200+
{
201+
$this->themes = [];
202+
$this->useDefaultThemes = [];
203+
$this->resources = [];
204+
$this->resourceHierarchyLevels = [];
205+
}
196206
}

0 commit comments

Comments
 (0)