Skip to content

Commit 793a4aa

Browse files
committed
Makes our bundles extends from AbstractBundle
1 parent 391e250 commit 793a4aa

File tree

18 files changed

+36
-110
lines changed

18 files changed

+36
-110
lines changed

src/Autocomplete/src/AutocompleteBundle.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,16 @@
1212
namespace Symfony\UX\Autocomplete;
1313

1414
use Symfony\Component\DependencyInjection\ContainerBuilder;
15-
use Symfony\Component\HttpKernel\Bundle\Bundle;
15+
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
1616
use Symfony\UX\Autocomplete\DependencyInjection\AutocompleteFormTypePass;
1717

1818
/**
1919
* @author Ryan Weaver <ryan@symfonycasts.com>
2020
*/
21-
final class AutocompleteBundle extends Bundle
21+
final class AutocompleteBundle extends AbstractBundle
2222
{
2323
public function build(ContainerBuilder $container)
2424
{
2525
$container->addCompilerPass(new AutocompleteFormTypePass());
2626
}
27-
28-
public function getPath(): string
29-
{
30-
return \dirname(__DIR__);
31-
}
3227
}

src/Chartjs/src/ChartjsBundle.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,13 @@
1111

1212
namespace Symfony\UX\Chartjs;
1313

14-
use Symfony\Component\HttpKernel\Bundle\Bundle;
14+
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
1515

1616
/**
1717
* @author Titouan Galopin <galopintitouan@gmail.com>
1818
*
1919
* @final
2020
*/
21-
class ChartjsBundle extends Bundle
21+
class ChartjsBundle extends AbstractBundle
2222
{
23-
public function getPath(): string
24-
{
25-
return \dirname(__DIR__);
26-
}
2723
}

src/Cropperjs/src/CropperjsBundle.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,13 @@
1111

1212
namespace Symfony\UX\Cropperjs;
1313

14-
use Symfony\Component\HttpKernel\Bundle\Bundle;
14+
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
1515

1616
/**
1717
* @author Titouan Galopin <galopintitouan@gmail.com>
1818
*
1919
* @final
2020
*/
21-
class CropperjsBundle extends Bundle
21+
class CropperjsBundle extends AbstractBundle
2222
{
23-
public function getPath(): string
24-
{
25-
return \dirname(__DIR__);
26-
}
2723
}

src/Dropzone/src/DropzoneBundle.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,13 @@
1111

1212
namespace Symfony\UX\Dropzone;
1313

14-
use Symfony\Component\HttpKernel\Bundle\Bundle;
14+
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
1515

1616
/**
1717
* @author Titouan Galopin <galopintitouan@gmail.com>
1818
*
1919
* @final
2020
*/
21-
class DropzoneBundle extends Bundle
21+
class DropzoneBundle extends AbstractBundle
2222
{
23-
public function getPath(): string
24-
{
25-
return \dirname(__DIR__);
26-
}
2723
}

src/Icons/src/UXIconsBundle.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,11 @@
1111

1212
namespace Symfony\UX\Icons;
1313

14-
use Symfony\Component\HttpKernel\Bundle\Bundle;
14+
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
1515

1616
/**
1717
* @author Kevin Bond <kevinbond@gmail.com>
1818
*/
19-
final class UXIconsBundle extends Bundle
19+
final class UXIconsBundle extends AbstractBundle
2020
{
21-
public function getPath(): string
22-
{
23-
return \dirname(__DIR__);
24-
}
2521
}

src/LazyImage/src/LazyImageBundle.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,13 @@
1111

1212
namespace Symfony\UX\LazyImage;
1313

14-
use Symfony\Component\HttpKernel\Bundle\Bundle;
14+
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
1515

1616
/**
1717
* @author Titouan Galopin <galopintitouan@gmail.com>
1818
*
1919
* @final
2020
*/
21-
class LazyImageBundle extends Bundle
21+
class LazyImageBundle extends AbstractBundle
2222
{
23-
public function getPath(): string
24-
{
25-
return \dirname(__DIR__);
26-
}
2723
}

src/LiveComponent/src/LiveComponentBundle.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313

1414
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
1515
use Symfony\Component\DependencyInjection\ContainerBuilder;
16-
use Symfony\Component\HttpKernel\Bundle\Bundle;
16+
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
1717
use Symfony\UX\LiveComponent\DependencyInjection\Compiler\ComponentDefaultActionPass;
1818
use Symfony\UX\LiveComponent\DependencyInjection\Compiler\OptionalDependencyPass;
1919

2020
/**
2121
* @author Kevin Bond <kevinbond@gmail.com>
2222
*/
23-
final class LiveComponentBundle extends Bundle
23+
final class LiveComponentBundle extends AbstractBundle
2424
{
2525
public const HYDRATION_EXTENSION_TAG = 'live_component.hydration_extension';
2626

@@ -30,9 +30,4 @@ public function build(ContainerBuilder $container): void
3030
$container->addCompilerPass(new OptionalDependencyPass(), PassConfig::TYPE_BEFORE_OPTIMIZATION, 100);
3131
$container->addCompilerPass(new ComponentDefaultActionPass());
3232
}
33-
34-
public function getPath(): string
35-
{
36-
return \dirname(__DIR__);
37-
}
3833
}

src/Notify/src/NotifyBundle.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,13 @@
1111

1212
namespace Symfony\UX\Notify;
1313

14-
use Symfony\Component\HttpKernel\Bundle\Bundle;
14+
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
1515

1616
/**
1717
* @author Mathias Arlaud <mathias.arlaud@gmail.com>
1818
*
1919
* @final
2020
*/
21-
class NotifyBundle extends Bundle
21+
class NotifyBundle extends AbstractBundle
2222
{
23-
public function getPath(): string
24-
{
25-
return \dirname(__DIR__);
26-
}
2723
}

src/React/src/ReactBundle.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,13 @@
1111

1212
namespace Symfony\UX\React;
1313

14-
use Symfony\Component\HttpKernel\Bundle\Bundle;
14+
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
1515

1616
/**
1717
* @author Titouan Galopin <galopintitouan@gmail.com>
1818
*
1919
* @final
2020
*/
21-
class ReactBundle extends Bundle
21+
class ReactBundle extends AbstractBundle
2222
{
23-
public function getPath(): string
24-
{
25-
return \dirname(__DIR__);
26-
}
2723
}

src/StimulusBundle/src/StimulusBundle.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,14 @@
1212
namespace Symfony\UX\StimulusBundle;
1313

1414
use Symfony\Component\DependencyInjection\ContainerBuilder;
15-
use Symfony\Component\HttpKernel\Bundle\Bundle;
15+
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
1616
use Symfony\UX\StimulusBundle\DependencyInjection\Compiler\RemoveAssetMapperServicesCompiler;
1717

1818
/**
1919
* @author Ryan Weaver <ryan@symfonycasts.com>
2020
*/
21-
final class StimulusBundle extends Bundle
21+
final class StimulusBundle extends AbstractBundle
2222
{
23-
public function getPath(): string
24-
{
25-
return \dirname(__DIR__);
26-
}
27-
2823
public function build(ContainerBuilder $container)
2924
{
3025
$container->addCompilerPass(new RemoveAssetMapperServicesCompiler());

src/Svelte/src/SvelteBundle.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111

1212
namespace Symfony\UX\Svelte;
1313

14-
use Symfony\Component\HttpKernel\Bundle\Bundle;
14+
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
1515

1616
/**
1717
* @author Titouan Galopin <galopintitouan@gmail.com>
1818
* @author Thomas Choquet <thomas.choquet.pro@gmail.com>
1919
*
2020
* @final
2121
*/
22-
class SvelteBundle extends Bundle
22+
class SvelteBundle extends AbstractBundle
2323
{
2424
}

src/Swup/src/SwupBundle.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,11 @@
1111

1212
namespace Symfony\UX\Swup;
1313

14-
use Symfony\Component\HttpKernel\Bundle\Bundle;
14+
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
1515

1616
/**
1717
* @final
1818
*/
19-
class SwupBundle extends Bundle
19+
class SwupBundle extends AbstractBundle
2020
{
21-
public function getPath(): string
22-
{
23-
return \dirname(__DIR__);
24-
}
2521
}

src/TogglePassword/src/TogglePasswordBundle.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,11 @@
1111

1212
namespace Symfony\UX\TogglePassword;
1313

14-
use Symfony\Component\HttpKernel\Bundle\Bundle;
14+
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
1515

1616
/**
1717
* @author Félix Eymonot <felix.eymonot@alximy.io>
1818
*/
19-
final class TogglePasswordBundle extends Bundle
19+
final class TogglePasswordBundle extends AbstractBundle
2020
{
21-
public function getPath(): string
22-
{
23-
return \dirname(__DIR__);
24-
}
2521
}

src/Translator/src/UxTranslatorBundle.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\UX\Translator;
1313

1414
use Symfony\Component\DependencyInjection\ContainerBuilder;
15-
use Symfony\Component\HttpKernel\Bundle\Bundle;
15+
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
1616
use Symfony\UX\Translator\DependencyInjection\TranslatorCompilerPass;
1717

1818
/**
@@ -22,13 +22,8 @@
2222
*
2323
* @experimental
2424
*/
25-
class UxTranslatorBundle extends Bundle
25+
class UxTranslatorBundle extends AbstractBundle
2626
{
27-
public function getPath(): string
28-
{
29-
return \dirname(__DIR__);
30-
}
31-
3227
public function build(ContainerBuilder $container): void
3328
{
3429
$container->addCompilerPass(new TranslatorCompilerPass());

src/Turbo/src/TurboBundle.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
1616
use Symfony\Component\DependencyInjection\ContainerBuilder;
1717
use Symfony\Component\HttpFoundation\Request;
18-
use Symfony\Component\HttpKernel\Bundle\Bundle;
18+
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
1919

2020
/**
2121
* @author Kévin Dunglas <kevin@dunglas.fr>
2222
*/
23-
final class TurboBundle extends Bundle
23+
final class TurboBundle extends AbstractBundle
2424
{
2525
public const STREAM_FORMAT = 'turbo_stream';
2626
public const STREAM_MEDIA_TYPE = 'text/vnd.turbo-stream.html';
@@ -46,9 +46,4 @@ public function process(ContainerBuilder $container): void
4646
}
4747
}, PassConfig::TYPE_BEFORE_REMOVING);
4848
}
49-
50-
public function getPath(): string
51-
{
52-
return \dirname(__DIR__);
53-
}
5449
}

src/TwigComponent/src/TwigComponentBundle.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,16 @@
1212
namespace Symfony\UX\TwigComponent;
1313

1414
use Symfony\Component\DependencyInjection\ContainerBuilder;
15-
use Symfony\Component\HttpKernel\Bundle\Bundle;
15+
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
1616
use Symfony\UX\TwigComponent\DependencyInjection\Compiler\TwigComponentPass;
1717

1818
/**
1919
* @author Kevin Bond <kevinbond@gmail.com>
2020
*/
21-
final class TwigComponentBundle extends Bundle
21+
final class TwigComponentBundle extends AbstractBundle
2222
{
2323
public function build(ContainerBuilder $container): void
2424
{
2525
$container->addCompilerPass(new TwigComponentPass());
2626
}
27-
28-
public function getPath(): string
29-
{
30-
return \dirname(__DIR__);
31-
}
3227
}

src/Typed/src/TypedBundle.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,11 @@
1111

1212
namespace Symfony\UX\Typed;
1313

14-
use Symfony\Component\HttpKernel\Bundle\Bundle;
14+
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
1515

1616
/**
1717
* @final
1818
*/
19-
class TypedBundle extends Bundle
19+
class TypedBundle extends AbstractBundle
2020
{
21-
public function getPath(): string
22-
{
23-
return \dirname(__DIR__);
24-
}
2521
}

src/Vue/src/VueBundle.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,14 @@
1111

1212
namespace Symfony\UX\Vue;
1313

14-
use Symfony\Component\HttpKernel\Bundle\Bundle;
14+
use Symfony\Component\HttpKernel\Bundle\AbstractBundle;
1515

1616
/**
1717
* @author Titouan Galopin <galopintitouan@gmail.com>
1818
* @author Thibault RICHARD <thibault.richard62@gmail.com>
1919
*
2020
* @final
2121
*/
22-
class VueBundle extends Bundle
22+
class VueBundle extends AbstractBundle
2323
{
24-
public function getPath(): string
25-
{
26-
return \dirname(__DIR__);
27-
}
2824
}

0 commit comments

Comments
 (0)