Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect webspaces when calculating the maximum number of sitemap pages #642

Merged
merged 2 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Sitemap/ArticleSitemapProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ public function getMaxPage($schema, $host)
$webspaceQuery->add(new TermQuery('additional_webspaces', $webspaceKey), BoolQuery::SHOULD);
}

$search->addQuery($webspaceQuery);

return \ceil($repository->count($search) / static::PAGE_SIZE);
}

Expand Down
60 changes: 5 additions & 55 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,11 @@ parameters:
count: 1
path: Builder/ArticleIndexBuilder.php

-
message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Command\\\\ArticleExportCommand\\:\\:configure\\(\\) has no return type specified\\.$#"
count: 1
path: Command/ArticleExportCommand.php

-
message: "#^Strict comparison using \\=\\=\\= between 0 and bool will always evaluate to false\\.$#"
count: 1
path: Command/ArticleExportCommand.php

-
message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Command\\\\ArticleImportCommand\\:\\:configure\\(\\) has no return type specified\\.$#"
count: 1
path: Command/ArticleImportCommand.php

-
message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Command\\\\ArticleImportCommand\\:\\:printExceptions\\(\\) has no return type specified\\.$#"
count: 1
Expand All @@ -70,11 +60,6 @@ parameters:
count: 1
path: Command/ArticleImportCommand.php

-
message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Command\\\\ReindexCommand\\:\\:configure\\(\\) has no return type specified\\.$#"
count: 1
path: Command/ReindexCommand.php

-
message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Command\\\\ReindexCommand\\:\\:getDocuments\\(\\) should return Sulu\\\\Component\\\\DocumentManager\\\\Collection\\\\QueryResultCollection but returns mixed\\.$#"
count: 1
Expand Down Expand Up @@ -535,21 +520,6 @@ parameters:
count: 1
path: Controller/WebsiteArticleController.php

-
message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\DependencyInjection\\\\ConverterCompilerPass\\:\\:process\\(\\) has no return type specified\\.$#"
count: 1
path: DependencyInjection/ConverterCompilerPass.php

-
message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\DependencyInjection\\\\RouteEnhancerCompilerPass\\:\\:process\\(\\) has no return type specified\\.$#"
count: 1
path: DependencyInjection/RouteEnhancerCompilerPass.php

-
message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\DependencyInjection\\\\StructureValidatorCompilerPass\\:\\:process\\(\\) has no return type specified\\.$#"
count: 1
path: DependencyInjection/StructureValidatorCompilerPass.php

-
message: "#^Negated boolean expression is always true\\.$#"
count: 1
Expand Down Expand Up @@ -590,11 +560,6 @@ parameters:
count: 1
path: DependencyInjection/SuluArticleExtension.php

-
message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\DependencyInjection\\\\SuluArticleExtension\\:\\:prepend\\(\\) has no return type specified\\.$#"
count: 1
path: DependencyInjection/SuluArticleExtension.php

-
message: "#^Offset 'article' on array\\{snippet\\: string\\} in isset\\(\\) does not exist\\.$#"
count: 1
Expand Down Expand Up @@ -960,21 +925,11 @@ parameters:
count: 1
path: Document/Form/ArticleDocumentType.php

-
message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Form\\\\ArticleDocumentType\\:\\:configureOptions\\(\\) has no return type specified\\.$#"
count: 1
path: Document/Form/ArticleDocumentType.php

-
message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Form\\\\ArticlePageDocumentType\\:\\:buildForm\\(\\) has no return type specified\\.$#"
count: 1
path: Document/Form/ArticlePageDocumentType.php

-
message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Form\\\\ArticlePageDocumentType\\:\\:configureOptions\\(\\) has no return type specified\\.$#"
count: 1
path: Document/Form/ArticlePageDocumentType.php

-
message: "#^Cannot access offset 'structure' on mixed\\.$#"
count: 2
Expand All @@ -995,11 +950,6 @@ parameters:
count: 1
path: Document/Form/Listener/DataNormalizer.php

-
message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Form\\\\UnstructuredType\\:\\:configureOptions\\(\\) has no return type specified\\.$#"
count: 1
path: Document/Form/UnstructuredType.php

-
message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\Document\\\\Index\\\\ArticleGhostIndexer\\:\\:__construct\\(\\) has parameter \\$typeConfiguration with no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -1690,6 +1640,11 @@ parameters:
count: 1
path: Document/Subscriber/ArticleSubscriber.php

-
message: "#^Cannot access offset int\\<0, max\\> on mixed\\.$#"
count: 1
path: Document/Subscriber/ArticleSubscriber.php

-
message: "#^Cannot call method getIdentifier\\(\\) on mixed\\.$#"
count: 1
Expand Down Expand Up @@ -2510,11 +2465,6 @@ parameters:
count: 1
path: Sitemap/ArticleSitemapProvider.php

-
message: "#^Method Sulu\\\\Bundle\\\\ArticleBundle\\\\SuluArticleBundle\\:\\:build\\(\\) has no return type specified\\.$#"
count: 1
path: SuluArticleBundle.php

-
message: "#^Cannot call method getExcerpt\\(\\) on mixed\\.$#"
count: 1
Expand Down
Loading