Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Tagging Bundle Laravel Package

kunstmaan/tagging-bundle

KunstmaanTaggingBundle adds reusable tagging to Symfony and Doctrine projects: attach tags to entities, manage tags in the admin, and query or filter content by tag. It integrates with Kunstmaan CMS bundles and provides a lightweight foundation for tag-based navigation and search.

View on GitHub
Deep Wiki
Context7

Getting Started

This is a Symfony bundle, not a Laravel package. Before you install anything, confirm you actually need it: it is only useful if your application already runs Kunstmaan bundles on Symfony 2.x with Doctrine ORM. For a standard Laravel/Eloquent app, the day‑to‑day leverage is close to zero.

Minimal path if you are on the target stack:

  1. composer require kunstmaan/tagging-bundle (note the last tagged release is from 2014, so expect to pin fabien-pennequin/doctrine-extensions-taggable and an old Symfony/Doctrine matrix).
  2. Register Kunstmaan\TaggingBundle\KunstmaanTaggingBundle in AppKernel.
  3. Let Doctrine pick up the bundle's Tag entity and the taggable join mapping (or copy the mapping into your own entity).
  4. Make one entity taggable by implementing the DoctrineExtensions Taggable interface and using its trait.
  5. Render/persist tags through the bundle's TagManager/form type rather than hand‑rolling tag rows.

Where to look first:

  • Entity/Tag.php and Entity/TagRepository.php – the schema you will inherit.
  • Helper/ / Manager/ services – the actual add/remove/lookup API.
  • The bundle's Form/ types – how tags are edited in the Kunstmaan admin.
  • Upstream FabienPennequin/DoctrineExtensions-Taggable docs – the bundle is mostly glue around that library.

First use case: attach tags to a content/page entity in a Kunstmaan admin, then expose a tag list or "related by tag" query. If you cannot name that exact use case, stop here and use spatie/laravel-tags instead.

Implementation Patterns

Doctrine-first tagging. Every pattern assumes a Doctrine entity manager. In Laravel you would need laravel-doctrine/orm (or equivalent) plus a custom service provider that registers the bundle's services manually — the bundle has no Laravel provider. Budget time for this; it is usually more work than writing tags yourself.

Typical entity setup:

class Article implements Taggable
{
    use TaggableTrait; // from DoctrineExtensions-Taggable

    // Doctrine mapping for the tags collection is provided by the extension
}

Typical workflow:

  • Writing tags through the tag manager/helper instead of setting the collection directly, so normalization and deduplication happen centrally.
  • Editing tags via the bundle's form type inside the Kunstmaan admin; the form type expects the taggable mapping to be present, otherwise it silently produces no tag input.
  • Reading tags from the entity's tag collection for display, and from the Tag repository when you need tag clouds, counts, or autocomplete.
  • Querying is the weak spot: there is no first-class "find all entities with tag X" repository for arbitrary entities. Expect to write a join through the tagging join table yourself, or filter in PHP for small sets.

Integration tips:

  • Keep tagging on a small number of entities. This bundle was built for Kunstmaan content types, not general-purpose taxonomy.
  • If you only need tag storage, port Tag to an Eloquent model with a polymorphic taggables pivot and a TagService. That is ~100 lines and removes the Symfony/Doctrine dependency entirely.
  • Wrap tag mutation in a transaction when tagging multiple entities, since the extension writes both the tag row and the join row.
  • If you must stay on Symfony, define your own TagManager service alias so you can swap the implementation later without touching call sites.

Gotchas and Tips

  • Unmaintained. Last release 2014, 10 stars, zero dependents. It targets Symfony 2.x / PHP 5.x-era Doctrine. Expect dependency conflicts on modern PHP and Composer 2.
  • Wrong ecosystem for Laravel. There is no service provider, no config file, no facade. Everything is Doctrine + Symfony DI. "Installing" it in Laravel means manually bootstrapping a foreign bundle.
  • Tag scoping is global. Tags are not namespaced per entity type or per tenant by default. Two content types sharing a tag vocabulary will collide; plan a type/context column yourself if you need separation.
  • Normalization/case. Deduplication depends on the upstream extension's slug behavior. Verify Tag vs tag vs Tag produces one row; add a unique index and normalize on write.
  • Schema ownership. The bundle does not ship migrations for your app. Generate migrations for tag and the taggable join table explicitly, and check the join table name against what the extension expects — a mismatch fails silently at persist time.
  • Deleting tags. Removing a tag from an entity usually leaves the orphan Tag row. Add a cleanup job or an explicit repository method; otherwise your tag cloud grows stale entries.
  • Debugging: inspect the join table directly when tags "disappear". Most failures are missing mapping metadata, a detached entity, or a flush order issue, not the tag manager itself.
  • Extension points: you can override the Tag entity and the tag manager service in Symfony DI, but not much else — the bundle is thin glue over DoctrineExtensions-Taggable.
  • Recommendation for Laravel: skip this. Use spatie/laravel-tags for polymorphic Eloquent tagging, or implement a small tags + taggables pair. You will get better maintenance, native Eloquent queries, and no Doctrine bridge.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
cgv/localized-resource