glitchr/base-bundle

Base helper integration for Symfony

Maintainers

Package info

gitlab.glitchr.dev/public-repository/symfony/bundle/base/component

Homepage

Type:symfony-bundle

pkg:composer/glitchr/base-bundle

Transparency log

Statistics

Installs: 552

Dependents: 2

Suggesters: 0

3.0.0 2026-07-04 15:46 UTC

This package is auto-updated.

Last update: 2026-07-14 12:15:08 UTC


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/)

AreaDirectoriesPurpose
AdminAdmin/, Field/, Form/EasyAdmin integration: custom CRUD fields (~40, e.g. WysiwygField, CropperField, TranslationField) with their configurators, form types and extensions
PersistenceDatabase/, Entity/, Repository/, EntityDispatcher/, *Subscriber/Doctrine attributes (Hierarchify, Versionable, Vault, …), base entities (User, Thread, Layout, …), lifecycle dispatching
HTTPController/, Routing/, Response/Public/admin/UX controllers, advanced router, sitemap
SecuritySecurity/, Validator/Voters, 2FA (scheb), access tokens, dynamic session storage
ServicesService/, Cache/, Notifier/, Serializer/BaseService facade, media/file/flysystem services, localizer, notifier channels
PresentationTwig/, templates/, translations/Twig extensions/components, EasyAdmin + client templates, translations
Assetsassets/, public/, Imagine/Encore entrypoints (async/defer), built assets, image filters
ToolingConsole/, 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 by BaseExtension)
  • services-decoration.php — decorations of framework/third-party services
  • services-public.php — services forced public
  • services-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.