From b36e96739e94d903652398af0a862c0abda06ae0 Mon Sep 17 00:00:00 2001 From: jsteemann Date: Wed, 1 Dec 2021 19:54:43 +0100 Subject: [PATCH] [DE-104]: deprecate skiplist and hash indexes --- CHANGELOG.md | 10 ++++++ lib/ArangoDBClient/CollectionHandler.php | 5 ++- tests/.phpunit.result.cache | 1 + tests/CollectionBasicTest.php | 44 +++++++++++++----------- tests/CollectionExtendedTest.php | 8 +++-- 5 files changed, 45 insertions(+), 23 deletions(-) create mode 100644 tests/.phpunit.result.cache diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d47c7ab..5f60887f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## Release notes for the ArangoDB-PHP driver 3.10.x + +Using the index types "hash", "skiplist" or "fulltext" is deprecated. +With the RocksDB storage engine, "hash" and "skiplist" indexes are mere aliases of +the "persistent" index type. Thus the "persistent" index is the preferred type to +use from the PHP driver as well. + +ArangoDB 3.10 also deprecates the usage of fulltext indexes, so using the "fulltext" +index type from the PHP driver is also deprecated. + ## Release notes for the ArangoDB-PHP driver 3.9.x This version of the PHP driver is compatible with PHP versions 7.4 and 8.0. diff --git a/lib/ArangoDBClient/CollectionHandler.php b/lib/ArangoDBClient/CollectionHandler.php index 3ece4e03..392d0d1f 100644 --- a/lib/ArangoDBClient/CollectionHandler.php +++ b/lib/ArangoDBClient/CollectionHandler.php @@ -144,11 +144,13 @@ class CollectionHandler extends Handler /** * hash index option + * @deprecated "hash" is now an alias for "persistent". use "persistent" instead */ const OPTION_HASH_INDEX = 'hash'; /** * fulltext index option + * @deprecated fulltext indexes are deprecated from ArangoDB 3.10 onwards */ const OPTION_FULLTEXT_INDEX = 'fulltext'; @@ -159,6 +161,7 @@ class CollectionHandler extends Handler /** * skiplist index option + * @deprecated "skiplist" is now an alias for "persistent". use "persistent" instead */ const OPTION_SKIPLIST_INDEX = 'skiplist'; @@ -897,7 +900,7 @@ public function createHashIndex($collection, array $fields, $unique = null, $spa * @param int $minLength - the minimum length of words to index * @param bool $inBackground - true if index shall be created in background * - * @deprecated use CollectionHandler::createIndex instead + * @deprecated use CollectionHandler::createIndex instead. additionally, fulltext indexes are deprecated from ArangoDB 3.10 onwards * * @return array - server response of the created index * @throws \ArangoDBClient\Exception diff --git a/tests/.phpunit.result.cache b/tests/.phpunit.result.cache new file mode 100644 index 00000000..e6d7781c --- /dev/null +++ b/tests/.phpunit.result.cache @@ -0,0 +1 @@ +{"version":1,"defects":{"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithKeyOptionsCluster":1,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithDistributeShardsLike":1,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithNumberOfShardsCluster":1,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithReplicationFactor1":1,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithReplicationFactor2":1,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithReplicationFactorSatellite":1,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithShardingStrategyCommunityCompat":1,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithShardingStrategyHash":1,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithoutShardingStrategy":1,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithShardKeysCluster":1,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithSmartJoinAttribute":1,"ArangoDBClient\\CollectionBasicTest::testCollectionCountDetailed":1,"ArangoDBClient\\CollectionBasicTest::testGetShards":1,"ArangoDBClient\\CollectionBasicTest::testGetResponsibleShard":1,"ArangoDBClient\\CollectionExtendedTest::testCreateGetAndDeleteCollectionWithWaitForSyncTrue":3,"ArangoDBClient\\DatabaseTest::testCreateDatabaseWithOptions":1,"ArangoDBClient\\DatabaseTest::testCreateDatabaseWithMoreOptions":1,"ArangoDBClient\\QueryTest::testCurrentAndKill":1,"ArangoDBClient\\DatabaseTest::testCreateDatabaseDeleteIt":4,"ArangoDBClient\\DatabaseTest::testCreateDatabaseGetListOfDatabasesAndDeleteItAgain":4,"ArangoDBClient\\DatabaseTest::testCreateDatabaseGetInfoOfDatabasesAndDeleteItAgain":4,"ArangoDBClient\\DatabaseTest::testCreateDatabaseSwitchToItAndCreateAnotherOne":4,"ArangoDBClient\\CollectionExtendedTest::testCreateWithSchema":3,"ArangoDBClient\\DatabaseTest::testCreateDatabaseWithUnicodeName":1,"ArangoDBClient\\DatabaseTest::testCreateDatabaseWithUnicodeNameNormalization":1,"ArangoDBClient\\DatabaseTest::testDeleteNonExistentDatabase":3,"ArangoDBClient\\CollectionBasicTest::testGetIndexByName":3,"ArangoDBClient\\CollectionBasicTest::testCreateIndexInBackground":4},"times":{"ArangoDBClient\\AdminTest::testEngine":0.002,"ArangoDBClient\\AdminTest::testEngineStats":0.001,"ArangoDBClient\\AdminTest::testGetServerVersion":0,"ArangoDBClient\\AdminTest::testGetServerVersionWithDetails":0,"ArangoDBClient\\AdminTest::testGetServerTime":0,"ArangoDBClient\\AdminTest::testGetServerLogEntries":0.001,"ArangoDBClient\\AdminTest::testGetServerLog":0.002,"ArangoDBClient\\AdminTest::testGetServerMetrics":0.002,"ArangoDBClient\\AdminTest::testReloadServerRouting":0,"ArangoDBClient\\AdminTest::testGetServerStatistics":0,"ArangoDBClient\\AdminTest::testGetServerStatisticsDescription":0,"ArangoDBClient\\AnalyzerTest::testCreateAnalyzerObject":0.001,"ArangoDBClient\\AnalyzerTest::testCreateIdentityAnalyzer":0.008,"ArangoDBClient\\AnalyzerTest::testCreateTextAnalyzer":0.006,"ArangoDBClient\\AnalyzerTest::testCreateTextAnalyzerFail":0.002,"ArangoDBClient\\AnalyzerTest::testCreateDelimiterAnalyzer":0.004,"ArangoDBClient\\AnalyzerTest::testCreateNormAnalyzer":0.004,"ArangoDBClient\\AnalyzerTest::testGetAnalyzer":0.005,"ArangoDBClient\\AnalyzerTest::testGetDefaultAnalyzers":0.001,"ArangoDBClient\\AnalyzerTest::testGetAllAnalyzers":0.009,"ArangoDBClient\\AnalyzerTest::testGetNonExistingAnalyzer":0.002,"ArangoDBClient\\AnalyzerTest::testAnalyzerProperties":0.013,"ArangoDBClient\\AnalyzerTest::testDropAnalyzer":0.007,"ArangoDBClient\\AnalyzerTest::testDropNonExistingAnalyzer":0.003,"ArangoDBClient\\AqlUserFunctionTest::testRegisterListAndUnRegisterAqlUserFunctionWithInitialConfig":0.014,"ArangoDBClient\\AqlUserFunctionTest::testRegisterListAndUnRegisterAqlUserFunctionUsingShortcut":0.012,"ArangoDBClient\\AqlUserFunctionTest::testRegisterListAndUnRegisterAqlUserFunctionWithGettersAndSetters":0.013,"ArangoDBClient\\AqlUserFunctionTest::testRegisterListAndUnRegisterAqlUserFunctionWithWithMagicSettersAndGetters":0.013,"ArangoDBClient\\AqlUserFunctionTest::testReRegisterListAndUnRegisterAqlUserFunctionTwice":0.02,"ArangoDBClient\\AqlUserFunctionTest::testGetAQLFunctionsWithNamespaceFilter":0.023,"ArangoDBClient\\AqlUserFunctionTest::testUnRegisterAQLFunctionsOnNamespace":0.022,"ArangoDBClient\\BatchTest::testEmptyBatch":0.01,"ArangoDBClient\\BatchTest::testPartIds":0.007,"ArangoDBClient\\BatchTest::testProcessProcess":0.006,"ArangoDBClient\\BatchTest::testCreateDocumentBatch":0.004,"ArangoDBClient\\BatchTest::testCreateDocumentBatchWithDefinedBatchSize":0.004,"ArangoDBClient\\BatchTest::testFailureWhenCreatingMoreDocumentsInBatchThanDefinedBatchSize":0.002,"ArangoDBClient\\BatchTest::testCreateMixedBatchWithPartIds":0.014,"ArangoDBClient\\BatchTest::testRemoveByKeysInBatch":0.005,"ArangoDBClient\\BatchTest::testCollectionHandlerAllInBatch":0.006,"ArangoDBClient\\BatchTest::testFirstExampleBatch":0.006,"ArangoDBClient\\BatchTest::testByExampleBatch":0.009,"ArangoDBClient\\CollectionBasicTest::testDefaultCollectionType":0.002,"ArangoDBClient\\CollectionBasicTest::testInitializeCollection":0.002,"ArangoDBClient\\CollectionBasicTest::testInitializeCollectionWithDocumentType":0.002,"ArangoDBClient\\CollectionBasicTest::testInitializeCollectionWithEdgeType":0.001,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionLongName":0.002,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionTooLongName":0.001,"ArangoDBClient\\CollectionBasicTest::testCreateAndDeleteCollectionPre1_2":0.002,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithKeyOptionsAndVerifyProperties":0.003,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithKeyOptionsCluster":0.002,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithDistributeShardsLike":0.001,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithNumberOfShardsCluster":0.001,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithReplicationFactor1":0.002,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithReplicationFactor2":0.001,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithReplicationFactorSatellite":0.001,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithShardingStrategyCommunityCompat":0.001,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithShardingStrategyHash":0.001,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithoutShardingStrategy":0.002,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithShardKeysCluster":0.002,"ArangoDBClient\\CollectionBasicTest::testCreateCollectionWithSmartJoinAttribute":0.002,"ArangoDBClient\\CollectionBasicTest::testCreateAndDeleteCollection":0.002,"ArangoDBClient\\CollectionBasicTest::testCreateAndDeleteEdgeCollection":0.003,"ArangoDBClient\\CollectionBasicTest::testCreateAndDeleteEdgeCollectionWithoutCreatingObject":0.003,"ArangoDBClient\\CollectionBasicTest::testCreateAndDeleteSystemCollectionWithoutCreatingObject":0.002,"ArangoDBClient\\CollectionBasicTest::testCreateIndex":0.002,"ArangoDBClient\\CollectionBasicTest::testGetIndexById":0.002,"ArangoDBClient\\CollectionBasicTest::testGetIndexByName":0.002,"ArangoDBClient\\CollectionBasicTest::testDropIndexById":0.002,"ArangoDBClient\\CollectionBasicTest::testDropIndexByName":0.002,"ArangoDBClient\\CollectionBasicTest::testCreateGeo1Index":0.002,"ArangoDBClient\\CollectionBasicTest::testCreateGeo2Index":0.002,"ArangoDBClient\\CollectionBasicTest::testCreateHashIndex":0.003,"ArangoDBClient\\CollectionBasicTest::testCreateSparseHashIndex":0.002,"ArangoDBClient\\CollectionBasicTest::testCreateFulltextIndex":0.003,"ArangoDBClient\\CollectionBasicTest::testCreateSkipListIndex":0.002,"ArangoDBClient\\CollectionBasicTest::testCreateSparseSkipListIndex":0.002,"ArangoDBClient\\CollectionBasicTest::testCreatePersistentIndex":0.002,"ArangoDBClient\\CollectionBasicTest::testCreateSparsePersistentIndex":0.002,"ArangoDBClient\\CollectionBasicTest::testCreateTtlIndex":0.002,"ArangoDBClient\\CollectionBasicTest::testGetIndex":0.002,"ArangoDBClient\\CollectionBasicTest::testCreateIndexInBackground":0.013,"ArangoDBClient\\CollectionBasicTest::testHasCollectionReturnsFalseIfCollectionDoesNotExist":0.002,"ArangoDBClient\\CollectionBasicTest::testHasCollectionReturnsTrueIfCollectionExists":0.001,"ArangoDBClient\\CollectionBasicTest::testCollectionCountDetailed":0.002,"ArangoDBClient\\CollectionBasicTest::testGetShards":0.002,"ArangoDBClient\\CollectionBasicTest::testGetResponsibleShard":0.002,"ArangoDBClient\\CollectionExtendedTest::testCreateWithNoSchema":0.002,"ArangoDBClient\\CollectionExtendedTest::testCreateWithSchema":0.003,"ArangoDBClient\\CollectionExtendedTest::testCreateGetAndDeleteCollectionWithWaitForSyncDefault":0.002,"ArangoDBClient\\CollectionExtendedTest::testCreateGetAndDeleteSystemCollection":0.002,"ArangoDBClient\\CollectionExtendedTest::testGetAllNonSystemCollections":0.002,"ArangoDBClient\\CollectionExtendedTest::testGetChecksum":0.002,"ArangoDBClient\\CollectionExtendedTest::testGetChecksumWithException":0.001,"ArangoDBClient\\CollectionExtendedTest::testGetRevision":0.002,"ArangoDBClient\\CollectionExtendedTest::testGetRevisionWithException":0.001,"ArangoDBClient\\CollectionExtendedTest::testCreateRenameAndDeleteCollection":0.002,"ArangoDBClient\\CollectionExtendedTest::testCreateGetAndDeleteCollectionWithWaitForSyncTrue":0.01,"ArangoDBClient\\CollectionExtendedTest::testCreateGetAndDeleteCollectionThroughCreateFromArrayWithWaitForSyncTrue":0.002,"ArangoDBClient\\CollectionExtendedTest::testRemoveByKeys":0.003,"ArangoDBClient\\CollectionExtendedTest::testRemoveByKeysCollectionNotFound":0.001,"ArangoDBClient\\CollectionExtendedTest::testRemoveByKeysNotFound":0.003,"ArangoDBClient\\CollectionExtendedTest::testCreateDocumentsAndRemoveByExampleEmptyExample":0.003,"ArangoDBClient\\CollectionExtendedTest::testCreateDocumentsAndUpdateByExampleEmptyExample":0.003,"ArangoDBClient\\CollectionExtendedTest::testCreateDocumentsAndUpdateByExampleEmptyUpdateExample":0.003,"ArangoDBClient\\CollectionExtendedTest::testCreateDocumentsAndReplaceByExampleEmptyExample":0.003,"ArangoDBClient\\CollectionExtendedTest::testCreateDocumentsAndReplaceByExampleEmptyReplaceExample":0.005,"ArangoDBClient\\CollectionExtendedTest::testCreateDocumentsAndQueryByExampleEmptyExample":0.003,"ArangoDBClient\\CollectionExtendedTest::testCreateDocumentsWithCreateFromArrayAndRemoveByExample":0.014,"ArangoDBClient\\CollectionExtendedTest::testCreateDocumentsWithCreateFromArrayGetAsArrayAndRemoveByExample":0.006,"ArangoDBClient\\CollectionExtendedTest::testCreateDocumentsWithCreateFromArrayUpdateReplaceAndRemoveByExample":0.025,"ArangoDBClient\\CollectionExtendedTest::testCreateDocumentsFromArrayUpdateReplaceAndRemoveByExample":0.038,"ArangoDBClient\\CollectionExtendedTest::testCreateDocumentsWithCreateFromArrayUpdateReplaceAndRemoveByExampleWithLimits":0.044,"ArangoDBClient\\CollectionExtendedTest::testCreateDocumentsWithCreateFromArrayUpdateReplaceAndRemoveByExampleWithWaitForSync":0.042,"ArangoDBClient\\CollectionExtendedTest::testCreateDocumentsWithCreateFromArrayUpdateReplaceAndRemoveByExampleWithKeepNull":0.039,"ArangoDBClient\\CollectionExtendedTest::testCreateDocumentsWithCreateFromArrayAndRemoveByExampleWithLimit":0.03,"ArangoDBClient\\CollectionExtendedTest::testImportFromFileUsingHeadersAndValues":0.015,"ArangoDBClient\\CollectionExtendedTest::testImportFromFileUsingDocumentsLineByLine":0.012,"ArangoDBClient\\CollectionExtendedTest::testImportFromFileUsingResultSet":0.006,"ArangoDBClient\\CollectionExtendedTest::testImportFromArrayOfDocuments":0.005,"ArangoDBClient\\CollectionExtendedTest::testImportFromStringWithValuesAndHeaders":0.005,"ArangoDBClient\\CollectionExtendedTest::testImportFromStringUsingDocumentsLineByLine":0.004,"ArangoDBClient\\CollectionExtendedTest::testImportFromStringUsingDocumentsUsingResultset":0.004,"ArangoDBClient\\CollectionExtendedTest::testCreateGetAllIdsAndDeleteCollectionThroughCreateFromArray":0.004,"ArangoDBClient\\CollectionExtendedTest::testCreateAndAllAndDeleteCollection":0.003,"ArangoDBClient\\CollectionExtendedTest::testCreateAndIssueAllWithHiddenAttributesAndDeleteCollection":0.003,"ArangoDBClient\\CollectionExtendedTest::testCreateAndIssueAllWithHiddenAttributesButDifferentDocGetAllOptionsAndDeleteCollection":0.005,"ArangoDBClient\\CollectionExtendedTest::testCreateAndAllWithLimitAndDeleteCollection":0.003,"ArangoDBClient\\CollectionExtendedTest::testCreateAndAllWithSkipAndDeleteCollection":0.004,"ArangoDBClient\\CollectionExtendedTest::testCreateFillAndTruncateCollection":0.018,"ArangoDBClient\\CollectionExtendedTest::testGetAll":0.001,"ArangoDBClient\\CollectionExtendedTest::testCreateHashIndex":0.003,"ArangoDBClient\\CollectionExtendedTest::testCreateUniqueHashIndex":0.004,"ArangoDBClient\\CollectionExtendedTest::testCreateSkipListIndexedCollectionAddDocumentsAndQueryRange":0.016,"ArangoDBClient\\CollectionExtendedTest::testCreateGeoIndexedCollectionAddDocumentsAndQueryNear":0.016,"ArangoDBClient\\CollectionExtendedTest::testCreateGeoIndexedCollectionAddDocumentsAndQueryWithin":0.017,"ArangoDBClient\\CollectionExtendedTest::testCreateFulltextIndexedCollectionAddDocumentsAndQuery":0.013,"ArangoDBClient\\CollectionExtendedTest::testCreateFulltextIndexedCollectionWithOptions":0.002,"ArangoDBClient\\CollectionExtendedTest::testCreateArrayIndex":0.005,"ArangoDBClient\\CollectionExtendedTest::testCreateArrayIndexWithDeduplicateOption":0.004,"ArangoDBClient\\CollectionExtendedTest::testCreateIndexWithDisabledEstimates":0.002,"ArangoDBClient\\CollectionExtendedTest::testCreateTtlIndex":0.002,"ArangoDBClient\\CollectionExtendedTest::testAnyDocumentInCollection":0.004,"ArangoDBClient\\CollectionExtendedTest::testAnyDocumentInNonExistentCollection":0.001,"ArangoDBClient\\CollectionExtendedTest::testAnyDocumentInAnEmptyCollection":0.002,"ArangoDBClient\\CollectionExtendedTest::testFulltextQuery":0.03,"ArangoDBClient\\CollectionExtendedTest::testLookupByKeys":0.005,"ArangoDBClient\\CollectionExtendedTest::testLookupByCollectionNotFound":0.002,"ArangoDBClient\\ConnectionTest::testInitializeConnection":0.001,"ArangoDBClient\\ConnectionTest::testTestUnconnected":2.005,"ArangoDBClient\\ConnectionTest::testTest":0.004,"ArangoDBClient\\ConnectionTest::testEndpointAndPort":0.003,"ArangoDBClient\\ConnectionTest::testGetStatus":0.004,"ArangoDBClient\\ConnectionTest::testGetOptions":0.003,"ArangoDBClient\\ConnectionTest::testSetOptions":0.003,"ArangoDBClient\\ConnectionTest::testTimeoutOptions":0.003,"ArangoDBClient\\ConnectionTest::testSetEndpointOption":0.003,"ArangoDBClient\\ConnectionTest::testSetAllowSelfSignedOption":0.002,"ArangoDBClient\\ConnectionTest::testSetVerifyCert":0.002,"ArangoDBClient\\ConnectionTest::testSetCiphers":0.003,"ArangoDBClient\\ConnectionTest::testSetHostOption":0.003,"ArangoDBClient\\ConnectionTest::testSetPortOption":0.003,"ArangoDBClient\\ConnectionTest::testGetSetDatabase":0.002,"ArangoDBClient\\ConnectionTest::testSetTimeoutException":3.003,"ArangoDBClient\\ConnectionTest::testSetTimeout":1.014,"ArangoDBClient\\ConnectionTest::testSetConnectTimeout":1.011,"ArangoDBClient\\ConnectionTest::testSetRequestTimeoutException":2.005,"ArangoDBClient\\ConnectionTest::testSetRequestTimeout":1.009,"ArangoDBClient\\ConnectionTest::testConnectionClose":0.001,"ArangoDBClient\\ConnectionTest::testConnectionKeepAlive":0.002,"ArangoDBClient\\ConnectionTest::testAuthentication":0.001,"ArangoDBClient\\ConnectionTest::testBasicTracer":0.003,"ArangoDBClient\\ConnectionTest::testEnhancedTracer":0.004,"ArangoDBClient\\CustomDocumentClassTest::testGetCustomDocumentWithHandler":0.004,"ArangoDBClient\\CustomDocumentClassTest::testGetCustomDocumentWithStatement":0.004,"ArangoDBClient\\CustomDocumentClassTest::testGetCustomDocumentWithBatch":0.005,"ArangoDBClient\\CustomEdgeClassTest::testGetCustomEdgeWithHandler":0.004,"ArangoDBClient\\DatabaseTest::testCreateDatabaseDeleteIt":0.036,"ArangoDBClient\\DatabaseTest::testCreateDatabaseGetListOfDatabasesAndDeleteItAgain":0.025,"ArangoDBClient\\DatabaseTest::testCreateDatabaseGetInfoOfDatabasesAndDeleteItAgain":0.017,"ArangoDBClient\\DatabaseTest::testCreateDatabaseWithOptions":0.001,"ArangoDBClient\\DatabaseTest::testCreateDatabaseWithMoreOptions":0.001,"ArangoDBClient\\DatabaseTest::testDeleteNonExistentDatabase":0.001,"ArangoDBClient\\DatabaseTest::testCreateDatabaseSwitchToItAndCreateAnotherOne":0.017,"ArangoDBClient\\DocumentBasicTest::testInitializeDocument":0.002,"ArangoDBClient\\DocumentBasicTest::testInsertSilent":0.002,"ArangoDBClient\\DocumentBasicTest::testInsertSilentWithError":0.002,"ArangoDBClient\\DocumentBasicTest::testInsertReturnNew":0.002,"ArangoDBClient\\DocumentBasicTest::testInsertMany":0.003,"ArangoDBClient\\DocumentBasicTest::testInsertManyReturnNew":0.003,"ArangoDBClient\\DocumentBasicTest::testInsertManySilent":0.003,"ArangoDBClient\\DocumentBasicTest::testInsertManyWithErrors":0.003,"ArangoDBClient\\DocumentBasicTest::testInsertManySilentWithErrors":0.003,"ArangoDBClient\\DocumentBasicTest::testInsertManyLarge":0.137,"ArangoDBClient\\DocumentBasicTest::testInsertManyEmpty":0.002,"ArangoDBClient\\DocumentBasicTest::testInsertOverwrite":0.004,"ArangoDBClient\\DocumentBasicTest::testInsertOverwriteMode":0.004,"ArangoDBClient\\DocumentBasicTest::testCreateAndDeleteDocumentWithId":0.002,"ArangoDBClient\\DocumentBasicTest::testCreateAndDeleteDocument":0.002,"ArangoDBClient\\DocumentBasicTest::testCreateAndDeleteDocumentSilent":0.003,"ArangoDBClient\\DocumentBasicTest::testDeleteDocumentSilentWithError":0.001,"ArangoDBClient\\DocumentBasicTest::testCreateAndDeleteDocumentWithoutCreatedCollection":0.003,"ArangoDBClient\\DocumentBasicTest::testCreateAndDeleteDocumentWithoutCreatedCollectionAndOptionCreate":0.003,"ArangoDBClient\\DocumentBasicTest::testCreateAndDeleteDocumentUsingDefinedKey":0.003,"ArangoDBClient\\DocumentBasicTest::testCreateAndDeleteDocumentWithSeveralKeys":0.059,"ArangoDBClient\\DocumentBasicTest::testCreateDocumentWithInvalidKeys":0.001,"ArangoDBClient\\DocumentBasicTest::testCreateAndDeleteDocumentWithArray":0.002,"ArangoDBClient\\DocumentBasicTest::testCreateGetAndDeleteDocumentWithRevision":0.003,"ArangoDBClient\\DocumentBasicTest::testCreateHeadAndDeleteDocumentWithRevision":0.003,"ArangoDBClient\\DocumentBasicTest::testCreateAndDeleteDocumentUsingDefinedKeyWithArrayAndSaveOnly":0.003,"ArangoDBClient\\DocumentBasicTest::testCreateAndVerifyValidJsonIsReturnedWhenCastToString":0.002,"ArangoDBClient\\DocumentBasicTest::testHasDocumentReturnsFalseIfDocumentDoesNotExist":0.002,"ArangoDBClient\\DocumentBasicTest::testHasDocumentReturnsTrueIfDocumentExists":0.002,"ArangoDBClient\\DocumentExtendedTest::testCreateDocumentWithCreateFromArrayGetAndDeleteDocument":0.002,"ArangoDBClient\\DocumentExtendedTest::testCreateDocumentWithCreateFromArrayGetByExampleAndDeleteDocument":0.003,"ArangoDBClient\\DocumentExtendedTest::testCreateDocumentWithCreateFromArrayGetByExampleWithOptionsAndDeleteDocument":0.014,"ArangoDBClient\\DocumentExtendedTest::testCreateDocumentWithCreateFromArrayGetFirstExampleAndDeleteDocument":0.004,"ArangoDBClient\\DocumentExtendedTest::testUpdateDocument":0.003,"ArangoDBClient\\DocumentExtendedTest::testUpdateDocumentMergeObjects":0.003,"ArangoDBClient\\DocumentExtendedTest::testUpdateDocumentDoNotMergeObjects":0.003,"ArangoDBClient\\DocumentExtendedTest::testUpdateDocumentDoNotKeepNull":0.002,"ArangoDBClient\\DocumentExtendedTest::testUpdateDocumentReturnOldNew":0.002,"ArangoDBClient\\DocumentExtendedTest::testUpdateDocumentSilent":0.002,"ArangoDBClient\\DocumentExtendedTest::testUpdateDocumentSilentWithError":0.002,"ArangoDBClient\\DocumentExtendedTest::testReplaceDocument":0.002,"ArangoDBClient\\DocumentExtendedTest::testReplaceDocumentReturnOldNew":0.002,"ArangoDBClient\\DocumentExtendedTest::testReplaceDocumentSilent":0.002,"ArangoDBClient\\DocumentExtendedTest::testReplaceDocumentSilentWithError":0.002,"ArangoDBClient\\DocumentExtendedTest::testDeleteDocumentWithDeleteByIdWithoutRevision":0.002,"ArangoDBClient\\DocumentExtendedTest::testDeleteDocumentWithDeleteByIdWithRevisionAndPolicyIsError":0.002,"ArangoDBClient\\DocumentExtendedTest::testDeleteDocumentWithDeleteByIdWithRevisionAndPolicyIsLast":0.002,"ArangoDBClient\\DocumentExtendedTest::testRemoveDocumentReturnOld":0.002,"ArangoDBClient\\DocumentExtendedTest::testCreateUpdateGetAndDeleteDocumentWithRevisionCheck":0.004,"ArangoDBClient\\DocumentExtendedTest::testMoreCreateUpdateGetAndDeleteDocumentWithRevisionCheck":0.004,"ArangoDBClient\\DocumentExtendedTest::testCreateSetNullAttributeUpdateGetAndDeleteDocumentWithRevisionCheck":0.005,"ArangoDBClient\\DocumentExtendedTest::testGetAll":0.002,"ArangoDBClient\\DocumentExtendedTest::testHiddenAttributesGetAll":0.003,"ArangoDBClient\\DocumentExtendedTest::testGetReplaceUpdateAndRemoveOnNonExistentObjects":0.002,"ArangoDBClient\\DocumentExtendedTest::testStoreNewDocumentThenReplace":0.002,"ArangoDBClient\\EdgeBasicTest::testInitializeEdge":0.003,"ArangoDBClient\\EdgeBasicTest::testCreateAndDeleteEdge":0.009,"ArangoDBClient\\EdgeBasicTest::testCreateAndDeleteEdgeWithoutCreatedEdgeCollection":0.009,"ArangoDBClient\\EdgeBasicTest::testCreateGetAndDeleteEdgeWithRevision":0.008,"ArangoDBClient\\EdgeBasicTest::testCreateHeadAndDeleteEdgeWithRevision":0.007,"ArangoDBClient\\EdgeBasicTest::testGetAllIds":0.006,"ArangoDBClient\\EdgeBasicTest::testEdges":0.007,"ArangoDBClient\\EdgeBasicTest::testEdgesAny":0.005,"ArangoDBClient\\EdgeBasicTest::testEdgesIn":0.006,"ArangoDBClient\\EdgeBasicTest::testEdgesOut":0.006,"ArangoDBClient\\EdgeBasicTest::testEdgesBatched":0.006,"ArangoDBClient\\EdgeExtendedTest::testGetReplaceUpdateAndRemoveOnNonExistentObjects":0.006,"ArangoDBClient\\EdgeExtendedTest::testUpdateEdge":0.006,"ArangoDBClient\\EdgeExtendedTest::testUpdateEdgeDoNotKeepNull":0.006,"ArangoDBClient\\EdgeExtendedTest::testReplaceEdge":0.006,"ArangoDBClient\\FoxxBasicTest::testUploadAndInstallFoxxApp":0.086,"ArangoDBClient\\FoxxBasicTest::testUploadAndInstallNonExistingFoxxApp":0.011,"ArangoDBClient\\GeneralGraphExtendedTest::testsaveGetUpdateReplaceRemoveVertex":0.017,"ArangoDBClient\\GeneralGraphExtendedTest::testsaveGetUpdateReplaceRemoveEdge":0.015,"ArangoDBClient\\GraphBasicTest::testCreateAndDeleteGraphsWithDefinitions":0.007,"ArangoDBClient\\GraphBasicTest::testCreationOfGraphObject":0.001,"ArangoDBClient\\GraphBasicTest::testCreateAndDeleteGraphByName":0.004,"ArangoDBClient\\GraphBasicTest::testCreateRetrieveAndDeleteGraph1":0.006,"ArangoDBClient\\GraphBasicTest::testGetPropertiesAndDeleteGraphByInstance":0.004,"ArangoDBClient\\GraphBasicTest::testGetNonExistingGraph":0.001,"ArangoDBClient\\GraphBasicTest::testAddGetDeleteCollections":0.009,"ArangoDBClient\\GraphBasicTest::testAddGetDeleteCollectionsWithCache":0.009,"ArangoDBClient\\GraphBasicTest::testAddGetDeleteEdgeCollections":0.01,"ArangoDBClient\\GraphExtendedTest::testSaveVerticesAndEdgeBetweenThemAndRemoveOneByOne":0.01,"ArangoDBClient\\GraphExtendedTest::testSaveVerticesAndEdgeBetweenThemAndRemoveOneByOneWithCache":0.01,"ArangoDBClient\\GraphExtendedTest::testSaveVerticesAndEdgeBetweenThemAndRemoveFirstVertexFirst":0.011,"ArangoDBClient\\GraphExtendedTest::testGetReplaceUpdateAndRemoveOnNonExistentObjects":0.007,"ArangoDBClient\\GraphExtendedTest::testSaveVertexReplaceUpdateAndRemove":0.01,"ArangoDBClient\\GraphExtendedTest::testSaveVertexConditionalReplaceUpdateAndRemove":0.01,"ArangoDBClient\\GraphExtendedTest::testSaveVerticesAndSaveReplaceUpdateAndRemoveEdge":0.012,"ArangoDBClient\\GraphExtendedTest::testSaveVerticesAndConditionalSaveReplaceUpdateAndRemoveEdge":0.007,"ArangoDBClient\\GraphExtendedTest::testSaveVerticesFromVertexHandlerAndEdgeFromEdgeHandlerBetweenThemAndRemoveFirstVertexFirst":0.007,"ArangoDBClient\\GraphExtendedTest::testSaveVertexWithGraphInstance":0.003,"ArangoDBClient\\GraphExtendedTest::testGetVertexWithGraphInstance":0.009,"ArangoDBClient\\GraphExtendedTest::testReplaceVertexWithGraphInstance":0.008,"ArangoDBClient\\GraphExtendedTest::testUpdateVertexWithGraphInstance":0.01,"ArangoDBClient\\GraphExtendedTest::testRemoveVertexWithGraphInstance":0.01,"ArangoDBClient\\GraphExtendedTest::testSaveEdgeWithGraphInstance":0.009,"ArangoDBClient\\GraphExtendedTest::testGetEdgeWithGraphInstance":0.009,"ArangoDBClient\\GraphExtendedTest::testReplaceEdgeWithGraphInstance":0.01,"ArangoDBClient\\GraphExtendedTest::testUpdateEdgeWithGraphInstance":0.009,"ArangoDBClient\\GraphExtendedTest::testRemoveEdgeWithGraphInstance":0.008,"ArangoDBClient\\GraphExtendedTest::testHasVertexReturnsFalseIfNotExists":0.003,"ArangoDBClient\\GraphExtendedTest::testHasVertexReturnsTrueIfExists":0.009,"ArangoDBClient\\GraphExtendedTest::testHasEdgeReturnsFalseIfNotExists":0.003,"ArangoDBClient\\GraphExtendedTest::testHasEdgeReturnsTrueIfExists":0.007,"ArangoDBClient\\QueryCacheTest::testClear":0.026,"ArangoDBClient\\QueryCacheTest::testGetEntries":0.024,"ArangoDBClient\\QueryCacheTest::testEnable":0.023,"ArangoDBClient\\QueryCacheTest::testEnabledButExplicitlyDisabledForQuery":0.022,"ArangoDBClient\\QueryCacheTest::testDisable":0.023,"ArangoDBClient\\QueryCacheTest::testDemandModeUsed1":0.022,"ArangoDBClient\\QueryCacheTest::testDemandModeUsed2":0.023,"ArangoDBClient\\QueryCacheTest::testDemandModeUnused":0.064,"ArangoDBClient\\QueryTest::testCurrentAndKill":0.002,"ArangoDBClient\\QueryTest::testGetSlowEmpty":0.001,"ArangoDBClient\\QueryTest::testGetSlow":10.005,"ArangoDBClient\\QueryTest::testTimeoutException":10.01,"ArangoDBClient\\StatementTest::testExecuteStatement":0.009,"ArangoDBClient\\StatementTest::testStatementReturnNoWarnings":0.006,"ArangoDBClient\\StatementTest::testStatementReturnWarnings":0.007,"ArangoDBClient\\StatementTest::testStatementFailOnWarning":0.013,"ArangoDBClient\\StatementTest::testStatementFailWithMemoryLimit":0.007,"ArangoDBClient\\StatementTest::testStatisticsPeakMemoryUsage":0.012,"ArangoDBClient\\StatementTest::testStatisticsExecutionTime":3.015,"ArangoDBClient\\StatementTest::testStatisticsInsert":0.044,"ArangoDBClient\\StatementTest::testStatisticsSelectRemove":0.016,"ArangoDBClient\\StatementTest::testStatisticsSelect":0.014,"ArangoDBClient\\StatementTest::testExplainStatement":0.002,"ArangoDBClient\\StatementTest::testValidateStatement":0.002,"ArangoDBClient\\StatementTest::testExecuteStatementFlat":0.001,"ArangoDBClient\\StatementTest::testStatementThatReturnsScalarResponses":0.002,"ArangoDBClient\\StatementTest::testStatementWithFullCount":0.002,"ArangoDBClient\\StatementTest::testTtl":8.011,"ArangoDBClient\\StatementTest::testMemoryLimit":0.148,"ArangoDBClient\\StatementTest::testMaxRuntime":2.11,"ArangoDBClient\\StatementTest::testProfiling":0.034,"ArangoDBClient\\StatementTest::testStatementStreaming":0.092,"ArangoDBClient\\StatementTest::testBindReservedValue":0.003,"ArangoDBClient\\StatementTest::testBindReservedName":0.003,"ArangoDBClient\\StatementTest::testCacheAttributeTrue":0.002,"ArangoDBClient\\StatementTest::testCacheAttributeFalse":0.001,"ArangoDBClient\\StatementTest::testCacheAttributeNull":0.001,"ArangoDBClient\\StatementTest::testCacheAttributeNotSet":0.002,"ArangoDBClient\\StreamingTransactionTest::testCreateTransaction":0.003,"ArangoDBClient\\StreamingTransactionTest::testCreateAndAbortTransaction":0.004,"ArangoDBClient\\StreamingTransactionTest::testCreateAndAbortTransactionById":0.004,"ArangoDBClient\\StreamingTransactionTest::testCreateAndCommitTransaction":0.003,"ArangoDBClient\\StreamingTransactionTest::testCreateAndCommitTransactionById":0.003,"ArangoDBClient\\StreamingTransactionTest::testCreateAndGetStatusTransaction":0.002,"ArangoDBClient\\StreamingTransactionTest::testCreateAndGetStatusTransactionById":0.004,"ArangoDBClient\\StreamingTransactionTest::testGetStatusForNonExistingTransaction":0.003,"ArangoDBClient\\StreamingTransactionTest::testCreateWithCollections":0.004,"ArangoDBClient\\StreamingTransactionTest::testCreateWithCollectionsAndModes":0.003,"ArangoDBClient\\StreamingTransactionTest::testGetCollection":0.003,"ArangoDBClient\\StreamingTransactionTest::testInsert":0.004,"ArangoDBClient\\StreamingTransactionTest::testRemove":0.005,"ArangoDBClient\\StreamingTransactionTest::testUpdate":0.004,"ArangoDBClient\\StreamingTransactionTest::testReplace":0.004,"ArangoDBClient\\StreamingTransactionTest::testTruncate":0.016,"ArangoDBClient\\StreamingTransactionTest::testQuery":0.007,"ArangoDBClient\\StreamingTransactionTest::testCommitAndthenCommitTransaction":0.004,"ArangoDBClient\\StreamingTransactionTest::testCommitAndthenAbortTransaction":0.004,"ArangoDBClient\\StreamingTransactionTest::testAbortAndthenAbortTransaction":0.002,"ArangoDBClient\\StreamingTransactionTest::testAbortAndthenCommitTransaction":0.005,"ArangoDBClient\\TransactionTest::testCreateAndExecuteTransactionWithArrayInitialization":0.011,"ArangoDBClient\\TransactionTest::testCreateAndExecuteTransactionWithMagicGettersSetters":0.007,"ArangoDBClient\\TransactionTest::testCreateAndExecuteTransactionWithMagicGettersSettersAndSingleCollectionDefinitionsAsStrings":0.008,"ArangoDBClient\\TransactionTest::testCreateAndExecuteTransactionWithGettersSetters":0.006,"ArangoDBClient\\TransactionTest::testCreateAndExecuteTransactionExclusiveWithGettersSetters":0.003,"ArangoDBClient\\TransactionTest::testCreateAndExecuteTransactionWithReturnValue":0.003,"ArangoDBClient\\TransactionTest::testCreateAndExecuteTransactionWithTransactionException":0.003,"ArangoDBClient\\TransactionTest::testCreateAndExecuteTransactionWithTransactionErrorUniqueConstraintOnSave":0.003,"ArangoDBClient\\TraversalTest::testTraversalUsingDirectionOutbound":0.017,"ArangoDBClient\\TraversalTest::testTraversalUsingDirectionInbound":0.014,"ArangoDBClient\\TraversalTest::testTraversalUsingDirectionAnyAndUniquenessWithVerticesNoneAndEdgesGlobal":0.016,"ArangoDBClient\\TraversalTest::testTraversalUsingDirectionOutboundAndFilter1":0.016,"ArangoDBClient\\TraversalTest::testTraversalUsingDirectionOutboundAndFilter2":0.014,"ArangoDBClient\\TraversalTest::testTraversalUsingDirectionOutboundAndMinDepthIs2":0.012,"ArangoDBClient\\TraversalTest::testTraversalUsingDirectionOutboundAndMaxDepthIs1":0.01,"ArangoDBClient\\TraversalTest::testTraversalCountVisitedNodesAndReturnListOfNodesOnly":0.014,"ArangoDBClient\\TraversalTest::testTraversalExpandOnlyInboundOfAliceAndOutboundOfEve":0.013,"ArangoDBClient\\TraversalTest::testTraversalFollowDepthFirstStrategy":0.017,"ArangoDBClient\\TraversalTest::testTraversalUsingPostOrderOrdering":0.016,"ArangoDBClient\\TraversalTest::testTraversalUsingBackwardItemOrdering":0.016,"ArangoDBClient\\TraversalTest::testTraversalIncludeEdgesOnlyOnceGloballyButNodesEveryTimeVisited":0.013,"ArangoDBClient\\TraversalTest::testTraversalTooManyIterations":0.012,"ArangoDBClient\\UserBasicTest::testGrantPermissions":0.007,"ArangoDBClient\\UserBasicTest::testGrantAndRevokePermissions":0.003,"ArangoDBClient\\UserBasicTest::testGrantDatabasePermissions":0.004,"ArangoDBClient\\UserBasicTest::testGrantAndRevokeDatabasePermissions":0.002,"ArangoDBClient\\UserBasicTest::testGrantCollectionPermissions":0.004,"ArangoDBClient\\UserBasicTest::testGrantAndRevokeCollectionPermissions":0.003,"ArangoDBClient\\UserBasicTest::testAddReplaceUpdateGetAndDeleteUserWithNullValues":0.002,"ArangoDBClient\\UserBasicTest::testAddReplaceUpdateGetAndDeleteUserWithNonNullValues":0.002,"ArangoDBClient\\UserBasicTest::testFunctionsOnNonExistentUser":0.001,"ArangoDBClient\\ViewTest::testCreateViewObject":0.001,"ArangoDBClient\\ViewTest::testCreateView":0.001,"ArangoDBClient\\ViewTest::testGetView":0.001,"ArangoDBClient\\ViewTest::testGetNonExistingView":0,"ArangoDBClient\\ViewTest::testViewProperties":0.001,"ArangoDBClient\\ViewTest::testViewSetProperties":0.005,"ArangoDBClient\\ViewTest::testDropView":0.001,"ArangoDBClient\\ViewTest::testDropNonExistingView":0.001,"ArangoDBClient\\ViewTest::testRenameView":0.002,"ArangoDBClient\\ViewTest::testRenameNonExistingView":0.001,"ArangoDBClient\\AnalyzerTest::testCreateStopwordsAnalyzer":0.005,"ArangoDBClient\\AnalyzerTest::testCreatePipelineAnalyzer":0.008,"ArangoDBClient\\DatabaseTest::testCreateDatabaseWithUnicodeName":0.002,"ArangoDBClient\\DatabaseTest::testCreateDatabaseWithUnicodeNameNormalization":0.002,"ArangoDBClient\\CollectionExtendedTest::testCreateUniquePersistentIndex":0.003}} \ No newline at end of file diff --git a/tests/CollectionBasicTest.php b/tests/CollectionBasicTest.php index 32b76928..70609044 100644 --- a/tests/CollectionBasicTest.php +++ b/tests/CollectionBasicTest.php @@ -790,8 +790,8 @@ public function testCreateIndex() { $result = $this->collectionHandler->createIndex( 'ArangoDB_PHP_TestSuite_IndexTestCollection' . '_' . static::$testsTimestamp, [ - 'type' => 'hash', - 'name' => 'mr-hash', + 'type' => 'persistent', + 'name' => 'mr-persistent', 'fields' => ['a', 'b'], 'unique' => true, 'sparse' => true, @@ -807,11 +807,11 @@ public function testCreateIndex() $indexInfo = $indicesByIdentifiers[$result['id']]; - static::assertEquals('hash', $indexInfo[CollectionHandler::OPTION_TYPE]); + static::assertEquals('persistent', $indexInfo[CollectionHandler::OPTION_TYPE]); static::assertEquals(['a', 'b'], $indexInfo['fields']); static::assertTrue($indexInfo['unique']); static::assertTrue($indexInfo['sparse']); - static::assertEquals('mr-hash', $indexInfo['name']); + static::assertEquals('mr-persistent', $indexInfo['name']); } @@ -848,20 +848,18 @@ public function testGetIndexByName() { $result = $this->collectionHandler->createIndex( 'ArangoDB_PHP_TestSuite_IndexTestCollection' . '_' . static::$testsTimestamp, [ - 'type' => 'fulltext', + 'type' => 'persistent', 'name' => 'this-is-an-index', 'fields' => ['c'], - 'minLength' => 4, ] ); $indexInfo = $this->collectionHandler->getIndex('ArangoDB_PHP_TestSuite_IndexTestCollection' . '_' . static::$testsTimestamp, $result['id']); - static::assertEquals('fulltext', $indexInfo[CollectionHandler::OPTION_TYPE]); + static::assertEquals('persistent', $indexInfo[CollectionHandler::OPTION_TYPE]); static::assertEquals(['c'], $indexInfo['fields']); static::assertFalse($indexInfo['unique']); - static::assertTrue($indexInfo['sparse']); - static::assertEquals(4, $indexInfo['minLength']); + static::assertFalse($indexInfo['sparse']); static::assertEquals('this-is-an-index', $indexInfo['name']); } @@ -872,10 +870,9 @@ public function testDropIndexById() { $result = $this->collectionHandler->createIndex( 'ArangoDB_PHP_TestSuite_IndexTestCollection' . '_' . static::$testsTimestamp, [ - 'type' => 'fulltext', + 'type' => 'persistent', 'name' => 'this-is-an-index', 'fields' => ['c'], - 'minLength' => 4, ] ); @@ -891,10 +888,9 @@ public function testDropIndexByName() { $result = $this->collectionHandler->createIndex( 'ArangoDB_PHP_TestSuite_IndexTestCollection' . '_' . static::$testsTimestamp, [ - 'type' => 'fulltext', + 'type' => 'persistent', 'name' => 'this-is-an-index', 'fields' => ['c'], - 'minLength' => 4, ] ); @@ -960,6 +956,7 @@ public function testCreateGeo2Index() /** * Create a hash index and verify it by getting information about the index from the server + * @deprecated the "hash" index type is deprecated on the server side */ public function testCreateHashIndex() { @@ -994,6 +991,7 @@ public function testCreateHashIndex() /** * Create a sparse hash index and verify it by getting information about the index from the server + * @deprecated the "hash" index type is deprecated on the server side */ public function testCreateSparseHashIndex() { @@ -1029,6 +1027,7 @@ public function testCreateSparseHashIndex() /** * Create a fulltext index and verify it by getting information about the index from the server + * @deprecated the "fulltext" index type is deprecated from ArangoDB 3.10 onwards */ public function testCreateFulltextIndex() { @@ -1059,6 +1058,7 @@ public function testCreateFulltextIndex() /** * Create a skiplist index and verify it by getting information about the index from the server + * @deprecated the "skiplist" index type is deprecated on the server side */ public function testCreateSkipListIndex() { @@ -1091,6 +1091,7 @@ public function testCreateSkipListIndex() /** * Create a sparse skiplist index and verify it by getting information about the index from the server + * @deprecated the "skiplist" index type is deprecated on the server side */ public function testCreateSparseSkipListIndex() { @@ -1221,6 +1222,7 @@ public function testCreateTtlIndex() /** * Test creating an index and getting it to verify. + * @deprecated the "fulltext" index type is deprecated from ArangoDB 3.10 onwards */ public function testGetIndex() { @@ -1251,12 +1253,14 @@ public function testGetIndex() */ public function testCreateIndexInBackground() { - $result = $this->collectionHandler->createHashIndex( - 'ArangoDB_PHP_TestSuite_IndexTestCollection' . '_' . static::$testsTimestamp, - ['test'], - false, - false, - true + $result = $this->collectionHandler->createIndex( + 'ArangoDB_PHP_TestSuite_IndexTestCollection' . '_' . static::$testsTimestamp, [ + 'type' => 'persistent', + 'fields' => ['test'], + 'unique' => false, + 'sparse' => false, + 'inBackground' => true + ] ); $indices = $this->collectionHandler->getIndexes('ArangoDB_PHP_TestSuite_IndexTestCollection' . '_' . static::$testsTimestamp); @@ -1268,7 +1272,7 @@ public function testCreateIndexInBackground() $indexInfo = $indicesByIdentifiers[$result['id']]; static::assertEquals( - CollectionHandler::OPTION_HASH_INDEX, + CollectionHandler::OPTION_PERSISTENT_INDEX, $indexInfo[CollectionHandler::OPTION_TYPE] ); static::assertEquals(['test'], $indexInfo['fields']); diff --git a/tests/CollectionExtendedTest.php b/tests/CollectionExtendedTest.php index 844a0f00..b32f6556 100644 --- a/tests/CollectionExtendedTest.php +++ b/tests/CollectionExtendedTest.php @@ -2038,6 +2038,7 @@ public function testGetAll() /** * test for creation of a hash index + * @deprecated the "hash" index type is deprecated on the server side */ public function testCreateHashIndex() { @@ -2070,7 +2071,7 @@ public function testCreateHashIndex() /** * test for creation of a hash index, uniqueness violation */ - public function testCreateUniqueHashIndex() + public function testCreateUniquePersistentIndex() { // set up collections, indexes and test-documents $collectionHandler = $this->collectionHandler; @@ -2086,7 +2087,7 @@ public function testCreateUniqueHashIndex() $documentHandler->save($collection->getName(), $document2); try { - $collectionHandler->index($collection->getName(), 'hash', ['index'], true); + $collectionHandler->index($collection->getName(), 'persistent', ['index'], true); } catch (ServerException $e) { static::assertInstanceOf( ServerException::class, @@ -2105,6 +2106,7 @@ public function testCreateUniqueHashIndex() /** * test for creation of a skip-list indexed collection and querying by range (first level and nested), with closed, skip and limit options + * @deprecated the functionality is deprecated on the server side */ public function testCreateSkipListIndexedCollectionAddDocumentsAndQueryRange() @@ -2456,6 +2458,7 @@ public function testCreateGeoIndexedCollectionAddDocumentsAndQueryWithin() /** * test for creation of a fulltext indexed collection and querying by within, with distance, skip and limit options + * @deprecated the "fulltext" index type is deprecated from ArangoDB 3.10 onwards */ public function testCreateFulltextIndexedCollectionAddDocumentsAndQuery() { @@ -2491,6 +2494,7 @@ public function testCreateFulltextIndexedCollectionAddDocumentsAndQuery() /** * Test if we can create a full text index with options, on a collection + * @deprecated the "fulltext" index type is deprecated from ArangoDB 3.10 onwards */ public function testCreateFulltextIndexedCollectionWithOptions() {