xavierleune/ting_bundle
A Symfony bundle that packages Ting integration for PHP projects, providing bundle configuration and service wiring to help developers add Ting functionality to Symfony applications with minimal setup. A small, straightforward package for projects that need Ting support.
ting_bundle is a Symfony bundle (7.4 / 8) around the Ting persistence layer — not an Eloquent-style package with Laravel auto-discovery. There's no service provider, no Artisan commands, no Laravel bridge. It's only relevant to a Laravel developer who is also running (or migrating to) Symfony. Everything below assumes Symfony conventions.^7.4 || ^8.0, xavierleune/ting ^4.0.composer require xavierleune/ting_bundle:^4.0
config/bundles.php. Flex usually handles this, but verify it explicitly if you're coming from ccmbenchmark/ting_bundle (see UPGRADE-4.0.md).# config/packages/ting.yaml
ting:
default_connection: main
default_database: '%env(DATABASE_NAME)%'
#[Table(name: 'city', repository: CityRepository::class)]
class City implements NotifyPropertyInterface
{
// ...
}
Then autowire CityRepository into a controller or console command and call countBy() / existsBy() to prove the wiring before touching the profiler.#[Table(name:, repository:)] per entity; default_connection / default_database fill in whatever you omit, and explicit values still win. Multi-connection apps only annotate the exceptions.RepositoryFactory is itself autowirable when you need to resolve repositories dynamically.countBy, existsBy, getBySql, transactional, plus typed query parameters (pass the int/enum/DTO, let Ting bind it).BackedEnum serializer. Type-aware change tracking means readonly value objects, enums and serializer-handled DateTimeImmutable aren't compared on every save — override with #[Column(mutable: ...)] when you genuinely want dirty-checking.cache_provider is the id of any Symfony cache pool. Pick a dedicated pool rather than leaning on cache.app by accident.UniqueEntity takes named arguments only, and its violation message now renders enum, date and object values correctly.refreshUser() reloads by primary key — re-test any custom provider that assumed 3.x behaviour.cache.app. If you want your pool, inject it explicitly.master / slaves became primary / replicas. The old keys fail the container build with a message naming the replacements; friendly, but it blocks boot until renamed.cache_provider changed from a doctrine/cache service to a Symfony cache pool id. doctrine/cache is gone entirely; a stale id fails at build time.enum_serializer: symfony_serializer to keep the old storage. Decide before deploying, not after.UniqueEntity: named arguments only. Positional usages from 3.x won't be tolerated; grep for them during the upgrade.serializerOptions now replace defaults instead of merging into lists. Setting a single option expecting the rest to survive silently drops them.array property now gives you an associative array, not a stdClass. Every $entity->json->prop becomes $entity->json['prop'].#[Column], or a #[Table] missing connection/database/repository, fails the container build with the entity named. Warm the container in CI to catch these before runtime.#[Column(mutable: ...)] before assuming a query bug.ccmbenchmark/ting_bundle: the namespace changed. With Flex, re-check config/bundles.php after the switch — a leftover entry bites you at boot.ting service previously failed on the new file_locator service; drop any workaround you pinned around that.RepositoryFactory, custom serializers registered with Ting, and per-column mutable overrides. If behaviour isn't expressible in #[Table] / #[Column], hook there rather than subclassing repositories.How can I help you explore Laravel packages today?