Skip to content

Commit 9a8c0b6

Browse files
authored
Merge pull request #118 from dlubitz/neos-9
TASK: Neos 9 compatibility
2 parents 260394b + ac2ea3d commit 9a8c0b6

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

Classes/Domain/Model/Index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class Index
104104
* @param Client $client $client
105105
* @throws ElasticSearchException
106106
*/
107-
public function __construct(string $name, Client $client = null)
107+
public function __construct(string $name, ?Client $client = null)
108108
{
109109
$name = trim($name);
110110
if (empty($name) || strpos($name, '_') === 0) {
@@ -170,7 +170,7 @@ public function exists(): bool
170170
* @throws ElasticSearchException
171171
* @throws \Neos\Flow\Http\Exception
172172
*/
173-
public function request(string $method, string $path = null, array $arguments = [], $content = null, bool $prefixIndex = true): Response
173+
public function request(string $method, ?string $path = null, array $arguments = [], $content = null, bool $prefixIndex = true): Response
174174
{
175175
if ($this->client === null) {
176176
throw new ElasticSearchException('The client of the index "' . $this->prefixName() . '" is not set, hence no requests can be done.', 1566313883);

Classes/Indexer/Object/ObjectIndexer.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class ObjectIndexer
7878
* @param Client $client
7979
* @return void
8080
*/
81-
public function indexObject($object, $signalInformation = null, Client $client = null)
81+
public function indexObject($object, $signalInformation = null, ?Client $client = null)
8282
{
8383
$type = $this->getIndexTypeForObject($object, $client);
8484
if ($type === null) {
@@ -98,7 +98,7 @@ public function indexObject($object, $signalInformation = null, Client $client =
9898
* @param Client $client
9999
* @return GenericType
100100
*/
101-
protected function getIndexTypeForObject($object, Client $client = null)
101+
protected function getIndexTypeForObject($object, ?Client $client = null)
102102
{
103103
if ($client === null) {
104104
$client = $this->client;
@@ -144,7 +144,7 @@ protected function getIndexablePropertiesAndValuesFromObject($object)
144144
* @param Client $client
145145
* @return void
146146
*/
147-
public function removeObject($object, $signalInformation = null, Client $client = null)
147+
public function removeObject($object, $signalInformation = null, ?Client $client = null)
148148
{
149149
$type = $this->getIndexTypeForObject($object, $client);
150150
if ($type === null) {
@@ -162,7 +162,7 @@ public function removeObject($object, $signalInformation = null, Client $client
162162
* @param Client $client
163163
* @return string one of this' ACTION_TYPE_* constants or NULL if no action is required
164164
*/
165-
public function objectIndexActionRequired($object, Client $client = null)
165+
public function objectIndexActionRequired($object, ?Client $client = null)
166166
{
167167
$type = $this->getIndexTypeForObject($object, $client);
168168
if ($type === null) {

Classes/Transfer/Exception.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Exception extends ElasticSearchException
3939
* @param RequestInterface|null $request
4040
* @param \Exception|null $previous
4141
*/
42-
public function __construct($message, $code, ResponseInterface $response, RequestInterface $request = null, \Exception $previous = null)
42+
public function __construct($message, $code, ResponseInterface $response, ?RequestInterface $request = null, \Exception $previous = null)
4343
{
4444
$this->response = $response;
4545
$this->request = $request;

Classes/Transfer/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class Response
3737
* @throws Exception
3838
* @throws Exception\ApiException
3939
*/
40-
public function __construct(ResponseInterface $response, RequestInterface $request = null)
40+
public function __construct(ResponseInterface $response, ?RequestInterface $request = null)
4141
{
4242
$this->originalResponse = $response;
4343

Tests/Functional/Domain/DocumentTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function simpleDocumentDataProvider()
3737
* @dataProvider simpleDocumentDataProvider
3838
* @test
3939
*/
40-
public function idOfFreshNewDocumentIsPopulatedAfterStoring(array $data = null)
40+
public function idOfFreshNewDocumentIsPopulatedAfterStoring(?array $data = null)
4141
{
4242
$document = new Document(new TwitterType($this->testingIndex), $data);
4343
static::assertNull($document->getId());
@@ -49,7 +49,7 @@ public function idOfFreshNewDocumentIsPopulatedAfterStoring(array $data = null)
4949
* @dataProvider simpleDocumentDataProvider
5050
* @test
5151
*/
52-
public function versionOfFreshNewDocumentIsCreatedAfterStoringAndIncreasedAfterSubsequentStoring(array $data = null)
52+
public function versionOfFreshNewDocumentIsCreatedAfterStoringAndIncreasedAfterSubsequentStoring(?array $data = null)
5353
{
5454
$document = new Document(new TwitterType($this->testingIndex), $data);
5555
static::assertNull($document->getVersion());

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
"doctrine/annotations": "^1.0",
99
"doctrine/collections": "^1.0",
1010
"doctrine/orm": "^2.0",
11-
"neos/error-messages": "^6.0 || ^7.0 || ^8.0 || dev-master",
12-
"neos/flow": "^6.0 || ^7.0 || ^8.0 || dev-master",
13-
"neos/utility-arrays": "^6.0 || ^7.0 || ^8.0 || dev-master",
14-
"neos/utility-objecthandling": "^6.0 || ^7.0 || ^8.0 || dev-master"
11+
"neos/error-messages": "^7.3 || ^8.0 || ^9.0 || dev-master",
12+
"neos/flow": "^7.3 || ^8.0 || ^9.0 || dev-master",
13+
"neos/utility-arrays": "^7.3 || ^8.0 || ^9.0 || dev-master",
14+
"neos/utility-objecthandling": "^7.3 || ^8.0 || ^9.0 || dev-master"
1515
},
1616
"autoload": {
1717
"psr-4": {

0 commit comments

Comments
 (0)