-
-
Notifications
You must be signed in to change notification settings - Fork 399
Description
The Problem
Right now, our bundle naming is all over the place. Some bundles have a UX prefix, others don't, and it's confusing.
Bundles with UX prefix:
UXIconsBundleUXMapBundleUXToolkitBundleUxTranslatorBundle(lowercasex🤔)
Bundles without UX prefix:
AutocompleteBundleChartjsBundleCropperjsBundleDropzoneBundleLazyImageBundle(deprecated)LiveComponentBundleNotifyBundleReactBundleStimulusBundleSvelteBundleSwupBundle(deprecated)TogglePasswordBundle(deprecated)TurboBundleTwigComponentBundleTypedBundle(deprecated)VueBundle
Why
If I remember correctly, the UX Translator was the first package where I prefixed the bundle name by Ux in #819. Due to skill issue, I assumed that new TreeBuilder('ux_translator') was enough, but nope. 🙈
Then, new packages like Icons, Map and Toolkit used UX (in uppercase), because of "Symfony UX". It would be nice for all packages to follow the same convention based on UX...Bundle.
Also, some bundles use the AbstractBundle (Simpler Bundle Extension and Configuration), but other do not. It would be ideal to re-align all the bundles for using the AbstractBundle, and drop the *Extension and Configuration files.
Migration plan
In 2.x:
- Create
UX...Bundleclasses - Use the simplified system based on
AbstractBundle - Remove
*ExtensionandConfigurationfiles (already marked as internal) - ❓ Keep the old
*Bundlefiles, but useclass_alias(e.g.:class_alias(UXAutocompleteBundle::class, AutocompleteBundle::class)) - Changelog
For example:
// UXAutocompleteBundle.php
namespace Symfony\UX\Autocomplete;
class UXAutocompleteBundle extends AbstractBundle {
// ...
}// AutocompleteBundle.php
namespace Symfony\UX\Autocomplete;
// So using `Symfony\UX\Autocomplete\AutocompleteBundle::class` in `config/bundles.php` will still works
class_alias(UXAutocompleteBundle::class, AutocompleteBundle::class);In 3.x:
- Remove the deprecated bundles and aliases
- Changelog