Skip to content

v2.0.0

Choose a tag to compare

@paullla paullla released this 03 Jul 12:54
· 9 commits to master since this release
08c5644

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, CurrentDataTrackerStorageInterface and StorageInitializerInterface in the new Locastic\Loggastic\Storage namespace; 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-bundle now ^2.8 || ^3.0) (#39)
  • Basic auth (elastic_user, elastic_password) and elastic_ssl_verification config 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\Attribute namespace; update the Groups import on your loggable entities (#39)
  • Modern bundle directory layout (AbstractBundle, root-level config/); LocasticLoggasticExtension and Configuration removed (#38)
  • Core services depend on the storage interfaces instead of the Elasticsearch services; constructor signatures changed (#40)
  • ActivityLogProviderInterface::getActivityLogsByIndexAndId() removed; use ElasticsearchActivityLogStorage::findByIndexAndObjectId() (#40)
  • ElasticNormalizationContextTrait moved to Locastic\Loggastic\Serializer\Traits\NormalizationContextTrait (#40)
  • ActivityLogDoctrineSubscriber registers via per-event doctrine.event_listener tags (DoctrineBundle 3 compatibility) (#39)

Removed

  • ActivityLogProvider::getCurrentDataTrackerByClassAndId() (broken, threw TypeError on every hit) and the unused IndexNotFoundException (#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 LoggableChildInterface children 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