Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 4.56 KB

UPGRADE.md

File metadata and controls

50 lines (36 loc) · 4.56 KB

UPGRADE

Upgrade from v3 to v4

  • Remove deprecated options valantic_elastica_bridge.client.host and valantic_elastica_bridge.client.port. Use valantic_elastica_bridge.client.dsn instead, e.g. http://localhost:9200
  • Renamed valantic_elastica_bridge.client.addSentryBreadcrumbs to valantic_elastica_bridge.client.should_add_sentry_breadcrumbs
  • See README#Queue to set up the required Symfony Messenger workers.

Upgrade from v2 to v3

  • no code changes necessary

Upgrade from v1 to v2

Migration

  • IndexDocumentInterface implementations should now extend \Valantic\ElasticaBridgeBundle\Document\AbstractDocument. getType() should now return one of \Valantic\ElasticaBridgeBundle\Enum\DocumentType
  • Valantic\ElasticaBridgeBundle\DocumentType\Index\ListingTrait was removed, remove any references to it #30
  • Update references to renamed classes and interfaces (see next section)
  • see also the example in docs/example/

Breaking Changes

  • PHP 8.1+ #26
  • \Valantic\ElasticaBridgeBundle\EventListener\Pimcore\AbstractListener was renamed to \Valantic\ElasticaBridgeBundle\EventListener\Pimcore\ChangeListener
  • Valantic\ElasticaBridgeBundle\DocumentType\Index\IndexDocumentInterface was renamed to \Valantic\ElasticaBridgeBundle\Document\DocumentInterface #36
  • \Valantic\ElasticaBridgeBundle\DocumentType\AbstractDocument and Valantic\ElasticaBridgeBundle\DocumentType\DocumentInterface were dropped in favor of \Valantic\ElasticaBridgeBundle\Document\AbstractDocument and Valantic\ElasticaBridgeBundle\Document\DocumentInterface #36
  • \Valantic\ElasticaBridgeBundle\Document\DocumentInterface::getType now returns an enum of type \Valantic\ElasticaBridgeBundle\Enum\DocumentType #28
  • Valantic\ElasticaBridgeBundle\Index\IndexInterface::getDocumentFromElement was removed, use $index->getElasticaIndex()->getDocument(AbstractDocument::getElasticsearchId($element)) instead #35
  • Valantic\ElasticaBridgeBundle\Index\IndexInterface::searchForElements was removed, use $index->getElasticaIndex()->search($query)->getDocuments() instead #35
  • Valantic\ElasticaBridgeBundle\Index\IndexInterface::documentResultToElements was removed #35
  • Valantic\ElasticaBridgeBundle\Index\IndexInterface::getGlobalFilters, Valantic\ElasticaBridgeBundle\Index\IndexInterface::disableGlobalFilters, Valantic\ElasticaBridgeBundle\Index\IndexInterface::enableGlobalFilters were removed
  • Valantic\ElasticaBridgeBundle\Index\TenantAwareTrait has been replaced by Valantic\ElasticaBridgeBundle\Index\AbstractTenantAwareIndex
  • Valantic\ElasticaBridgeBundle\Document\TenantAwareTrait has been replaced by Valantic\ElasticaBridgeBundle\Document\AbstractTenantAwareDocument
  • Valantic\ElasticaBridgeBundle\DocumentType\Index\DataObjectNormalizerTrait was moved to Valantic\ElasticaBridgeBundle\Document\DataObjectNormalizerTrait

New Features

  • PHPStan generics annotations for \Valantic\ElasticaBridgeBundle\Document\DocumentInterface and related helper traits #32
  • Added \Valantic\ElasticaBridgeBundle\Service\PropagateChanges::handle to programmatically update an element in all indices #33
  • Added support for assets #34
  • Allow \Valantic\ElasticaBridgeBundle\Document\DocumentInterface::getSubType to return null for generic, element-level indices #42

Other changes

  • :cleanup now defaults to only cleaning up bundle indices #27
  • Removed --check from :index #41
  • Valantic\ElasticaBridgeBundle\Index\TenantAwareInterface now extends Valantic\ElasticaBridgeBundle\Index\IndexInterface
  • Valantic\ElasticaBridgeBundle\Document\TenantAwareInterface now extends Valantic\ElasticaBridgeBundle\Document\DocumentInterface