Skip to content

Commit 13a875c

Browse files
committed
!!! TASK: Remove support for elasticsearch version 5
1 parent 3204d2d commit 13a875c

12 files changed

Lines changed: 32 additions & 40 deletions

File tree

.travis.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ addons:
99
- openjdk-8-jre-headless
1010
matrix:
1111
include:
12-
- php: 7.3
13-
env: ES=5
1412
- php: 7.3
1513
env: ES=6
1614
- php: 7.3
@@ -23,7 +21,6 @@ cache:
2321
before_install:
2422
- export NEOS_TARGET_VERSION=5.1
2523
- cd ..
26-
- if [ "$ES" = 5 ]; then wget --no-check-certificate https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.15.zip && unzip elasticsearch-5.6.15.zip && mv elasticsearch-5.6.15 elasticsearch; fi
2724
- if [ "$ES" = 6 ]; then wget --no-check-certificate https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.8.6.tar.gz && tar xvfz elasticsearch-6.8.6.tar.gz && mv elasticsearch-6.8.6 elasticsearch; fi
2825
- if [ "$ES" = 7 ]; then wget --no-check-certificate https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.5.2-linux-x86_64.tar.gz && tar xvfz elasticsearch-7.5.2-linux-x86_64.tar.gz && mv elasticsearch-7.5.2 elasticsearch; fi
2926
- cd elasticsearch
@@ -45,6 +42,5 @@ install:
4542
- cd neos-base-distribution
4643
script:
4744
- bin/phpunit --colors -c Build/BuildEssentials/PhpUnit/UnitTests.xml Packages/Application/Flowpack.ElasticSearch.ContentRepositoryAdaptor/Tests/Unit
48-
- if [ "$ES" = 5 ]; then FLOW_CONTEXT="Testing/ElasticVersion5" bin/phpunit --colors --stop-on-failure -c Build/BuildEssentials/PhpUnit/FunctionalTests.xml Packages/Application/Flowpack.ElasticSearch.ContentRepositoryAdaptor/Tests/Functional; fi
49-
- if [ "$ES" = 6 ]; then FLOW_CONTEXT="Testing/ElasticVersion5" bin/phpunit --colors --stop-on-failure -c Build/BuildEssentials/PhpUnit/FunctionalTests.xml Packages/Application/Flowpack.ElasticSearch.ContentRepositoryAdaptor/Tests/Functional; fi
50-
- if [ "$ES" = 7 ]; then FLOW_CONTEXT="Testing/ElasticVersion5" bin/phpunit --colors --stop-on-failure -c Build/BuildEssentials/PhpUnit/FunctionalTests.xml Packages/Application/Flowpack.ElasticSearch.ContentRepositoryAdaptor/Tests/Functional; fi
45+
- if [ "$ES" = 6 ]; then FLOW_CONTEXT="Testing/ElasticVersion6" bin/phpunit --colors --stop-on-failure -c Build/BuildEssentials/PhpUnit/FunctionalTests.xml Packages/Application/Flowpack.ElasticSearch.ContentRepositoryAdaptor/Tests/Functional; fi
46+
- if [ "$ES" = 7 ]; then FLOW_CONTEXT="Testing/ElasticVersion6" bin/phpunit --colors --stop-on-failure -c Build/BuildEssentials/PhpUnit/FunctionalTests.xml Packages/Application/Flowpack.ElasticSearch.ContentRepositoryAdaptor/Tests/Functional; fi

Classes/Driver/Version5/DocumentDriver.php renamed to Classes/Driver/Version6/DocumentDriver.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?php
2-
32
declare(strict_types=1);
43

5-
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version5;
4+
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version6;
65

76
/*
87
* This file is part of the Flowpack.ElasticSearch.ContentRepositoryAdaptor package.
@@ -25,7 +24,7 @@
2524
use Neos\Flow\Log\Utility\LogEnvironment;
2625

2726
/**
28-
* Document driver for Elasticsearch version 5.x
27+
* Document driver for Elasticsearch version 6.x
2928
*
3029
* @Flow\Scope("singleton")
3130
*/
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version5;
4+
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version6;
55

66
/*
77
* This file is part of the Flowpack.ElasticSearch.ContentRepositoryAdaptor package.
@@ -22,7 +22,7 @@
2222
use Neos\Flow\Annotations as Flow;
2323

2424
/**
25-
* Index management driver for Elasticsearch version 5.x
25+
* Index management driver for Elasticsearch version 6.x
2626
*
2727
* @Flow\Scope("singleton")
2828
*/
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version5;
4+
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version6;
55

66
/*
77
* This file is part of the Flowpack.ElasticSearch.ContentRepositoryAdaptor package.
@@ -22,7 +22,7 @@
2222
use Neos\Flow\Log\Utility\LogEnvironment;
2323

2424
/**
25-
* Indexer driver for Elasticsearch version 5.x
25+
* Indexer driver for Elasticsearch version 6.x
2626
*
2727
* @Flow\Scope("singleton")
2828
*/

Classes/Driver/Version5/Mapping/NodeTypeMappingBuilder.php renamed to Classes/Driver/Version6/Mapping/NodeTypeMappingBuilder.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version5\Mapping;
5+
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version6\Mapping;
66

77
/*
88
* This file is part of the Flowpack.ElasticSearch.ContentRepositoryAdaptor package.
@@ -50,7 +50,7 @@ public function initializeObject($cause): void
5050
parent::initializeObject($cause);
5151

5252
if ($cause === ObjectManagerInterface::INITIALIZATIONCAUSE_CREATED) {
53-
$this->migrateConfigurationForElasticVersion5($this->defaultConfigurationPerType);
53+
$this->migrateConfigurationForElasticVersion6($this->defaultConfigurationPerType);
5454
}
5555
}
5656

@@ -82,15 +82,15 @@ public function buildMappingInformation(Index $index): MappingCollection
8282
$fullConfiguration = $nodeType->getFullConfiguration();
8383
if (isset($fullConfiguration['search']['elasticSearchMapping'])) {
8484
$fullMapping = $fullConfiguration['search']['elasticSearchMapping'];
85-
$this->migrateConfigurationForElasticVersion5($fullMapping);
85+
$this->migrateConfigurationForElasticVersion6($fullMapping);
8686
$mapping->setFullMapping($fullMapping);
8787
}
8888

8989
foreach ($nodeType->getProperties() as $propertyName => $propertyConfiguration) {
9090
if (isset($propertyConfiguration['search']['elasticSearchMapping'])) {
9191
if (is_array($propertyConfiguration['search']['elasticSearchMapping'])) {
9292
$propertyMapping = $propertyConfiguration['search']['elasticSearchMapping'];
93-
$this->migrateConfigurationForElasticVersion5($propertyMapping);
93+
$this->migrateConfigurationForElasticVersion6($propertyMapping);
9494
$mapping->setPropertyByPath($propertyName, $propertyMapping);
9595
}
9696
} elseif (isset($propertyConfiguration['type'], $this->defaultConfigurationPerType[$propertyConfiguration['type']]['elasticSearchMapping'])) {
@@ -112,7 +112,7 @@ public function buildMappingInformation(Index $index): MappingCollection
112112
* @param array $mapping
113113
* @return void
114114
*/
115-
protected function migrateConfigurationForElasticVersion5(array &$mapping): void
115+
protected function migrateConfigurationForElasticVersion6(array &$mapping): void
116116
{
117117
$this->adjustStringTypeMapping($mapping);
118118
}

Classes/Driver/Version5/Query/FilteredQuery.php renamed to Classes/Driver/Version6/Query/FilteredQuery.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?php
2-
32
declare(strict_types=1);
43

5-
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version5\Query;
4+
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version6\Query;
65

76
/*
87
* This file is part of the Flowpack.ElasticSearch.ContentRepositoryAdaptor package.
@@ -18,7 +17,7 @@
1817
use Flowpack\ElasticSearch\ContentRepositoryAdaptor\Exception\QueryBuildingException;
1918

2019
/**
21-
* Filtered query for elastic version 5
20+
* Filtered query for Elasticsearch version 6.x
2221
*/
2322
class FilteredQuery extends AbstractQuery
2423
{

Classes/Driver/Version5/Query/FunctionScoreQuery.php renamed to Classes/Driver/Version6/Query/FunctionScoreQuery.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?php
2-
32
declare(strict_types=1);
43

5-
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version5\Query;
4+
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version6\Query;
65

76
/*
87
* This file is part of the Flowpack.ElasticSearch.ContentRepositoryAdaptor package.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
declare(strict_types=1);
33

4-
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version5;
4+
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version6;
55

66
/*
77
* This file is part of the Flowpack.ElasticSearch.ContentRepositoryAdaptor package.
@@ -19,7 +19,7 @@
1919
use Neos\Flow\Annotations as Flow;
2020

2121
/**
22-
* Request driver for Elasticsearch version 5.x
22+
* Request driver for Elasticsearch version 6.x
2323
*
2424
* @Flow\Scope("singleton")
2525
*/
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?php
2-
32
declare(strict_types=1);
43

5-
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version5;
4+
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version6;
65

76
/*
87
* This file is part of the Flowpack.ElasticSearch.ContentRepositoryAdaptor package.
@@ -19,7 +18,7 @@
1918
use Neos\Flow\Annotations as Flow;
2019

2120
/**
22-
* System driver for Elasticsearch version 5.x
21+
* System driver for Elasticsearch version 6.x
2322
*
2423
* @Flow\Scope("singleton")
2524
*/

Configuration/Settings.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Flowpack:
22
ElasticSearch:
33
ContentRepositoryAdaptor:
44
command:
5-
useSubProcesses: true
5+
useSubProcesses: false
66
indexing:
77
batchSize:
88
elements: 500
@@ -12,11 +12,11 @@ Flowpack:
1212
'*':
1313
indexed: true
1414
driver:
15-
version: '5.x'
15+
version: '6.x'
1616
mapping:
17-
5.x:
17+
6.x:
1818
query:
19-
className: Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version5\Query\FilteredQuery
19+
className: Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version6\Query\FilteredQuery
2020
arguments:
2121
request:
2222
query:
@@ -49,14 +49,14 @@ Flowpack:
4949
- 'aggregations'
5050
- 'suggest'
5151
document:
52-
className: 'Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version5\DocumentDriver'
52+
className: 'Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version6\DocumentDriver'
5353
indexer:
54-
className: 'Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version5\IndexerDriver'
54+
className: 'Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version6\IndexerDriver'
5555
indexManagement:
56-
className: 'Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version5\IndexDriver'
56+
className: 'Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version6\IndexDriver'
5757
request:
58-
className: 'Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version5\RequestDriver'
58+
className: 'Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version6\RequestDriver'
5959
system:
60-
className: 'Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version5\SystemDriver'
60+
className: 'Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version6\SystemDriver'
6161
nodeTypeMappingBuilder:
62-
className: 'Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version5\Mapping\NodeTypeMappingBuilder'
62+
className: 'Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version6\Mapping\NodeTypeMappingBuilder'

0 commit comments

Comments
 (0)