File tree 3 files changed +16
-3
lines changed
3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 15
15
"sylius/locale" : " ^1.0" ,
16
16
"symfony/config" : " ^5.4 || ^6.4" ,
17
17
"symfony/dependency-injection" : " ^5.4 || ^6.4" ,
18
- "symfony/http-kernel" : " ^5.4 || ^6.4"
18
+ "symfony/http-kernel" : " ^5.4 || ^6.4" ,
19
+ "symfony/service-contracts" : " ^1.1 || ^2.0 || ^3.0"
19
20
},
20
21
"require-dev" : {
21
22
"infection/infection" : " ^0.27.11" ,
Original file line number Diff line number Diff line change 8
8
use Sylius \Component \Channel \Context \ChannelNotFoundException ;
9
9
use Sylius \Component \Channel \Model \ChannelInterface ;
10
10
use Sylius \Component \Channel \Repository \ChannelRepositoryInterface ;
11
+ use Symfony \Contracts \Service \ResetInterface ;
11
12
12
- final class StaticChannelContext implements ChannelContextInterface
13
+ final class StaticChannelContext implements ChannelContextInterface, ResetInterface
13
14
{
14
15
private ?ChannelInterface $ channel = null ;
15
16
@@ -43,4 +44,9 @@ public function setChannelCode(string $channelCode): void
43
44
44
45
$ this ->channel = $ channel ;
45
46
}
47
+
48
+ public function reset (): void
49
+ {
50
+ $ this ->channel = null ;
51
+ }
46
52
}
Original file line number Diff line number Diff line change 6
6
7
7
use Sylius \Component \Locale \Context \LocaleContextInterface ;
8
8
use Sylius \Component \Locale \Context \LocaleNotFoundException ;
9
+ use Symfony \Contracts \Service \ResetInterface ;
9
10
10
- final class StaticLocaleContext implements LocaleContextInterface
11
+ final class StaticLocaleContext implements LocaleContextInterface, ResetInterface
11
12
{
12
13
private ?string $ localeCode = null ;
13
14
@@ -20,4 +21,9 @@ public function setLocaleCode(?string $localeCode): void
20
21
{
21
22
$ this ->localeCode = $ localeCode ;
22
23
}
24
+
25
+ public function reset (): void
26
+ {
27
+ $ this ->localeCode = null ;
28
+ }
23
29
}
You can’t perform that action at this time.
0 commit comments