glitchr / base-bundle
Base helper integration for Symfony
Package info
gitlab.glitchr.dev/public-repository/symfony/bundle/base/component
Type:symfony-bundle
pkg:composer/glitchr/base-bundle
Requires
- php: ^8.1
- api-platform/doctrine-orm: ^4.0
- api-platform/symfony: ^4.0
- beberlei/doctrineextensions: ^1.0
- doctrine/doctrine-bundle: ^2.0|^3.0
- doctrine/orm: ^2.15|^3.0
- easycorp/easyadmin-bundle: ^4.0|^5.0
- endroid/qr-code: ^6.0
- enshrined/svg-sanitize: ^0.22
- florianv/swap: ^4.0
- glitchr/backup-manager: 4.0.*-dev
- glitchr/base-plugin: 2.0.*-dev
- glitchr/doctrine-dc2type: 1.0.*-dev
- glitchr/well-known: 1.0.*-dev
- hashids/hashids: ^5.0
- imagine/imagine: ^1.2
- league/flysystem-bundle: ^3.1
- league/flysystem-ftp: ^3.0
- nelmio/cors-bundle: ^2.2
- nelmio/security-bundle: ^3.0
- phpoffice/phpspreadsheet: ^1.23|^2.0
- picqer/php-barcode-generator: ^2.0
- scheb/2fa: ^7.0|^8.0
- scienta/doctrine-json-functions: ~4.3
- symfony/asset: ^6.0|^7.0|^8.0
- symfony/config: ^6.0|^7.0|^8.0
- symfony/dependency-injection: ^6.0|^7.0|^8.0
- symfony/discord-notifier: ^6.0|^7.0|^8.0
- symfony/dotenv: ^6.0|^7.0|^8.0
- symfony/expression-language: ^6.0|^7.0|^8.0
- symfony/form: ^6.0|^7.0|^8.0
- symfony/framework-bundle: ^6.0|^7.0|^8.0
- symfony/http-client: ^6.0|^7.0|^8.0
- symfony/intl: ^6.0|^7.0|^8.0
- symfony/mailer: ^6.0|^7.0|^8.0
- symfony/messenger: ^6.0|^7.0|^8.0
- symfony/notifier: ^6.0|^7.0|^8.0
- symfony/security-bundle: ^6.0|^7.0|^8.0
- symfony/serializer: ^6.0|^7.0|^8.0
- symfony/twig-bundle: ^6.0|^7.0|^8.0
- symfony/uid: ^6.0|^7.0|^8.0
- symfony/ux-twig-component: ^2.0|^3.0
- symfony/validator: ^6.0|^7.0|^8.0
- symfony/workflow: ^6.0|^7.0|^8.0
- twig/cache-extra: ^3.0
- twig/cssinliner-extra: ^3.0
- twig/extra-bundle: ^3.0
- twig/inky-extra: ^3.0
- twig/intl-extra: ^3.0
- twig/twig: ^3.0
Requires (Dev)
- doctrine/doctrine-fixtures-bundle: ^3.4
- doctrine/doctrine-migrations-bundle: ^3.0
- phpstan/phpstan: ^1.12
- phpunit/phpunit: ^10.5
- squizlabs/php_codesniffer: ^3.7
- symfony/debug-bundle: ^6.0|^7.0|^8.0
- symfony/phpunit-bridge: ^6.0|^7.0|^8.0
- symfony/stopwatch: ^6.0|^7.0|^8.0
- symfony/var-dumper: ^6.0|^7.0|^8.0
- symfony/web-profiler-bundle: ^6.0|^7.0|^8.0
- wapmorgan/php-deprecation-detector: ^2.0
README
Bedrock Symfony bundle for Glitchr projects: it pre-configures a full application
stack (admin, security, media, i18n, workflow, API) so host apps only add their
domain code. The Base\ namespace deliberately mirrors the host apps' App\
structure — a host class can usually extend or decorate its Base\ counterpart
one-to-one.
Requires PHP ≥ 8.1 and Symfony 6, 7 or 8. Licensed LGPL-3.0-or-later
(see COPYING / COPYING.LESSER).
Installation
The package is resolved from GitLab (gitlab.glitchr.dev/public-repository/symfony/bundle/base/component):
composer require glitchr/base-bundle:^3.0
Enable in config/bundles.php (Flex usually does it):
Base\BaseBundle::class => ['all' => true],
Bundle configuration lives under the base: key; the tree is defined in
src/DependencyInjection/BaseConfiguration.php.
Try it in one command
A self-contained demo (bare Symfony skeleton + this bundle + SQLite, one flat
page touring the App\ ↔ Base\ mirroring, the shipped entity layer, the
setting bag, the obfuscator and the translator) ships in the root
Dockerfile:
docker build -t base-bundle-demo .
docker run --rm -p 8000:8000 base-bundle-demo
# → http://localhost:8000/
The demo app under example/app/ doubles as a minimal
reference: the smallest bundles.php, base.yaml, doctrine.yaml,
security.yaml and flysystem.yaml a host application needs.
What's inside (map of src/)
| Area | Directories | Purpose |
|---|---|---|
| Admin | Admin/, Field/, Form/ | EasyAdmin integration: custom CRUD fields (~40, e.g. WysiwygField, CropperField, TranslationField) with their configurators, form types and extensions |
| Persistence | Database/, Entity/, Repository/, EntityDispatcher/, *Subscriber/ | Doctrine attributes (Hierarchify, Versionable, Vault, …), base entities (User, Thread, Layout, …), lifecycle dispatching |
| HTTP | Controller/, Routing/, Response/ | Public/admin/UX controllers, advanced router, sitemap |
| Security | Security/, Validator/ | Voters, 2FA (scheb), access tokens, dynamic session storage |
| Services | Service/, Cache/, Notifier/, Serializer/ | BaseService facade, media/file/flysystem services, localizer, notifier channels |
| Presentation | Twig/, templates/, translations/ | Twig extensions/components, EasyAdmin + client templates, translations |
| Assets | assets/, public/, Imagine/ | Encore entrypoints (async/defer), built assets, image filters |
| Tooling | Console/, Inspector/, Attributes/ | Console commands, profiler data collectors, attribute reader |
Extension points are autoconfigured by tag — implement the interface, the tag is
applied automatically (see src/DependencyInjection/BaseExtension.php):
base.entity_extension, base.annotation, base.icon_provider,
base.service.sharer, base.simple_cache, …
Service wiring
Service definitions live in config/:
services.php— registrations (split per domain, loaded byBaseExtension)services-decoration.php— decorations of framework/third-party servicesservices-public.php— services forced publicservices-fix.php— targeted workarounds
Development
The bundle is developed inside a host app's vendor/glitchr/base-bundle
checkout (composer VCS install keeps .git) and pushed from there.
make build # yarn install + Encore (watch in debug, prod otherwise)
make linter # php-cs-fixer + phpstan (level max)
make tests # phpunit
CI (.gitlab-ci.yml) runs cs-fixer, PHPStan and PHPUnit on every push.
Releases
One development branch per major (1.x, 2.x, 3.x — the current one is the
main branch; the next major starts 4.x), tags per release (3.0.0, 3.1.0,
…) — tag after each meaningful batch so consumers can pin stable versions:
git tag -a 3.1.0 -m "..." && git push origin 3.1.0
The legacy 1.0/2.0/3.0 branches carry the pre-2026 unslimmed history and
are frozen — do not push to them.
See CHANGELOG.md.