Releases: Locastic/Loggastic
Release list
v2.1.0
Loggastic 2.1.0 puts the 2.0 storage abstraction to work: you can now run activity logs entirely on your relational database, with no Elasticsearch cluster required.
Choose your storage
A new storage config option selects the backend in one line:
# config/packages/loggastic.yaml
locastic_loggastic:
storage: doctrine # 'elasticsearch' (default), 'doctrine' or 'in_memory'The default stays elasticsearch, so existing apps upgrade with no changes. When another backend is selected, no Elasticsearch services are registered at all: no ES client, no elastic_* configuration, no PSR-18 requirement.
Doctrine DBAL storage (#45)
Activity logs and current data trackers are stored in two shared database tables with JSON columns, discriminated by an indexed object class column. The schema is created through the DBAL schema API and all values pass through DBAL type conversion, so the adapter runs on PostgreSQL, MySQL, SQLite and anything else Doctrine DBAL supports, on both DBAL 3.8+ and 4.x (both majors are covered in CI). Timestamps are normalized to UTC, table names are overridable via service configuration, and tracker writes are upserts, so message retries or re-running the populate command never create duplicate tracker rows.
In-memory storage (#45)
storage: in_memory keeps logs in the PHP process while mirroring real backend semantics (sorting, pagination, per-class isolation). Test suites can exercise the full logging flow with zero external services.
Everything else
doctrine/dbal(^3.8 || ^4.0) is now an explicit dependency- README gained a "Choose your storage" section and a documented
storagekey in the configuration reference
Full details in CHANGELOG.md. No breaking changes; upgrading from 2.0.0 is a plain composer update locastic/loggastic.
v2.0.0
Major release: pluggable storage. Elasticsearch is now one storage backend behind three storage-agnostic interfaces, on a modernized foundation. See UPGRADE-2.0.md for the migration guide.
Added
- Storage abstraction:
ActivityLogStorageInterface,CurrentDataTrackerStorageInterfaceandStorageInitializerInterfacein the newLocastic\Loggastic\Storagenamespace; implement and alias them to store activity logs in a custom backend (#40) - Elasticsearch implementations of the storage interfaces in
Locastic\Loggastic\Bridge\Elasticsearch\Storage(used by default, no configuration changes needed) (#40) - Support for Symfony 8 and DoctrineBundle 3 (
symfony/*now^6.4 || ^7.0 || ^8.0,doctrine/doctrine-bundlenow^2.8 || ^3.0) (#39) - Basic auth (
elastic_user,elastic_password) andelastic_ssl_verificationconfig options for secured Elasticsearch clusters (#37, originally proposed in #26 by @jakubdusek)
Changed (breaking - see UPGRADE-2.0.md)
elasticsearch/elasticsearch^8.0 || ^9.0; Elasticsearch 7 is no longer supported and a PSR-18 HTTP client implementation is required (#37)- Serializer attributes moved to the
Symfony\Component\Serializer\Attributenamespace; update theGroupsimport on your loggable entities (#39) - Modern bundle directory layout (
AbstractBundle, root-levelconfig/);LocasticLoggasticExtensionandConfigurationremoved (#38) - Core services depend on the storage interfaces instead of the Elasticsearch services; constructor signatures changed (#40)
ActivityLogProviderInterface::getActivityLogsByIndexAndId()removed; useElasticsearchActivityLogStorage::findByIndexAndObjectId()(#40)ElasticNormalizationContextTraitmoved toLocastic\Loggastic\Serializer\Traits\NormalizationContextTrait(#40)ActivityLogDoctrineSubscriberregisters via per-eventdoctrine.event_listenertags (DoctrineBundle 3 compatibility) (#39)
Removed
ActivityLogProvider::getCurrentDataTrackerByClassAndId()(broken, threwTypeErroron every hit) and the unusedIndexNotFoundException(#40)AnnotationLoggableContextCollectionFactory(deprecated since 1.2); use the#[Loggable]attribute or XML/YAML (#39)
Fixed
ElasticsearchService::getItemById()always returned null (#37)- Deleting an entity together with its
LoggableChildInterfacechildren crashed the update handler (#41) ElasticsearchService::bulkCreate()now refreshes the index, so trackers written by the populate command are immediately searchable (#42)
Full changelog: v1.2.0...v2.0.0
v1.2.0 - First stable release
Loggastic leaves beta! This is the first stable release, and from now on the project follows semantic versioning: no breaking changes outside major versions, and deprecations announced at least one minor release ahead (see CONTRIBUTING.md for the backward-compatibility policy).
Highlights
- Symfony 6.4 LTS support. All
symfony/*requirements now accept^6.4 || ^7.0, so the bundle installs on everything from Symfony 6.4 LTS to the latest 7.4. Tested in CI on PHP 8.2/8.3/8.4 with both Symfony 6.4 and 7.4. (#35) composer installworks again on fresh checkouts. The previous exact version pins only matched Symfony releases with published security advisories, which Composer 2.9+ refuses to install. Constraints are widened so patched releases resolve. (#33)- Elasticsearch bridge interfaces.
ElasticsearchClientInterfaceandElasticsearchServiceInterfaceare now used everywhere instead of the concrete classes, enabling service decoration. Thanks @manuel-gamma! (#32)
Also in this release
- PHPStan (level 6) and PHP-CS-Fixer now run in CI, alongside a new tests matrix covering 6 PHP/Symfony combinations (#34, #35)
- New community files: CHANGELOG, CONTRIBUTING, SECURITY policy, and issue/PR templates (#34)
- Fixed PHP 8.4 implicit-nullable deprecation warnings (#34)
Deprecations
AnnotationLoggableContextCollectionFactoryis deprecated and will be removed in 2.0. Use the#[Loggable]PHP attribute (or XML/YAML config) instead. Related: the abandoneddoctrine/annotationspackage is no longer a dependency; if you wired the annotation factory manually, require it yourself. See UPGRADE-2.0.md. (#35)
Upgrading from 1.1.x
No action needed for most projects: there are no breaking changes. If your app is on Symfony 7.3+, nothing changes at all; if you were blocked from installing on 6.4, you no longer are.
Symfony 7.3 & Doctrine 3.4
v1.1.6-beta symfony 7.3 & doctrine 3.4 (#30)
Symfony 7.2
Upgrade to Symfony 7.2 (#29) upgrade to symfony 7.2
PHP 8.1 and added missing limit and offset params to ActivityLogProvider
v1.1.4-beta Add limit and offset to ActivityLogProvider (#24)
Fixed elastic configuration
v1.1.3-beta fix(#16): fix configuration elastic_properties (#22)
v1.1.2-beta
What's Changed
Full Changelog: v1.1.1-beta...v1.1.2-beta
v1.1.1-beta
Explicit configuration for ActivityLogger service needed to fix normalization issues with collections
What's Changed
Full Changelog: v1.1.0-beta...v1.1.1-beta
v1.1.0-beta
What's Changed
Full Changelog: v1.0.9-beta...v1.1.0-beta