WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit cedf414

Browse files
Add content-fields to admin list search (#719)
* add content-fields to admin list search * fix test-suites
1 parent 214ed11 commit cedf414

File tree

5 files changed

+20
-67
lines changed

5 files changed

+20
-67
lines changed

.circleci/config.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

.github/workflows/test-application.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
phpcr-transport: doctrinedbal
2828
dependency-versions: 'lowest'
2929
php-extensions: 'ctype, iconv, mysql, gd'
30-
tools: 'composer:v1'
30+
tools: 'composer:v2'
3131
env:
3232
SYMFONY_DEPRECATIONS_HELPER: disabled
3333
ELASTICSEARCH_HOST: '127.0.0.1:9200'
@@ -82,6 +82,19 @@ jobs:
8282
SYMFONY_DEPRECATIONS_HELPER: weak
8383
ELASTICSEARCH_HOST: '127.0.0.1:9200'
8484

85+
- php-version: '8.3'
86+
elasticsearch-version: '7.17.2'
87+
elasticsearch-package-constraint: '~7.17.0'
88+
phpcr-transport: doctrinedbal
89+
dependency-versions: 'highest'
90+
php-extensions: 'ctype, iconv, mysql, imagick'
91+
tools: 'composer:v2'
92+
phpstan: false
93+
env:
94+
SYMFONY_DEPRECATIONS_HELPER: weak
95+
ELASTICSEARCH_HOST: '127.0.0.1:9200'
96+
ARTICLE_TEST_CASE: extend
97+
8598
- php-version: '8.3'
8699
elasticsearch-version: '7.17.2'
87100
elasticsearch-package-constraint: '~7.17.0'

Controller/ArticleController.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,11 @@ protected function getFieldDescriptors(): array
214214
->setSearchField('route_path.value')
215215
->setSearchability(FieldDescriptor::SEARCHABILITY_YES)
216216
->build(),
217+
'contentFields' => ElasticSearchFieldDescriptor::create('contentFields')
218+
->setVisibility(FieldDescriptorInterface::VISIBILITY_NEVER)
219+
->setSearchField('content_fields')
220+
->setSearchability(FieldDescriptor::SEARCHABILITY_YES)
221+
->build(),
217222
];
218223
}
219224

Document/ArticlePageDocument.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ public function setRoute(RouteInterface $route)
237237
{
238238
$this->route = $route;
239239

240-
return $this;
240+
return $this; // @phpstan-ignore-line
241241
}
242242

243243
public function removeRoute(): RoutablePageBehavior

phpstan-baseline.neon

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -585,11 +585,6 @@ parameters:
585585
count: 1
586586
path: Document/ArticleDocument.php
587587

588-
-
589-
message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setRoute\\(\\) has no return type specified\\.$#"
590-
count: 1
591-
path: Document/ArticleDocument.php
592-
593588
-
594589
message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticleDocument\\:\\:setShadowLocale\\(\\) has no return type specified\\.$#"
595590
count: 1
@@ -700,11 +695,6 @@ parameters:
700695
count: 1
701696
path: Document/ArticlePageDocument.php
702697

703-
-
704-
message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageDocument\\:\\:setRoute\\(\\) has no return type specified\\.$#"
705-
count: 1
706-
path: Document/ArticlePageDocument.php
707-
708698
-
709699
message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\ArticlePageDocument\\:\\:setShadowLocale\\(\\) has no return type specified\\.$#"
710700
count: 1

0 commit comments

Comments
 (0)