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 930bcf7

Browse filesBrowse 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 ------- eb70c8b [FrameworkBundle] Add alias `ServicesResetter` for `services_resetter` service
2 parents 18a5c70 + eb70c8b commit 930bcf7
Copy full SHA for 930bcf7

File tree

5 files changed

+26
-2
lines changed
Filter options

5 files changed

+26
-2
lines changed

‎src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ CHANGELOG
1515
* Deprecate the `framework.validation.cache` option
1616
* Add `--method` option to the `debug:router` command
1717
* Auto-exclude DI extensions, test cases, entities and messenger messages
18+
* Add DI alias from `ServicesResetterInterface` to `services_resetter`
1819

1920
7.2
2021
---

‎src/Symfony/Bundle/FrameworkBundle/Resources/config/services.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/config/services.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate;
4343
use Symfony\Component\HttpKernel\Config\FileLocator;
4444
use Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter;
45+
use Symfony\Component\HttpKernel\DependencyInjection\ServicesResetterInterface;
4546
use Symfony\Component\HttpKernel\EventListener\LocaleAwareListener;
4647
use Symfony\Component\HttpKernel\HttpCache\Store;
4748
use Symfony\Component\HttpKernel\HttpCache\StoreInterface;
@@ -177,6 +178,7 @@ class_exists(WorkflowEvents::class) ? WorkflowEvents::ALIASES : []
177178

178179
->set('services_resetter', ServicesResetter::class)
179180
->public()
181+
->alias(ServicesResetterInterface::class, 'services_resetter')
180182

181183
->set('reverse_container', ReverseContainer::class)
182184
->args([

‎src/Symfony/Component/HttpKernel/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/CHANGELOG.md
+1Lines 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
---

‎src/Symfony/Component/HttpKernel/DependencyInjection/ServicesResetter.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpKernel/DependencyInjection/ServicesResetter.php
+1-2Lines 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
+21Lines 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 <fabien@symfony.com>
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.