File tree Expand file tree Collapse file tree 3 files changed +4
-20
lines changed Expand file tree Collapse file tree 3 files changed +4
-20
lines changed Original file line number Diff line number Diff line change 11
11
12
12
namespace Translation \Bundle \EventListener ;
13
13
14
- use Symfony \Component \HttpKernel \Event \PostResponseEvent ;
15
14
use Symfony \Component \HttpKernel \Event \TerminateEvent ;
16
15
use Symfony \Component \Translation \DataCollectorTranslator ;
17
16
use Translation \Bundle \Service \StorageService ;
@@ -32,9 +31,6 @@ final class AutoAddMissingTranslations
32
31
*/
33
32
private $ storage ;
34
33
35
- /**
36
- * @param DataCollectorTranslator $translator
37
- */
38
34
public function __construct (StorageService $ storage , DataCollectorTranslator $ translator = null )
39
35
{
40
36
$ this ->dataCollector = $ translator ;
@@ -56,10 +52,3 @@ public function onTerminate(TerminateEvent $event): void
56
52
}
57
53
}
58
54
}
59
-
60
- // PostResponseEvent have been renamed into ResponseEvent in sf 4.3
61
- // @see https://github.com/symfony/symfony/blob/master/UPGRADE-4.3.md#httpkernel
62
- // To be removed once sf ^4.3 become the minimum supported version.
63
- if (!class_exists (TerminateEvent::class) && class_exists (PostResponseEvent::class)) {
64
- class_alias (PostResponseEvent::class, TerminateEvent::class);
65
- }
Original file line number Diff line number Diff line change 12
12
namespace Translation \Bundle \EventListener ;
13
13
14
14
use Symfony \Component \Asset \Packages ;
15
- use Symfony \Component \HttpKernel \Event \FilterResponseEvent ;
16
15
use Symfony \Component \HttpKernel \Event \ResponseEvent ;
17
16
use Symfony \Component \Routing \Generator \UrlGeneratorInterface ;
18
17
use Translation \Bundle \EditInPlace \ActivatorInterface ;
@@ -128,10 +127,3 @@ public function onKernelResponse(ResponseEvent $event): void
128
127
$ event ->getResponse ()->setContent ($ content );
129
128
}
130
129
}
131
-
132
- // FilterResponseEvent have been renamed into ResponseEvent in sf 4.3
133
- // @see https://github.com/symfony/symfony/blob/master/UPGRADE-4.3.md#httpkernel
134
- // To be removed once sf ^4.3 become the minimum supported version.
135
- if (!class_exists (ResponseEvent::class) && class_exists (FilterResponseEvent::class)) {
136
- class_alias (FilterResponseEvent::class, ResponseEvent::class);
137
- }
Original file line number Diff line number Diff line change 8
8
*/
9
9
( function ( ) {
10
10
if ( typeof customElements . define !== "undefined" ) {
11
- customElements . define ( "x-trans" , HTMLElement ) ;
11
+ // it is not possible to use HTMLElement directly
12
+ class XTrans extends HTMLElement { }
13
+
14
+ customElements . define ( "x-trans" , XTrans ) ;
12
15
13
16
return ;
14
17
}
You can’t perform that action at this time.
0 commit comments