summaryrefslogtreecommitdiff
path: root/src/engine/VyOSElasticModernFulltextStorageEngine.php
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-05-23 15:48:18 +0300
committerYuriy Andamasov <yuriy@vyos.io>2026-05-23 15:48:18 +0300
commit011eec12f9176a6a8b8d8b9133bc00107a7855c0 (patch)
treea769aa37ef6d209d66d02fb86a9853b4e4393c5b /src/engine/VyOSElasticModernFulltextStorageEngine.php
parenta19f5c077c0ed8ee4d88c0c8d704995b155d3dc2 (diff)
downloadphorge-elasticsearch-modern-011eec12f9176a6a8b8d8b9133bc00107a7855c0.tar.gz
phorge-elasticsearch-modern-011eec12f9176a6a8b8d8b9133bc00107a7855c0.zip
Engine: revert abstract → plain class for production dispatch
A recent fixup cascade declared VyOSElasticModernFulltextStorageEngine as 'abstract class' to enable test-doubling subclasses (VyOSElasticModernHostTestEngine, VyOSElasticModernFulltextStorageEngineTestDouble). That change broke production dispatch: Phorge's PhutilClassMapQuery selects engines via PhutilSymbolLoader::loadObjects(), which calls setConcreteOnly(true) and unsets any class where reflection reports isAbstract(). The engine class would no longer be discoverable by cluster.search[].type:elasticsearch-modern, and the test-fixture subclasses live in src/__tests__/ which libphutil excludes from runtime class-map loading. Revert to plain 'class' (not 'final', not 'abstract'). Plain 'class' is discoverable by PhutilClassMapQuery; existing test fixtures keep working without rewrite; operators can subclass if they need to (harmless). Also update VyOSElasticModernHostTestCase::testPlaceholderEngineIsAbstract → testEngineIsConcreteForDispatch, inverting the assertion to document the correct invariant and its rationale (setConcreteOnly reference). All 22 tests pass. 🤖 Generated by [robots](https://vyos.io)
Diffstat (limited to 'src/engine/VyOSElasticModernFulltextStorageEngine.php')
-rw-r--r--src/engine/VyOSElasticModernFulltextStorageEngine.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/engine/VyOSElasticModernFulltextStorageEngine.php b/src/engine/VyOSElasticModernFulltextStorageEngine.php
index f290513..5c3d9a2 100644
--- a/src/engine/VyOSElasticModernFulltextStorageEngine.php
+++ b/src/engine/VyOSElasticModernFulltextStorageEngine.php
@@ -1,10 +1,11 @@
<?php
/**
- * Placeholder for the engine class. Keep this abstract until E7/E8 land so
- * it is not auto-discovered as a selectable backend before it can operate.
+ * Full-text storage engine for Elasticsearch 7/8 and compatible OpenSearch
+ * clusters. Discoverable by PhutilClassMapQuery (plain class, not abstract)
+ * so Phorge's cluster.search dispatch can find and instantiate it.
*/
-abstract class VyOSElasticModernFulltextStorageEngine
+class VyOSElasticModernFulltextStorageEngine
extends PhabricatorFulltextStorageEngine {
private $version = null;