Skip to content

Commit 3600aec

Browse files
feature #60020 [FrameworkBundle] Make ServicesResetter autowirable (lyrixx)
This PR was merged into the 7.3 branch. Discussion ---------- [FrameworkBundle] Make `ServicesResetter` autowirable | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | yes | Deprecations? | no | Issues | | License | MIT I need this service quite often, and I never made this PR... But Today I'm motivated 😃 Commits ------- eb70c8b4974 [FrameworkBundle] Add alias `ServicesResetter` for `services_resetter` service
2 parents 175557f + 84b25e3 commit 3600aec

File tree

3 files changed

+23
-2
lines changed

3 files changed

+23
-2
lines changed

CHANGELOG.md

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

77
* Add `$key` argument to `#[MapQueryString]` that allows using a specific key for argument resolving
88
* Support `Uid` in `#[MapQueryParameter]`
9+
* Add `ServicesResetterInterface`, implemented by `ServicesResetter`
910

1011
7.2
1112
---

DependencyInjection/ServicesResetter.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
use ProxyManager\Proxy\LazyLoadingInterface;
1515
use Symfony\Component\VarExporter\LazyObjectInterface;
16-
use Symfony\Contracts\Service\ResetInterface;
1716

1817
/**
1918
* Resets provided services.
@@ -23,7 +22,7 @@
2322
*
2423
* @final since Symfony 7.2
2524
*/
26-
class ServicesResetter implements ResetInterface
25+
class ServicesResetter implements ServicesResetterInterface
2726
{
2827
/**
2928
* @param \Traversable<string, object> $resettableServices
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <[email protected]>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\HttpKernel\DependencyInjection;
13+
14+
use Symfony\Contracts\Service\ResetInterface;
15+
16+
/**
17+
* Resets provided services.
18+
*/
19+
interface ServicesResetterInterface extends ResetInterface
20+
{
21+
}

0 commit comments

Comments
 (0)