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 1111
1212namespace Translation \Bundle \EventListener ;
1313
14- use Symfony \Component \HttpKernel \Event \PostResponseEvent ;
1514use Symfony \Component \HttpKernel \Event \TerminateEvent ;
1615use Symfony \Component \Translation \DataCollectorTranslator ;
1716use Translation \Bundle \Service \StorageService ;
@@ -32,9 +31,6 @@ final class AutoAddMissingTranslations
3231 */
3332 private $ storage ;
3433
35- /**
36- * @param DataCollectorTranslator $translator
37- */
3834 public function __construct (StorageService $ storage , DataCollectorTranslator $ translator = null )
3935 {
4036 $ this ->dataCollector = $ translator ;
@@ -56,10 +52,3 @@ public function onTerminate(TerminateEvent $event): void
5652 }
5753 }
5854}
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 1212namespace Translation \Bundle \EventListener ;
1313
1414use Symfony \Component \Asset \Packages ;
15- use Symfony \Component \HttpKernel \Event \FilterResponseEvent ;
1615use Symfony \Component \HttpKernel \Event \ResponseEvent ;
1716use Symfony \Component \Routing \Generator \UrlGeneratorInterface ;
1817use Translation \Bundle \EditInPlace \ActivatorInterface ;
@@ -128,10 +127,3 @@ public function onKernelResponse(ResponseEvent $event): void
128127 $ event ->getResponse ()->setContent ($ content );
129128 }
130129}
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 88 */
99( function ( ) {
1010 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 ) ;
1215
1316 return ;
1417 }
You can’t perform that action at this time.
0 commit comments