- What is kibatic/timezone-bundle used for?
- It is a small Symfony bundle that provides a ready-to-use timezone form type with grouped timezone choices. It helps manage how a DateTimeInterface is displayed in the correct timezone and makes it easier to store user timezones consistently. It is not a Laravel package and does not ship Laravel-specific integrations.
- How do I install kibatic/timezone-bundle?
- Install it with Composer using composer require kibatic/timezone-bundle. Then register the bundle in your Symfony application's bundle configuration, typically in config/bundles.php for Symfony Flex apps. Because it is a Symfony bundle, Laravel's package auto-discovery will not register it for you.
- Does kibatic/timezone-bundle work with Laravel?
- No, it is built as a Symfony bundle and does not provide a Laravel service provider, facade, or config file. Laravel does not use Symfony's form component by default, so the form type will not be available in a typical Laravel app. You should choose a Laravel-native timezone solution unless you are deliberately integrating Symfony forms.
- Which Laravel versions are supported by kibatic/timezone-bundle?
- It does not target Laravel versions at all; its compatibility is defined by Symfony and Composer constraints. Check the package's composer.json for the supported Symfony versions. For Laravel projects, there is no Laravel version support matrix to rely on.
- How do I configure the timezone form type?
- Configuration is intentionally minimal: register the bundle and use its timezone form type in your Symfony form classes. The bundle is designed to provide grouped timezone choices out of the box, so you usually do not need extensive setup. Review the repository README for the exact form type class name and any available options.
- What are common use cases for a timezone form type?
- Typical use cases include user profile settings, account preferences, scheduling forms, and admin panels where a timezone must be selected and stored. Grouped choices make long timezone lists easier to navigate. The bundle is most useful when you need consistent timezone input alongside DateTimeInterface display handling.
- How do I test timezone selection in a Symfony form?
- Write a form test that submits a valid timezone identifier and asserts that the form is valid and the value is stored as expected. You can also assert that the choice list is grouped according to the bundle's form type. For Laravel, you would need a separate testing approach because this bundle is not integrated with Laravel's form testing helpers.
- Is kibatic/timezone-bundle production-ready and maintained?
- It is a small bundle, so you should review the repository's recent commits, releases, and issue activity before using it in production. Pin a specific version in Composer and monitor for updates. If maintenance appears inactive, consider Symfony's built-in timezone choice types or a custom form type instead.
- What are alternatives to kibatic/timezone-bundle for Laravel?
- In Laravel, use the timezone validation rule and populate a select with DateTimeZone::listIdentifiers or a curated list. You can also build a custom Blade component or use a package that explicitly supports Laravel. Symfony's Intl timezone choice type is a comparable alternative if you are working in Symfony.
- Does kibatic/timezone-bundle convert DateTimeInterface values automatically?
- The bundle focuses on timezone form input and consistent storage, not on automatically converting every DateTimeInterface in your application. You still need application logic to convert and display dates in the user's selected timezone. Treat the stored timezone as the user's preference and apply it where dates are rendered.